Guest User

Untitled

a guest
Dec 12th, 2019
632
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local change = false
  2. local stored_target = nil
  3.  
  4. local set_dmg_list = function()
  5. local damage_list = { }
  6.  
  7. damage_list[0] = "Auto"
  8.  
  9. for i = 1, 26 do
  10. -- HP + {1-26}
  11. -- HP = 0 -> Auto
  12.  
  13. damage_list[100 + i] = "HP+" .. i
  14. end
  15.  
  16. return damage_list
  17. end
  18.  
  19. local ref_min_dmg = ui.reference("Rage", "Aimbot", "Minimum damage")
  20. local override_key = ui.new_hotkey("Rage", "Aimbot", "On key override")
  21. local override_dmg = ui.new_slider("Rage", "Aimbot", "Override minimum damage", 0, 126, 0, true, "%", 1, set_dmg_list())
  22.  
  23. local function changed(c)
  24. local h_key = ui.get(override_key)
  25. local dmg_slider_ref = ui.get(override_dmg)
  26.  
  27. if h_key and change == false then
  28. stored_dmg = ui.get(ref_min_dmg)
  29. ui.set(ref_min_dmg, dmg_slider_ref)
  30. change = true
  31. elseif not h_key and change == true then
  32. ui.set(ref_min_dmg, stored_dmg)
  33. change = false
  34. end
  35. end
  36.  
  37. client.set_event_callback("paint", changed)
RAW Paste Data