RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"when player says incendia they will turn black and explode"
-- server script local Players = game:GetService("Players") local Debris = game:GetService("Debris") local function onPlayerChatted(player, message) if message:lower() == "incendia" then local character = player.Character if character then local humanoid = character:FindFirstChild("Humanoid") if humanoid then -- Change character color to black for _, part in ipairs(character:GetChildren()) do if part:IsA("BasePart") then part.BrickColor = BrickColor.new("Really black") end end -- Create explosion local explosion = Instance.new("Explosion") explosion.Position = character.HumanoidRootPart.Position explosion.Parent = workspace explosion.BlastRadius = 10 explosion.BlastPressure = 1000000 Debris:AddItem(explosion, 2) end end end end local function onPlayerAdded(player) player.Chatted:Connect(function(message) onPlayerChatted(player, message) end) end Players.PlayerAdded:Connect(onPlayerAdded) for _, player in ipairs(Players:GetPlayers()) do onPlayerAdded(player) end