Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoShaman(false)
- maps={0,1,2,3,4,5,6,9,11,12,13,15,16,17,18,19,20,24,25}
- tfm.exec.newGame(0)
- system.disableChatCommandDisplay("help",true)
- ui.addPopup(1, 0, "Hello, welcome to the Haunted Game! The shaman can control mice by pressing I to jump, J to move left,K to move down , and L to move right! If you are uncomfortable with the 'I' button, you can alternatively press the 'Space' button to jump! Feel free to change maps! Have fun! Type !help for this popup to pop again!", nil, 200,100,400,true)
- function eventChatCommand(name,message)
- if message=="help" then
- ui.addPopup(1, 0, "Hello, welcome to the Haunted Game! The shaman can control mice by pressing I to jump, J to move left,K to move down , and L to move right! If you are uncomfortable with the 'I' button, you can alternatively press the 'Space' button to jump! Feel free to change maps! Have fun! Type !help for this popup to pop again!", name, 200,100,400,true)
- end
- end
- function eventLoop(time,remaining)
- if remaining<=0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
- function eventNewGame()
- for name, player in pairs(tfm.get.room.playerList) do
- for keys, k in pairs({73, 74, 75, 76}) do
- if player.isShaman then
- tfm.exec.bindKeyboard(name, k, true, true)
- print(name)
- end
- end
- end
- end
- function eventKeyboard(name, key, down, x, y)
- for name, player in pairs(tfm.get.room.playerList) do
- if not player.isShaman then
- if key == 73 then
- tfm.exec.movePlayer(name, 0, 0, true, 0, -50, false)
- elseif key == 32 then
- tfm.exec.movePlayer(name, 0, 0, true, 0, -50, false)
- elseif key == 75 then
- tfm.exec.movePlayer(name, 0, 0, true, 0, 40, false)
- elseif key == 74 then
- tfm.exec.movePlayer(name, 0, 0, true, -40, 0, false)
- elseif key == 76 then
- tfm.exec.movePlayer(name, 0, 0, true, 40, 0, false)
- end
- end
- end
- end
- function eventPlayerDied()
- local i=0
- for n,player in pairs(tfm.get.room.playerList) do
- if not player.isDead then
- i=i+1
- end
- end
- if i==0 then
- tfm.exec.newGame(maps[math.random(#maps)])
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment