Advertisement
Guest User

Untitled

a guest
Aug 3rd, 2014
1,442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.69 KB | None | 0 0
  1. -- You don't need to remove text with these: --
  2. -- It's ignored by the computer.
  3. -- Insert your victim's name (person who you would like to move) here without removing the quotation marks.
  4.  
  5. -- Be sure to remove the spaces
  6. doll= "Griffincraft"
  7.  
  8. -- Insert YOUR name here without removing the quotation marks.
  9. -- Be sure to remove the spaces
  10. god = "Nibblerrat"
  11.  
  12. -- Binding the keyboard for god(you)
  13. -- 73 is I, the key for Up.
  14. -- 75 is K, the key for Down
  15. -- 74 is J, the key for Left.
  16. -- 76 is L, the key for Right.
  17.  
  18. for name in pairs(tfm.get.room.playerList) do
  19. -- Instead of binding each key seperately, we put them all in a group.
  20.         for keys, k in pairs({73, 74, 75, 76}) do
  21. --And now the keys are binded!
  22.                 tfm.exec.bindKeyboard(god, k, true, true)
  23.         end
  24. end
  25.  
  26. -- Listening for keyboard events.
  27. -- You'll notice that move values are different because it makes the doll easier to control.
  28.  
  29. function eventKeyboard(god, key, down, x, y)
  30.         if key == 73 then
  31. --Moves the player Up by 50 pixels
  32.                 tfm.exec.movePlayer(doll, 0, 0, true, 0, -50, false)
  33.         elseif key == 75 then
  34. -- Moves the player Down by 40pixels
  35.                 tfm.exec.movePlayer(doll, 0, 0, true, 0, 40, false)
  36.         elseif key == 74 then
  37. -- Moves the player Left by 40 pixels
  38.                 tfm.exec.movePlayer(doll, 0, 0, true, -40, 0, false)                
  39.         elseif key == 76 then
  40. -- Moves the player Right by 40 pixels
  41.                 tfm.exec.movePlayer(doll, 0, 0, true, 40, 0, false)                      
  42.         end
  43. end
  44.  
  45. -- Prints out you your doll only to you.
  46.  
  47. print("<font color='#FFFF00'>"..doll.."<font color='#FFFF00'> is now your doll!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement