ADVERTISEMENTREMOVE ADS

Anti CFrame Teleport | Prevent games from teleporting you

Universal script
2 years ago
Script preview thumbnail
Script Preview

Description

Yeah, this will stop exploiting teleports as well
feel free to tweak it to fix this

Features:

  • Anti Teleport
ADVERTISEMENTREMOVE ADS
36 Lines • 1.22 KiB
Verified
Raw
local players = game:GetService('Players')
local lplr = players.LocalPlayer
local lastCF, stop, heartbeatConnection
local function start()
heartbeatConnection = game:GetService('RunService').Heartbeat:Connect(function()
if stop then
return
end
lastCF = lplr.Character:FindFirstChildOfClass('Humanoid').RootPart.CFrame
end)
lplr.Character:FindFirstChildOfClass('Humanoid').RootPart:GetPropertyChangedSignal('CFrame'):Connect(function()
stop = true
lplr.Character:FindFirstChildOfClass('Humanoid').RootPart.CFrame = lastCF
game:GetService('RunService').Heartbeat:Wait()
stop = false
end)
lplr.Character:FindFirstChildOfClass('Humanoid').Died:Connect(function()
heartbeatConnection:Disconnect()
end)
end
lplr.CharacterAdded:Connect(function(character)
repeat
game:GetService('RunService').Heartbeat:Wait()
until character:FindFirstChildOfClass('Humanoid')
repeat
game:GetService('RunService').Heartbeat:Wait()
until character:FindFirstChildOfClass('Humanoid').RootPart
start()
end)
lplr.CharacterRemoving:Connect(function()
heartbeatConnection:Disconnect()
end)
start()
ADVERTISEMENTREMOVE ADS

Comments

0 comments
to add a comment
Loading comments
ADVERTISEMENTREMOVE ADS