Advertisement
ohhhhhhshdhashdahsd

Real Jill ORB

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