Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Comands script?

How would i make a script when I say a certain word something happens? EX: I say "Kill" Then it would kill all the players alive or just me.

8 comments

0

Its impossible.

0

@Connor What do you mean?

0

He must give up on life. His dreams will never be acomplished

0

Oh thanks you so nice, also a guy did it on a script builder with me so yeah it is possible...

0

@Connor Impossible? http://goo.gl/BRdmZw

0

Possable end of descusion.

0

/whoosh/

0

.....

1 answer

local commands = {
	["kill"] = function()
		for _, p in pairs(game.Players:GetPlayers()) do
			if p.Character then
				p.Character:BreakJoints()
			end
		end
	end;
}

game.Players.PlayerAdded:connect(function(player)
	player.Chatted:connect(function(msg)
		if commands[msg:lower()] then
			commands[msg:lower()]()
		end
	end)
end)

1 comment

0

If you wanted to look at a more "advanced" commands script (template) then take a look at this code that I wrote over a year ago: http://pastebin.com/rARwmL5t

This discussion is preserved as it was. New answers, comments, and votes are closed.