Advertisement
Guest User

Untitled

a guest
Jun 24th, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.72 KB | None | 0 0
  1. local console_cmd = client.exec
  2. local console_log = client.log
  3. local ui_get = ui.get
  4.  
  5. local rifles = {
  6. {
  7. rifle_name = 'None',
  8. rifle_console = ' '
  9. },
  10. {
  11. rifle_name = 'AK-47',
  12. rifles_console = 'ak47'
  13. },
  14. {
  15. rifle_name = "M4",
  16. rifles_console = "m4a1"
  17. },
  18. {
  19. rifle_name = 'SSG-08',
  20. rifles_console = 'ssg08'
  21. },
  22. {
  23. rifle_name = 'FAMAS',
  24. rifles_console = 'famas'
  25. },
  26. {
  27. rifle_name = 'AUG',
  28. rifles_console = 'aug'
  29. },
  30. {
  31. rifle_name = 'SG-553',
  32. rifles_console = 'sg556'
  33. },
  34. {
  35. rifle_name = 'AWP',
  36. rifles_console = 'awp'
  37. },
  38. {
  39. rifle_name = 'Auto Sniper',
  40. rifles_console = 'scar20; buy g3sg1'
  41. },
  42. {
  43. rifle_name = 'Galil',
  44. rifles_console = 'galilar'
  45. }
  46. }
  47.  
  48. local heavy = {
  49. {
  50. heavy_name = 'None',
  51. heavy_console = ' '
  52. },
  53. {
  54. heavy_name = 'Nova',
  55. heavy_console = 'nova'
  56. },
  57. {
  58. heavy_name = 'XM1014',
  59. heavy_console = ' xm1014'
  60. },
  61. {
  62. heavy_name = 'MAG7',
  63. heavy_console = 'mag7'
  64. },
  65. {
  66. heavy_name = 'Sawed Off',
  67. heavy_console = 'sawedoff'
  68. },
  69. {
  70. heavy_name = 'M249',
  71. heavy_console = 'm249'
  72. },
  73. {
  74. heavy_name = 'Negev',
  75. heavy_console = 'negev'
  76. }
  77. }
  78.  
  79. local pistols = {
  80. {
  81. pistol_name = 'None',
  82. pistol_console = ' '
  83. },
  84. {
  85. pistol_name = 'P2000',
  86. pistol_console = 'hkp2000'
  87. },
  88. {
  89. pistol_name = 'Glock-18',
  90. pistol_console = 'glock'
  91. },
  92. {
  93. pistol_name = 'Dual Berettas',
  94. pistol_console = 'elite'
  95. },
  96. {
  97. pistol_name = 'P250',
  98. pistol_console = 'p250'
  99. },
  100. {
  101. pistol_name = 'FIVE-SEVEN',
  102. pistol_console = 'fiveseven'
  103. },
  104. {
  105. pistol_name = 'TEC-9',
  106. pistol_console = 'tec9'
  107. },
  108. {
  109. pistol_name = 'Deagle / R8',
  110. pistol_console = 'deagle ;buy revolver'
  111. }
  112. }
  113.  
  114. local smgs = {
  115. {
  116. smg_name = 'None',
  117. smg_console = ' '
  118. },
  119. {
  120. smg_name = 'MP-9',
  121. smg_console = 'mp9'
  122. },
  123. {
  124. smg_name = 'MAC-10',
  125. smg_console = 'mac10'
  126. },
  127. {
  128. smg_name = 'MP7',
  129. smg_console = 'mp7'
  130. },
  131. {
  132. smg_name = 'UMP-45',
  133. smg_console = 'ump45'
  134. },
  135. {
  136. smg_name = 'P90',
  137. smg_console = 'p90'
  138. },
  139. {
  140. smg_name = 'PP-BIZON',
  141. smg_console = 'bizon'
  142. }
  143. }
  144.  
  145. local _rifles = {}
  146. for _, v in pairs(rifles) do
  147. _rifles[#_rifles + 1] = v.rifle_name
  148. end
  149.  
  150. local _pistols = {}
  151. for _, v in pairs(pistols) do
  152. _pistols[#_pistols + 1] = v.pistol_name
  153. end
  154.  
  155. local _smgs = {}
  156. for _, v in pairs(smgs) do
  157. _smgs[#_smgs + 1] = v.smg_name
  158. end
  159.  
  160. local _heavy = {}
  161. for _, v in pairs(heavy) do
  162. _heavy[#_heavy + 1] = v.heavy_name
  163. end
  164.  
  165. local buybot_button = ui.new_checkbox("MISC", "Miscellaneous", "Buy-bot")
  166. local rifles_combo = ui.new_combobox("MISC", "Miscellaneous", "Rifles", _rifles)
  167. local smg_combo = ui.new_combobox("MISC", "Miscellaneous", "SMG's", _smgs)
  168. local pistols_combo = ui.new_combobox("MISC", "Miscellaneous", "Pistols", _pistols)
  169. local heavy_combo = ui.new_combobox("MISC", "Miscellaneous", "Heavy", _heavy)
  170. local vest_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Kevlar Vest")
  171. local vesthelm_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Kevlar Vest + Helmet")
  172. local zeus_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Zeus x27")
  173. local defuse_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Defuse Kit")
  174. local molly_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Molotov / Incendiary")
  175. local smoke_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Smoke")
  176. local flash_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Flash")
  177. local flash2_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Flash x2")
  178. local he_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "HE Grenade")
  179. local decoy_checkbox = ui.new_checkbox("MISC", "Miscellaneous", "Decoy")
  180.  
  181.  
  182. local function buy()
  183. if ui_get(buybot_button)then
  184.  
  185. local pistolname = ui_get(pistols_combo)
  186. for _, v in pairs(pistols) do
  187. if v.pistol_name == pistolname then
  188. console_cmd('buy ', v.pistol_console)
  189. console_log('bought ', pistol_name)
  190. end
  191. end
  192.  
  193. if ui_get(vest_checkbox) then
  194. console_cmd('buy vest')
  195. console_log('Bought Kevlar')
  196. end
  197.  
  198. if ui_get(vesthelm_checkbox) then
  199. console_cmd('buy vesthelm')
  200. console_log('Bought Kevlar + Helmet')
  201. end
  202.  
  203. if ui_get(defuse_checkbox) then
  204. console_cmd('buy defuser')
  205. console_log('Bought defuse kit')
  206. end
  207.  
  208. local smgname = ui_get(smg_combo)
  209. for _, v in pairs(smgs) do
  210. if v.smg_name == smgname then
  211. console_cmd('buy ', v.smg_console)
  212. console_log('bought ', smg_name)
  213. end
  214. end
  215.  
  216. local riflename = ui_get(rifles_combo)
  217. for _, v in pairs(rifles) do
  218. if v.rifle_name == riflename then
  219. console_cmd('buy ', v.rifles_console)
  220. console_log('bought ', rifle_name)
  221. end
  222. end
  223.  
  224. local heavyname = ui_get(heavy_combo)
  225. for _, v in pairs(heavy) do
  226. if v.heavy_name == heavyname then
  227. console_cmd("buy ", v.heavy_console)
  228. console_log('bought ', heavy_name)
  229. end
  230. end
  231.  
  232. if ui_get(molly_checkbox) then
  233. console_cmd('buy incgrenade; buy molotov')
  234. console_log('Bought Incendiary / Molotov grenade')
  235. end
  236.  
  237. if ui_get(smoke_checkbox) then
  238. console_cmd('buy smokegrenade')
  239. console_log('Bought Smoke Grenade')
  240. end
  241.  
  242. if ui_get(flash_checkbox) then
  243. console_cmd('buy flashbang')
  244. console_log('Bought Flashbang')
  245. end
  246.  
  247. if ui_get(flash2_checkbox) then
  248. console_cmd('buy flashbang; buy flashbang')
  249. console_log('Bought Flashbang x2')
  250. end
  251.  
  252. if ui_get(he_checkbox) then
  253. console_cmd('buy hegrendade')
  254. console_log('Bought HE Grenade')
  255. end
  256.  
  257. if ui_get(zeus_checkbox) then
  258. console_cmd('buy taser 34')
  259. console_log('Bought Zeus x27')
  260. end
  261.  
  262. if ui_get(decoy_checkbox) then
  263. console_cmd('buy decoy')
  264. console_log('Bought Decoy')
  265. end
  266. end
  267. end
  268.  
  269. client.set_event_callback("player_spawn", buy)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement