Advertisement
miguelspastes

auto buy

Jan 15th, 2019
414
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. -- Original Buy bot https://aimware.net/forum/thread-87473.html -- Out of Menu LUA
  2. local show = true
  3. local ref = gui.Reference();
  4. local WindowBox = gui.Window("WindowBox", "Auto Buy", 200, 200, 200, 302)
  5. local GroupBox = gui.Groupbox( WindowBox, "Auto Buy Settings", 15, 15, 170, 240 );
  6. local ActiveCheckBox = gui.Checkbox(GroupBox, "ActiveCheckBox", "Activate", false)
  7. local PrimaryWeapons = gui.Combobox( GroupBox, 'PrimaryWeapons', "Primary Weapons", "Off", "AK | M4", "Scout", "AWP", "Auto")
  8. local SecondaryWeapons = gui.Combobox( GroupBox, 'SecondaryWeapons', "Secondary Weapons", "Off", "Elite", "P250", "Tec-9 | Five-Seven", "R8 | Deagle")
  9. local Nades = gui.Checkbox( GroupBox, "Nades", "Grenades", false);
  10. local Zeus = gui.Checkbox( GroupBox, "Zeus", "Zeus", false);
  11. local Armor = gui.Checkbox( GroupBox, "Armor", "Armor", false);
  12. local Defuser = gui.Checkbox( GroupBox, "Defuser", "Defuser", false);
  13. local money = 0
  14. local sleep = 0
  15. local buy_act = false
  16.  
  17. function showmen() if input.IsButtonPressed(45) then if show then show = false; else show = true; end end end; callbacks.Register("Draw", "asd", showmen);
  18. function shows() if show then WindowBox:SetActive(1); else WindowBox:SetActive(0); end end; callbacks.Register("Draw", "shows", shows);
  19.  
  20. function autobuy(Event)
  21. if (entities.GetLocalPlayer() ~= nil) then
  22. money = entities.GetLocalPlayer():GetProp("m_iAccount")
  23. end
  24. if ActiveCheckBox:GetValue() then
  25. if Event:GetName() == "round_start" then
  26. buy_act = true
  27. sleep = globals.TickCount()
  28. end end end
  29.  
  30. function buy()
  31. if buy_act == true and globals.TickCount() - sleep > 32 then
  32. buy_act = false
  33. sleep = globals.TickCount()
  34. if (SecondaryWeapons:GetValue() == 0) then
  35. elseif (SecondaryWeapons:GetValue() == 1) then
  36. client.Command("buy elite", true)
  37. elseif (SecondaryWeapons:GetValue() == 2) then
  38. client.Command("buy p250", true)
  39. elseif (SecondaryWeapons:GetValue() == 3) then
  40. client.Command("buy tec9", true)
  41. elseif (SecondaryWeapons:GetValue() == 4) then
  42. client.Command("buy deagle", true)
  43. end
  44. if (money > 199) then
  45. if Zeus:GetValue() then
  46. client.Command("buy Taser", true)
  47. end end
  48.  
  49. if (money > 2200) then
  50. if (PrimaryWeapons:GetValue() == 0) then
  51. elseif (PrimaryWeapons:GetValue() == 1) then
  52. client.Command("buy ak47", true)
  53. elseif (PrimaryWeapons:GetValue() == 2) then
  54. client.Command("buy ssg08", true)
  55. elseif (PrimaryWeapons:GetValue() == 3) then
  56. client.Command("buy awp", true)
  57. elseif (PrimaryWeapons:GetValue() == 4) then
  58. client.Command("buy scar20", true)
  59. end
  60. if Armor:GetValue() then client.Command("buy vest; buy vesthelm"); end
  61. if Nades:GetValue() then client.Command("buy hegrenade; buy incgrenade; buy molotov; buy smokegrenade; buy flashbang", true); end
  62. if Defuser:GetValue() then client.Command("buy defuser");
  63. end end end end
  64.  
  65. client.AllowListener('round_start');
  66. callbacks.Register("FireGameEvent", "autobuy", autobuy);
  67. callbacks.Register("Draw", "buy", buy);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement