fork download
  1. local PossibleImages = {146657891}
  2. local MaxImages = 4
  3.  
  4.  
  5. function GetImage()
  6. return "http://w...content-available-to-author-only...x.com/asset/?id="..PossibleImages[math.random(1, #PossibleImages)]
  7. end
  8.  
  9. function CreateImage(img, x)
  10. local new = Instance.new("ImageLabel")
  11. new.Image = img
  12. new.Position = UDim2.new(0.2 * x, 0, 0.5, 0)
  13. new.Size = UDim2.new(0, 200, 0, 280)
  14. new.Parent = script.Parent.Holder.PremPackOpen -- somewhere in PlayerGui
  15. end
  16.  
  17. button = script.Parent.Holder.GPackUI.PremiumGP
  18.  
  19. button.MouseButton1Down:connect(function()
  20. button.Visible = false
  21. for i = 1, MaxImages do
  22. local img = GetImage()
  23. CreateImage(img, i)
  24. end
  25. end)
  26.  
  27. -- your code goes here
Runtime error #stdin #stdout #stderr 0.01s 2536KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
lua: prog.lua:17: attempt to index global 'script' (a nil value)
stack traceback:
	prog.lua:17: in main chunk
	[C]: ?