Advertisement
Guest User

Door spam lua v0.3

a guest
Oct 16th, 2019
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.62 KB | None | 0 0
  1. local checkbox  = gui.new_checkbox("door spam")
  2. local spam      = gui.new_button_bind("checkbox", KEY_V)
  3. local delay     = gui.new_slider_int("delay in ticks", 1, 5, 2)
  4. local lastTick  = globals.tickcount()
  5. local callback  = callbacks.register
  6.  
  7. local function spamdoor()
  8.     if(gui.get(spam) and gui.get(checkbox)) then
  9.         if(globals.tickcount() - lastTick > 0) then
  10.             client.exec("+use")
  11.         end
  12.         if(globals.tickcount() - lastTick > gui.get(delay)) then
  13.             client.exec("-use")
  14.             lastTick = globals.tickcount()
  15.         end
  16.     end
  17. end
  18. callback("create_move", spamdoor)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement