Advertisement
SebasL0LGG

Project Lazarus: 💀 ZOMBIS Script 1

Dec 7th, 2022
2,059
-2
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 20.64 KB | Gaming | 0 2
  1. Project Lazarus: 💀 ZOMBIS 💀
  2.  
  3.  
  4.  
  5. -local Players = game:GetService('Players')
  6.  
  7. local LocalPlayer = Players.LocalPlayer
  8. local Mouse = LocalPlayer:GetMouse()
  9. local CurrentCamera = workspace.CurrentCamera
  10.  
  11. local Settings = {
  12.     Visual = {
  13.         Nametags = false,
  14.         Tracers = false,
  15.         Chams = false,
  16.         ZombieChams = false,
  17.         Skeletons = false,
  18.         Box3D = false,
  19.     },
  20.     Colors = {
  21.         TeamMainColor = Color3.fromRGB(25,25,200),
  22.         TeamMainOutline = Color3.fromRGB(50,50,255),
  23.         TeamMainFill = Color3.fromRGB(0,0,0),
  24.  
  25.         EnemyMainColor = Color3.fromRGB(200,75,75),
  26.         EnemyMainOutline = Color3.fromRGB(255,100,100),
  27.         EnemyMainFill = Color3.fromRGB(0,0,0),
  28.     },
  29.     StuffToDestroy = {
  30.         DrawingObjects = {},
  31.         Normal = {},
  32.         Connections = {},
  33.     }
  34. }
  35.  
  36. --< Get Library >--
  37. local library = loadstring(game:HttpGet("https://pastebin.com/raw/db4qGmB5"))()
  38.  
  39. --< Create Window >--
  40. local window = library:CreateWindow("Esp")
  41.  
  42. --< Create Tabs >--
  43. local VisualsTab = window:CreateTab("Visuals")
  44. local WeaponTab = window:CreateTab('Weapon Mods')
  45. local SettingsTab = window:CreateTab("Settings")
  46.  
  47. --< Visuals Tab >--
  48. VisualsTab:CreateToggle('Nametags', false, function(Val) Settings.Visual.Nametags = Val end)
  49. VisualsTab:CreateToggle('Tracers', false, function(Val) Settings.Visual.Tracers = Val end)
  50. VisualsTab:CreateToggle('Chams', false, function(Val) Settings.Visual.Chams = Val end)
  51. VisualsTab:CreateToggle('Zombie Chams', false, function(Val) Settings.Visual.ZombieChams = Val end)
  52. VisualsTab:CreateToggle('Skeletons', false, function(Val) Settings.Visual.Skeletons = Val end)
  53. VisualsTab:CreateToggle('3D Box', false, function(Val) Settings.Visual.Box3D = Val end)
  54.  
  55. --< Settings Tab >--
  56. SettingsTab:CreateKeybind("Toggle Menu", "RightAlt", function() window:ToggleWindow() end)
  57. SettingsTab:CreateColor('Team Main Color', Settings.Colors.TeamMainColor, function(Val) Settings.Colors.TeamMainColor = Val end)
  58. SettingsTab:CreateColor('Team Main Fill', Settings.Colors.TeamMainFill, function(Val) Settings.Colors.TeamMainFill = Val end)
  59. SettingsTab:CreateColor('Team Main Outline', Settings.Colors.TeamMainOutline, function(Val) Settings.Colors.TeamMainOutline = Val end)
  60. SettingsTab:CreateColor('Enemy Main Color', Settings.Colors.EnemyMainColor, function(Val) Settings.Colors.EnemyMainColor = Val end)
  61. SettingsTab:CreateColor('Enemy Main Fill', Settings.Colors.EnemyMainFill, function(Val) Settings.Colors.EnemyMainFill = Val end)
  62. SettingsTab:CreateColor('Enemy Main Outline', Settings.Colors.EnemyMainOutline, function(Val) Settings.Colors.EnemyMainOutline = Val end)
  63.  
  64. --< Visual Functions >--
  65. local function CreateLine()
  66.     local NewLine = Drawing.new('Line')
  67.     NewLine.Color = Color3.fromRGB(255, 255, 255)
  68.     NewLine.Thickness = 1
  69.     NewLine.From = Vector2.new(0, 0)
  70.     NewLine.To = Vector2.new(1, 1)
  71.     NewLine.Visible = false
  72.     table.insert(Settings.StuffToDestroy.DrawingObjects, NewLine)
  73.     return NewLine
  74. end
  75. local function CreateText()
  76.     local NewText = Drawing.new('Text')
  77.     NewText.Size = 15
  78.     NewText.Outline = true
  79.     NewText.Center = true
  80.     NewText.Visible = false
  81.     table.insert(Settings.StuffToDestroy.DrawingObjects, NewText)
  82.     return NewText
  83. end
  84. local function CreateCham(Name, Adornee)
  85.     local NewCham = Instance.new('Highlight', game.Lighting)
  86.     NewCham.Name = Name
  87.     NewCham.Adornee = Adornee
  88.     NewCham.FillTransparency = 0
  89.     NewCham.DepthMode = Enum.HighlightDepthMode.AlwaysOnTop
  90.     NewCham.Enabled = false
  91.     table.insert(Settings.StuffToDestroy.Normal, NewCham)
  92.     return NewCham
  93. end
  94.  
  95. local function ChangeLine(Line, newFrom, newTo, newColor)
  96.     Line.From = Vector2.new(newFrom.X, newFrom.Y)
  97.     Line.To = Vector2.new(newTo.X, newTo.Y)
  98.     Line.Color = newColor
  99.     Line.Visible = true
  100. end
  101. local function GetBones(Char)
  102.     local BoneTable = {}
  103.     pcall(function()
  104.         if Char.Humanoid.RigType == Enum.HumanoidRigType.R15 then
  105.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.Head.Position)
  106.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.UpperTorso.Position)
  107.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.LowerTorso.Position)
  108.  
  109.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.RightUpperArm.Position)
  110.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.RightLowerArm.Position)
  111.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.RightHand.Position)
  112.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.LeftUpperArm.Position)
  113.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.LeftLowerArm.Position)
  114.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.LeftHand.Position)
  115.  
  116.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.RightUpperLeg.Position)
  117.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.RightLowerLeg.Position)
  118.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.RightFoot.Position)
  119.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.LeftUpperLeg.Position)
  120.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.LeftLowerLeg.Position)
  121.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.LeftFoot.Position)
  122.         elseif Char.Humanoid.RigType == Enum.HumanoidRigType.R6 then
  123.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.Head.Position)
  124.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char.Torso.Position)
  125.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char['Right Arm'].Position)
  126.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char['Left Arm'].Position)
  127.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char['Right Leg'].Position)
  128.             BoneTable[#BoneTable+1] = CurrentCamera:WorldToViewportPoint(Char['Left Leg'].Position)
  129.         else
  130.             print('Humanoid not valid.')
  131.         end
  132.     end)
  133.     if #BoneTable == 0 then print('Table with no bones?') end
  134.     return BoneTable
  135. end
  136. local function DrawBones(SkeletonTable, BoneTable, Color)
  137.     pcall(function()
  138.         if #BoneTable == 15 then
  139.             ChangeLine(SkeletonTable['Head'], BoneTable[1], BoneTable[3], Color)
  140.  
  141.             ChangeLine(SkeletonTable['RUA'], BoneTable[2], BoneTable[4], Color)
  142.             ChangeLine(SkeletonTable['RLA'], BoneTable[4], BoneTable[5], Color)
  143.             ChangeLine(SkeletonTable['RH'], BoneTable[5], BoneTable[6], Color)
  144.             ChangeLine(SkeletonTable['LUA'], BoneTable[2], BoneTable[7], Color)
  145.             ChangeLine(SkeletonTable['LLA'], BoneTable[7], BoneTable[8], Color)
  146.             ChangeLine(SkeletonTable['LH'], BoneTable[8], BoneTable[9], Color)
  147.  
  148.             ChangeLine(SkeletonTable['RUL'], BoneTable[3], BoneTable[10], Color)
  149.             ChangeLine(SkeletonTable['RLL'], BoneTable[10], BoneTable[11], Color)
  150.             ChangeLine(SkeletonTable['RF'], BoneTable[11], BoneTable[12], Color)
  151.             ChangeLine(SkeletonTable['LUL'], BoneTable[3], BoneTable[13], Color)
  152.             ChangeLine(SkeletonTable['LLL'], BoneTable[13], BoneTable[14], Color)
  153.             ChangeLine(SkeletonTable['LF'], BoneTable[14], BoneTable[15], Color)
  154.         elseif #BoneTable == 6 then
  155.             ChangeLine(SkeletonTable['Head'], BoneTable[1], BoneTable[2], Color)
  156.  
  157.             ChangeLine(SkeletonTable['RUA'], BoneTable[2], BoneTable[3], Color)
  158.             ChangeLine(SkeletonTable['LUA'], BoneTable[2], BoneTable[4], Color)
  159.             ChangeLine(SkeletonTable['RUL'], BoneTable[2], BoneTable[5], Color)
  160.             ChangeLine(SkeletonTable['LUL'], BoneTable[2], BoneTable[6], Color)
  161.         end
  162.     end)
  163. end
  164. local function Draw3DBox(Table, Character, Color)
  165.     local op = Vector3.new(Character.HumanoidRootPart.Position.X - .25, Character.HumanoidRootPart.Position.Y - .5, Character.HumanoidRootPart.Position.Z)
  166.  
  167.     local X = 1.5
  168.     local Y = 2.5
  169.     local Z = 1.5
  170.  
  171.     local Top1 = CurrentCamera:WorldToViewportPoint(op + Vector3.new(-X, Y, -Z))
  172.     local Top2 = CurrentCamera:WorldToViewportPoint(op + Vector3.new(X, Y, -Z))
  173.     local Top3 = CurrentCamera:WorldToViewportPoint(op + Vector3.new(X, Y, Z))
  174.     local Top4 = CurrentCamera:WorldToViewportPoint(op + Vector3.new(-X, Y, Z))
  175.  
  176.     local Bottom1 = CurrentCamera:WorldToViewportPoint(op + Vector3.new(-X, -Y, -Z))
  177.     local Bottom2 = CurrentCamera:WorldToViewportPoint(op + Vector3.new(X, -Y, -Z))
  178.     local Bottom3 = CurrentCamera:WorldToViewportPoint(op + Vector3.new(X, -Y, Z))
  179.     local Bottom4 = CurrentCamera:WorldToViewportPoint(op + Vector3.new(-X, -Y, Z))
  180.  
  181.     ChangeLine(Table.Test1, Vector2.new(Top1.X, Top1.Y), Vector2.new(Top2.X, Top2.Y), Color)
  182.     ChangeLine(Table.Test2, Vector2.new(Top2.X, Top2.Y), Vector2.new(Top3.X, Top3.Y), Color)
  183.     ChangeLine(Table.Test3, Vector2.new(Top3.X, Top3.Y), Vector2.new(Top4.X, Top4.Y), Color)
  184.     ChangeLine(Table.Test4, Vector2.new(Top4.X, Top4.Y), Vector2.new(Top1.X, Top1.Y), Color)
  185.  
  186.     ChangeLine(Table.Test5, Vector2.new(Bottom1.X, Bottom1.Y), Vector2.new(Bottom2.X, Bottom2.Y), Color)
  187.     ChangeLine(Table.Test6, Vector2.new(Bottom2.X, Bottom2.Y), Vector2.new(Bottom3.X, Bottom3.Y), Color)
  188.     ChangeLine(Table.Test7, Vector2.new(Bottom3.X, Bottom3.Y), Vector2.new(Bottom4.X, Bottom4.Y), Color)
  189.     ChangeLine(Table.Test8, Vector2.new(Bottom4.X, Bottom4.Y), Vector2.new(Bottom1.X, Bottom1.Y), Color)
  190.  
  191.     ChangeLine(Table.Test9, Vector2.new(Top1.X, Top1.Y), Vector2.new(Bottom1.X, Bottom1.Y), Color)
  192.     ChangeLine(Table.Test10, Vector2.new(Top2.X, Top2.Y), Vector2.new(Bottom2.X, Bottom2.Y), Color)
  193.     ChangeLine(Table.Test11, Vector2.new(Top3.X, Top3.Y), Vector2.new(Bottom3.X, Bottom3.Y), Color)
  194.     ChangeLine(Table.Test12, Vector2.new(Top4.X, Top4.Y), Vector2.new(Bottom4.X, Bottom4.Y), Color)
  195. end
  196.  
  197. local function RemoveFromTable(Table, Object)
  198.     for i=1,#Table do
  199.         if Table[i] == Object then table.remove(Table, i) end
  200.     end
  201. end
  202.  
  203. local function Esp(Character)
  204.     local Player = Players:FindFirstChild(Character.Name)
  205.     local Tracer = CreateLine()
  206.     local Text = CreateText()
  207.     local Cham = CreateCham(Player.Name, Character)
  208.     local SkeletonTable = {
  209.         Head = CreateLine(),
  210.         RUA = CreateLine(),
  211.         RLA = CreateLine(),
  212.         RH = CreateLine(),
  213.         LUA = CreateLine(),
  214.         LLA = CreateLine(),
  215.         LH = CreateLine(),
  216.         RUL = CreateLine(),
  217.         RLL = CreateLine(),
  218.         RF= CreateLine(),
  219.         LUL = CreateLine(),
  220.         LLL = CreateLine(),
  221.         LF= CreateLine(),
  222.     }
  223.     local Box3DTable = {
  224.         Test1 = CreateLine(),
  225.         Test2 = CreateLine(),
  226.         Test3 = CreateLine(),
  227.         Test4 = CreateLine(),
  228.         Test5 = CreateLine(),
  229.         Test6 = CreateLine(),
  230.         Test7 = CreateLine(),
  231.         Test8 = CreateLine(),
  232.         Test9 = CreateLine(),
  233.         Test10 = CreateLine(),
  234.         Test11 = CreateLine(),
  235.         Test12 = CreateLine(),
  236.     }
  237.  
  238.     local Conn = Settings.StuffToDestroy.Connections[Player.Name]
  239.     Conn = game:GetService('RunService').RenderStepped:Connect(function()
  240.         if Player and Players:FindFirstChild(Player.Name) and Character and Character:FindFirstChild('HumanoidRootPart') and Character:FindFirstChild('Humanoid') and Character.Humanoid.Health > 0 then
  241.             --// Set to invisible just in case \\--
  242.             Tracer.Visible = false
  243.             Text.Visible = false
  244.             Cham.Enabled = false
  245.             for i,v in pairs(SkeletonTable) do v.Visible = false end
  246.             for i,v in pairs(Box3DTable) do v.Visible = false end
  247.  
  248.             --// Main \\--
  249.             local Pos, Vis = CurrentCamera:WorldToViewportPoint(Character.HumanoidRootPart.Position)
  250.             local HeadPos = CurrentCamera:WorldToViewportPoint(Character:WaitForChild('Head').Position + Vector3.new(0, 1.5, 0))
  251.             if Vis then
  252.                 if Settings.Visual.Tracers then
  253.                     ChangeLine(Tracer, Vector2.new(Mouse.X, Mouse.Y + 36), Vector2.new(Pos.X, Pos.Y), Settings.Colors.TeamMainColor)
  254.                 end
  255.                 if Settings.Visual.Nametags then
  256.                     Text.Text = Player.Name
  257.                     Text.Position = Vector2.new(HeadPos.X, HeadPos.Y)
  258.                     Text.Color = Settings.Colors.TeamMainColor
  259.                     Text.Visible = true
  260.                 end
  261.                 if Settings.Visual.Chams then
  262.                     Cham.FillColor = Settings.Colors.TeamMainFill
  263.                     Cham.OutlineColor = Settings.Colors.TeamMainOutline
  264.                     Cham.Enabled = true
  265.                 end
  266.                 if Settings.Visual.Skeletons then
  267.                     DrawBones(SkeletonTable, GetBones(Character), Settings.Colors.TeamMainColor)
  268.                 end
  269.                 if Settings.Visual.Box3D then
  270.                     Draw3DBox(Box3DTable, Character, Settings.Colors.TeamMainColor)
  271.                 end
  272.             end
  273.         else
  274.             RemoveFromTable(Settings.StuffToDestroy.DrawingObjects, Tracer)
  275.             RemoveFromTable(Settings.StuffToDestroy.DrawingObjects, Text)
  276.             RemoveFromTable(Settings.StuffToDestroy.Normal, Cham)
  277.             for i,v in pairs(SkeletonTable) do RemoveFromTable(Settings.StuffToDestroy.DrawingObjects, v) end
  278.             for i,v in pairs(Box3DTable) do RemoveFromTable(Settings.StuffToDestroy.DrawingObjects, v) end
  279.             RemoveFromTable(Settings.StuffToDestroy.Connections, Conn)
  280.  
  281.             Tracer:Remove()
  282.             Text:Remove()
  283.             Cham:Destroy()
  284.             for i,v in pairs(SkeletonTable) do v:Remove() end
  285.             for i,v in pairs(Box3DTable) do v:Remove() end
  286.             Conn:Disconnect()
  287.         end
  288.     end)
  289. end
  290. local function ZombieEsp(Zombie)
  291.     local Cham = CreateCham('Zombie', Zombie)
  292.  
  293.     local Conn = Settings.StuffToDestroy.Connections[#Settings.StuffToDestroy.Connections+1]
  294.     Conn = game:GetService('RunService').RenderStepped:Connect(function()
  295.         if Zombie and Zombie:FindFirstChild('HumanoidRootPart') and Zombie:FindFirstChild('Humanoid') and Zombie.Humanoid.Health > 0 then
  296.             --// Set to invisible just in case \\--
  297.             Cham.Enabled = false
  298.  
  299.             --// Main \\--
  300.             local Pos, Vis = CurrentCamera:WorldToViewportPoint(Zombie.HumanoidRootPart.Position)
  301.             if Vis then
  302.                 if Settings.Visual.ZombieChams then
  303.                     Cham.FillColor = Settings.Colors.EnemyMainFill
  304.                     Cham.OutlineColor = Settings.Colors.EnemyMainOutline
  305.                     Cham.Enabled = true
  306.                 end
  307.             end
  308.         else
  309.             RemoveFromTable(Settings.StuffToDestroy.Normal, Cham)
  310.             RemoveFromTable(Settings.StuffToDestroy.Connections, Conn)
  311.  
  312.             Cham:Destroy()
  313.             Conn:Disconnect()
  314.         end
  315.     end)
  316. end
  317.  
  318. for i,v in pairs(Players:GetPlayers()) do
  319.     if v ~= LocalPlayer then
  320.         table.insert(Settings.StuffToDestroy.Connections, v.CharacterAdded:Connect(Esp))
  321.         if v.Character then
  322.             Esp(v.Character)
  323.         end
  324.     end
  325. end
  326. Settings.StuffToDestroy.Connections['PlayerAdded'] = Players.PlayerAdded:Connect(function(Player)
  327.     if Player ~= LocalPlayer then
  328.         table.insert(Settings.StuffToDestroy.Connections, Player.CharacterAdded:Connect(Esp))
  329.         if Player.Character then
  330.             Esp(Player.Character)
  331.         end
  332.     end
  333. end)
  334.  
  335. for i,v in pairs(workspace.Baddies:GetChildren()) do
  336.     ZombieEsp(v)
  337. end
  338. Settings.StuffToDestroy.Connections['ZombieAdded'] = workspace.Baddies.ChildAdded:Connect(ZombieEsp)
  339.  
  340. --< Weapon Functions >--
  341. local ThingsToRefresh = {}
  342. local Path = nil
  343.  
  344. local function RefreshWeapons()
  345.     local Scripts = {}
  346.     for i,v in pairs(LocalPlayer:WaitForChild('Backpack'):GetChildren()) do
  347.         if v:IsA('ModuleScript') and string.find(v.Name, 'Weapon') then table.insert(Scripts, v) end
  348.     end
  349.  
  350.     local temp = {}
  351.     for i,v in pairs(Scripts) do
  352.         table.insert(temp, v.Name .. ' (' .. v.WeaponName.Value .. ')')
  353.     end
  354.  
  355.     return temp
  356. end
  357.  
  358. local function AddShit()
  359.     if Path ~= nil then
  360.         local s = require(Path)
  361.         if s.Ammo ~= nil then -- See if in game
  362.             table.insert(ThingsToRefresh, WeaponTab:CreateToggle('No Spread', false, function(Val)
  363.                 if Val then
  364.                     s.Spread.MaxOld = s.Spread.Max
  365.                     s.Spread.MinOld = s.Spread.Min
  366.                     s.Spread = {Max = 0, Min = 0}
  367.                 else
  368.                     s.Spread.Max = s.Spread.MaxOld
  369.                     s.Spread.Min = s.Spread.MinOld
  370.                 end
  371.             end))
  372.             table.insert(ThingsToRefresh, WeaponTab:CreateToggle('No Recoil', false, function(Val)
  373.                 if Val then
  374.                     s.ViewKick.Pitch.MaxOld = s.ViewKick.Pitch.Max
  375.                     s.ViewKick.Pitch.MinOld = s.ViewKick.Pitch.Min
  376.                     s.ViewKick.Yaw.MaxOld = s.ViewKick.Yaw.Max
  377.                     s.ViewKick.Yaw.MinOld = s.ViewKick.Yaw.Min
  378.  
  379.                     s.ViewKick = {
  380.                         Pitch = {Max = 0, Min = 0},
  381.                         Yaw = {Max = 0, Min = 0}
  382.                     }
  383.                 else
  384.                     s.ViewKick.Pitch.Max = s.ViewKick.Pitch.MaxOld
  385.                     s.ViewKick.Pitch.Min = s.ViewKick.Pitch.MinOld
  386.                     s.ViewKick.Yaw.Max = s.ViewKick.Yaw.MaxOld
  387.                     s.ViewKick.Yaw.Min = s.ViewKick.Yaw.MinOld
  388.                 end
  389.             end))
  390.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Name: ', s.WeaponName, function(Val)
  391.                 s.WeaponName = tostring(Val)
  392.             end))
  393.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Damage Max', s.Damage.Max, function(Val)
  394.                 s.Damage.Max = Val
  395.             end))
  396.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Damage Min', s.Damage.Min, function(Val)
  397.                 s.Damage.Min = Val
  398.             end))
  399.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Ammo: ', s.Ammo, function(Val)
  400.                 s.Ammo = tonumber(Val)
  401.             end))
  402.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Stored Ammo: ', s.StoredAmmo, function(Val)
  403.                 s.StoredAmmo = tonumber(Val)
  404.             end))
  405.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Mag Size: ', s.MagSize, function(Val)
  406.                 s.MagSize = tonumber(Val)
  407.             end))
  408.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Max Ammo: ', s.MaxAmmo, function(Val)
  409.                 s.MaxAmmo = tonumber(Val)
  410.             end))
  411.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Bullet Penetration: ', s.BulletPenetration, function(Val)
  412.                 s.BulletPenetration = tonumber(Val)
  413.             end))
  414.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Fire Rate: ', s.FireTime, function(Val)
  415.                 s.FireTime = tonumber(Val)
  416.             end))
  417.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Aim FOV: ', s.AimFOV, function(Val)
  418.                 s.AimFOV = tonumber(Val)
  419.             end))
  420.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Move Speed: ', s.MoveSpeed, function(Val)
  421.                 s.MoveSpeed = tonumber(Val)
  422.             end))
  423.             table.insert(ThingsToRefresh, WeaponTab:CreateTextbox('Semi-Auto', tostring(s.Semi), function(Val)
  424.                 s.Semi = Val:lower() == "true"
  425.             end))
  426.         else
  427.             warn('Not in game, unable to edit weapon stats.')
  428.         end
  429.     else
  430.         print('Not alive.')
  431.     end
  432. end
  433.  
  434. local wd = WeaponTab:CreateDropdown("Choose Weapon", RefreshWeapons(), "None", function(Option)
  435.     Path = LocalPlayer:WaitForChild('Backpack')[Option:split(' ')[1]] or nil
  436.     AddShit()
  437. end)
  438. WeaponTab:CreateButton("Refresh", function()
  439.     --// Remove Previous Things \\--
  440.     for i,v in pairs(ThingsToRefresh) do
  441.         v:Destroy()
  442.     end
  443.     ThingsToRefresh = {}
  444.     Path = nil
  445.  
  446.     --// Refresh Dropdown \\--
  447.     wd:Refresh(RefreshWeapons())
  448. end)
  449.  
  450. --< Destroy Stuff >--
  451. game.CoreGui.TreysHub.Destroying:Connect(function()
  452.     for i,v in pairs(Settings.StuffToDestroy.DrawingObjects) do
  453.         v:Remove()
  454.     end
  455.     for i,v in pairs(Settings.StuffToDestroy.Normal) do
  456.         v:Destroy()
  457.     end
  458.     for i,v in pairs(Settings.StuffToDestroy.Connections) do
  459.         v:Disconnect()
  460.     end
  461. end)
  462.  
  463.  
  464.  
Tags: Roblox
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement