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

Is this if statement possible?

if admin[player.Name] then
			if msg == "shutdown server" then
				shutdown()
			end
		end

--Yes, I already made the table "admin" and I already created the function "shutdown()".

1 answer

local admins = {player=true, azarth = true, blackknightxx = true}

game.Players.PlayerAdded:connect(function(player)
	player.Chatted:connect(function(msg)
		if admins[player.Name:lower()] and msg:lower() == "shutdown server" then
			shutdown()
		end
	end)
end)

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