Advertisement
sniki10

Untitled

Aug 26th, 2014
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1.  
  2.  
  3. -- Insert your victim's name (person who you would like to move) here without removing the quotation marks.
  4. doll= "Anonimkka"
  5.  
  6. -- Insert YOUR name here without removing the quotation marks.
  7. god = "Ovcapolska"
  8. -- That's it! Done! You can now run the script and troll people!
  9.  
  10. ------------------------------------------------------------------------------------------------------
  11. ------------------------------------------------------------------------------------------------------
  12. ------------------------------------------------------------------------------------------------------
  13. -----Do NOT edit the following code unless you're a developer, otherwise it probably won't work.------
  14. ------------------------------------------------------------------------------------------------------
  15. ------------------------------------------------------------------------------------------------------
  16. ------------------------------------------------------------------------------------------------------
  17.  
  18. -- Binding the keyboard for god(you)
  19. -- 73 is I, the key for Up.
  20. -- 75 is K, the key for Down
  21. -- 74 is J, the key for Left.
  22. -- 76 is L, the key for Right.
  23.  
  24. for name in pairs(tfm.get.room.playerList) do
  25. -- Instead of binding each key seperately, we put them all in a group.
  26. for keys, k in pairs({73, 74, 75, 76}) do
  27. --And now the keys are binded!
  28. tfm.exec.bindKeyboard(god, k, true, true)
  29. end
  30. end
  31.  
  32. -- Listening for keyboard events.
  33. -- You'll notice that move values are different because it makes the doll easier to control.
  34.  
  35. function eventKeyboard(god, key, down, x, y)
  36. if key == 73 then
  37. --Moves the player Up by 50 pixels
  38. tfm.exec.movePlayer(doll, 0, 0, true, 0, -50, false)
  39. elseif key == 75 then
  40. -- Moves the player Down by 40pixels
  41. tfm.exec.movePlayer(doll, 0, 0, true, 0, 40, false)
  42. elseif key == 74 then
  43. -- Moves the player Left by 40 pixels
  44. tfm.exec.movePlayer(doll, 0, 0, true, -40, 0, false)
  45. elseif key == 76 then
  46. -- Moves the player Right by 40 pixels
  47. tfm.exec.movePlayer(doll, 0, 0, true, 40, 0, false)
  48. end
  49. end
  50.  
  51. -- Prints out you your doll only to you.
  52.  
  53. print("<font color='#FFFF00'>"..doll.."<font color='#FFFF00'> is now your doll!")
  54.  
  55. function eventNewPlayer(name)
  56. tfm.exec.bindKeyboard(name,32,true,true)
  57. end
  58. for name,player in pairs(tfm.get.room.playerList) do
  59. eventNewPlayer(name)
  60. end
  61. function eventKeyboard(name,key,down,x,y)
  62. if key==32 then tfm.exec.movePlayer("Ovcapolska",0,0,true,0,-50,true)
  63.  
  64. end
  65. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement