RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"create a script where if a player says "Hi" in the chat they get killed"
-- server script local function onPlayerChatted(player, message) if message:lower() == "hi" then local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then humanoid.Health = 0 end end end end local function onPlayerAdded(player) player.Chatted:Connect(function(message) onPlayerChatted(player, message) end) end game.Players.PlayerAdded:Connect(onPlayerAdded)