simple tp script
Key RequiredUniversal

simple tp script

Universal ScriptheckerYAEAWTYAYheckerYAEAWTYAY 8K views 26 executesUpdated Nov 21, 2024
Unrated
00
Lua Script•31 lines (869 chars)
local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
local teleportEnabled = false

local function toggleTeleport()
    teleportEnabled = not teleportEnabled
    if teleportEnabled then
        print("Teleportation enabled")
    else
        print("Teleportation disabled")
    end
end

local function teleportToMouse()
    if teleportEnabled and player.Character and player.Character:FindFirstChild("HumanoidRootPart") then
        local targetPosition = mouse.Hit.Position
        player.Character.HumanoidRootPart.CFrame = CFrame.new(targetPosition)
    end
end

mouse.KeyDown:Connect(function(key)
    if key:lower() == "f" then
        teleportToMouse()
    end
end)

game:GetService("UserInputService").InputBegan:Connect(function(input, gameProcessedEvent)
    if input.KeyCode == Enum.KeyCode.Insert then
        toggleTeleport()
    end
end)

Features & Information

press insert to enable the code and press it again to disable it and then press f to teleport anywhere to your mouse position (prints out if its enabled or disabled when you press insert)

Community Comments (1)

heckerYAEAWTYAYheckerYAEAWTYAYNov 21, 2024(edited)

Have fun!

More Scripts for Universal Scripts