Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local console_cmd = client.exec
- local console_log = client.log
- local ui_get = ui.get
- local rifles = {
- {
- rifle_name = 'None',
- rifle_console = ' '
- },
- {
- rifle_name = 'AK-47',
- rifles_console = 'ak47'
- },
- {
- rifle_name = "M4",
- rifles_console = "m4a1"
- },
- {
- rifle_name = 'SSG-08',
- rifles_console = 'ssg08'
- },
- {
- rifle_name = 'FAMAS',
- rifles_console = 'famas'
- },
- {
- rifle_name = 'AUG',
- rifles_console = 'aug'
- },
- {
- rifle_name = 'SG-553',
- rifles_console = 'sg556'
- },
- {
- rifle_name = 'AWP',
- rifles_console = 'awp'
- },
- {
- rifle_name = 'Auto Sniper',
- rifles_console = 'scar20; buy g3sg1'
- },
- {
- rifle_name = 'Galil',
- rifles_console = 'galilar'
- }
- }
- local heavy = {
- {
- heavy_name = 'None',
- heavy_console = ' '
- },
- {
- heavy_name = 'Nova',
- heavy_console = 'nova'
- },
- {
- heavy_name = 'XM1014',
- heavy_console = ' xm1014'
- },
- {
- heavy_name = 'MAG7',
- heavy_console = 'mag7'
- },
- {
- heavy_name = 'Sawed Off',
- heavy_console = 'sawedoff'
- },
- {
- heavy_name = 'M249',
- heavy_console = 'm249'
- },
- {
- heavy_name = 'Negev',
- heavy_console = 'negev'
- }
- }
- local pistols = {
- {
- pistol_name = 'None',
- pistol_console = ' '
- },
- {
- pistol_name = 'P2000',
- pistol_console = 'hkp2000'
- },
- {
- pistol_name = 'Glock-18',
- pistol_console = 'glock'
- },
- {
- pistol_name = 'Dual Berettas',
- pistol_console = 'elite'
- },
- {
- pistol_name = 'P250',
- pistol_console = 'p250'
- },
- {
- pistol_name = 'FIVE-SEVEN',
- pistol_console = 'fiveseven'
- },
- {
- pistol_name = 'TEC-9',
- pistol_console = 'tec9'
- },
- {
- pistol_name = 'Deagle / R8',
- pistol_console = 'deagle ;buy revolver'
- }
- }
- local smgs = {
- {
- smg_name = 'None',
- smg_console = ' '
- },
- {
- smg_name = 'MP-9',
- smg_console = 'mp9'
- },
- {
- smg_name = 'MAC-10',
- smg_console = 'mac10'
- },
- {
- smg_name = 'MP7',
- smg_console = 'mp7'
- },
- {
- smg_name = 'UMP-45',
- smg_console = 'ump45'
- },
- {
- smg_name = 'P90',
- smg_console = 'p90'
- },
- {
- smg_name = 'PP-BIZON',
- smg_console = 'bizon'
- }
- }
- local _rifles = {}
- for _, v in pairs(rifles) do
- _rifles[#_rifles + 1] = v.rifle_name
- end
- local _pistols = {}
- for _, v in pairs(pistols) do
- _pistols[#_pistols + 1] = v.pistol_name
- end
- local _smgs = {}
- for _, v in pairs(smgs) do
- _smgs[#_smgs + 1] = v.smg_name
- end
- local _heavy = {}
- for _, v in pairs(heavy) do
- _heavy[#_heavy + 1] = v.heavy_name
- end
- local buybot_button = ui.new_checkbox("MISC", "Miscellaneous", "Buy-bot")
- local rifles_combo = ui.new_combobox("MISC", "Miscellaneous", "Rifles", _rifles)
- local smg_combo = ui.new_combobox("MISC", "Miscellaneous", "SMG's", _smgs)
- local pistols_combo = ui.new_combobox("MISC", "Miscellaneous", "Pistols", _pistols)
- local heavy_combo = ui.new_combobox("MISC", "Miscellaneous", "Heavy", _heavy)
- local vest_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Kevlar Vest")
- local vesthelm_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Kevlar Vest + Helmet")
- local zeus_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Zeus x27")
- local defuse_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Defuse Kit")
- local molly_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Molotov / Incendiary")
- local smoke_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Smoke")
- local flash_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Flash")
- local flash2_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Flash x2")
- local he_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "HE Grenade")
- local decoy_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Decoy")
- local function buy()
- if ui_get(buybot_button)then
- local pistolname = ui_get(pistols_combo)
- for _, v in pairs(pistols) do
- if v.pistol_name == pistolname then
- console_cmd('buy ', v.pistol_console)
- console_log('bought ', pistol_name)
- end
- end
- if ui_get(vest_checkbox) then
- console_cmd('buy vest')
- console_log('Bought Kevlar')
- end
- if ui_get(vesthelm_checkbox) then
- console_cmd('buy vesthelm')
- console_log('Bought Kevlar + Helmet')
- end
- if ui_get(defuse_checkbox) then
- console_cmd('buy defuser')
- console_log('Bought defuse kit')
- end
- local smgname = ui_get(smg_combo)
- for _, v in pairs(smgs) do
- if v.smg_name == smgname then
- console_cmd('buy ', v.smg_console)
- console_log('bought ', smg_name)
- end
- end
- local riflename = ui_get(rifles_combo)
- for _, v in pairs(rifles) do
- if v.rifle_name == riflename then
- console_cmd('buy ', v.rifles_console)
- console_log('bought ', rifle_name)
- end
- end
- local heavyname = ui_get(heavy_combo)
- for _, v in pairs(heavy) do
- if v.heavy_name == heavyname then
- console_cmd("buy ", v.heavy_console)
- console_log('bought ', heavy_name)
- end
- end
- if ui_get(molly_checkbox) then
- console_cmd('buy incgrenade; buy molotov')
- console_log('Bought Incendiary / Molotov grenade')
- end
- if ui_get(smoke_checkbox) then
- console_cmd('buy smokegrenade')
- console_log('Bought Smoke Grenade')
- end
- if ui_get(flash_checkbox) then
- console_cmd('buy flashbang')
- console_log('Bought Flashbang')
- end
- if ui_get(flash2_checkbox) then
- console_cmd('buy flashbang; buy flashbang')
- console_log('Bought Flashbang x2')
- end
- if ui_get(he_checkbox) then
- console_cmd('buy hegrendade')
- console_log('Bought HE Grenade')
- end
- if ui_get(zeus_checkbox) then
- console_cmd('buy taser 34')
- console_log('Bought Zeus x27')
- end
- if ui_get(decoy_checkbox) then
- console_cmd('buy decoy')
- console_log('Bought Decoy')
- end
- end
- end
- client.set_event_callback("player_spawn", buy)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement