awzp

Giant Red Ball

May 25th, 2018
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1.  
  2.  
  3. local ball = Instance.new("Model",workspace)
  4. workspace.Base:remove()
  5. y = 0
  6. thing = 200
  7. main = CFrame.new(0,thing/4,0) * CFrame.Angles(0,y,0)
  8. go = 0.235
  9.  
  10. local col = 0
  11.  
  12. function circle()
  13. for i=0,math.pi*2,go do
  14. local p = Instance.new("Part",ball)
  15. p.formFactor = "Custom"
  16. p.Size = Vector3.new(thing/4,thing/4,5)
  17. p.Anchored = true
  18. p.TopSurface = 0
  19. p.BottomSurface = 0
  20. p.Elasticity = 1
  21. p.Friction = 0
  22. p.BrickColor = BrickColor.new(Color3.new(col,0,0))
  23. p.CFrame = main * CFrame.Angles(i,0,0) * CFrame.new(0,0,thing)
  24. col = col + 0.08
  25. if col >= 1 then
  26. col = 0
  27. end
  28. end
  29. end
  30.  
  31. function yes(path)
  32. if path:IsA("BasePart") then
  33. path.Friction = 0
  34. path.Elasticity = 1
  35. local bf = Instance.new("BodyForce",path)
  36. bf.force = Vector3.new(0,path:GetMass()*196.3,0)
  37. coroutine.resume(coroutine.create(function()
  38. while true do
  39. wait(4)
  40. path.RotVelocity = Vector3.new(math.random(-80,80),math.random(-80,80),math.random(-80,80))
  41. wait(0.5)
  42. path.Velocity = path.CFrame.lookVector * 500
  43. end
  44. end))
  45. end
  46. local h = path:findFirstChild("Humanoid")
  47. if h ~= nil then
  48. h.Sit = true
  49. h.Changed:connect(function(prop)
  50. h.Sit = true
  51. end)
  52. end
  53. for _,v in pairs(path:children()) do
  54. yes(v)
  55. end
  56. end
  57.  
  58. yes(workspace)
  59.  
  60. repeat
  61. circle()
  62. y = y + go
  63. main = main * CFrame.Angles(0,go,0)
  64. until y >= math.pi
Add Comment
Please, Sign In to add comment