First script is anti-god, located in StarterPlayer:
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
repeat wait() until LocalPlayer
repeat wait() until LocalPlayer.Character
local Character = LocalPlayer.Character
local Backpack = LocalPlayer:WaitForChild("Backpack")
Character.ChildRemoved:connect(function(Obj)
if Obj:IsA("Humanoid")then
LocalPlayer:Kick("suspicious activity")
end
end)
The second script is anti-tp, located in StarterCharacter:
interval = 1
punishment = 1
local Players = game:GetService("Players")
local LocalPlayer = Players.LocalPlayer
wallet = script.Parent.Parent.Parent:FindFirstChild("tp")
while wait() do
if LocalPlayer:GetRankInGroup(4219097) < 100 and wallet == false then
currPos = script.Parent.HumanoidRootPart.Position
wait(interval)
nowPos = script.Parent.HumanoidRootPart.Position
distMoved = nowPos-currPos
maxMovable = interval*script.Parent.Humanoid.WalkSpeed
if distMoved.X > (maxMovable+10) or distMoved.X < -(maxMovable+10) or distMoved.Z > (maxMovable+10) or distMoved.Z < -(maxMovable+10) then
LocalPlayer:Kick("suspicious activity")
end
end
end
According to the person who made these for me, they worked in studio for him. But now that I’ve implemented them into my game, they are not working. God mode makes no sense, and the tp should work as all I did was add value checks to make sure nobody gets falsely kicked if being teleported by the server.
Any help is appreciated, as we’re truly stumped on how this is not working.