Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait()
- local Orb = nil
- local Character = nil
- Settings = {
- ["Trail"] = true;
- ["TrailColor"] = BrickColor.Red();
- ["Radius"] = 6;
- ["Height"] = 5;
- ["Bounce"] = 0.4;
- ["Speed"] = 0.47
- }
- if script.ClassName == "LocalScript" then
- if game.PlaceId == 178350907 then
- script.Parent = nil
- else
- local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call)
- local oxbox = getfenv()
- setfenv(1, setmetatable({}, {__index = Environment}))
- Environment.coroutine.yield()
- oxbox.script:Destroy()
- end
- else
- game.Players.PlayerAdded(function(plr)
- if plr.Name:lower() == "ROBLOX" then
- Owner = plr
- end
- end)
- local TR = {}
- SO = function()
- Orb = Instance.new('Part', workspace)
- Orb.Name = "Orb"
- Orb.BrickColor = BrickColor.White()
- Orb.Transpareny = .1
- Orb.Anchored = true
- Orb.CanCollide = false
- Orb.Locked = true
- Orb.FormFactor = "Symmetric"
- Orb.Shape = "Ball"
- Orb.Size = Vector3.new(1,1,1)
- Orb.TopSurface = 10
- Orb.BottomSurface = 10
- local Light = Instance.new("PointLight", Orb)
- Light.Color = Color3.new(255,0,0)
- Light.Range = 10
- Orb.Changed:connect(function()
- if not workspace:findFirstChild(Orb.Name) then
- SO()
- end
- end)
- end SO()
- SpawnTR = function()
- if Orb ~= nil then
- local Tail = Instance.new('Part', Orb)
- Tail.BrickColor = Settings.TrailColor
- Tail.Transparency = .1
- Tail.Anchored = true
- Tail.CanCollide = false
- Tail.Locked = true
- Tail.FormFactor = "Custom"
- Tail.Size = Vector3.new(0.65, 0.64, 0.65)
- Tail.CFrame = Orb.CFrame
- Tail.TopSurface = 10
- Tail.BottomSurface = 10
- table.insert(TR, Tail)
- spawn(function()
- for i=1, 0,-.064 do
- Tail.Color=Color3.new(i,i,i)
- game:service'RunService'.RenderStepped:wait()
- end
- end
- function clerp(p1,p2,percent)
- local p1x,p1y,p1z,p1R00,p1R01,p1R02,p1R10,p1R11,p1R12,p1R20,p1R21,p1R22=p1:components()
- local p2x,p2y,p2z,p2R00,p2R01,p2R02,p2R10,p2R11,p2R12,p2R20,p2R21,p2R22=p2:components()
- 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))
- end
- local Rot = 1
- spawn(function()
- game:GetService("RunService").RenderStepped:connect(function()
- if Owner and Owner.Character and Owner.Character:FindFirstChild("Torso") then
- Character = Owner.Character.Torso.CFrame
- else
- Character = CFrame.new(0,1.5,0)
- end
- if Orb ~= nil then
- Rot = Rot + Settings.Speed
- Orb.Name = "MilesOrb_"..math.random(1,99999)
- Orb.CFrame = clerp(Orb.CFrame,
- Character
- *CFrame.new(0,3.7,0)
- *CFrame.Angles(0,Rot,(math.sin((tick())*1.3)*2.7)+13)
- *CFrame.new(Settings.Radius, math.sin((tick())*Settings.Bounce)*Settings.Height, 0)
- *CFrame.Angles(math.sin(tick()),math.sin(tick()),math.sin(tick()))
- ,.1)
- -- Trail
- SpawnTR()
- for i,_ in next,TrailParts do
- if TrailParts[i] ~= nil and TrailParts[i+1] ~= nil then
- local Part1 = TrailParts[i]
- local Part2 = TrailParts[i+1]
- local Mag = ((Part1.CFrame.p-Part2.CFrame.p).magnitude)
- Part1.Size = Vector3.new(Part1.Size.X+.016, Mag, Part1.Size.Z+.016)
- Part1.Transparency = Part1.Transparency + .028
- Part1.CFrame = CFrame.new(Part1.CFrame.p, Part2.CFrame.p)
- * CFrame.Angles(math.pi/2,0,0)
- if Part1.Size.X >= .64 then
- Part1:Destroy()
- table.remove(TrailParts, i)
- end
- end
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement