Ok, so I wanted to make these scripts that make your game safe. I have an anti-kick script and an anti-reset script. (I have a no-reset script in starterpack. here's my anti-kick script:
local player = game.Workspace.LocalPlayer
local hax = game.Players.LocalPlayer:Destroy() -- detect if someone kicks a player
print('hackers, beware. Troys anti-virus is protecting the game from harm. the status is'..game.Workspace.AntiVirus.Value)
while true do -- to do multiple scans so it wont mess up once the hacker comes back or another hacker joins.
if hax then -- to scan if some player kicks some other player
player:Destroy() -- to kick the hacker
m = Instance.new("Message")
m.Text = "Troy's anti-virus has found a hacker and kicked him for deleting a player. his name is"..player.Name
wait(1/5)
m:Remove()
end
end
and my anti-reset script is here along with it's linked source:
while wait() do
local char = player.Character
if char and enabled then
if char:findFirstChild("Humanoid") then
char.Humanoid.Name = "humanoid"
end
local player = game.Workspace.LocalPlayer
local hax = player.Humanoid.Health == 0
while true do
if hax then
player:Destroy()
m = Instance.new("Message")
m.Text = "Troy's anti-virus has found a hacker and kicked him for Force Resetting a player. his name is"..player.Name
wait(1/5)
m:Remove()
end
end
Thanks for reading! please answer!

2 comments
"Game.Players:GetPlayerFromCharacter(Game.Players.LocalPlayer)" Would not work. game.Players.LocalPlayer is already the player.
Thanks, Maxa. If you want to know what i'm doing, I want to scan if a player is removed by a player then print the player's name and kick the hacker.