function punishment() while true do if game.Players.LocalPlayer.Character.Humanoid.Health == 100 then game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "THIS IS YOUR PUNISHMENT!", Enum.ChatColor.Blue) wait(3) game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "LIFE ISN'T AS SWEET AS YOU THOUGHT, HUH?", Enum.ChatColor.Blue) wait(3) game:GetService("Chat"):Chat(game.Players.LocalPlayer.Character.Head, "WHEN WILL YOU LEARN THAT YOUR ACTIONS HAVE CONSEQUENCES!", Enum.ChatColor.Blue) wait(3) else break end end end
Yeah I try to get it to stop but it keeps going. What do I do so when I die it stops?
Use thee Died Event on humanoids.
Humanoid.Died:Connect(function() print(“dead”) end)