Advertisement
Rawoas13

[Script] Speed

Jan 18th, 2020
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. --Creator: Hass
  2. --Made in: 18/01/2020
  3. --Last update: 18/01/2020
  4. --[[ Notes:
  5.     Does:
  6.         Hack Speed.
  7.     Keys:
  8.         Space --<-- Use Speed. (Editable in # *)
  9. ]]--
  10.  
  11. velocity = 35 -- Mouse speed
  12. key = 32 -- #*
  13.  
  14. mice={}
  15. eventNewPlayer=function(n) mice[n]={right=true}
  16.     for _,k in next,{0,2,key} do
  17.         system.bindKeyboard(n,k,true,true)
  18.     end
  19. end
  20. table.foreach(tfm.get.room.playerList,eventNewPlayer)
  21.  
  22. eventNewGame=function() table.foreach(tfm.get.room.playerList,function(n) mice[n]={right=true} end) end
  23.  
  24. eventKeyboard=function(n,k)
  25.     if k==key then
  26.         tfm.exec.movePlayer(n,0,0,false,(mice[n].right and velocity or -velocity),0,true)
  27.     end
  28.     if k==0 then mice[n].right=false elseif k==2 then mice[n].right=true end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement