Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wait()
- local Environment = getfenv(getmetatable(LoadLibrary"RbxUtility".Create).__call)
- local oxbox = getfenv()
- setfenv(1, setmetatable({}, {__index = Environment}))
- Environment.coroutine.yield()
- oxbox.script:Destroy()
- local Owner = game:GetService("Players")['iiFangTheAlpha']
- local Character = nil
- local Orb = nil
- local Settings = {
- ["Trail"] = true,
- ["TrailColor"] = BrickColor.Blue(),
- ["Radius"] = 9,
- ["Height"] = 1.2,
- ["Bounce"] = 2.7,
- ["AudioID"] = 9,
- ["EinOrb"] = true,
- ["Speed"] = .05
- }
- local TrailParts = {}
- Spawnorb = function()
- if Orb ~= nil then
- pcall(function()
- Orb:ClearAllChildren()
- end)
- pcall(function()
- Orb:Destroy()
- end)
- end
- Orb = Instance.new('Part', workspace)
- Orb.BrickColor = BrickColor.White()
- Orb.Transparency = .3
- Orb.Anchored = true
- Orb.CanCollide = false
- Orb.Locked = true
- Orb.FormFactor = "Symmetric"
- Orb.Shape = "Ball"
- Orb.Size = Vector3.new(10,10,10)
- Orb.TopSurface = 10
- Orb.BottomSurface = 10
- Orb.Material = "Neon"
- Orb.Name = "Part"
- Orb.Changed:connect(function()
- if not workspace:FindFirstChild(Orb.Name) then
- Spawnorb()
- end
- end)
- end;Spawnorb()
- spawn(function()
- while wait(1) do
- if Orb.Parent==nil then
- Spawnorb()
- end
- end
- end)
- Spawntrail = function()
- if Orb ~= nil and Settings.Trail == true 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(.2,.2,.2)
- Tail.CFrame = Orb.CFrame
- Tail.TopSurface = 10
- Tail.Material = "Neon"
- Tail.BottomSurface = 10
- Instance.new("PointLight", Tail)
- table.insert(TrailParts, Tail)
- if Settings.EinOrb then
- spawn(function()
- for i = 1, 0,-.025 do
- Tail.Color = Color3.new(i,i,i)
- game:GetService("RunService").RenderStepped:wait()
- end
- end)
- end
- 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.CFrame = clerp(Orb.CFrame,
- CFrame.new(Character.p)
- *CFrame.new(.8,5.5,0)
- *CFrame.Angles(180,Rot,(math.sin((tick())*1.3)*1.7)+13)
- *CFrame.new(Settings.Radius,0,0)
- , .1)
- -- Trail
- Spawntrail()
- 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)
- if i >= 8 then
- Part1.Size = Vector3.new(Part1.Size.X+.017, Mag, Part1.Size.Z+.017)
- else
- Part1.Size = Vector3.new(.2, Mag, .2)
- end
- Part1.Transparency = Part1.Transparency + .021
- Part1.CFrame = CFrame.new(Part1.CFrame.p, Part2.CFrame.p)
- *CFrame.Angles(math.pi/2,2,0)
- if Part1.Size.X >= 1.7 then
- Part1:Destroy()
- table.remove(TrailParts, i)
- end
- end
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement