Universal Script 📌
8.1k Views
32 Executions

simple tp script

Universal Script 📌
heckerYAEAWTYAY
heckerYAEAWTYAYFirst script
2 years ago
Get an executor
Please login to perform these actions:

Does it work?

No reports yet

No reports yet. Tried it? Be the first to say.

Also noticed:

Description

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)

View Raw
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)


Comments

1
Log in to join the conversation. Login
heckerYAEAWTYAY's profile picture
heckerYAEAWTYAYUploader2 years ago(edited)

Have fun!

1

More universal scripts

See all
Universal Script 📌
3.8k
184.5k
Bumped 4 hours ago
Script hub
411
41
5 hours ago
Universal Script 📌
28.6k
663.4k
Bumped 7 hours ago
Script hub
13.8k
2.7k
Bumped 9 hours ago
Key System
Paid
Script hub
263.7k
88.1k
Bumped 10 hours ago
Key System
Universal Script 📌
2.9k
9.5k
Bumped 10 hours ago
Universal Script 📌
668
38
Approved 10 hours ago
Universal Script 📌
710
43
Approved 10 hours ago