Advertisement
Guest User

autobuy

a guest
Apr 19th, 2019
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.01 KB | None | 0 0
  1. local misc_automation_main_ref = gui.Reference("MISC", "GENERAL", "Main")
  2.  
  3. local buybot_enable = gui.Checkbox( misc_automation_main_ref, "BB_enable", "BuyBot Active",  false)
  4. local buybot_primary = gui.Combobox( misc_automation_main_ref, "global_buybot_primary", "BuyBot Primary", "Off", "SCAR\\G3SG1","AK47\\M4A1", "SCOUT", "AWP", "SG553\\AUG")
  5. local buybot_secondary = gui.Combobox( misc_automation_main_ref, "global_buybot_secondary", "BuyBot Secondary",  "Off", "Duals", "Deagle\\Revolver" )
  6. local buybot_armor = gui.Checkbox( misc_automation_main_ref, "global_buybot_armor", "BuyBot Armor", false)
  7. local buybot_nades = gui.Checkbox( misc_automation_main_ref, "global_buybot_nades", "BuyBot Nades", false)
  8. local buybot_zeus = gui.Checkbox( misc_automation_main_ref, "global_buybot_zeus", "BuyBot Zeus",  false)
  9. local buybot_defuser = gui.Checkbox( misc_automation_main_ref, "global_buybot_defuse", "BuyBot Defuser",  false)
  10.  
  11.  
  12.  
  13. local weapons_ = {"pistol", "revolver", "smg", "rifle", "shotgun", "scout", "autosniper", "sniper", "lmg"}
  14. local hitboxes_ = {"head", "neck", "chest", "stomach", "pelvis", "arms", "legs"}
  15.  
  16. local primary_w = {"buy scar20", "buy m4a1", "buy scout", "buy awp","buy aug"}
  17. local secondary_w = {"buy elite", "buy deagle"}
  18.  
  19.    
  20.  
  21. function Hooked_Events( event )
  22.     if event:GetName() == "round_start" and buybot_enable:GetValue() then
  23.         local tobuy = ""
  24.         local primary = buybot_primary:GetValue()
  25.         local secondary = buybot_secondary:GetValue()
  26.        
  27.         if buybot_armor:GetValue() then tobuy = "buy vesthelm;" end
  28.         if primary > 0 then tobuy = tobuy..primary_w[primary]..";"  end    
  29.         if secondary > 0 then tobuy = tobuy..secondary_w[secondary]..";" end
  30.         if buybot_nades:GetValue() then tobuy = tobuy.."buy hegrenade;buy molotov;buy smokegrenade;buy flashbang;buy flashbang;" end
  31.         if buybot_zeus:GetValue() then tobuy = tobuy.."buy taser" end
  32.         if buybot_defuser:GetValue() then tobuy = tobuy.."buy defuser" end
  33.         client.Command(tobuy, false)
  34.     end
  35. end
  36.  
  37.  
  38.  
  39. callbacks.Register( "FireGameEvent", Hooked_Events)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement