Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- count = 0
- count2 = 0
- step = false
- step2 = false
- rayblacklist = {}
- params = RaycastParams.new()
- params.FilterDescendantsInstances = {rayblacklist, owner.Character}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- if owner.Character.Humanoid.RigType ~= Enum.HumanoidRigType.R15 then
- owner.Character["Left Leg"]:Destroy()
- owner.Character["Right Leg"]:Destroy()
- else
- owner.Character["LeftUpperLeg"]:Destroy()
- owner.Character["RightUpperLeg"]:Destroy()
- owner.Character["LeftLowerLeg"]:Destroy()
- owner.Character["RightLowerLeg"]:Destroy()
- owner.Character["LeftFoot"]:Destroy()
- owner.Character["RightFoot"]:Destroy()
- end
- owner.Character.Humanoid.HipHeight = 5
- function the()
- local part2 = Instance.new("Part",owner.Character)
- local part3 = Instance.new("Part",owner.Character)
- local part4 = Instance.new("Part",owner.Character)
- part4.CanCollide = false
- part3.CanCollide = false
- part2.CanCollide = false
- part3.Material = "SmoothPlastic"
- part2.Material = "SmoothPlastic"
- part4.Material = "SmoothPlastic"
- part3.Shape = "Ball"
- part4.Size = Vector3.new(1.25,1,1.25)
- part3.Name = "the"
- part3.Anchored = true
- part4.Anchored = true
- part2.CFrame = owner.Character.HumanoidRootPart.CFrame
- part3.CFrame = owner.Character.HumanoidRootPart.CFrame
- part4.CFrame = owner.Character.HumanoidRootPart.CFrame
- part2.Size = Vector3.new(1,0.25,1)
- part3.Size = Vector3.new(1,1,1)
- if owner.Character.Humanoid.RigType ~= Enum.HumanoidRigType.R15 then
- local weld = Instance.new("Weld",owner.Character.Torso)
- weld.Part0 = part2
- weld.Part1 = owner.Character.Torso
- weld.C0 = CFrame.new(-0.5,1.125,0)
- else
- local weld = Instance.new("Weld",owner.Character.LowerTorso)
- weld.Part0 = part2
- weld.Part1 = owner.Character.LowerTorso
- weld.C0 = CFrame.new(-0.5,0.125,0)
- end
- for i,v in pairs(script:GetDescendants()) do
- pcall(function()
- v.CanCollide = false
- end)
- end
- local arc = Instance.new("Part",owner.Character)
- arc.Anchored = true
- arc.CanCollide = false
- arc.Size = Vector3.new(0.5,0.5,4)
- local arc2 = Instance.new("Part",owner.Character)
- arc2.Anchored = true
- arc2.CanCollide = false
- arc2.Size = Vector3.new(0.5,0.5,4)
- arc.Material = "SmoothPlastic"
- arc2.Material = "SmoothPlastic"
- coroutine.wrap(function()
- while true do
- task.wait()
- pcall(function()
- local intersection2 = part2.Position + (part3.Position - part2.Position)
- local distance2 = (part2.Position - intersection2).Magnitude
- local intersection3 = part3.Position + (part4.Position - part3.Position)
- local distance3 = (part3.Position - intersection3).Magnitude
- arc.CFrame = CFrame.new(part2.Position, intersection2) * CFrame.new(0,0,-distance2/2)
- arc2.CFrame = CFrame.new(part3.Position, intersection3) * CFrame.new(0,0,-distance3/2)
- arc2.Size = Vector3.new(0.5,0.5,distance3)
- arc.Size = Vector3.new(0.5,0.5,distance2)
- if distance2 > 4 then
- count += 1
- if count == 1 then
- local params = RaycastParams.new()
- params.FilterDescendantsInstances = {rayblacklist, owner.Character}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- local result = game.Workspace:Raycast(part2.Position, part2.CFrame.upVector * -30 + owner.Character.Humanoid.MoveDirection * 15,params)
- local x,y,z = part2.CFrame:ToEulerAnglesXYZ()
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = part3
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.CFrame = CFrame.new(result.Position.X,result.Position.Y,result.Position.Z) * CFrame.Angles(x,y,z) * CFrame.new(0,3.5,-3)
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- elseif count == 2 then
- count = 0
- end
- end
- if distance3 > 5 then
- local result = game.Workspace:Raycast(part2.Position, part2.CFrame.upVector * -30 + owner.Character.Humanoid.MoveDirection * 15,params)
- local currentRightVector = result.Instance.CFrame.RightVector
- local upVector = result.Normal
- local newFacialVector = currentRightVector:Cross(upVector)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = part4
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- part4.CFrame = CFrame.fromMatrix(part4.Position, currentRightVector, upVector, newFacialVector)
- goal.Position = result.Position + Vector3.new(0,2,0)
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- coroutine.wrap(function()
- if not step then
- step = true
- wait(0.25)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = part4
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- part4.CFrame = CFrame.fromMatrix(part4.Position, currentRightVector, upVector, newFacialVector)
- goal.Position = result.Position
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- step = false
- end
- end)()
- end
- end)
- end
- end)()
- end
- function the2()
- local part2 = Instance.new("Part",owner.Character)
- local part3 = Instance.new("Part",owner.Character)
- local part4 = Instance.new("Part",owner.Character)
- part4.CanCollide = false
- part3.CanCollide = false
- part2.CanCollide = false
- part3.Shape = "Ball"
- part3.Material = "SmoothPlastic"
- part2.Material = "SmoothPlastic"
- part4.Material = "SmoothPlastic"
- part4.Size = Vector3.new(1.25,1,1.25)
- part3.Name = "the"
- part3.Anchored = true
- part4.Anchored = true
- part2.CFrame = owner.Character.HumanoidRootPart.CFrame
- part3.CFrame = owner.Character.HumanoidRootPart.CFrame
- part4.CFrame = owner.Character.HumanoidRootPart.CFrame
- part2.Size = Vector3.new(1,0.25,1)
- part3.Size = Vector3.new(1,1,1)
- if owner.Character.Humanoid.RigType ~= Enum.HumanoidRigType.R15 then
- local weld = Instance.new("Weld",owner.Character.Torso)
- weld.Part0 = part2
- weld.Part1 = owner.Character.Torso
- weld.C0 = CFrame.new(0.5,1.125,0)
- else
- local weld = Instance.new("Weld",owner.Character.LowerTorso)
- weld.Part0 = part2
- weld.Part1 = owner.Character.LowerTorso
- weld.C0 = CFrame.new(0.5,0.125,0)
- end
- for i,v in pairs(script:GetDescendants()) do
- pcall(function()
- v.CanCollide = false
- end)
- end
- local arc = Instance.new("Part",owner.Character)
- arc.Anchored = true
- arc.CanCollide = false
- arc.Size = Vector3.new(0.5,0.5,4)
- local arc2 = Instance.new("Part",owner.Character)
- arc2.Anchored = true
- arc2.CanCollide = false
- arc2.Size = Vector3.new(0.5,0.5,4)
- arc.Material = "SmoothPlastic"
- arc2.Material = "SmoothPlastic"
- coroutine.wrap(function()
- while true do
- task.wait()
- pcall(function()
- local intersection2 = part2.Position + (part3.Position - part2.Position)
- local distance2 = (part2.Position - intersection2).Magnitude
- local intersection3 = part3.Position + (part4.Position - part3.Position)
- local distance3 = (part3.Position - intersection3).Magnitude
- arc.CFrame = CFrame.new(part2.Position, intersection2) * CFrame.new(0,0,-distance2/2)
- arc2.CFrame = CFrame.new(part3.Position, intersection3) * CFrame.new(0,0,-distance3/2)
- arc2.Size = Vector3.new(0.5,0.5,distance3)
- arc.Size = Vector3.new(0.5,0.5,distance2)
- if distance2 > 4 then
- count2 += 1
- if count2 == 2 then
- local result = game.Workspace:Raycast(part2.Position, part2.CFrame.upVector * -30 + owner.Character.Humanoid.MoveDirection * 15,params)
- local x,y,z = part2.CFrame:ToEulerAnglesXYZ()
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = part3
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.CFrame = CFrame.new(result.Position.X,result.Position.Y,result.Position.Z) * CFrame.Angles(x,y,z)*CFrame.new(0,3.5,-3)
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- count2 = 0
- end
- end
- if distance3 > 5 then
- local params = RaycastParams.new()
- params.FilterDescendantsInstances = {rayblacklist, owner.Character}
- params.FilterType = Enum.RaycastFilterType.Blacklist
- local result = game.Workspace:Raycast(part2.Position, part2.CFrame.upVector * -30 + owner.Character.Humanoid.MoveDirection * 15,params)
- local currentRightVector = result.Instance.CFrame.RightVector
- local upVector = result.Normal
- local newFacialVector = currentRightVector:Cross(upVector)
- part4.CFrame = CFrame.fromMatrix(part4.Position, currentRightVector, upVector, newFacialVector)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = part4
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- goal.Position = result.Position + Vector3.new(0,2,0)
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- coroutine.wrap(function()
- if not step2 then
- step2 = true
- wait(0.25)
- local tweenService = game:GetService("TweenService")
- local timeToFade = 0.25
- local object = part4
- local tweenInfo = TweenInfo.new(timeToFade)
- local goal = {}
- part4.CFrame = CFrame.fromMatrix(part4.Position, currentRightVector, upVector, newFacialVector)
- goal.Position = result.Position
- local tween = tweenService:Create(object, tweenInfo, goal)
- tween:Play()
- wait(0.25)
- step2 = false
- end
- end)()
- end
- end)
- end
- end)()
- end
- the()
- wait(0.25)
- the2()
- for i,v in pairs(owner.Character:GetDescendants()) do
- table.insert(rayblacklist,v)
- end
- params.FilterDescendantsInstances = {rayblacklist, owner.Character}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement