2AreYouMental110

Victini's Apocalypse Rising Gui

Sep 17th, 2021
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 30.27 KB | None | 0 0
  1. MDown = false
  2. Mouse = game.Players.LocalPlayer:GetMouse()
  3. function ConvertNumbers(X, Y)
  4. TX = Mouse.ViewSizeX*X
  5. TY = Mouse.ViewSizeY*Y
  6. return TX, TY
  7. end
  8. function MoveableItem(item)
  9.     item.InputBegan:connect(function(input)
  10.         if input.UserInputType == Enum.UserInputType.MouseButton1 or input.UserInputType == Enum.UserInputType.Touch then
  11.             MDown = true
  12.             CX, CY = ConvertNumbers(item.Position.X.Scale, item.Position.Y.Scale)
  13.             item.Position = UDim2.new(0, item.Position.X.Offset+CX, 0, item.Position.Y.Offset+CY)
  14.             StartX = Mouse.X - item.Position.X.Offset
  15.             StartY = Mouse.Y - item.Position.Y.Offset
  16.             while MDown == true do
  17.                 item.Position = UDim2.new(0, Mouse.X - StartX, 0, Mouse.Y - StartY)
  18.                 wait()
  19.             end
  20.         end
  21.     end)
  22.     item.InputEnded:connect(function(input)
  23.         if input.UserInputType == Enum.UserInputType.MouseButton1 then
  24.             MDown = false
  25.         end
  26.     end)
  27. end
  28.  
  29. if pcall(function() readfile("Custom Kits.txt") end) ~= true then
  30. writefile("Custom Kits.txt", "")
  31. wait()
  32. end
  33.  
  34. MenusButtons = {"Items", "Kits", "Players", "Vehicles", "Weapons", "Custom Kits"}
  35. KitsList = {["M14"] = {"M14", {"M14Ammo50", 4}, "ACOG", "Grip", "Suppressor762", "MilitaryPackBlack"},
  36. ["Spec Ops"] = {"CamoSpecialBottom", "CamoSpecialTop", "BallisticSpecOps", "MaskSpecOps"},
  37. ["Additions"] = {"GPS", "Map", "Sabre", "GreenChemlight", "Entrencher"}}
  38. Light = game:GetService("Lighting")
  39. Players = game:GetService("Players")
  40. Loot = Light.LootDrops
  41. Mats = Light.Materials
  42. Work = game:GetService("Workspace")
  43. Vehicles = Work:FindFirstChild("Vehicles")
  44. Zombies = Work:FindFirstChild("Zombies")
  45. Ob = getrenv()["_G"].Obfuscate
  46. spawn(function()
  47. Chat = Players.LocalPlayer:WaitForChild("PlayerGui"):WaitForChild("CustomChat")
  48. Chat.ResetOnSpawn = false
  49. Hist = Chat:WaitForChild("Bin"):WaitForChild("History")
  50. for i, v in pairs(Hist:GetChildren()) do
  51. v.Changed:connect(function()
  52. if string.sub(v.Text, 1, 1) == "/" then
  53. v.Text = string.sub(v.Text, 2)
  54. end
  55. end)
  56. end
  57. end)
  58.  
  59. --Special Kits Load--
  60.  
  61. TextName = "Custom Kits"
  62. NewTx = readfile("Custom Kits.txt")
  63. --Setup is: {Kit2:M14;M14Ammo30#8;}
  64.  
  65. function Sep(Tx)
  66. local Tabs = {}
  67. local Open = false
  68. local Last = 0
  69. for i = 1, string.len(Tx) do
  70. if string.sub(Tx, i, i) == "{" then
  71. Open = true
  72. Last = i
  73. elseif string.sub(Tx, i, i) == "}" then
  74. if Open == true then
  75. Open = false
  76. table.insert(Tabs, string.sub(Tx, Last+1, i-1))
  77. end
  78. end
  79. end
  80. return Tabs
  81. end
  82.  
  83. function MakeIndividual(Tabs)
  84. if #Tabs < 1 then
  85. return
  86. end
  87. local ReturnList = {}
  88. for i = 1, #Tabs do
  89. local KitName = ""
  90. local Items = {}
  91. local Start = 0
  92. for a = 1, string.len(Tabs[i]) do
  93. if string.sub(Tabs[i], a, a) == ":" then
  94. KitName = string.sub(Tabs[i], 1, a-1)
  95. Start = a
  96. elseif string.sub(Tabs[i], a, a) == ";" then
  97. local TempItem = string.sub(Tabs[i], Start+1, a-1)
  98. if string.match(TempItem, "#") then
  99. local Val1 = string.split(TempItem, "#")
  100. Val1[2] = tonumber(Val1[2])
  101. TempItem = Val1
  102. end
  103. table.insert(Items, TempItem)
  104. Start = a
  105. end
  106. end
  107. KitsList[KitName] = Items
  108. ReturnList[KitName] = Items
  109. end
  110. return ReturnList
  111. end
  112.  
  113. function SetupCustomKits()
  114. KitsList = {["M14"] = {"M14", {"M14Ammo50", 4}, "ACOG", "Grip", "Suppressor762", "MilitaryPackBlack"},
  115. ["Spec Ops"] = {"CamoSpecialBottom", "CamoSpecialTop", "BallisticSpecOps", "MaskSpecOps"},
  116. ["Additions"] = {"GPS", "Map", "Sabre", "GreenChemlight", "Entrencher"}}
  117. MakeIndividual(Sep(readfile("Custom Kits.txt")))
  118. end
  119. SetupCustomKits()
  120. --Special Kits Load--
  121.  
  122. R = game.Workspace.Remote
  123. Serial = nil
  124. GetKey = nil
  125. local metaCall = getrawmetatable(getrenv().shared)
  126. for i, v in pairs(debug.getupvalues(metaCall.__index)) do
  127. if i == 3 then
  128. for a, b in pairs(debug.getupvalues(v)) do
  129. if a == 6 then
  130. Serial = b
  131. elseif a == 7 then
  132. GetKey = b
  133. end
  134. end
  135. end
  136. end
  137. function fireserver(Re, ...)
  138. Re = R[tostring(Re)]
  139. Re:FireServer(Serial({...}, GetKey()))
  140. end
  141.  
  142. for i, v in pairs(Loot:GetChildren()) do
  143. if not v.PrimaryPart then
  144. v.PrimaryPart = v:FindFirstChild("Head", true)
  145. end
  146. end
  147.  
  148. Gui = Instance.new("ScreenGui", game.CoreGui)
  149. Gui.Name = "Victini's Apoc Gui"
  150.  
  151. Frame = Instance.new("Frame", Gui)
  152. Frame.Size = UDim2.new(0, 340, 0, 240)
  153. Frame.BackgroundColor3 = Color3.new(160/255, 100/255, 185/255)
  154. MoveableItem(Frame)
  155.  
  156. Bar = Instance.new("TextLabel", Frame)
  157. Bar.Size = UDim2.new(1, 0, 0, 20)
  158. Bar.BackgroundColor3 = Color3.new(190/255, 140/255, 220/255)
  159. Bar.TextScaled = true
  160. Bar.TextColor3 = Color3.new(1, 1, 1)
  161. Bar.Text = "Victini's Apoc Gui"
  162. Bar.BorderSizePixel = 0
  163.  
  164. X = Instance.new("TextButton", Bar)
  165. X.Size = UDim2.new(0, 20, 0, 20)
  166. X.Position = UDim2.new(1, -20, 0, 0)
  167. X.Text = "X"
  168. X.TextScaled = true
  169. X.BackgroundColor3 = Color3.new(0, 0, 0)
  170. X.TextColor3 = Color3.new(1, 1, 1)
  171. X.BorderSizePixel = 0
  172. X.MouseButton1Down:connect(function()
  173. Gui:remove()
  174. end)
  175.  
  176. Menu = Instance.new("Frame", Frame)
  177. Menu.Size = UDim2.new(0, 80, 1, -20)
  178. Menu.Position = UDim2.new(0, 0, 0, 20)
  179. Menu.BackgroundColor3 = Color3.new(0, 0, 0)
  180. Menu.BorderSizePixel = 0
  181.  
  182. for i = 1, #MenusButtons do
  183. local Button = Instance.new("TextButton", Menu)
  184. Button.BorderSizePixel = 0
  185. Button.Size = UDim2.new(0.8, 0, 0, 30)
  186. Button.Position = UDim2.new(0.1, 0, 0, 30*(i-1))
  187. Button.BackgroundColor3 = Color3.new(100/255, 100/255, 185/255)
  188. Button.Text = MenusButtons[i]
  189. Button.TextScaled = true
  190. MenusButtons[MenusButtons[i]] = {}
  191. Button.MouseButton1Down:connect(function()
  192. for a = 1, #MenusButtons do
  193. local Tab = MenusButtons[MenusButtons[a]]
  194. for b = 1, #Tab do
  195. Tab[b].Visible = false
  196. end
  197. end
  198. local Tab = MenusButtons[MenusButtons[i]]
  199. for a = 1, #Tab do
  200. Tab[a].Visible = true
  201. end
  202. for a, b in pairs(Menu:GetChildren()) do
  203. if b:IsA("TextButton") then
  204. b.BackgroundColor3 = Color3.new(100/255, 100/255, 185/255)
  205. end
  206. end
  207. Button.BackgroundColor3 = Color3.new(160/255, 160/255, 1)
  208. end)
  209. end
  210.  
  211.  
  212. function MakeGUIItem(GuiType, Par)
  213. local Temp = Instance.new(GuiType, Frame)
  214. table.insert(MenusButtons[Par], Temp)
  215. Temp.Visible = false
  216. Temp.BorderSizePixel = 0
  217. return Temp
  218. end
  219.  
  220. function AddGUIItem(GuiItem, Par)
  221. table.insert(MenusButtons[Par], GuiItem)
  222. end
  223.  
  224. function MakeScrollButton(ScrollPar, Tx)
  225. local Button = Instance.new("TextButton", ScrollPar)
  226. Button.BorderSizePixel = 0
  227. Button.Size = UDim2.new(0.9, 0, 0, 25)
  228. Button.Position = UDim2.new(0, 0, 0, 25*(#ScrollPar:GetChildren()-1))
  229. Button.Text = Tx
  230. Button.TextScaled = true
  231. Button.BackgroundColor3 = Color3.new(60/255, 60/255, 1)
  232. return Button
  233. end
  234.  
  235. Scroll = MakeGUIItem("ScrollingFrame", "Items")
  236. Scroll.Size = UDim2.new(0, 130, 1, -50)
  237. Scroll.Position = UDim2.new(0, 80, 0, 50)
  238. Scroll.BackgroundTransparency = 1
  239. Scroll.Visible = true
  240. AddGUIItem(Scroll, "Custom Kits")
  241.  
  242. ItemLabel = MakeGUIItem("TextBox", "Items")
  243. ItemLabel.Size = UDim2.new(0, 100, 0, 30)
  244. ItemLabel.Position = UDim2.new(0, 80, 0, 20)
  245. ItemLabel.Text = "Item"
  246. ItemLabel.TextScaled = true
  247. ItemLabel.BackgroundColor3 = Color3.new(1, 1, 1)
  248. ItemLabel.Visible = true
  249. AddGUIItem(ItemLabel, "Custom Kits")
  250.  
  251. ItemSearch = MakeGUIItem("TextButton", "Items")
  252. ItemSearch.BorderSizePixel = 0
  253. ItemSearch.Size = UDim2.new(0, 30, 0, 30)
  254. ItemSearch.Position = UDim2.new(0, 180, 0, 20)
  255. ItemSearch.Text = "=>"
  256. ItemSearch.TextScaled = true
  257. ItemSearch.BackgroundColor3 = Color3.new(1, 1, 1)
  258. ItemSearch.Visible = true
  259. ItemSearch.MouseButton1Down:connect(function()
  260. ItemsDisplay(ItemLabel.Text)
  261. end)
  262. AddGUIItem(ItemSearch, "Custom Kits")
  263.  
  264. function ItemsDisplay(Specific)
  265. ClearDisplay()
  266. wait()
  267. local Times = 0
  268. for i, v in pairs(Loot:GetChildren()) do
  269. if Specific == nil or string.match(string.lower(v.Name), string.lower(Specific)) then
  270. local Button = MakeScrollButton(Scroll, v.Name)
  271. Button.MouseButton1Down:connect(function()
  272. SelectedItem = v
  273. AmountText.Text = 1
  274. for a, b in pairs(Scroll:GetChildren()) do
  275. b.BackgroundColor3 = Color3.new(60/255, 60/255, 1)
  276. end
  277. Button.BackgroundColor3 = Color3.new(120/255, 120/255, 1)
  278. end)
  279. end
  280. end
  281. Scroll.CanvasSize = UDim2.new(0, 0, 0, 25*#Scroll:GetChildren())
  282. end
  283.  
  284. function ClearDisplay()
  285. for i, v in pairs(Scroll:GetChildren()) do
  286. v:remove()
  287. end
  288. end
  289.  
  290. ItemsDisplay()
  291.  
  292. PlayersDisplay = MakeGUIItem("ScrollingFrame", "Items")
  293. AddGUIItem(PlayersDisplay, "Kits")
  294. AddGUIItem(PlayersDisplay, "Players")
  295. AddGUIItem(PlayersDisplay, "Vehicles")
  296. AddGUIItem(PlayersDisplay, "Weapons")
  297. PlayersDisplay.Size = UDim2.new(0, 130, 1, -50)
  298. PlayersDisplay.Position = UDim2.new(0, 210, 0, 20)
  299. PlayersDisplay.BackgroundTransparency = 1
  300. PlayersDisplay.Visible = true
  301.  
  302. function DisplayPlayers()
  303. ClearPlayers()
  304. wait()
  305. for i, v in pairs(game.Players:GetPlayers()) do
  306. local Button = MakeScrollButton(PlayersDisplay, v.Name)
  307. PlayersDisplay.CanvasSize = UDim2.new(0, 0, 0, 25*i)
  308. if v == SelectedPlayer then
  309. Button.BackgroundColor3 = Color3.new(120/255, 120/255, 1)
  310. end
  311. Button.MouseButton1Down:connect(function()
  312. SelectedPlayer = v
  313. for i, v in pairs(PlayersDisplay:GetChildren()) do
  314. v.BackgroundColor3 = Color3.new(60/255, 60/255, 1)
  315. end
  316. Button.BackgroundColor3 = Color3.new(120/255, 120/255, 1)
  317. end)
  318. end
  319. local All = Instance.new("TextButton", PlayersDisplay)
  320. All.Name = "All"
  321. All.BorderSizePixel = 0
  322. All.Size = UDim2.new(0.9, 0, 0, 25)
  323. All.Position = UDim2.new(0, 0, 0, 25*(#game.Players:GetChildren()))
  324. PlayersDisplay.CanvasSize = UDim2.new(0, 0, 0, 25*(#game.Players:GetChildren()+1))
  325. All.Text = "All"
  326. All.TextScaled = true
  327. All.BackgroundColor3 = Color3.new(60/255, 60/255, 1)
  328. All.MouseButton1Down:connect(function()
  329. SelectedPlayer = All
  330. for i, v in pairs(PlayersDisplay:GetChildren()) do
  331. v.BackgroundColor3 = Color3.new(60/255, 60/255, 1)
  332. end
  333. All.BackgroundColor3 = Color3.new(120/255, 120/255, 1)
  334. end)
  335. if tostring(SelectedPlayer) == "All" then
  336. All.BackgroundColor3 = Color3.new(120/255, 120/255, 1)
  337. end
  338. end
  339.  
  340. function ClearPlayers()
  341. for i, v in pairs(PlayersDisplay:GetChildren()) do
  342. v:remove()
  343. end
  344. end
  345.  
  346. DisplayPlayers()
  347. Players.PlayerAdded:connect(DisplayPlayers)
  348. Players.PlayerRemoving:connect(DisplayPlayers)
  349.  
  350. SpawnItemButton = MakeGUIItem("TextButton", "Items")
  351. SpawnItemButton.Size = UDim2.new(0, 129, 0, 29)
  352. SpawnItemButton.Position = UDim2.new(1, -130, 1, -29)
  353. SpawnItemButton.BackgroundColor3 = Color3.new(190/255, 140/255, 220/255)
  354. SpawnItemButton.Text = "Spawn"
  355. SpawnItemButton.TextScaled = true
  356. SpawnItemButton.TextColor3 = Color3.new(1, 1, 1)
  357. SpawnItemButton.Visible = true
  358. SpawnItemButton.MouseButton1Down:connect(function()
  359. local Amount = 1
  360. if tonumber(Quantity.Text) ~= nil and tonumber(Quantity.Text) > 1 then
  361. Amount = tonumber(Quantity.Text)
  362. end
  363. if tostring(SelectedPlayer) ~= "All" then
  364. for i = 1, Amount do
  365. SpawnItem(Loot, Vector3.new(3, 2, 0), SelectedItem, SelectedPlayer)
  366. end
  367. elseif tostring(SelectedPlayer) == "All" then
  368. for i, v in pairs(game.Players:GetPlayers()) do
  369. for a = 1, Amount do
  370. SpawnItem(Loot, Vector3.new(3, 2, 0), SelectedItem, v)
  371. end
  372. end
  373. end
  374. end)
  375.  
  376. SelectedPlayer = nil
  377. SelectedItem = nil
  378. SpawnedItems = {}
  379. function SpawnItem(Par, OF, SelectedItem, SelectedPlayer)
  380. if SelectedPlayer == nil or SelectedItem == nil then
  381. return
  382. end
  383. if SpawnedItems[SelectedItem] == nil then
  384. SpawnedItems[SelectedItem] = {true}
  385. else
  386. table.insert(SpawnedItems[SelectedItem], true)
  387. end
  388. if SelectedItem.Parent ~= Mats then
  389. fireserver("ChangeParent", Par:WaitForChild(tostring(SelectedItem)), Mats)
  390. end
  391. local ItemI = Mats:WaitForChild(tostring(SelectedItem))
  392. pcall(function() R["PlaceMaterial"]:FireServer(Mats:WaitForChild(tostring(SelectedItem)).Name, SelectedPlayer.Character.Torso.Position-ItemI.PrimaryPart.Position-OF) end)
  393. spawn(function()
  394. wait(2)
  395. table.remove(SpawnedItems[SelectedItem], 1)
  396. if #SpawnedItems[SelectedItem] < 1 then
  397. fireserver("ChangeParent", Mats:WaitForChild(tostring(SelectedItem)), Par)
  398. end
  399. end)
  400. end
  401.  
  402. Extend = MakeGUIItem("Frame", "Items")
  403. Extend.BackgroundColor3 = Color3.new(160/255, 100/255, 185/255)
  404. Extend.Position = UDim2.new(0, -1, 1, -1)
  405. Extend.Size = UDim2.new(1, 1, 0, 26)
  406. AddGUIItem(Extend, "Custom Kits")
  407. AddGUIItem(Extend, "Vehicles")
  408.  
  409. Quantity = MakeGUIItem("TextBox", "Items")
  410. Quantity.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  411. Quantity.Size = UDim2.new(0, 130, 0, 26)
  412. Quantity.Position = UDim2.new(1, -130, 1, 0)
  413. Quantity.Text = "Amount"
  414. Quantity.TextScaled = true
  415. AddGUIItem(Quantity, "Vehicles")
  416.  
  417. SelectedKit = nil
  418. KitsDisplay = MakeGUIItem("ScrollingFrame", "Kits")
  419. KitsDisplay.Size = UDim2.new(0, 130, 1, -20)
  420. KitsDisplay.Position = UDim2.new(0, 80, 0, 20)
  421. KitsDisplay.BackgroundTransparency = 1
  422. KitsDisplay.Visible = false
  423. function DisplayKits()
  424. for i ,v in pairs(KitsDisplay:GetChildren()) do
  425. v:remove()
  426. end
  427. wait()
  428. for i, v in pairs(KitsList) do
  429. local Button = MakeScrollButton(KitsDisplay, tostring(i))
  430. Button.MouseButton1Down:connect(function()
  431. SelectedKit = tostring(i)
  432. for i, v in pairs(KitsDisplay:GetChildren()) do
  433. if v:IsA("TextButton") then
  434. v.BackgroundColor3 = Color3.new(60/255, 60/255, 1)
  435. end
  436. end
  437. Button.BackgroundColor3 = Color3.new(120/255, 120/255, 1)
  438. end)
  439. end
  440. KitsDisplay.CanvasSize = UDim2.new(0, 0, 0, 25*#KitsDisplay:GetChildren())
  441. end
  442.  
  443. DisplayKits()
  444.  
  445. SpawnKitsButton = MakeGUIItem("TextButton", "Kits")
  446. SpawnKitsButton.Size = UDim2.new(0, 129, 0, 29)
  447. SpawnKitsButton.Position = UDim2.new(1, -130, 1, -29)
  448. SpawnKitsButton.BackgroundColor3 = Color3.new(190/255, 140/255, 220/255)
  449. SpawnKitsButton.Text = "Spawn"
  450. SpawnKitsButton.TextScaled = true
  451. SpawnKitsButton.TextColor3 = Color3.new(1, 1, 1)
  452. SpawnKitsButton.Visible = false
  453. SpawnKitsButton.MouseButton1Down:connect(function()
  454. if SelectedPlayer == nil or SelectedKit == nil then
  455. return
  456. end
  457. Tab = KitsList[SelectedKit]
  458. for i = 1, #Tab do
  459. local SItem;
  460. local SAmount = 1
  461. if typeof(Tab[i]) == "table" then
  462. SItem = Tab[i][1]
  463. SAmount = Tab[i][2]
  464. else
  465. SItem = Tab[i]
  466. end
  467. if Mats:FindFirstChild(SItem) then
  468. SItem = Mats:FindFirstChild(SItem)
  469. else
  470. SItem = Loot:WaitForChild(SItem)
  471. end
  472. spawn(function()
  473. for a = 1, SAmount do
  474. local ItemOffset = Vector3.new(math.random(1, 14)-7, 2, math.random(1, 14)-7)
  475. if tostring(SelectedPlayer) ~= "All" then
  476. SpawnItem(Loot, ItemOffset, SItem, SelectedPlayer)
  477. elseif tostring(SelectedPlayer) == "All" then
  478. for c, d in pairs(game.Players:GetPlayers()) do
  479. SpawnItem(Loot, ItemOffset, SItem, d)
  480. end
  481. end
  482. end
  483. end)
  484. end
  485. end)
  486.  
  487. KillPlr = MakeGUIItem("TextButton", "Players")
  488. KillPlr.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  489. KillPlr.Size = UDim2.new(0, 130, 0, 25)
  490. KillPlr.Position = UDim2.new(0, 80, 0, 20)
  491. KillPlr.Text = "Kill Player"
  492. KillPlr.TextScaled = true
  493. KillPlr.MouseButton1Down:connect(function()
  494. if SelectedPlayer ~= nil and tostring(SelectedPlayer) ~= "All" and SelectedPlayer.Character ~= nil and SelectedPlayer.Character:FindFirstChild("Head") then
  495. fireserver("GrabItem", SelectedPlayer.Character.Humanoid, game.Players, SelectedPlayer.Character.Head)
  496. elseif tostring(SelectedPlayer) == "All" then
  497. for i, v in pairs(game.Players:GetPlayers()) do
  498. if v ~= game.Players.LocalPlayer and v.Character ~= nil and v.Character:FindFirstChild("Head") and v.Character:FindFirstChild("Humanoid") then
  499. fireserver("GrabItem", v.Character.Humanoid, game.Players, v.Character.Head)
  500. end
  501. end
  502. end
  503. end)
  504.  
  505. KickPlr = MakeGUIItem("TextButton", "Players")
  506. KickPlr.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  507. KickPlr.Size = UDim2.new(0, 130, 0, 25)
  508. KickPlr.Position = UDim2.new(0, 80, 0, 45)
  509. KickPlr.Text = "Kick Player"
  510. KickPlr.TextScaled = true
  511. KickPlr.MouseButton1Down:connect(function()
  512. if SelectedPlayer ~= nil and tostring(SelectedPlayer) ~= "All" and SelectedPlayer.Character ~= nil and SelectedPlayer.Character:FindFirstChild("HumanoidRootPart") then
  513. local H = SelectedPlayer.Character.HumanoidRootPart
  514. R.AddClothing:FireServer("IsBuildingMaterial", H, "", "", "")
  515. repeat
  516. wait()
  517. until H:FindFirstChild("IsBuildingMaterial")
  518. R.ReplicatePart:FireServer(H, H.CFrame + Vector3.new(1000, 100, 1000))
  519. elseif tostring(SelectedPlayer) == "All" then
  520. for i, v in pairs(game.Players:GetPlayers()) do
  521. if v ~= game.Players.LocalPlayer and v.Character ~= nil and v.Character:FindFirstChild("HumanoidRootPart") then
  522. spawn(function()
  523. local H = v.Character.HumanoidRootPart
  524. R.AddClothing:FireServer("IsBuildingMaterial", H, "", "", "")
  525. repeat
  526. wait()
  527. until H:FindFirstChild("IsBuildingMaterial")
  528. R.ReplicatePart:FireServer(H, H.CFrame + Vector3.new(1000, 100, 1000))
  529. end)
  530. end
  531. end
  532. end
  533. end)
  534.  
  535. InfStat = MakeGUIItem("TextButton", "Players")
  536. InfStat.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  537. InfStat.Size = UDim2.new(0, 130, 0, 25)
  538. InfStat.Position = UDim2.new(0, 80, 0, 70)
  539. InfStat.Text = "Infinite Hunger/Thirst"
  540. InfStat.TextScaled = true
  541. InfStat.MouseButton1Down:connect(function()
  542. if SelectedPlayer ~= nil and tostring(SelectedPlayer) ~= "All" and SelectedPlayer:FindFirstChild("playerstats") then
  543. fireserver("ChangeValue", SelectedPlayer.playerstats.Hunger, math.huge)
  544. fireserver("ChangeValue", SelectedPlayer.playerstats.Thirst, math.huge)
  545. elseif tostring(SelectedPlayer) == "All" then
  546. for i, v in pairs(game.Players:GetPlayers()) do
  547. if v:FindFirstChild("playerstats") then
  548. fireserver("ChangeValue", v.playerstats.Hunger, math.huge)
  549. fireserver("ChangeValue", v.playerstats.Thirst, math.huge)
  550. end
  551. end
  552. end
  553. end)
  554.  
  555. Humanoids = {}
  556. GodButton = MakeGUIItem("TextButton", "Players")
  557. GodButton.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  558. GodButton.Size = UDim2.new(0, 130, 0, 25)
  559. GodButton.Position = UDim2.new(0, 80, 0, 95)
  560. GodButton.Text = "God Player"
  561. GodButton.TextScaled = true
  562. GodButton.MouseButton1Down:connect(function()
  563. if SelectedPlayer == nil then
  564. return
  565. end
  566. if tostring(SelectedPlayer) ~= "All" and SelectedPlayer.Character ~= nil and SelectedPlayer.Character:FindFirstChild("Humanoid") then
  567. fireserver("AddDamage", SelectedPlayer.Character.Humanoid, math.huge)
  568. if SelectedPlayer == game.Players.LocalPlayer and Humanoids[SelectedPlayer.Character.Humanoid] ~= true then
  569. Humanoids[SelectedPlayer.Character.Humanoid] = true
  570. SelectedPlayer.Character.Humanoid:GetPropertyChangedSignal("Health"):connect(function()
  571. if SelectedPlayer.Character.Humanoid ~= nil and SelectedPlayer.Character.Humanoid.Health ~= 100 then
  572. SelectedPlayer.Character.Humanoid.Health = 100
  573. end
  574. end)
  575. end
  576. elseif tostring(SelectedPlayer) == "All" then
  577. for i, v in pairs(game.Players:GetPlayers()) do
  578. if v.Character ~= nil and v:FindFirstChild("Humanoid") then
  579. fireserver("AddDamage", v.Character.Humanoid, math.huge)
  580. end
  581. end
  582. end
  583. end)
  584.  
  585.  
  586. VehiclesScroll = MakeGUIItem("ScrollingFrame", "Vehicles")
  587. VehiclesScroll.Size = UDim2.new(0, 130, 1, -20)
  588. VehiclesScroll.Position = UDim2.new(0, 80, 0, 20)
  589. VehiclesScroll.BackgroundTransparency = 1
  590.  
  591. function DisplayVehicles()
  592. for i, v in pairs(VehiclesScroll:GetChildren()) do
  593. v:remove()
  594. end
  595. wait()
  596. local VT = {}
  597. for i, v in pairs(Vehicles:GetChildren()) do
  598. if VT[v.Name] == nil then
  599. VT[v.Name] = true
  600. local Button = MakeScrollButton(VehiclesScroll, v.Name)
  601. Button.MouseButton1Down:connect(function()
  602. SelectedVehicle = v
  603. for a, b in pairs(VehiclesScroll:GetChildren()) do
  604. b.BackgroundColor3 = Color3.new(60/255, 60/255, 1)
  605. end
  606. Button.BackgroundColor3 = Color3.new(120/255, 120/255, 1)
  607. end)
  608. end
  609. end
  610. VehiclesScroll.CanvasSize = UDim2.new(0, 0, 0, 25*#VehiclesScroll:GetChildren())
  611. end
  612.  
  613. DisplayVehicles()
  614. Vehicles.ChildAdded:connect(DisplayVehicles)
  615. Vehicles.ChildRemoved:connect(DisplayVehicles)
  616.  
  617. SpawnVButton = MakeGUIItem("TextButton", "Vehicles")
  618. SpawnVButton.Size = UDim2.new(0, 129, 0, 29)
  619. SpawnVButton.Position = UDim2.new(1, -130, 1, -29)
  620. SpawnVButton.BackgroundColor3 = Color3.new(190/255, 140/255, 220/255)
  621. SpawnVButton.Text = "Spawn"
  622. SpawnVButton.TextScaled = true
  623. SpawnVButton.TextColor3 = Color3.new(1, 1, 1)
  624. SpawnVButton.Visible = false
  625. SpawnVButton.MouseButton1Down:connect(function()
  626. local Number = tonumber(Quantity.Text)
  627. if Number == nil or Number < 1 then
  628. Number = 1
  629. end
  630. SpawnVehicle(SelectedVehicle, SelectedPlayer, Number)
  631. end)
  632.  
  633. function SpawnVehicle(SelectedVehicle, SelectedPlayer, Amount)
  634. spawn(function()
  635. for i = 1, Amount do
  636. if SelectedVehicle == nil or SelectedPlayer == nil then
  637. return
  638. end
  639. if game.Workspace:FindFirstChild(tostring(SelectedVehicle)) then
  640. for i, v in pairs(game.Workspace:GetChildren()) do
  641. if v.Name == tostring(SelectedVehicle) then
  642. fireserver("GrabItem", Vehicles, v, v)
  643. end
  644. end
  645. end
  646. SpawnItem(Vehicles, Vector3.new(20, -5, 0), SelectedVehicle, SelectedPlayer)
  647. repeat
  648. wait()
  649. until game.Workspace:FindFirstChild(tostring(SelectedVehicle))
  650. newCar = game.Workspace[tostring(SelectedVehicle)]
  651. fireserver("GrabItem", Vehicles, game.Players, newCar)
  652. for i, v in pairs(newCar:WaitForChild("Stats"):GetChildren()) do
  653. if v.Name == "Armor" or v.Name == "Tank" or v.Name == "Hull" or v.Name == "Engine" or v.Name == "Fuel" then
  654. if v:FindFirstChild("Max") then
  655. fireserver("ChangeValue", v.Max, 1999999999)
  656. end
  657. fireserver("ChangeValue", v, 1999999999)
  658. elseif v.Name == "MaxSpeed" then
  659. fireserver("ChangeValue", v, 200)
  660. if v:FindFirstChild("Offroad") then
  661. fireserver("ChangeValue", v.Offroad, 200)
  662. end
  663. end
  664. end
  665. for i, v in pairs(newCar:WaitForChild("Wheels"):GetChildren()) do
  666. fireserver("WheelVisibleSet", v, "Normal")
  667. end
  668. end
  669. end)
  670. end
  671.  
  672. StatsToChange = {["Reload"] = {false, 20, 9999999}, ["Accuracy"] = {true, 1, 9999999}, ["Zoomed"] = {true, 100, 9999999}, ["Damage"] = {true, 100, 1}, ["Recoil"] = {true, 1, 9999999}}
  673. --Don't change the above, its to decide if we need to obfuscate the values or not
  674.  
  675. function ChangeAllStats(Par, Val)
  676. for i, v in pairs(Par:GetDescendants()) do
  677. if StatsToChange[tostring(v)] ~= nil and (v:IsA("StringValue") or v:IsA("IntValue")) then
  678. if StatsToChange[tostring(v)][1] == false then
  679. fireserver("ChangeValue", v, StatsToChange[tostring(v)][Val])
  680. else
  681. fireserver("ChangeValue", v, Ob(StatsToChange[tostring(v)][Val]))
  682. end
  683. end
  684. end
  685. end
  686.  
  687. GodWeapon = MakeGUIItem("TextButton", "Weapons")
  688. GodWeapon.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  689. GodWeapon.Size = UDim2.new(0, 130, 0, 25)
  690. GodWeapon.Position = UDim2.new(0, 80, 0, 20)
  691. GodWeapon.Text = "God Weapons"
  692. GodWeapon.TextScaled = true
  693. GodWeapon.MouseButton1Down:connect(function()
  694. if SelectedPlayer == nil then
  695. return
  696. end
  697. if tostring(SelectedPlayer) ~= "All" and SelectedPlayer:FindFirstChild("Backpack") and SelectedPlayer.Character ~= nil then
  698. ChangeAllStats(SelectedPlayer.Backpack, 2)
  699. ChangeAllStats(SelectedPlayer.Character, 2)
  700. elseif tostring(SelectedPlayer) == "All" then
  701. for i, v in pairs(game.Players:GetPlayers()) do
  702. if v:FindFirstChild("Backpack") and v.Character ~= nil then
  703. ChangeAllStats(v.Backpack, 2)
  704. ChangeAllStats(v.Character, 2)
  705. end
  706. end
  707. end
  708. end)
  709.  
  710. BreakWeapon = MakeGUIItem("TextButton", "Weapons")
  711. BreakWeapon.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  712. BreakWeapon.Size = UDim2.new(0, 130, 0, 25)
  713. BreakWeapon.Position = UDim2.new(0, 80, 0, 45)
  714. BreakWeapon.Text = "Break Weapons"
  715. BreakWeapon.TextScaled = true
  716. BreakWeapon.MouseButton1Down:connect(function()
  717. if SelectedPlayer == nil then
  718. return
  719. end
  720. if tostring(SelectedPlayer) ~= "All" and SelectedPlayer:FindFirstChild("Backpack") and SelectedPlayer.Character ~= nil then
  721. ChangeAllStats(SelectedPlayer.Backpack, 3)
  722. ChangeAllStats(SelectedPlayer.Character, 3)
  723. elseif tostring(SelectedPlayer) == "All" then
  724. for i, v in pairs(game.Players:GetPlayers()) do
  725. if v:FindFirstChild("Backpack") and v.Character ~= nil then
  726. ChangeAllStats(v.Backpack, 3)
  727. ChangeAllStats(v.Character, 3)
  728. end
  729. end
  730. end
  731. end)
  732.  
  733. InfiniteAmmo = MakeGUIItem("TextButton", "Weapons")
  734. InfiniteAmmo.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  735. InfiniteAmmo.Size = UDim2.new(0, 130, 0, 25)
  736. InfiniteAmmo.Position = UDim2.new(0, 80, 0, 70)
  737. InfiniteAmmo.Text = "Infinite Ammo"
  738. InfiniteAmmo.TextScaled = true
  739. InfiniteAmmo.MouseButton1Down:connect(function()
  740. if SelectedPlayer == nil then
  741. SelectedPlayer = game.Players.LocalPlayer
  742. end
  743. if tostring(SelectedPlayer) ~= "All" then
  744. for i, v in pairs(SelectedPlayer.playerstats.slots:GetDescendants()) do
  745. if v.Name == "Clip" then
  746. fireserver("ChangeValue", v.MaxClip, 2000000000)
  747. fireserver("ChangeValue", v, Ob(2000000000))
  748. end
  749. end
  750. elseif tostring(SelectedPlayer) == "All" then
  751. for i, v in pairs(game.Players:GetPlayers()) do
  752. if v:FindFirstChild("playerstats") then
  753. spawn(function()
  754. for a, b in pairs(v.playerstats.slots:GetDescendants()) do
  755. if b.Name == "Clip" and b:FindFirstChild("MaxClip") then
  756. fireserver("ChangeValue", b.MaxClip, 2000000000)
  757. fireserver("ChangeValue", b, Ob(2000000000))
  758. end
  759. end
  760. end)
  761. end
  762. end
  763. end
  764. end)
  765.  
  766. local TempKitCreation = {}
  767. local CreatingKit = false
  768. function AddToCreationKit(Item, Amount)
  769. local TempItem = Item
  770. if Amount > 1 then
  771. TempItem = {Item, Amount}
  772. end
  773. table.insert(TempKitCreation, TempItem)
  774. end
  775. function RemoveFromCreationKit(Item)
  776. for i = 1, #TempKitCreation do
  777. if typeof(TempKitCreation[i]) == "table" and TempKitCreation[i][1] == Item or TempKitCreation[i] == Item then
  778. table.remove(TempKitCreation, i)
  779. end
  780. end
  781. end
  782.  
  783. function DeleteKitF(KN)
  784. local TempKitListText = readfile("Custom Kits.txt")
  785. for i = 1, string.len(TempKitListText) do
  786. if string.sub(TempKitListText, i, i+string.len(KN)) == KN..":" then
  787. local End = 0
  788. repeat
  789. End = End+1
  790. until string.sub(TempKitListText, i+End, i+End) == "}"
  791. if i == 2 then
  792. TempKitListText = string.sub(TempKitListText, i+End+2)
  793. else
  794. TempKitListText = string.sub(TempKitListText, 1, i-2)..string.sub(TempKitListText, i+End+2)
  795. end
  796. writefile("Custom Kits.txt", TempKitListText)
  797. break
  798. end
  799. end
  800. end
  801.  
  802. KitItemsDisplay = MakeGUIItem("ScrollingFrame", "Custom Kits")
  803. KitItemsDisplay.Size = UDim2.new(0, 130, 0.5, 21)
  804. KitItemsDisplay.Position = UDim2.new(0, 210, 0, 20)
  805. KitItemsDisplay.BackgroundTransparency = 1
  806.  
  807. KitNameBox = MakeGUIItem("TextBox", "Custom Kits")
  808. KitNameBox.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  809. KitNameBox.Size = UDim2.new(0, 130, 0, 26)
  810. KitNameBox.Position = UDim2.new(0, 210, 1, -27)
  811. KitNameBox.Text = "Kit Name"
  812. KitNameBox.TextScaled = true
  813.  
  814. AmountText = MakeGUIItem("TextBox", "Custom Kits")
  815. AmountText.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  816. AmountText.Size = UDim2.new(0, 130, 0, 26)
  817. AmountText.Position = UDim2.new(0, 80, 1, -1)
  818. AmountText.Text = "Item Amount"
  819. AmountText.TextScaled = true
  820.  
  821. CreateButton = MakeGUIItem("TextButton", "Custom Kits")
  822. CreateButton.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  823. CreateButton.Size = UDim2.new(0, 130, 0, 26)
  824. CreateButton.Position = UDim2.new(0, 210, 1, -1)
  825. CreateButton.Text = "Create Kit"
  826. CreateButton.TextScaled = true
  827. CreateButton.TextColor3 = Color3.new(1, 1, 1)
  828. CreateButton.MouseButton1Down:connect(function()
  829. if CreatingKit == false or #TempKitCreation < 1 then
  830. return
  831. end
  832. local TempKitString = "{"..KitNameBox.Text..":"
  833. for i = 1, #TempKitCreation do
  834. local TempKitItem = TempKitCreation[i]
  835. if typeof(TempKitItem) == "table" then
  836. TempKitItem = TempKitItem[1].."#"..tostring(TempKitItem[2])
  837. end
  838. TempKitString = TempKitString..TempKitItem..";"
  839. end
  840. TempKitString = TempKitString.."},"
  841. DeleteKitF(KitNameBox.Text)
  842. writefile("Custom Kits.txt", readfile("Custom Kits.txt")..TempKitString)
  843. wait(1)
  844. SetupCustomKits()
  845. wait()
  846. DisplayKits()
  847. LoadKitsF()
  848. end)
  849.  
  850. AddItemButton = MakeGUIItem("TextButton", "Custom Kits")
  851. AddItemButton.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  852. AddItemButton.Size = UDim2.new(0, 130, 0, 26)
  853. AddItemButton.Position = UDim2.new(0, 210, 1, -53)
  854. AddItemButton.Text = "Add Item"
  855. AddItemButton.TextScaled = true
  856. AddItemButton.TextColor3 = Color3.new(1, 1, 1)
  857. AddItemButton.MouseButton1Down:connect(function()
  858. if CreatingKit == false then
  859. for i, v in pairs(KitItemsDisplay:GetChildren()) do
  860. v:remove()
  861. end
  862. TempKitCreation = {}
  863. end
  864. CreatingKit = true
  865. if SelectedItem == nil then
  866. return
  867. end
  868. local Num = tonumber(AmountText.Text)
  869. if Num == nil or Num <= 1 then
  870. Num = 1
  871. end
  872. AddToCreationKit(tostring(SelectedItem), Num)
  873. local Button = MakeScrollButton(KitItemsDisplay, tostring(SelectedItem).."#"..tostring(Num))
  874. local TempSelectedItem = SelectedItem
  875. Button.MouseButton1Down:connect(function()
  876. RemoveFromCreationKit(tostring(TempSelectedItem))
  877. Button:remove()
  878. for i, v in pairs(KitItemsDisplay:GetChildren()) do
  879. v.Position = UDim2.new(0, 0, 0, 25*(i-1))
  880. end
  881. KitItemsDisplay.CanvasSize = UDim2.new(0, 0, 0, 25*#KitItemsDisplay:GetChildren())
  882. end)
  883. KitItemsDisplay.CanvasSize = UDim2.new(0, 0, 0, 25*#KitItemsDisplay:GetChildren())
  884. end)
  885.  
  886. function LoadKitsF()
  887. for i, v in pairs(KitItemsDisplay:GetChildren()) do
  888. v:remove()
  889. end
  890. KitNameBox.Text = "Kit Name"
  891. CreatingKit = false
  892. TempKitCreation = {}
  893. local TempKitsList = MakeIndividual(Sep(readfile("Custom Kits.txt")))
  894. for i, v in pairs(TempKitsList) do
  895. local TempKitName = i
  896. local Button = MakeScrollButton(KitItemsDisplay, TempKitName)
  897. Button.MouseButton1Down:connect(function()
  898. KitNameBox.Text = TempKitName
  899. CreatingKit = true
  900. for a, b in pairs(KitItemsDisplay:GetChildren()) do
  901. b:remove()
  902. end
  903. for a = 1, #v do
  904. local TempItemName = v[a]
  905. local ForStorage = v[a]
  906. if typeof(TempItemName) == "table" then
  907. AddToCreationKit(TempItemName[1], tonumber(TempItemName[2]))
  908. ForStorage = ForStorage[1]
  909. TempItemName = TempItemName[1].."#"..tostring(TempItemName[2])
  910. else
  911. AddToCreationKit(TempItemName, tonumber(1))
  912. TempItemName = TempItemName.."#1"
  913. end
  914. local Button = MakeScrollButton(KitItemsDisplay, TempItemName)
  915. Button.MouseButton1Down:connect(function()
  916. RemoveFromCreationKit(ForStorage)
  917. Button:remove()
  918. for i, v in pairs(KitItemsDisplay:GetChildren()) do
  919. v.Position = UDim2.new(0, 0, 0, 25*(i-1))
  920. end
  921. KitItemsDisplay.CanvasSize = UDim2.new(0, 0, 0, 25*#KitItemsDisplay:GetChildren())
  922. end)
  923. end
  924. KitItemsDisplay.CanvasSize = UDim2.new(0, 0, 0, 25*#KitItemsDisplay:GetChildren())
  925. end)
  926. end
  927. KitItemsDisplay.CanvasSize = UDim2.new(0, 0, 0, 25*#KitItemsDisplay:GetChildren())
  928. end
  929.  
  930. LoadKits = MakeGUIItem("TextButton", "Custom Kits")
  931. LoadKits.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  932. LoadKits.Size = UDim2.new(0, 80, 0, 26)
  933. LoadKits.Position = UDim2.new(0, 0, 1, -1)
  934. LoadKits.Text = "Load Kits"
  935. LoadKits.TextScaled = true
  936. LoadKits.TextColor3 = Color3.new(1, 1, 1)
  937. LoadKits.MouseButton1Down:connect(function()
  938. LoadKitsF()
  939. end)
  940.  
  941. DeleteKit = MakeGUIItem("TextButton", "Custom Kits")
  942. DeleteKit.BackgroundColor3 = Color3.new(145/255, 140/255, 220/255)
  943. DeleteKit.Size = UDim2.new(0, 130, 0, 26)
  944. DeleteKit.Position = UDim2.new(0, 210, 1, -79)
  945. DeleteKit.Text = "Delete Kit"
  946. DeleteKit.TextScaled = true
  947. DeleteKit.TextColor3 = Color3.new(1, 1, 1)
  948. DeleteKit.MouseButton1Down:connect(function()
  949. DeleteKitF(KitNameBox.Text)
  950. wait(1)
  951. SetupCustomKits()
  952. wait()
  953. DisplayKits()
  954. LoadKitsF()
  955. end)
  956. LoadKitsF()
Add Comment
Please, Sign In to add comment