Advertisement
BobMe

PenthingGlobal

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