```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```

tween vi en
tranvanbao1411 37 19th Sep, 2023
To share this paste please copy this url and send to your friends
RAW Paste Data
There are no comments yet.