Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local adm = {["Blood#3565"]= true,["Anto#6095"] = true,["His#0439"] = true}
- local fly = {}
- local speed = {}
- historial = {}
- respawn = true
- args = {}
- local categorias = {p1 = {'#1', p1, hola}, p2 = {}}
- function colorReyes()
- tfm.exec.setNameColor("Anto#6095", 0xFFA8D3)
- tfm.exec.setNameColor("Blood#3565", 0xCA2411)
- end
- function main( )
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.newGame('#7', false)
- system.disableChatCommandDisplay(nil)
- colorReyes()
- end
- function eventChatCommand(name, command)
- if adm[name] then
- args = string.split(command, " ")
- if command=="queso" or command == "cheese" or command == "q" then
- tfm.exec.giveCheese (name)
- elseif command =="noc" or command == "noq" then
- tfm.exec.removeCheese (name)
- elseif command=="win" then
- tfm.exec.giveCheese (name)
- tfm.exec.playerVictory (name)
- elseif command=="sfacil" then
- tfm.exec.setShaman (name)
- tfm.exec.setShamanMode (name, 0)
- elseif command=="shard" then
- tfm.exec.setShaman (name)
- tfm.exec.setShamanMode (name, 1)
- elseif command=="sdivine" then
- tfm.exec.setShaman (name)
- tfm.exec.setShamanMode (name, 2)
- elseif command=="s" or command=="shaman" then
- tfm.exec.setShaman (name)
- elseif command=="nos" or command == "noshaman" then
- tfm.exec.setShaman (name, false)
- elseif command == "tp" then
- system.bindMouse(name, true)
- elseif command=="notp" then
- system.bindMouse(name, false)
- elseif command=="fly" then
- tfm.exec.bindKeyboard(name,32,false,true)
- if fly[name] then
- fly[name] = false
- else
- fly[name] = true
- end
- elseif command == "nofly" then
- fly[name] = false
- elseif command == "ar" or command == "activerespawn" or command == "activer" then
- if respawn then
- respawn = false
- else
- respawn = true
- end
- elseif command == "sp" or command == "speed" then
- tfm.exec.bindKeyboard(name,90,false,true)
- tfm.exec.bindKeyboard(name,88,false,true)
- if speed[name] then
- speed[name] = false
- else
- speed[name] = true
- end
- elseif command == "all" or command == "powers" or command == "poderes" then
- fly[name] = true
- tfm.exec.bindKeyboard(name,32,false,true)
- system.bindMouse(name, true)
- speed[name] = true
- tfm.exec.bindKeyboard(name,90,false,true)
- tfm.exec.bindKeyboard(name,88,false,true)
- elseif args[1] == "np" then
- if args[2] == nil then
- tfm.exec.newGame('#7', false)
- else
- args[2] = args[2]:gsub("p","#")
- tfm.exec.newGame(args[2], false)
- end
- elseif args[1] == "respawn" or args[1] == "r" then
- if args[2] == nil then
- tfm.exec.respawnPlayer(name)
- else
- tfm.exec.respawnPlayer(args[2])
- end
- end
- end
- end
- function eventMouse(name, x, y)
- if system.bindMouse then
- tfm.exec.movePlayer(name, x, y, false, 0, 0, false)
- end
- end
- function eventKeyboard(name,key,down,x,y)
- if key==32 and fly[name]==true then
- tfm.exec.movePlayer(name,0,0,true,0,-50,false)
- end
- if key==90 and speed[name]==true then
- tfm.exec.movePlayer(name,0,0,true,-100,0,false)
- end
- if key==88 and speed[name]==true then
- tfm.exec.movePlayer(name,0,0,true,100,0,false)
- end
- end
- function eventPlayerDied (playerName)
- if respawn then
- tfm.exec.respawnPlayer(playerName)
- colorReyes()
- end
- end
- function eventPlayerWon(playerName)
- if respawn then
- tfm.exec.respawnPlayer(playerName)
- colorReyes()
- end
- tfm.exec.setPlayerScore(playerName, 1,true)
- end
- function string.split(s, pattern, n)
- local st = {}
- for sb in string.gmatch(s, "[^"..pattern.."]+") do
- if not n or n > -1 then
- table.insert(st,sb)
- else
- st[#st] = st[#st]..pattern..sb
- end
- n = n and n-1 or false
- end
- return st
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement