Advertisement
darraghd493

Tween TP Tool Script

Aug 31st, 2023
2,112
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.11 KB | Source Code | 1 0
  1. --[[
  2.     A simple TP tool script for games with a (bad) anticheat.
  3.  
  4.     Tested on Blox Fruits
  5.     https://www.roblox.com/games/2753915549/Blox-Fruits
  6. ]]
  7.  
  8. getgenv().speed = 250 -- Change this to control the speed of the tool
  9.  
  10. -- Script
  11. local Players = game:GetService("Players")
  12. local TweenService = game:GetService("TweenService")
  13.  
  14. local LocalPlayer = Players.LocalPlayer
  15. local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
  16. local Mouse = LocalPlayer:GetMouse()
  17.  
  18. function tweenTeleport(to, speed)
  19.     local rootPart = Character.HumanoidRootPart
  20.     local tween = TweenService:Create(rootPart, TweenInfo.new((to.Position - rootPart.Position).Magnitude / speed, Enum.EasingStyle.Linear), {
  21.         CFrame = to
  22.     })
  23.  
  24.     tween:Play()
  25.     tween.Completed:Wait()
  26. end
  27.  
  28. -- Teleport Tool
  29. local tool = Instance.new("Tool")
  30. tool.RequiresHandle = false
  31. tool.Name = "Teleport Tool"
  32.  
  33. tool.Activated:connect(function()
  34.     local position = Mouse.Hit + Vector3.new(0, 2.5, 0)
  35.     tweenTeleport(CFrame.new(position.X, position.Y, position.Z), getgenv().speed)
  36. end)
  37.  
  38. tool.Parent = LocalPlayer.Backpack
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement