24kDxrxk

Teleport

Oct 15th, 2024
893
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. local players = game:GetService("Players")
  2. local localPlayer = players.LocalPlayer
  3. local backpack = localPlayer.Backpack
  4. local mouse = localPlayer:GetMouse()
  5.  
  6. local function isAlive(Player, headCheck)
  7. local Player = Player or localPlayer
  8. if Player and Player.Character and ((Player.Character:FindFirstChildOfClass("Humanoid")) and (Player.Character:FindFirstChild("HumanoidRootPart")) and (headCheck and Player.Character:FindFirstChild("Head") or not headCheck)) then
  9. return true
  10. else
  11. return false
  12. end
  13. end
  14.  
  15. local tool = Instance.new("Tool")
  16. tool.Name = "TPTool"
  17. tool.Parent = backpack
  18. tool.RequiresHandle = false
  19. tool.Activated:Connect(function()
  20. if isAlive() then
  21. localPlayer.Character.HumanoidRootPart.CFrame = mouse.Hit + Vector3.new(0, 3, 0)
  22. end
  23. end)
Advertisement
Add Comment
Please, Sign In to add comment