Advertisement
ClockworkHorror

[ROBLOX] EinOrb V1.1

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