Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Miles orb
- -- Build : 3
- -- Made by jillmiles1
- -- Server / Client orb
- -- 97% replicated ein orb
- wait()
- local Owner = game:GetService("Players").LocalPlayer
- local Character = nil
- local Orb = nil
- local Settings = {
- ["Trail"] = true,
- ["TrailColor"] = BrickColor.White(),
- ["Radius"] = 9,
- ["Height"] = 1.2,
- ["Bounce"] = 2.7,
- ["AudioID"] = 9,
- ["EinOrb"] = true,
- ["Speed"] = .03
- }
- 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:connect(function(plr)
- if plr.Name:lower() == "jillmiles1" then
- Owner = plr
- end
- end)
- script:Destroy()
- end
- 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(1,1,1)
- Orb.TopSurface = 10
- Orb.BottomSurface = 10
- Orb.Name = "Part"
- Orb.Changed:connect(function()
- if not workspace:FindFirstChild(Orb.Name) then
- Spawnorb()
- end
- end)
- end Spawnorb()
- 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.BottomSurface = 10
- table.insert(TrailParts, Tail)
- if Settings.EinOrb then
- spawn(function()
- for i = 1, 0,-.025 do
- Tail.Color = Color3.new(i,i,i)
- game:service'RunService'.Stepped: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").Stepped: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)
- ,.2)
- -- 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 >= 10 then
- Part1.Size = Vector3.new(Part1.Size.X+.013, Mag, Part1.Size.Z+.013)
- 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 >= .9 then
- Part1:Destroy()
- table.remove(TrailParts, i)
- end
- end
- end
- end
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement