urabigfatnoob

spphhheerrreeeeee

Nov 21st, 2016
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.63 KB | None | 0 0
  1. terrain = workspace.Terrain
  2. renderstepped = game:GetService('RunService').RenderStepped
  3. spheremodel = Instance.new('Model',terrain)
  4. spheremodel.Name = 'Sphere'
  5. part = Instance.new('Part')
  6. part.Anchored = true
  7. part.CanCollide = true
  8. size = 50
  9. part.Size = Vector3.new(size/10,size,size/10)
  10. part.Material = Enum.Material.Neon
  11. part.Transparency = .925
  12. part.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  13. part.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  14. part.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  15. part.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  16. part.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  17. part.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  18. part.BrickColor = BrickColor.White()
  19.  
  20. ballCFrame = CFrame.new(15,15,15)
  21.  
  22. local diameter = size
  23. local circ = math.pi*diameter
  24. local n = circ/(size/10)
  25. local rot = 360/n
  26.  
  27. for x = 0,n/2 do
  28. renderstepped = game:GetService('RunService').RenderStepped:wait()
  29. for i = 0,n/2 do
  30. renderstepped = game:GetService('RunService').RenderStepped:wait()
  31. local clone = part:Clone()
  32. clone.BrickColor = BrickColor.new(math.random(),math.random(),math.random())
  33. clone.Parent = spheremodel
  34. clone.CFrame = CFrame.new(20,20,20)*CFrame.Angles(math.rad(i*rot),0,math.rad(x*rot))
  35. end
  36. end
  37. wait(1)
  38. all,last = {}
  39. function scan(p)
  40. for i,v in pairs(p:GetChildren()) do
  41. if (v:IsA("BasePart")) then
  42. if (last) then
  43. local w = Instance.new("Weld")
  44. w.Part0,w.Part1 = last,v
  45. w.C0 = v.CFrame:toObjectSpace(last.CFrame):inverse()
  46. w.Parent = last
  47. end
  48. table.insert(all,v)
  49. last = v
  50. end
  51. scan(v)
  52. v.Anchored = false
  53. end
  54. end
  55. scan(spheremodel)
Advertisement
Add Comment
Please, Sign In to add comment