Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spawn = true
- ids = {6,2,1,10}
- i = 20
- for _,dsble in next,{"AutoNewGame","AutoTimeLeft","AutoShaman","AutoScore","PhysicalConsumables","DebugCommand","MinimalistMode"} do
- tfm.exec["disable"..dsble](true)
- end
- function eventLoop (timeC, timeR)
- ui.addText("<font color='%s' face='Soopafresh' size='15'><b>Objects expires in: "..i.."</b></font>", 0, 370, "#BABD2F", "#333")
- if i == 0 then
- for k,v in pairs(ids) do
- tfm.exec.removeObject(v)
- end
- i = 20
- end
- table.insert(ids, tfm.exec.addShamanObject(math.random(2801,2818), math.random(5, 1000), 370))
- table.insert(ids, tfm.exec.addShamanObject(math.random(601,611), math.random(5, 1000), 20))
- table.insert(ids, tfm.exec.addShamanObject(math.random(1001,1004), math.random(5, 1000), 20))
- tfm.exec.explosion(math.random(5,800), math.random(5, 500), 50, 20, false)
- tfm.exec.explosion(math.random(5,800), math.random(5, 500), 50, 20, false)
- tfm.exec.explosion(math.random(5,800), math.random(5, 500), 50, 20, false)
- tfm.exec.explosion(math.random(5,800), math.random(5, 500), 50, 20, false)
- i = i - 1
- end
- function ui.addText(string, x, y, color, border)
- ui.addTextArea(1, string.format(string, border), nil, x, y-1, 900, 25, nil, nil, 0, true)
- ui.addTextArea(2, string.format(string, border), nil, x, y+1, 900, 25, nil, nil, 0, true)
- ui.addTextArea(3, string.format(string, border), nil, x+1, y, 900, 25, nil, nil, 0, true)
- ui.addTextArea(4, string.format(string, border), nil, x-1, y, 900, 25, nil, nil, 0, true)
- ui.addTextArea(5, string.format(string, color), nil, x, y, 900, 25, nil, nil, 0, true)
- end
- function eventNewGame()
- i = 0
- local t={} for k,v in pairs(tfm.get.room.objectList) do table.insert(t,k) end for k,v in ipairs(t) do tfm.exec.removeObject(v) end
- tfm.exec.newGame("#4")
- end
- local t={} for k,v in pairs(tfm.get.room.objectList) do table.insert(t,k) end for k,v in ipairs(t) do tfm.exec.removeObject(v) end
- tfm.exec.newGame("#8")
- local timer = { }
- function eventNewPlayer(playerName)
- tfm.exec.bindKeyboard(playerName,32,true,true)
- tfm.exec.bindKeyboard(playerName,1,true,true)
- timer[playerName] = 0
- end
- function eventKeyboard(playerName, keyCode, True, x, y)
- if keyCode == 1 then
- timer[playerName] = os.time() + 500
- elseif keyCode == 32 and os.time() < timer[playerName] then
- tfm.exec.movePlayer ( playerName, 0, 0, false, 0, -50, false )
- timer[playerName] = 0
- end
- end
- table.foreach(tfm.get.room.playerList, eventNewPlayer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement