Run it
Copy the script and paste it into your executor.
--Hello :D
local Players = game:GetService("Players")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local enabled = false
local CHECK_DISTANCE = 8
local TELEPORT_DISTANCE = 10
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.KeyCode == Enum.KeyCode.U then
enabled = not enabled
print("Teleport Avoidance:", enabled and "ON" or "OFF")
)
RunService.Heartbeat:(()
enabled
character = player.Character
character
root = character:()
root
_, otherPlayer (Players:())
otherPlayer ~= player
otherChar = otherPlayer.Character
otherChar
otherRoot = otherChar:()
otherRoot
distance = (root.Position - otherRoot.Position).Magnitude
distance <= CHECK_DISTANCE
direction = (root.Position - otherRoot.Position).Unit
newPosition = root.Position + direction * TELEPORT_DISTANCE
root.CFrame = .(newPosition)
)