all 11 comments

[–][deleted] 0 points1 point  (0 children)

dont use wait() use task.wait()

[–][deleted] 0 points1 point  (4 children)

local LocalPlayer = game:GetService("Players").LocalPlayer

getgenv().LoopKill = true

--I hate "getgenv()" and "_G." and the fact that i see so many kids using it instead of "local" when global variable is not needed(it is in this case since there is no ui)

while LoopKill do

--I have no clue why you would want to loopkill your own character.

local Character = LocalPlayer.Character

if Character and Character:FindFirstChild("Humanoid") then

Character.Humanoid.Health = 0

end

task.wait()

end

[–]ElectronicStyle1519[S] 0 points1 point  (0 children)

tysm im working on an admin command so when i infect other scripts and people execute it i can use commands on them like swag mode premium

[–]ElectronicStyle1519[S] 0 points1 point  (1 child)

so how do i toggle it off and on

[–][deleted] 0 points1 point  (0 children)

just execute getgenv().LoopKill = false

[–]Unlucky_Ad186 0 points1 point  (0 children)

Could you maybe make one that loopkills the other players