local Players = game:GetService("Players") local StarterGui = game:GetService("StarterGui") local player = Players.LocalPlayer local savedCheckpoint = nil local tpOnCooldown = false local function smoothTeleport(targetCFrame) if tpOnCooldown or not player.Character then return false end tpOnCooldown = true local humanoid = player.Character:FindFirstChildOfClass("Humanoid") local rootPart = player.Character:FindFirstChild("HumanoidRootPart") if not humanoid or not rootPart then return false end local oldCollide = rootPart.CanCollide rootPart.CanCollide = false local oldAnchored = rootPart.Anchored rootPart.Anchored = true local startPos = rootPart.Position local endPos = targetCFrame.Position local distance = (startPos - endPos).Magnitude local steps = math.floor(distance / 3) + 1 --steps can be changed for i = 1, steps do if not player.Character or not rootPart then break end local t = i / steps local stepPos = startPos:Lerp(endPos, t) local stepCF = targetCFrame + (stepPos - endPos) pcall(function() rootPart.CFrame = stepCF task.wait(0.02) -- cooldown can be changed end) end pcall(function() rootPart.CFrame = targetCFrame + Vector3.new( math.random(-0.5, 0.5), 0, math.random(-0.5, 0.5) ) end) task.wait(0.1) pcall(function() rootPart.Anchored = oldAnchored rootPart.CanCollide = oldCollide if humanoid then humanoid:ChangeState(Enum.HumanoidStateType.GettingUp) end end) tpOnCooldown = false return true end Tab:Button({ Title = "Save checkpoint", Desc = "Stores your current position", Callback = function() local rootPart = player.Character and player.Character:FindFirstChild("HumanoidRootPart") if rootPart then savedCheckpoint = rootPart.CFrame Window:Notify({ Title = "Checkpoint saved", Desc = "succesfully", Time = 4 }) end end }) Tab:Button({ Title = "Teleport to checkpoint", Desc = "Moves you to the saved point\nWill not work inside someone else's base", Callback = function() if not savedCheckpoint then Window:Notify({ Title = "error", Desc = "no checkpoint set", Time = 4 }) return end local rootPart = player.Character and player.Character:FindFirstChild("HumanoidRootPart") if not rootPart then return end local currentPos = rootPart.Position if (currentPos - savedCheckpoint.Position).Magnitude < 5 then Window:Notify({ Title = "already there", Desc = "you are close to checkpoint", Time = 4 }) return end if smoothTeleport(savedCheckpoint) then Window:Notify({ Title = "succesfully teleported", Desc = "succesfully", Time = 4 }) else Window:Notify({ Title = "failed", Desc = "teleport blocked by ac", Time = 4 }) end end })