Advertisement
cat568

Untitled

Mar 16th, 2019
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3. local env = getfenv(func)
  4. local newenv = setmetatable({},{
  5. __index = function(self,k)
  6. if k=="script" then
  7. return var
  8. else
  9. return env[k]
  10. end
  11. end,
  12. })
  13. setfenv(func,newenv)
  14. return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18.  
  19. Part0 = Instance.new("Part")
  20. VectorForce1 = Instance.new("VectorForce")
  21. Script2 = Instance.new("Script")
  22. Part0.Parent = mas
  23. Part0.CFrame = CFrame.new(3.5, 2.5, -3.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  24. Part0.Position = Vector3.new(3.5, 2.5, -3.5)
  25. Part0.Size = Vector3.new(5, 5, 5)
  26. Part0.Anchored = true
  27. Part0.BottomSurface = Enum.SurfaceType.Smooth
  28. Part0.TopSurface = Enum.SurfaceType.Smooth
  29. Attachment0 = Instance.new("Attachment",Part0)
  30. Attachment0.Orientation = Vector3.new(0,-90,0)
  31. Attachment0.Position = Vector3.new(0,0.25,2.5)
  32. VectorForce1.Parent = Part0
  33. VectorForce1.Attachment0 = Attachment0
  34. VectorForce1.Force = Vector3.new(100000, 0, 0)
  35.  
  36.  
  37. Script2.Parent = Part0
  38. table.insert(cors,sandbox(Script2,function()
  39. while true do
  40. wait(.1)
  41. local a = script.Parent:clone()
  42. a.Parent = workspace
  43. a.Script:remove()
  44. a.Anchored = false
  45.  
  46. script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0,.1,0)
  47. end
  48. end))
  49. for i,v in pairs(mas:GetChildren()) do
  50. v.Parent = workspace
  51. pcall(function() v:MakeJoints() end)
  52. end
  53. mas:Destroy()
  54. for i,v in pairs(cors) do
  55. spawn(function()
  56. pcall(v)
  57. end)
  58. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement