I need this so that I can make it so people cant use an exploit to make themself god mode.
Remember, this wasn't a request site. I give you a warning.
Ok, let get right into that question's answer :)
game.Players.PlayerAdded:Connect(function(plr) end)
If a player added, it will automatically get local. (Maybe it's the right to explain or I don't know)
'end)' is a thing that ends from :Connect(function)
game.Players.PlayerAdded:Connect(function(plr) if plr and plr:FindFirstChild("Humanoid") then end end) ~~~~~~~~~~~~~~~~ Finds player's humanoid and local it :) 'end' is a end from if statement.
game.Players.PlayerAdded:Connect(function(plr) if plr and plr:FindFirstChild("Humanoid") then if plr:FindFirstChild("Humanoid").Health == 100 then
end end
end)
Line 3 means if the player humanoid's health was 100 then...
game.Players.PlayerAdded:Connect(function(plr) if plr and plr:FindFirstChild("Humanoid") then if plr:FindFirstChild("Humanoid").Health == 100 then print(plr.Character.Name.." is a good player he didn't exploits :)") else plr:Kick("You have been banned by hacking into god mode >:(") end end end)
Line 4 means if the player was good (Health was 100) then print example: Player1 is a good player he didn't exploit :)
ELSE
Kicks the people with reason: You have been banned by hacking into god mode >:(
So this script maybe will work I don't know because I didn't test it out in Roblox studio
Thanks for reading, Bye! :3
If you have any question, comment below :) I happy to answer them :D
Yeah if someone could please write me a anti cheat
\
Closed as Not Constructive by BlackOrange3343
This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.
Why was this question closed?