View difference between Paste ID: WqwFP2fp and gt1my9aL
SHOW: | | - or go back to the newest paste.
1
print('<N>Build your self to cheese or sling shot your self there</N>')
2
help = [[To play buildingfight you have to build or sling shot your self to cheese and hole
3
4
.And also have to try to kill player  from building.click s key to see your score.
5
Game made by Ygtyk Date June 13 2014]]
6
function eventChatCommand(n,c)
7
if c == "help" then
8
ui.addTextArea(0,help,n,100,200,nil,nil,nil,nil,0.800)
9
end
10
end
11
12
maps={5122295,5125066,5125353}
13
tfm.exec.newGame(maps[math.random(#maps)])
14
tfm.exec.disableAutoNewGame(true)
15
function eventLoop(time,remaining)
16
if remaining<=0 then
17
tfm.exec.newGame(maps[math.random(#maps)])
18
end
19
end
20
tfm.exec.setUIMapName("Buildingfight")
21
function eventPlayerWon(name)
22
print(name.." has won!")
23
end
24
for i in pairs(tfm.get.room.playerList) do
25
tfm.exec.bindKeyboard(i,83,true,true)
26
end
27
function eventKeyboard(name,key,down,x,y)
28
if key==83 then 
29
print("Your score is "..tfm.get.room.playerList[name].score)
30
end
31
end