TEXT 1136
Death Zone Script By venuslock on 20th January 2023 02:02:59 PM
  1. getrenv().silentaim_fov = 90
  2. getrenv().silentaim_fov_scoped = 180
  3. getrenv().silentaim_fov_current = getrenv().silentaim_fov
  4. getrenv().silentaim_color = Color3.fromRGB(0, 255, 0)
  5. getrenv().silentaim_ignore_plrs = false
  6. getrenv().silentaim_ignore_npcs = false
  7.  
  8. getrenv().item_esp_enabled = false
  9. getrenv().item_esp_distance_max = 2000
  10. getrenv().item_esp_refreshrate = 0.1
  11. getrenv().item_esp_lastupdate = tick()
  12. getrenv().item_esp_color = Color3.fromRGB(0, 255, 0)
  13. getrenv().item_esp_iter = 10
  14. getrenv().item_esp_transparency = false
  15. getrenv().item_esp_transparency_reverse = false
  16.  
  17. getrenv().fastrun_enabled = false
  18. getrenv().fastrun_speed = 0.6
  19.  
  20. local gamemt = getrawmetatable(game)
  21. local __namecallBackup = gamemt.__namecall
  22. local __indexBackpup = gamemt.__index
  23.  
  24. local itemaddedconnections = {}
  25.  
  26. local uis = game:GetService("UserInputService")
  27. local runservice = game:GetService("RunService")
  28.  
  29. local plrs = game:GetService("Players")
  30. local plr = plrs.LocalPlayer
  31.  
  32. local camera = workspace.CurrentCamera
  33.  
  34. local closestplr
  35.  
  36. local _whitelist
  37. local _plrlist
  38.  
  39. local plrnamelist = {}
  40. local whitelisted = {}
  41.  
  42. local function Closest()
  43.    
  44.     local Distance, CursorDistance, Close = math.huge, math.huge
  45.    
  46.     local entityTable = {}
  47.     if not getrenv().silentaim_ignore_npcs and workspace:FindFirstChild("NPCs") then
  48.         for i, thing in pairs(workspace.NPCs:GetChildren()) do
  49.             if thing:FindFirstChildWhichIsA("Humanoid") and thing:FindFirstChildWhichIsA("Humanoid").Health > 0 then
  50.                 table.insert(entityTable, thing)
  51.             end
  52.         end
  53.     end
  54.    
  55.     if not getrenv().silentaim_ignore_plrs then
  56.         for i, thing in pairs(plrs:GetPlayers()) do
  57.             if thing ~= plr and thing.Character then
  58.                 table.insert(entityTable, thing.Character)
  59.             end
  60.         end
  61.     end
  62.    
  63.     for I, V in pairs(entityTable) do
  64.         if not plr.Character then
  65.             continue
  66.         end
  67.         if V == plr then
  68.             continue
  69.         end
  70.        
  71.         if #whitelisted > 0 then
  72.             local plrwhitelisted = false
  73.             for x, whitelistedplayer in pairs(whitelisted) do
  74.                 if whitelistedplayer == V.Name then
  75.                     plrwhitelisted = true
  76.                 end
  77.             end
  78.             if plrwhitelisted then
  79.                 continue
  80.             end
  81.         end
  82.        
  83.         local Part = V and V:FindFirstChild("Head")
  84.         if not Part and not V:FindFirstChild("HumanoidRootPart") then
  85.             continue
  86.         end
  87.        
  88.         if not (V:FindFirstChild("Humanoid") and V:FindFirstChild("Humanoid").Health > 0) then
  89.            continue
  90.         end
  91.        
  92.         local Pos, OnScreen = camera:WorldToViewportPoint(Part.Position)
  93.         if not OnScreen then
  94.             continue
  95.         end
  96.        
  97.         if not Part1 == nil then
  98.             continue
  99.         end
  100.        
  101.         local CursorRange = (Vector2.new(Pos.X, Pos.Y) - Vector2.new(uis:GetMouseLocation().X, uis:GetMouseLocation().Y)).Magnitude
  102.         local Range = (Part.Position - workspace.CurrentCamera.CFrame.Position).Magnitude
  103.         if CursorRange <= getrenv().silentaim_fov_current * 2 and Range < Distance and CursorRange < CursorDistance then
  104.             Distance = Range
  105.             CursorDistance = CursorRange
  106.             Close = V
  107.         end
  108.     end
  109.    return Close
  110. end
  111.  
  112. local function fastrun()
  113.    
  114.     local lastTick = tick()
  115.     local cooldown = 0.01
  116.    
  117.     local process = game:GetService("RunService").Heartbeat:Connect(function()
  118.    
  119.         if not (tick() - lastTick > cooldown) then return end
  120.        
  121.         if not (plr and plr.Character and plr.Character:FindFirstChildWhichIsA("Humanoid") and plr.Character:FindFirstChildWhichIsA("Humanoid").MoveDirection.Magnitude > 0) then return end
  122.        
  123.         lastTick = tick()
  124.        
  125.         plr.Character:TranslateBy(plr.Character:FindFirstChildWhichIsA("Humanoid").MoveDirection * Vector3.new(getrenv().fastrun_speed, getrenv().fastrun_speed, getrenv().fastrun_speed))
  126.        
  127.     end)
  128.    
  129.     while getrenv().fastrun_enabled do
  130.         runservice.Heartbeat:Wait()
  131.     end
  132.    
  133.     process:Disconnect()
  134.    
  135. end
  136.  
  137. setreadonly(gamemt, false)
  138.  
  139. gamemt.__namecall = newcclosure(function(self, ...)
  140.     local method = getnamecallmethod()
  141.     local args = {...}
  142.  
  143.     if tostring(method) == "FireServer" then
  144.        
  145.         local RemoteName = tostring(self)
  146.        
  147.         --[[if RemoteName == "HeadRotation" then
  148.            
  149.             args[1] = CFrame.new(Vector3.new(0/0, 0/0, 0/0), Vector3.new(0/0, 0/0, 0/0))
  150.            
  151.             return self.FireServer(self, unpack(args))
  152.             ]]
  153.         if RemoteName == "Shoot" and getrenv().silentaim_enabled then
  154.            
  155.             if closestplr ~= nil then
  156.                 if plrs:FindFirstChild(closestplr.Name) ~= nil then
  157.                     args[3] =
  158.                     {
  159.                         [1] = closestplr.Head,
  160.                         [2] = closestplr.Head.Position,
  161.                         [3] = plrs[closestplr.Name]
  162.                     }
  163.                     args[4] = closestplr.Head.Position
  164.                    
  165.                     return self.FireServer(self, unpack(args))
  166.                 else
  167.                     args[3] =
  168.                     {
  169.                         [1] = closestplr.Head,
  170.                         [2] = closestplr.Head.Position,
  171.                         [3] = closestplr
  172.                     }
  173.                     args[4] = closestplr.Head.Position
  174.                    
  175.                     return self.FireServer(self, unpack(args))
  176.                 end
  177.             end
  178.            
  179.         end
  180.     end
  181.  
  182.     return __namecallBackup(self, ...)
  183. end)
  184.  
  185. setreadonly(gamemt, true)
  186.  
  187. runservice.Heartbeat:Connect(function()
  188.     closestplr = Closest()
  189. end)
  190.  
  191. uis.InputBegan:Connect(function(inp)
  192.     if inp.UserInputType and inp.UserInputType == Enum.UserInputType.MouseButton2 then
  193.         --printconsole("holding right mouse")
  194.         getrenv().silentaim_fov_current = getrenv().silentaim_fov_scoped
  195.     end
  196. end)
  197.  
  198. uis.InputEnded:Connect(function(inp)
  199.     if inp.UserInputType and inp.UserInputType == Enum.UserInputType.MouseButton2 then
  200.         --printconsole("stopped holding right mouse")
  201.         getrenv().silentaim_fov_current = getrenv().silentaim_fov
  202.     end
  203. end)
  204.  
  205. --draw render
  206. local drawings = {}
  207. local drawings_render = runservice.Heartbeat:Connect(function()
  208.     for i, drawingcontainer in pairs(drawings) do
  209.         if drawingcontainer["Drawing"] ~= nil then
  210.             drawingcontainer["DrawFunction"](drawingcontainer["Drawing"], drawingcontainer["Object"])
  211.         else
  212.             drawings[i] = nil
  213.         end
  214.     end
  215. end)
  216.  
  217. --separate draw render for items (cus laggy)
  218. local item_drawings = {}
  219. local iteration = 0
  220. local item_drawings_render = runservice.Heartbeat:Connect(function()
  221.    
  222.     if tick() - getrenv().item_esp_lastupdate < getrenv().item_esp_refreshrate then return end
  223.    
  224.     getrenv().item_esp_lastupdate = tick()
  225.    
  226.     for i, drawingcontainer in pairs(item_drawings) do
  227.         if drawingcontainer["Drawing"] ~= nil and drawingcontainer["DrawFunction"] ~= nil then
  228.             drawingcontainer["DrawFunction"](drawingcontainer["Drawing"], drawingcontainer["Object"])
  229.         else
  230.             item_drawings[i] = nil
  231.         end
  232.         iteration = iteration + 1 --doing this instead of iteration += 1 because synapse shows an error and that doesnt look nice
  233.         if iteration%getrenv().item_esp_iter == 1 then
  234.             --printconsole("Cooling down...")
  235.             iteration = 0
  236.             runservice.RenderStepped:Wait()
  237.         end
  238.     end
  239. end)
  240.  
  241. --functions for drawing stuff
  242.  
  243. --silent aim
  244.  
  245. local function silentaim_enable()
  246.    
  247.     printconsole("Enabled")
  248.    
  249.     --local container = {}
  250.    
  251.     local center_circle_table = {}
  252.    
  253.     local center_circle = Drawing.new("Circle")
  254.     center_circle.Radius = 4
  255.     center_circle.Thickness = 1
  256.     center_circle.Position = Vector2.new(uis:GetMouseLocation().X, uis:GetMouseLocation().Y)
  257.     center_circle.Color = getrenv().silentaim_color
  258.     center_circle.Transparency = 0.5
  259.     center_circle.Visible = true
  260.    
  261.     center_circle_table["Drawing"] = center_circle
  262.     center_circle_table["Object"] = nil
  263.    
  264.     center_circle_table["DrawFunction"] = function(draw, obj)
  265.         --printconsole("draw center")
  266.         draw.Color = getrenv().silentaim_color
  267.         draw.Position = Vector2.new(uis:GetMouseLocation().X, uis:GetMouseLocation().Y)
  268.     end
  269.    
  270.     drawings["silentaim_center"] = center_circle_table
  271.    
  272.     local fov_circle_table = {}
  273.    
  274.     local fov_circle = Drawing.new("Circle")
  275.     fov_circle.Radius = getrenv().silentaim_fov_current * 2
  276.     fov_circle.Thickness = 1
  277.     fov_circle.Position = Vector2.new(uis:GetMouseLocation().X, uis:GetMouseLocation().Y)
  278.     fov_circle.Color = getrenv().silentaim_color
  279.     fov_circle.Visible = true
  280.    
  281.     fov_circle_table["Drawing"] = fov_circle
  282.     fov_circle_table["Object"] = nil
  283.    
  284.     fov_circle_table["DrawFunction"] = function(draw, obj)
  285.         --printconsole("draw fov")
  286.         draw.Color = getrenv().silentaim_color
  287.         draw.Position = Vector2.new(uis:GetMouseLocation().X, uis:GetMouseLocation().Y)
  288.         draw.Radius = getrenv().silentaim_fov_current * 2
  289.     end
  290.    
  291.     drawings["silentaim_fov"] = fov_circle_table
  292.    
  293.     local locked_player_table = {}
  294.    
  295.     local locked_player = Drawing.new("Square")
  296.     locked_player.Size = Vector2.new(4, 4)
  297.     locked_player.Thickness = 1
  298.     locked_player.Color = getrenv().silentaim_color
  299.     locked_player.Visible = true
  300.    
  301.     locked_player_table["Drawing"] = locked_player
  302.     locked_player_table["Object"] = closestplr
  303.    
  304.     locked_player_table["DrawFunction"] = function(draw, obj)
  305.         --printconsole("draw plr")
  306.         if closestplr ~= nil then
  307.             --printconsole("draw true plr")
  308.             local pos, vis = camera:WorldToViewportPoint(closestplr.Head.Position)
  309.             if vis then
  310.                 draw.Color = getrenv().silentaim_color
  311.                 draw.Size = Vector2.new(math.clamp(8 - pos.Z / 2, 8, 24), math.clamp(8 - pos.Z / 2, 8, 24))
  312.                 draw.Position = Vector2.new(pos.X - draw.Size.X / 2, pos.Y - draw.Size.Y / 2)
  313.                 draw.Visible = true
  314.             else
  315.                 draw.Visible = false
  316.             end
  317.         else
  318.             draw.Visible = false
  319.         end
  320.     end
  321.    
  322.     drawings["silentaim_locked_player"] = locked_player_table
  323.    
  324.     local locked_player_name_table = {}
  325.    
  326.     local locked_player_name = Drawing.new("Text")
  327.     locked_player_name.Size = 16
  328.     locked_player_name.Center = true
  329.     locked_player_name.Outline = true
  330.     locked_player_name.OutlineColor = Color3.new()
  331.     locked_player_name.Font = 1
  332.     locked_player_name.Color = getrenv().silentaim_color
  333.     locked_player_name.Visible = true
  334.    
  335.     locked_player_name_table["Drawing"] = locked_player_name
  336.     locked_player_name_table["Object"] = closestplr
  337.    
  338.     locked_player_name_table["DrawFunction"] = function(draw, obj)
  339.         if closestplr ~= nil then
  340.             --printconsole("draw true plr name")
  341.             draw.Color = getrenv().silentaim_color
  342.             draw.Position = Vector2.new(uis:GetMouseLocation().X, uis:GetMouseLocation().Y + 14)
  343.             if closestplr:IsA("Player") then
  344.                 if closestplr.DisplayName ~= closestplr.Name then
  345.                     draw.Text = closestplr.DisplayName .. " (" .. closestplr.Name .. ")"
  346.                 else
  347.                     draw.Text = closestplr.Name
  348.                 end
  349.             else
  350.                 draw.Text = closestplr.Name
  351.             end
  352.             draw.Visible = true
  353.         else
  354.             draw.Visible = false
  355.         end
  356.     end
  357.    
  358.     drawings["silentaim_locked_player_name"] = locked_player_name_table
  359.    
  360. end
  361.  
  362. local function silentaim_disable()
  363.    
  364.     local toremove =
  365.     {
  366.         drawings["silentaim_center"],
  367.         drawings["silentaim_fov"],
  368.         drawings["silentaim_locked_player"],
  369.         drawings["silentaim_locked_player_name"]
  370.     }
  371.    
  372.     for i, draw in pairs(toremove) do
  373.         draw["Drawing"].Visible = false
  374.         draw["Drawing"]:Remove()
  375.         draw["Drawing"] = nil
  376.     end
  377. end
  378.  
  379. local function esp_item_enable()
  380.    
  381.     local itemlocations = {}
  382.     itemaddedconnections = {}
  383.    
  384.     for i, city in pairs(workspace.GameStructures:GetChildren()) do
  385.         if city:FindFirstChild("Items") then
  386.             table.insert(itemlocations, city.Items)
  387.         end
  388.     end
  389.    
  390.     table.insert(itemlocations, workspace.Items)
  391.    
  392.     for i, itemlocation in pairs(itemlocations) do
  393.    
  394.     itemaddedconnection = itemlocation.ChildAdded:Connect(function(item)
  395.        
  396.         local id = tick()
  397.        
  398.         local newitem_table = {}
  399.        
  400.         local newitem_mark = Drawing.new("Square")
  401.         newitem_mark.Size = Vector2.new(8, 8)
  402.         newitem_mark.Thickness = 1
  403.         newitem_mark.Color = Color3.fromRGB(255, 0, 0)
  404.         --newitem_mark.Transparency = 0.75
  405.        
  406.         --workspace.GameStructures.City1.Items["12GaugeMag"].Config.Amount.Value
  407.        
  408.         local newitem_text = Drawing.new("Text")
  409.         newitem_text.Outline = true
  410.         newitem_text.Center = true
  411.         if item:FindFirstChild("Config") and item.Config:FindFirstChild("ItemName") then
  412.             if item.Config:FindFirstChild("Amount") and item.Config:FindFirstChild("MaxBullets") then
  413.                 newitem_text.Text = item.Config.ItemName.Value .. "\n[" .. item.Config.Amount.Value .. "/" .. item.Config.MaxBullets.Value .. "]"
  414.             elseif item.Config:FindFirstChild("Amount") then
  415.                 newitem_text.Text = item.Config.ItemName.Value .. "\n[" .. item.Config.Amount.Value "]"
  416.             else
  417.                 newitem_text.Text = item.Config.ItemName.Value
  418.             end
  419.         else
  420.             newitem_text.Text = item.Name
  421.         end
  422.         newitem_text.Font = 1
  423.         newitem_text.Size = 16
  424.         newitem_text.Color = Color3.fromRGB(255, 0, 0)
  425.         newitem_text.OutlineColor = Color3.new()
  426.         --newitem_text.Transparency = 0.75
  427.        
  428.         newitem_table["Drawing"] = {}
  429.         newitem_table["Drawing"]["Mark"] = newitem_mark
  430.         newitem_table["Drawing"]["Text"] = newitem_text
  431.         newitem_table["Object"] = item
  432.        
  433.         local parentchanged = item.AncestryChanged:Connect(function(_, parent)
  434.             if not parent and newitem_table["Drawing"] ~= nil then
  435.                 newitem_table["Drawing"]["Mark"].Visible = false
  436.                 newitem_table["Drawing"]["Text"].Visible = false
  437.                
  438.                 newitem_table["Drawing"]["Mark"]:Remove()
  439.                 newitem_table["Drawing"]["Text"]:Remove()
  440.                
  441.                 newitem_table["Drawing"] = nil
  442.                
  443.                 if parentchanged ~= nil then
  444.                     parentchanged:Disconnect()
  445.                     parentchanged = nil
  446.                 end
  447.             end
  448.         end)
  449.        
  450.         newitem_table["DrawFunction"] = function(draw, obj)
  451.            
  452.             if item ~= nil and item.Parent ~= nil and camera ~= nil then
  453.                
  454.                 local pos, vis
  455.                 if item:IsA("Model") then
  456.                     pos, vis = camera:WorldToViewportPoint(item:GetBoundingBox().Position)
  457.                 elseif item:IsA("BasePart") then
  458.                     pos, vis = camera:WorldToViewportPoint(item.Position)
  459.                 end
  460.                
  461.                 if vis and pos.Z < getrenv().item_esp_distance_max then
  462.                    
  463.                     if getrenv().item_esp_transparency then
  464.                         local calctransparency
  465.                         if getrenv().item_esp_transparency_reverse then
  466.                             calctransparency = math.clamp(pos.Z / getrenv().item_esp_distance_max + 0.25, 0, 1)
  467.                         else
  468.                             calctransparency = math.clamp(1 - pos.Z / getrenv().item_esp_distance_max + 0.25, 0, 1)
  469.                         end
  470.                         draw["Mark"].Transparency = calctransparency
  471.                         draw["Text"].Transparency = calctransparency
  472.                     else
  473.                         draw["Mark"].Transparency = 1
  474.                         draw["Text"].Transparency = 1
  475.                     end
  476.                    
  477.                     if item:FindFirstChild("Config") and item.Config:FindFirstChild("ItemName") then
  478.                         if item.Config:FindFirstChild("Amount") and item.Config:FindFirstChild("MaxBullets") then
  479.                             newitem_text.Text = item.Config.ItemName.Value .. " [" .. item.Config.Amount.Value .. "/" .. item.Config.MaxBullets.Value .. "] [" .. math.floor(pos.Z) .. "s.]"
  480.                         elseif item.Config:FindFirstChild("Amount") and item.Config.Amount.Value > 1 then
  481.                             newitem_text.Text = item.Config.ItemName.Value .. " [" .. item.Config.Amount.Value "] [" .. math.floor(pos.Z) .. "s.]"
  482.                         else
  483.                             newitem_text.Text = item.Config.ItemName.Value .. " [" .. math.floor(pos.Z) .. "s.]"
  484.                         end
  485.                     else
  486.                         newitem_text.Text = item.Name .. " [" .. math.floor(pos.Z) .. "s.]"
  487.                     end
  488.                    
  489.                     draw["Mark"].Color = getrenv().item_esp_color
  490.                     draw["Text"].Color = getrenv().item_esp_color
  491.                    
  492.                     draw["Mark"].Size = Vector2.new(math.clamp(24 - pos.Z / 4, 8, 24), math.clamp(24 - pos.Z / 4, 8, 24))
  493.                     draw["Text"].Size = 16
  494.                    
  495.                     draw["Mark"].Position = Vector2.new(pos.X - draw["Mark"].Size.X / 2, pos.Y - draw["Mark"].Size.Y / 2)
  496.                     draw["Text"].Position = Vector2.new(pos.X, pos.Y - draw["Mark"].Size.Y / 2 - draw["Text"].TextBounds.Y - 4)
  497.                    
  498.                     draw["Mark"].Visible = true
  499.                     draw["Text"].Visible = true
  500.                 else
  501.                     draw["Mark"].Visible = false
  502.                     draw["Text"].Visible = false
  503.                 end
  504.             elseif (item == nil or not item.Parent) then
  505.                
  506.                 printconsole("removing " .. item.Name)
  507.                
  508.                 draw["Mark"].Visible = false
  509.                 draw["Text"].Visible = false
  510.                
  511.                 draw["Mark"]:Remove()
  512.                 draw["Text"]:Remove()
  513.                
  514.                 newitem_table["Drawing"] = nil
  515.                
  516.             end
  517.         end
  518.        
  519.         item_drawings["__item_" .. item.Name .. "_" .. id] = newitem_table
  520.        
  521.     end)
  522.    
  523.    
  524.    
  525.     for i, item in pairs(itemlocation:GetChildren()) do
  526.        
  527.         local id = tick()
  528.        
  529.         local newitem_table = {}
  530.        
  531.         local newitem_mark = Drawing.new("Square")
  532.         newitem_mark.Size = Vector2.new(8, 8)
  533.         newitem_mark.Thickness = 1
  534.         newitem_mark.Color = Color3.fromRGB(255, 0, 0)
  535.         --newitem_mark.Transparency = 0.75
  536.        
  537.         local newitem_text = Drawing.new("Text")
  538.         newitem_text.Outline = true
  539.         newitem_text.Center = true
  540.         if item:FindFirstChild("Config") and item.Config:FindFirstChild("ItemName") then
  541.             newitem_text.Text = item.Config.ItemName.Value
  542.         else
  543.             newitem_text.Text = item.Name
  544.         end
  545.         newitem_text.Font = 1
  546.         newitem_text.Size = 16
  547.         newitem_text.Color = Color3.fromRGB(255, 0, 0)
  548.         newitem_text.OutlineColor = Color3.new()
  549.         --newitem_text.Transparency = 0.75
  550.        
  551.         newitem_table["Drawing"] = {}
  552.         newitem_table["Drawing"]["Mark"] = newitem_mark
  553.         newitem_table["Drawing"]["Text"] = newitem_text
  554.         newitem_table["Object"] = item
  555.        
  556.         local parentchanged = item.AncestryChanged:Connect(function(_, parent)
  557.             if not parent and newitem_table["Drawing"] ~= nil then
  558.                 newitem_table["Drawing"]["Mark"].Visible = false
  559.                 newitem_table["Drawing"]["Text"].Visible = false
  560.                
  561.                 newitem_table["Drawing"]["Mark"]:Remove()
  562.                 newitem_table["Drawing"]["Text"]:Remove()
  563.                
  564.                 newitem_table["Drawing"] = nil
  565.                
  566.                 if parentchanged ~= nil then
  567.                     parentchanged:Disconnect()
  568.                     parentchanged = nil
  569.                 end
  570.             end
  571.         end)
  572.        
  573.         newitem_table["DrawFunction"] = function(draw, obj)
  574.            
  575.             if item ~= nil and item.Parent ~= nil and camera ~= nil then
  576.                
  577.                 local pos, vis
  578.                 if item:IsA("Model") then
  579.                     pos, vis = camera:WorldToViewportPoint(item:GetBoundingBox().Position)
  580.                 elseif item:IsA("BasePart") then
  581.                     pos, vis = camera:WorldToViewportPoint(item.Position)
  582.                 end
  583.                
  584.                 if vis and pos.Z < getrenv().item_esp_distance_max then
  585.                    
  586.                     if getrenv().item_esp_transparency then
  587.                         local calctransparency
  588.                         if getrenv().item_esp_transparency_reverse then
  589.                             calctransparency = math.clamp(pos.Z / getrenv().item_esp_distance_max + 0.25, 0, 1)
  590.                         else
  591.                             calctransparency = math.clamp(1 - pos.Z / getrenv().item_esp_distance_max + 0.25, 0, 1)
  592.                         end
  593.                         draw["Mark"].Transparency = calctransparency
  594.                         draw["Text"].Transparency = calctransparency
  595.                     else
  596.                         draw["Mark"].Transparency = 1
  597.                         draw["Text"].Transparency = 1
  598.                     end
  599.                    
  600.                     if item:FindFirstChild("Config") and item.Config:FindFirstChild("ItemName") then
  601.                         if item.Config:FindFirstChild("Amount") and item.Config:FindFirstChild("MaxBullets") then
  602.                             newitem_text.Text = item.Config.ItemName.Value .. " [" .. item.Config.Amount.Value .. "/" .. item.Config.MaxBullets.Value .. "] [" .. math.floor(pos.Z) .. "s.]"
  603.                         elseif item.Config:FindFirstChild("Amount") and item.Config.Amount.Value > 1 then
  604.                             newitem_text.Text = item.Config.ItemName.Value .. " [" .. item.Config.Amount.Value .. "] [" .. math.floor(pos.Z) .. "s.]"
  605.                         else
  606.                             newitem_text.Text = item.Config.ItemName.Value .. " [" .. math.floor(pos.Z) .. "s.]"
  607.                         end
  608.                     else
  609.                         newitem_text.Text = item.Name .. " [" .. math.floor(pos.Z) .. "s.]"
  610.                     end
  611.                    
  612.                     draw["Mark"].Color = getrenv().item_esp_color
  613.                     draw["Text"].Color = getrenv().item_esp_color
  614.                    
  615.                     draw["Mark"].Size = Vector2.new(math.clamp(24 - pos.Z / 4, 8, 24), math.clamp(24 - pos.Z / 4, 8, 24))
  616.                     draw["Text"].Size = 16
  617.                    
  618.                     draw["Mark"].Position = Vector2.new(pos.X - draw["Mark"].Size.X / 2, pos.Y - draw["Mark"].Size.Y / 2)
  619.                     draw["Text"].Position = Vector2.new(pos.X, pos.Y - draw["Mark"].Size.Y / 2 - draw["Text"].TextBounds.Y - 4)
  620.                    
  621.                     draw["Mark"].Visible = true
  622.                     draw["Text"].Visible = true
  623.                 else
  624.                     draw["Mark"].Visible = false
  625.                     draw["Text"].Visible = false
  626.                 end
  627.             elseif (item == nil or not item.Parent) then
  628.                
  629.                 draw["Mark"].Visible = false
  630.                 draw["Text"].Visible = false
  631.                
  632.                 draw["Mark"]:Remove()
  633.                 draw["Text"]:Remove()
  634.                
  635.                 newitem_table["Drawing"] = nil
  636.                
  637.             end
  638.         end
  639.        
  640.         item_drawings["__item_" .. item.Name .. "_" .. id] = newitem_table
  641.        
  642.     end
  643.    
  644.     end
  645.    
  646. end
  647.  
  648. local function esp_item_disable()
  649.    
  650.     for i, connection in pairs(itemaddedconnections) do
  651.         connection:Disconnect()
  652.         connection = nil
  653.     end
  654.    
  655.     for i, thing in pairs(item_drawings) do
  656.         if string.match(i, "__item_") ~= nil then
  657.             thing["Drawing"]["Mark"].Visible = false
  658.             thing["Drawing"]["Text"].Visible = false
  659.            
  660.             thing["Drawing"]["Mark"]:Remove()
  661.             thing["Drawing"]["Text"]:Remove()
  662.            
  663.             thing["Drawing"] = nil
  664.         end
  665.     end
  666.    
  667. end
  668.  
  669. local library = loadstring(game:HttpGet(('https://raw.githubusercontent.com/AikaV3rm/UiLib/master/Lib.lua')))()
  670.  
  671. local main = library:CreateWindow("Death Zone")
  672.  
  673. local whitelist_folder = main:CreateFolder("Whitelist")
  674. local silentaim_folder = main:CreateFolder("Silent aim")
  675. local esp_item_folder = main:CreateFolder("Item ESP")
  676. local fastrun_folder = main:CreateFolder("Fast walk")
  677. local credits_folder = main:CreateFolder("Credits")
  678.  
  679. --silent aim
  680.  
  681. silentaim_folder:Toggle("Enabled",function(bool)
  682.     getrenv().silentaim_enabled = bool
  683.    
  684.     if getrenv().silentaim_enabled then
  685.         silentaim_enable()
  686.     else
  687.         silentaim_disable()
  688.     end
  689. end)
  690.  
  691. silentaim_folder:Toggle("Ignore players",function(bool)
  692.     getrenv().silentaim_ignore_plrs = bool
  693. end)
  694.  
  695. silentaim_folder:Toggle("Ignore NPCs",function(bool)
  696.     getrenv().silentaim_ignore_npcs = bool
  697. end)
  698.  
  699. silentaim_folder:Slider("FOV",{
  700.     min = 1; -- min value of the slider
  701.     max = 360; -- max value of the slider
  702.     precise = false; -- max 2 decimals
  703. },function(value)
  704.     getrenv().silentaim_fov_current = value
  705.     getrenv().silentaim_fov = value
  706. end)
  707.  
  708. silentaim_folder:Slider("FOV scoped",{
  709.     min = 1; -- min value of the slider
  710.     max = 540; -- max value of the slider
  711.     precise = false; -- max 2 decimals
  712. },function(value)
  713.     getrenv().silentaim_fov_scoped = value
  714. end)
  715.  
  716. silentaim_folder:ColorPicker("Reticle color",getrenv().silentaim_color,function(color)
  717.     getrenv().silentaim_color = color
  718. end)
  719.  
  720.  
  721. --esp
  722.  
  723. --item
  724.  
  725. esp_item_folder:Toggle("Enabled",function(bool)
  726.     getrenv().esp_item_enabled = bool
  727.    
  728.     if bool then
  729.         esp_item_enable()
  730.     else
  731.         esp_item_disable()
  732.     end
  733. end)
  734.  
  735. esp_item_folder:Slider("Max distance",{
  736.     min = 5; -- min value of the slider
  737.     max = 15000; -- max value of the slider
  738.     precise = false; -- max 2 decimals
  739. },function(value)
  740.     getrenv().item_esp_distance_max = value
  741. end)
  742.  
  743. esp_item_folder:Slider("Refresh rate",{
  744.     min = 0.01; -- min value of the slider
  745.     max = 5; -- max value of the slider
  746.     precise = true; -- max 2 decimals
  747. },function(value)
  748.     getrenv().item_esp_refreshrate = value
  749. end)
  750.  
  751. esp_item_folder:Slider("# per frame",{
  752.     min = 1; -- min value of the slider
  753.     max = 50; -- max value of the slider
  754.     precise = false; -- max 2 decimals
  755. },function(value)
  756.     getrenv().item_esp_iter = value
  757. end)
  758.  
  759. esp_item_folder:ColorPicker("Item color",getrenv().item_esp_color,function(color) --Default color
  760.     getrenv().item_esp_color = color
  761. end)
  762.  
  763. esp_item_folder:Toggle("Allow transparency",function(bool)
  764.     getrenv().item_esp_transparency = bool
  765. end)
  766.  
  767. esp_item_folder:Toggle("Reverse transparency",function(bool)
  768.     getrenv().item_esp_transparency_reverse = bool
  769. end)
  770.  
  771. --fastrun
  772.  
  773. fastrun_folder:Bind("Hotkey",Enum.KeyCode.N,function()
  774.     if game:GetService("UserInputService"):GetFocusedTextBox() ~= nil then return end
  775.    
  776.     getrenv().fastrun_enabled = (not getrenv().fastrun_enabled)
  777.    
  778.     if getrenv().fastrun_enabled == true then
  779.         fastrun()
  780.     end
  781. end)
  782.  
  783. fastrun_folder:Slider("Speed",{
  784.     min = 0; -- min value of the slider
  785.     max = 2; -- max value of the slider
  786.     precise = true; -- max 2 decimals
  787. },function(value)
  788.     getrenv().fastrun_speed = value
  789. end)
  790.  
  791. --whitelist
  792.  
  793.  
  794. for i, otherplr in pairs(plrs:GetPlayers()) do
  795.     if otherplr ~= plr then
  796.         table.insert(plrnamelist, otherplr.Name)
  797.     end
  798. end
  799.  
  800. plrs.PlayerAdded:Connect(function(thatplr)
  801.     table.insert(plrnamelist, thatplr.Name)
  802.    
  803.     _plrlist:Refresh(plrnamelist)
  804. end)
  805.  
  806. plrs.PlayerRemoving:Connect(function(thatplr)
  807.     for i, otherplr in pairs(plrnamelist) do
  808.         if otherplr == thatplr.Name then
  809.             table.remove(plrnamelist, i)
  810.         end
  811.     end
  812.    
  813.     _plrlist:Refresh(plrnamelist)
  814. end)
  815.  
  816. _plrlist = whitelist_folder:Dropdown("All players",plrnamelist,false,function(mob)
  817.     table.insert(whitelisted, mob)
  818.     for i, otherplr in pairs(plrnamelist) do
  819.         if otherplr == mob then
  820.             table.remove(plrnamelist, i)
  821.         end
  822.     end
  823.     _plrlist:Refresh(plrnamelist)
  824.     _whitelist:Refresh(whitelisted)
  825. end)
  826.  
  827. _whitelist = whitelist_folder:Dropdown("Whitelisted",whitelisted,false,function(mob)
  828.     table.insert(plrnamelist, mob)
  829.     for i, otherplr in pairs(whitelisted) do
  830.         if otherplr == mob then
  831.             table.remove(whitelisted, i)
  832.         end
  833.     end
  834.     _plrlist:Refresh(plrnamelist)
  835.     _whitelist:Refresh(whitelisted)
  836. end)
  837.  
  838.  
  839. --creds
  840.  
  841.  
  842. credits_folder:Label("Scripted by folder#0231",
  843.     {
  844.         TextSize = 18,
  845.         TextColor = Color3.fromRGB(255, 255, 255),
  846.         BgColor = Color3.fromRGB(38, 38, 38)
  847.     })
  848.  
  849. credits_folder:Label("UI library by Aika \n V3rm thread ID: 1040650",
  850.     {
  851.         TextSize = 14,
  852.         TextColor = Color3.fromRGB(255, 255, 255),
  853.         BgColor = Color3.fromRGB(38, 38, 38)
  854.     })
  855.  
  856. --dont take any of this code as good practice please
  857. --scripted by folder#0231
  858. --kairyu <3

Texbin is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.