Advertisement
luke2022

Tptool

Dec 16th, 2023
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. mouse = game.Players.LocalPlayer:GetMouse()
  2. tool = Instance.new("Tool")
  3. tool.RequiresHandle = false
  4. tool.Name = "Click TP"
  5. tool.Activated:connect(function()
  6. local pos = mouse.Hit+Vector3.new(0,2.5,0)
  7. pos = CFrame.new(pos.X,pos.Y,pos.Z)
  8. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = pos
  9. end)
  10. tool.Parent = game.Players.LocalPlayer.Backpack
  11. wait(0.07)
  12. local TweenService = game:GetService("TweenService")
  13. local UserInputService = game:GetService("UserInputService")
  14. local Players = game:GetService("Players")
  15.  
  16. local tool = Instance.new("Tool")
  17. tool.RequiresHandle = false
  18. tool.Name = "Tween Click TP"
  19. local function onActivated()
  20. local mouse = Players.LocalPlayer:GetMouse()
  21. local pos = mouse.Hit + Vector3.new(0,2.5,0)
  22. local humanoidRootPart = Players.LocalPlayer.Character.HumanoidRootPart
  23.  
  24. local tweenInfo = TweenInfo.new(
  25. 1,
  26. Enum.EasingStyle.Quad,
  27. Enum.EasingDirection.Out,
  28. 0,
  29. false,
  30. 0
  31. )
  32.  
  33. local tween = TweenService:Create(humanoidRootPart, tweenInfo, {
  34. CFrame = CFrame.new(pos.X, pos.Y, pos.Z)
  35. })
  36.  
  37. tween:Play()
  38. end
  39.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement