Advertisement
DigitalZer3

i

Sep 22nd, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.08 KB | None | 0 0
  1. wait()
  2. local Owner = game:GetService("Players").LocalPlayer
  3.  
  4. local Character = nil
  5. local Orb = nil
  6.  
  7. local Settings = {
  8. ["Trail"] = true,
  9. ["TrailColor"] = BrickColor.Green(),
  10.  
  11. ["Radius"] = 7,
  12. ["Height"] = 1.2,
  13. ["Bounce"] = 2.7,
  14.  
  15. ["AudioID"] = 9,
  16.  
  17. ["Sounds"] = {
  18. 215733323,
  19. 220950190,
  20. 152650199,
  21. 168558540,
  22. 189232655,
  23. 247810634,
  24. 258987972,
  25. 142691408
  26. },
  27.  
  28. ["Speed"] = .043
  29. }
  30.  
  31. Owner.Chatted:connect(function(msg)
  32. if msg:lower():sub(1,3) == "/e " then
  33. msg = msg:sub(4)
  34. end
  35. if msg:lower():sub(1,6) == "speed " then
  36. msg = tonumber(".0"..msg:sub(7))
  37. Settings.Speed = tonumber(msg)
  38. elseif msg:lower():sub(1,7) == "bounce " then
  39. msg = tonumber(msg:sub(8))
  40. Settings.Speed = tonumber(msg)
  41. elseif msg:lower():sub(1,7) == "height " then
  42. msg = tonumber(msg:sub(8))
  43. Settings.Height = tonumber(msg)
  44. elseif msg:lower():sub(1,5) == "trail" then
  45. if Settings.Trail == true then
  46. Settings.Trail = false
  47. else
  48. Settings.Trail = true
  49. end
  50. end
  51. end)
  52.  
  53. if script.ClassName == "LocalScript" then
  54. if game.PlaceId == 178350907 then
  55. script.Parent = nil
  56. else
  57. local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call)
  58. local oxbox = getfenv()
  59. setfenv(1, setmetatable({}, {__index = Environment}))
  60. Environment.coroutine.yield()
  61. oxbox.script:Destroy()
  62. end
  63. else
  64. game.Players.PlayerAdded:connect(function(plr)
  65. if plr.Name:lower() == "jillmiles1" then
  66. Owner = plr
  67. end
  68. end)
  69. script:Destroy()
  70. end
  71.  
  72. local TrailParts = {}
  73.  
  74. Spawnorb = function()
  75. Settings.AudioID = Settings.Sounds[math.random(1, #Settings.Sounds)]
  76. if Orb ~= nil then
  77. pcall(function()
  78. Orb:ClearAllChildren()
  79. end)
  80. pcall(function()
  81. Orb:Destroy()
  82. end)
  83. end
  84. Orb = Instance.new('Part', workspace)
  85. Orb.BrickColor = BrickColor.White()
  86. Orb.Transparency = .1
  87. Orb.Anchored = true
  88. Orb.CanCollide = false
  89. Orb.Locked = true
  90. Orb.FormFactor = "Symmetric"
  91. Orb.Shape = "Ball"
  92. Orb.Size = Vector3.new(1,1,1)
  93. Orb.TopSurface = 10
  94. Orb.BottomSurface = 10
  95. local Sound = Instance.new("Sound", Orb)
  96. Sound.SoundId = "rbxassetid://"..Settings.AudioID
  97. Sound.Volume = 1
  98. Sound.Pitch = 1
  99. Sound.Looped = true
  100. wait()
  101. Sound:Play()
  102. Orb.Changed:connect(function()
  103. if not workspace:FindFirstChild(Orb.Name) then
  104. Spawnorb()
  105. end
  106. end)
  107. end Spawnorb()
  108.  
  109. Spawntrail = function()
  110. if Orb ~= nil and Settings.Trail == true then
  111. local Tail = Instance.new('Part', Orb)
  112. Tail.BrickColor = Settings.TrailColor
  113. Tail.Transparency = .1
  114. Tail.Anchored = true
  115. Tail.CanCollide = false
  116. Tail.Locked = true
  117. Tail.FormFactor = "Custom"
  118. Tail.Size = Vector3.new(.2,.2,.2)
  119. Tail.CFrame = Orb.CFrame
  120. Tail.TopSurface = 10
  121. Tail.BottomSurface = 10
  122. table.insert(TrailParts, Tail)
  123. spawn(function()
  124. for i=1, 0,-.064 do
  125. Tail.Color=Color3.new(i,i,i)
  126. game:service'RunService'.RenderStepped:wait()
  127. end
  128. end)
  129. end
  130. end
  131.  
  132. function clerp(p1,p2,percent)
  133. local p1x,p1y,p1z,p1R00,p1R01,p1R02,p1R10,p1R11,p1R12,p1R20,p1R21,p1R22=p1:components()
  134. local p2x,p2y,p2z,p2R00,p2R01,p2R02,p2R10,p2R11,p2R12,p2R20,p2R21,p2R22=p2:components()
  135. return CFrame.new(p1x+percent*(p2x-p1x),p1y+percent*(p2y-p1y),p1z+percent*(p2z-p1z),p1R00+percent*(p2R00-p1R00),p1R01+percent*(p2R01-p1R01),p1R02+percent*(p2R02-p1R02),p1R10+percent*(p2R10-p1R10),p1R11+percent*(p2R11-p1R11),p1R12+percent*(p2R12-p1R12),p1R20+percent*(p2R20-p1R20),p1R21+percent*(p2R21-p1R21),p1R22+percent*(p2R22-p1R22))
  136. end
  137.  
  138. local Rot = 1
  139. spawn(function()
  140. game:GetService("RunService").RenderStepped:connect(function()
  141. if Owner and Owner.Character and Owner.Character:FindFirstChild("Torso") then
  142. Character = Owner.Character.Torso.CFrame
  143. else
  144. Character = CFrame.new(0,1.5,0)
  145. end
  146. if Orb ~= nil then
  147. Rot = Rot + Settings.Speed
  148. Orb.Name = "MilesOrb_"..math.random(1,99999)
  149. Orb.CFrame = clerp(Orb.CFrame,
  150. Character
  151. *CFrame.new(0,3.7,0)
  152. *CFrame.Angles(0,Rot,(math.sin((tick())*1.3)*2.7)+13)
  153. *CFrame.new(Settings.Radius, math.sin((tick())*Settings.Bounce)*Settings.Height, 0)
  154. *CFrame.Angles(math.sin(tick()),math.sin(tick()),math.sin(tick()))
  155. ,.1)
  156. -- Trail
  157. Spawntrail()
  158. for i,_ in next,TrailParts do
  159. if TrailParts[i] ~= nil and TrailParts[i+1] ~= nil then
  160. local Part1 = TrailParts[i]
  161. local Part2 = TrailParts[i+1]
  162. local Mag = ((Part1.CFrame.p-Part2.CFrame.p).magnitude)
  163. Part1.Size = Vector3.new(Part1.Size.X+.016, Mag, Part1.Size.Z+.016)
  164. Part1.Transparency = Part1.Transparency + .028
  165. Part1.CFrame = CFrame.new(Part1.CFrame.p, Part2.CFrame.p)
  166. * CFrame.Angles(math.pi/2,0,0)
  167. if Part1.Size.X >= .64 then
  168. Part1:Destroy()
  169. table.remove(TrailParts, i)
  170. run("iiOrb 2.0", "Orb has been loaded!")
  171. run("iiOrb 2.0", "DigitalZer3 is my master.")
  172. end
  173. end
  174. end
  175. end
  176. end)
  177. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement