Advertisement
lolpastestaylor

Untitled

Jul 31st, 2015
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.03 KB | None | 0 0
  1. --Dont worry, we arnt gone ;)
  2.  
  3. -- Miles orb
  4. -- Build : 3
  5. -- Made by jillmiles1
  6. -- Server / Client orb
  7.  
  8. wait()
  9. local Owner = game:GetService("Players").LocalPlayer
  10.  
  11. local Character = nil
  12. local Orb = nil
  13.  
  14. local Settings = {
  15. ["Trail"] = true,
  16. ["TrailColor"] = BrickColor.new("White")
  17.  
  18. ["Radius"] = 10,
  19. ["Height"] = 0,
  20. ["Bounce"] = 2,
  21.  
  22. ["AudioID"] = 9,
  23.  
  24. ["Sounds"] = {
  25. 139819412
  26. },
  27.  
  28. ["Speed"] = .0000000001
  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() == "Control22" 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.new("Really red")
  86. Orb.Transparency = .1
  87. Orb.Anchored = true
  88. Orb.Material = "Neon"
  89. Orb.CanCollide = false
  90. Orb.Locked = true
  91. Orb.FormFactor = "Symmetric"
  92. Orb.Shape = "Ball"
  93. Orb.Size = Vector3.new(1,1,1)
  94. Orb.TopSurface = 10
  95. Orb.BottomSurface = 10
  96. local Sound = Instance.new("Sound", Orb)
  97. Sound.SoundId = "rbxassetid://"..Settings.AudioID
  98. Sound.Volume = 1
  99. Sound.Pitch = 1
  100. Sound.Looped = true
  101. wait()
  102. Sound:Play()
  103. Orb.Changed:connect(function()
  104. if not workspace:FindFirstChild(Orb.Name) then
  105. Spawnorb()
  106. end
  107. end)
  108. end Spawnorb()
  109.  
  110. Spawntrail = function()
  111. if Orb ~= nil and Settings.Trail == true then
  112. local Tail = Instance.new('Part', Orb)
  113. Tail.BrickColor = Settings.TrailColor
  114. Tail.Transparency = .1
  115. Tail.Anchored = true
  116. Tail.Material = "Neon"
  117. Tail.CanCollide = false
  118. Tail.Locked = true
  119. Tail.FormFactor = "Custom"
  120. Tail.Size = Vector3.new(.2,.2,.2)
  121. Tail.CFrame = Orb.CFrame
  122. Tail.TopSurface = 10
  123. Tail.BottomSurface = 10
  124. table.insert(TrailParts, Tail)
  125. spawn(function()
  126. for i=1, 0,-.064 do
  127. Tail.Color=Color3.new(i,i,i)
  128. game:service'RunService'.RenderStepped:wait()
  129. end
  130. end)
  131. end
  132. end
  133.  
  134. function clerp(p1,p2,percent)
  135. local p1x,p1y,p1z,p1R00,p1R01,p1R02,p1R10,p1R11,p1R12,p1R20,p1R21,p1R22=p1:components()
  136. local p2x,p2y,p2z,p2R00,p2R01,p2R02,p2R10,p2R11,p2R12,p2R20,p2R21,p2R22=p2:components()
  137. 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))
  138. end
  139.  
  140. local Rot = 30
  141. spawn(function()
  142. game:GetService("RunService").RenderStepped:connect(function()
  143. if Owner and Owner.Character and Owner.Character:FindFirstChild("Torso") then
  144. Character = Owner.Character.Torso.CFrame
  145. else
  146. Character = CFrame.new(0,1.5,0)
  147. end
  148. if Orb ~= nil then
  149. Rot = Rot + Settings.Speed
  150. Orb.Name = "MilesOrb_"..math.random(1,99999)
  151. Orb.CFrame = clerp(Orb.CFrame,
  152. Character
  153. *CFrame.new(0,3.7,0)
  154. *CFrame.Angles(0,Rot,(math.sin((tick())*1.3)*2.7)+13)
  155. *CFrame.new(Settings.Radius, math.sin((tick())*Settings.Bounce)*Settings.Height, 0)
  156. *CFrame.Angles(math.random(3,40),math.random(3,40),math.random(3,40))
  157. ,.1)
  158. -- Trail
  159. Spawntrail()
  160. for i,_ in next,TrailParts do
  161. if TrailParts[i] ~= nil and TrailParts[i+1] ~= nil then
  162. local Part1 = TrailParts[i]
  163. local Part2 = TrailParts[i+1]
  164. local Mag = ((Part1.CFrame.p-Part2.CFrame.p).magnitude)
  165. Part1.Size = Vector3.new(Part1.Size.X+.016, Mag, Part1.Size.Z+.016)
  166. Part1.Transparency = Part1.Transparency + .028
  167. Part1.CFrame = CFrame.new(Part1.CFrame.p, Part2.CFrame.p)
  168. * CFrame.Angles(math.pi/2,0,0)
  169. if Part1.Size.X >= .64 then
  170. Part1:Destroy()
  171. table.remove(TrailParts, i)
  172. end
  173. end
  174. end
  175. end
  176. end)
  177. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement