Todas as publicações #686660 Raw Editar

Boot Script

público lua v1 · imutável
#686660 ·publicado 2007-09-08 02:18 UTC
corpo renderizado da publicação
-- Anaminusprint("Chat: Boot")permission = {"Anaminus"}function check(name)	if table.maxn(permission) == 0 then print("No admins") return true end --Remove all names from permission to allow all players to use command.	for i = 1,#permission do		if (string.upper(name) == string.upper(permission[i].Name)) then return true end	end	return falseendfunction boot(name, source)	local p=game.Workspace:FindFirstChild(name)	if p==nil then return end--	if (name == source) then return end --Can't boot self	local player = game.Players:FindFirstChild(name)	local m = Instance.new("Message")	m.Parent = player	m.Text = "Das Boot!"	wait(2)	m.Parent = nil	p.Parent = nil	player.Parent = nilendfunction onChatted(msg, recipient, speaker)	-- convert to all lower case	local source = string.lower(speaker.Name)	msg = string.lower(msg)	if not check(source) then return end	if string.match(msg, "boot") then		local players=game.Players:GetChildren()		for i=1, #players do			if string.match(msg, string.lower(players[i].Name)) then				boot(players[i].Name, speaker)				return			end		end	endendfunction onPlayerEntered(newPlayer)	newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) endgame.Players.ChildAdded:connect(onPlayerEntered)