Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- lua transformice
- -- Speed
- -- ©Zigwin
- admin='Zigwin'
- speedX=100
- p='3'
- for name,_ in pairs(tfm.get.room.playerList) do
- tfm.exec.bindKeyboard(name,37,true,true)
- tfm.exec.bindKeyboard(name,39,true,true)
- tfm.exec.bindKeyboard(name,65,true,true)
- tfm.exec.bindKeyboard(name,68,true,true)
- end
- function eventKeyboard(playerName, keyCode, down, xPlayerPosition, yPlayerPosition)
- if keyCode==68 or keyCode==39 then
- tfm.exec.movePlayer(playerName,0,0,nil,tfm.get.room.playerList[playerName].vx+speedX)
- elseif keyCode==65 or keyCode==37 then
- tfm.exec.movePlayer(playerName,0,0,nil,tfm.get.room.playerList[playerName].vx-speedX)
- end
- end
- tfm.exec.disableAutoTimeLeft(true)
- tfm.exec.disableAutoNewGame(true)
- tfm.exec.disableAutoScore(true)
- tfm.exec.disableAfkDeath(true)
- tfm.exec.disableAutoShaman(true)
- tfm.exec.newGame('#7')
- function eventPlayerDied(playerName) tfm.exec.respawnPlayer (playerName) end
- function eventNewPlayer(playerName)
- tfm.exec.respawnPlayer (playerName)
- tfm.exec.bindKeyboard(playerName,37,true,true)
- tfm.exec.bindKeyboard(playerName,39,true,true)
- tfm.exec.bindKeyboard(playerName,65,true,true)
- tfm.exec.bindKeyboard(playerName,68,true,true)
- end
- function eventChatCommand(playerName, message)
- if playerName==admin then
- if message:sub(1,5)=='map p' then
- tfm.exec.newGame('#'..tostring(message:sub(7)))
- elseif message:sub(1,3)=='map' then
- tfm.exec.newGame(message:sub(5))
- elseif message:sub(1,5)=='speed' then
- speedX=message:sub(7)
- elseif message:sub(1,4)=='next' then
- tfm.exec.newGame('#'..p)
- elseif message:sub(1,4)=='perm' then
- p=tostring(message:sub(6))
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement