BobMe

ImageGui

Oct 22nd, 2020 (edited)
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. --local owner = game.Players:WaitForChild("Memo1332")
  2. local siz = 8
  3. Instance.new("Folder",workspace).Name = "Paintinggg"
  4. local function bop(g)
  5. local folder = workspace:FindFirstChild("Paintinggg")
  6. if folder == nil then folder = Instance.new("Folder",workspace) folder.Name = "Paintinggg" end
  7. local cf = owner.Character.Head.CFrame
  8. local x = #g[1]
  9. local y = #g
  10. local sizex = siz
  11. local sizey = sizex*(y/x)
  12. local pa = Instance.new("Part",folder)
  13. pa.Locked = true
  14. local delac = {}
  15. pa.Anchored = true
  16. pa.Size = Vector3.new(sizex,sizey,0.5)
  17. pa.CFrame = cf * CFrame.new(0,sizey/2,0)
  18. pa.Material = Enum.Material.SmoothPlastic
  19. local sc = Instance.new("SurfaceGui",pa)
  20. sc.LightInfluence = 0
  21. sc.SizingMode = Enum.SurfaceGuiSizingMode.FixedSize
  22. sc.CanvasSize = Vector2.new(x,y)
  23. local clon = Instance.new("Frame")
  24. clon.Size = UDim2.new(0,1,0,1)
  25. clon.BorderSizePixel = 0
  26. print(x,y)
  27. for i,v in pairs(g) do
  28. local fold = Instance.new("Folder")
  29. local fr = clon:Clone()
  30. fr.Parent = fold
  31. fr.Size = UDim2.new(0,x,0,1)
  32. fr.Position = UDim2.new(0,0,0,i-1)
  33. table.insert(delac,fold)
  34. for ii=1,#v do
  35. local vv = v[(#v-ii)+1]
  36. vv = v[ii]
  37. --[[local part = Instance.new("FlagStand",folder)
  38. part.TouchInterest:Destroy()
  39. part.Size = Vector3.new(size,size,size)
  40. part.Material = Enum.Material.SmoothPlastic
  41. part.Color = Color3.fromRGB(vv[1],vv[2],vv[3])
  42. part.CFrame = cf * CFrame.new(math.floor((x*size)/2)-((ii-1)*size),(math.floor((y*size)/2)-((i-1)*size)+(owner.Character.Head.Size.Y*1.5)+((y*size)/2)),0)
  43. part.Anchored = true
  44. ]]
  45. local clo = clon:Clone()
  46. clo.Parent = fr
  47. clo.Position = UDim2.new(0,ii-1,0,0)
  48. clo.BackgroundColor3 = Color3.fromRGB(vv[1],vv[2],vv[3])
  49. end
  50. wait()
  51. end
  52. for i,v in pairs(delac) do
  53. v.Parent = sc
  54. if i%2 == 1 then
  55. wait(1/y)
  56. end
  57. end
  58. end
  59. owner.Chatted:Connect(function(msg)
  60. if string.lower(string.sub(msg,1,7)) == ";image " then
  61. local http = game:GetService("HttpService")
  62. local js = http:GetAsync(string.sub(msg,8))
  63. bop(http:JSONDecode(js))
  64. elseif string.lower(string.sub(msg,1,9)) == ";setsize " then
  65. siz = tonumber(string.sub(msg,10))
  66. elseif string.lower(msg) == ";clr" then
  67. if workspace:FindFirstChild("Paintinggg") ~= nil then
  68. workspace:FindFirstChild("Paintinggg"):ClearAllChildren()
  69. end
  70. end
  71. end)
Add Comment
Please, Sign In to add comment