Advertisement
dasdasdasdawdawda

orb2

Jul 6th, 2015
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local Module = {}
  2.  
  3. local player = game:GetService("Players").Y4KUSA
  4. player.Character:WaitForChild("Humanoid")
  5.  
  6. local folder = Instance.new("Folder", game:GetService("Workspace"))
  7. folder.Name = "Y4KUSA's Orb"
  8.  
  9. local light = Instance.new("SurfaceLight")
  10.  
  11. local function bright()
  12. light.Parent = Orb
  13. light.Brightness = 10
  14. light.BrickColor.new = BrickColor.new(255,0,0)
  15. light.Face = "Top"
  16. end
  17.  
  18. local part = Instance.new("Part")
  19.  
  20. local function res()
  21. part.Parent = folder
  22. part.Shape = "Ball"
  23. part.FormFactor = "Custom"
  24. part.Size = Vector3.new(1,1,1)
  25. part.Name = "Orb"
  26. part.Anchored = true
  27. part.Locked = true
  28. part.CanCollide = false
  29. part.BottomSurface = "Smooth"
  30. part.TopSurface = "Smooth"
  31. part.BrickColor = BrickColor.Black()
  32. end
  33.  
  34. res()
  35.  
  36. game:GetService("Workspace").DescendantRemoving:connect(function(v)
  37. if v == folder then
  38. folder = Instance.new("Folder")
  39. folder.Name = "Y4KUSA's Orb"
  40. part = Instance.new("Part")
  41. folder.Parent = game:GetService("Workspace")
  42. res()
  43. end
  44. end)
  45.  
  46. local point
  47.  
  48. local loop = coroutine.create(function()
  49. while true do
  50. for i=1,360,4 do
  51. if player.Character and not point then
  52. point = player.Character:FindFirstChild("Torso")
  53. end
  54. if point.Parent.Name == player.Character.Name then
  55. point = player.Character:FindFirstChild("Torso")
  56. end
  57. if part then
  58. part.CFrame = CFrame.new(point.CFrame.p) *CFrame.fromEulerAnglesXYZ(-math.sin(math.rad(i)),math.rad(i),0) *CFrame.new(0,7,-5)end
  59. wait()
  60. end
  61. end
  62. end)
  63.  
  64.  
  65.  
  66. local function trailPar()
  67. local pos = part.CFrame.p
  68. wait()
  69. local pos2 = part.CFrame.p
  70. local dist = (pos - pos2).magnitude
  71. local trail = Instance.new("Part")
  72. trail.Anchored = true
  73. trail.Locked = true
  74. trail.CanCollide = false
  75. trail.BottomSurface = "Smooth"
  76. trail.TopSurface = "Smooth"
  77. trail.Shape = "Block"
  78. trail.FormFactor = "Custom"
  79. trail.Size = Vector3.new(0.1,0.1,dist)
  80. trail.CFrame = CFrame.new(pos,pos2) *CFrame.new(0,0,-dist/2)
  81. trail.Parent = folder
  82. game:GetService("Debris"):AddItem(trail,2)
  83. return trail
  84. end
  85.  
  86. local trail = coroutine.create(function()
  87. while true do
  88. for i=1,20,1 do
  89. local trail = trailPar()
  90. trail.Size = trail.Size + Vector3.new(i/20,i/20,0)
  91. trail.Transparency = i/10
  92. trail.BrickColor = BrickColor.Red()
  93. end
  94. for i=20,1,-1 do
  95. local trail = trailPar()
  96. trail.Size = trail.Size + Vector3.new(i/20,i/20,0)
  97. trail.Transparency = i/20
  98. trail.BrickColor = BrickColor.Black()
  99. end
  100. for i=1,10,1 do
  101. local trail = trailPar()
  102. trail.Size = trail.Size + Vector3.new(i/10,i/10,0)
  103. trail.Transparency = i/10
  104. trail.BrickColor = BrickColor.Red()
  105. end
  106. for i=10,1,-1 do
  107. local trail = trailPar()
  108. trail.Size = trail.Size + Vector3.new(i/10,i/10,0)
  109. trail.Transparency = i/10
  110. trail.BrickColor = BrickColor.Black()
  111. end
  112. end
  113. end)
  114.  
  115.  
  116. coroutine.resume(loop)
  117. coroutine.resume(trail)
  118.  
  119.  
  120. return Module
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement