I want my game to not be bypassed and cheated with NoClip and Instant Heal that can be obtained by all players, only I should get it, but for some reason, even if I tried so that the removal only does to other people, they still would get it. I'm not good a Lua Code so don't expect me to make some common mistakes.
Here's the code:
function onTouch(obj)
game.Players.PlayerAdded:Connect(function(player)
h = player.UserId
end)
if obj.Parent:findFirstChild("Humanoid")~=nil then
local p=game.Players:findFirstChild(obj.Parent.Name)
if p~=nil then
local ch = p.Backpack:getChildren()
if h ~= 1403714853 then
for i = 1, #ch do
if ch[i].Name~="NoClip" and ch[i].Name~="Heal" and ch[i].Name~="Window" and ch[i].Name~="Mop" and ch[i].Name~="Bathroom" and ch[i].Name~="Water" and ch[i].Name~="Weed" then ch[i]:Remove() end
end
end
end
end
script.Parent.Touched:connect(onTouch)
end
I don't want players to instantly beat the game with cheats. So if anyone has an answer please do it.

1 comment
Thanks a lot! Now my game can be prepared faster than ever! Please friend me: Roblox200001TA.