Advertisement
Karluwu

LUA CODES

Dec 30th, 2018
441
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. COMMANDS:
  2. function eventChatCommand(name,command)
  3. if command=="cheese" then
  4. tfm.exec.giveCheese(name)
  5. elseif command=="mort" then
  6. tfm.exec.killPlayer(name)
  7. elseif command=="snow" then
  8. tfm.exec.snow(120, 0)
  9. elseif command=="new" then
  10. tfm.exec.newGame("@")
  11. elseif command=="win" then
  12. tfm.exec.playerVictory(name)
  13. elseif command=="score" then
  14. tfm.exec.setPlayerScore(name, 9999, true)
  15. elseif command=="meep" then
  16. tfm.exec.giveMeep(name)
  17. elseif command=="vamp" then
  18. tfm.exec.setVampirePlayer(name)
  19. end
  20. end
  21.  
  22.  
  23. FLY:
  24. function eventNewPlayer(name)
  25. tfm.exec.bindKeyboard(name,38,true,true)
  26. end
  27. for name in pairs(tfm.get.room.playerList) do
  28. for keys, k in pairs({38, 87}) do
  29. tfm.exec.bindKeyboard(name, k, true, true)
  30. end
  31. end
  32. function eventKeyboard(name,key,down,x,y)
  33. if key==38 then
  34. tfm.exec.movePlayer(name,0,0,true,0,-80,false)
  35. elseif key==87 then
  36. tfm.exec.movePlayer(name,0,0,true,0,-80,false)
  37. end
  38. end
  39.  
  40. SHOOT STUFF WITH Z AND X: ( https://www.deviantart.com/ashadasha/art/utility-codes-i-know-so-far-version-350-565241558 )
  41. for name in pairs(tfm.get.room.playerList) do
  42. for keys, k in pairs({88, 90}) do
  43. tfm.exec.bindKeyboard(name, k, true, true)
  44. end
  45. end
  46. function eventKeyboard(name, key, down, x, y)
  47. if key == 88 then
  48. tfm.exec.addShamanObject(17,x+25,y,90,100,500,false)
  49. elseif key == 90 then
  50. tfm.exec.addShamanObject(17,x-25,y,-90,-100,-500,false)
  51. end
  52. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement