```function Tween(P1) Distance = (P1.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude if Distance < 250 then Speed = 600 elseif Distance < 500 then Speed = 400 elseif Distance < 1000 then Speed = 350 elseif Distance >= 1000 then Speed = 200 end game:GetService("TweenService"):Create( game.Players.LocalPlayer.Character.HumanoidRootPart, TweenInfo.new(Distance/Speed, Enum.EasingStyle.Linear), {CFrame = P1} ):Play() end function Tween(P1) Distance = (P1.Position - game.Players.LocalPlayer.Character.HumanoidRootPart.Position).Magnitude if Distance < 1000 then Speed = 400 elseif Distance >= 1000 then Speed = 250 end game:GetService("TweenService"):Create( game.Players.LocalPlayer.Character.HumanoidRootPart, TweenInfo.new(Distance/Speed, Enum.EasingStyle.Linear), {CFrame = P1} ):Play() Clip = true wait(Distance/Speed) Clip = false end``` ```function StopTween(target) if not target then _G.StopTween = true wait() Tween(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame) wait() if game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:FindFirstChild("BodyClip") then game:GetService("Players").LocalPlayer.Character.HumanoidRootPart:FindFirstChild("BodyClip"):Destroy() end _G.StopTween = false _G.Clip = false end end```