BobMe

DrawS

Aug 22nd, 2020 (edited)
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. wait(1)
  2. local player = owner
  3. local memory = nil
  4. local color = Color3.fromRGB(145,145,145)
  5. while player:FindFirstChild("lud") ~= nil do
  6. player:FindFirstChild("lud"):Destroy()
  7. end
  8. local lud = player:FindFirstChild("lud")
  9. if lud == nil then
  10. lud = Instance.new("RemoteEvent",player)
  11. end
  12. lud.Name = "lud"
  13.  
  14. function cloneArray(array)
  15. local ar = {}
  16. for i=1,#array do
  17. table.insert(ar,array[i])
  18. end
  19. return ar
  20. end
  21.  
  22. player.Chatted:Connect(function(msg)
  23. if string.sub(msg:lower(),1,7) == ";color " then
  24. local tab = string.split(string.sub(msg:lower(),8)," ")
  25. local r,g,b = tab[1],tab[2],tab[3]
  26. if r ~= nil and g ~= nil and b ~= nil then
  27. color = Color3.fromRGB(r,g,b)
  28. end
  29. end
  30. end)
  31.  
  32. lud.OnServerEvent:Connect(function(plr,tab)
  33. memory = cloneArray(tab)
  34. local g = workspace:FindFirstChild("FolderOfDraw"..tostring(player.Name))
  35. if g == nil then
  36. g = Instance.new("Folder",workspace)
  37. g.Name = "FolderOfDraw"..tostring(player.Name)
  38. end
  39. g:ClearAllChildren()
  40. for i,v in pairs(tab) do
  41. local cframe = v[1]
  42. local size = v[2]
  43. local shape = v[3]
  44. local tem = Instance.new("FlagStand")
  45. --tem.Shape = shape
  46. tem.Anchored = true
  47. tem.Size = size
  48. tem.Material = Enum.Material.Neon
  49. tem.Color = color
  50. tem.CanCollide = false
  51. tem.CFrame = cframe
  52. tem.Parent = workspace:FindFirstChild("FolderOfDraw"..tostring(player.Name))
  53. tem.TouchInterest:Destroy()
  54. end
  55. end)
  56.  
  57. while wait(2) do
  58. local g = workspace:FindFirstChild("FolderOfDraw"..tostring(player.Name))
  59. if g == nil and memory ~= nil then
  60. Instance.new("Folder",workspace).Name = "FolderOfDraw"..tostring(player.Name)
  61. for i,v in pairs(memory) do
  62. local cframe = v[1]
  63. local size = v[2]
  64. local shape = v[3]
  65. local tem = Instance.new("FlagStand")
  66. --tem.Shape = shape
  67. tem.Anchored = true
  68. tem.Size = size
  69. tem.Material = Enum.Material.Neon
  70. tem.Color = color
  71. tem.CanCollide = false
  72. tem.CFrame = cframe
  73. tem.Parent = workspace:FindFirstChild("FolderOfDraw"..tostring(player.Name))
  74. tem.TouchInterest:Destroy()
  75. end
  76. end
  77. end
Add Comment
Please, Sign In to add comment