--pavetr.top/ds local enable = false local update = false local logs = false local cooldown = 10 local colors = { white = Color(230, 230, 230), red = Color(230, 55, 55), green = Color(55, 230, 55), blue = Color(55, 55, 230), invise = Color(255, 255, 255, 0), } local function printer_func() local lcplgpos = LocalPlayer():GetPos() local manik_find = false for k,ent in pairs(ents.FindInSphere(lcplgpos, 50)) do local entcls = ent:GetClass() if entcls == 'f_printer' then manik_find = true if logs then chat.AddText(colors.white, 'Найден принтер: ' .. tostring(ent)) end net.Start("GambitPrinter.Withdraw") net.WriteEntity(ent) net.SendToServer() if update then net.Start("GambitPrinter.Cool") net.WriteEntity(ent) net.SendToServer() end if logs then chat.AddText(colors.green, 'Взял деньги с принтера: ' .. tostring(ent)) end end end if not manik_find and logs then return chat.AddText(colors.red, 'Маников поблизости нет!') end end local function start_printer() timer.Stop('prink_lotter') timer.Create('prink_lotter', cooldown, 0, function() if enable then printer_func() end end) end concommand.Add('printer_enabled', function(plr, com, t, cd) enable = !enable if enable then if tonumber(cd) then cooldown = cd chat.AddText(colors.green, 'Установленая задержка в: '.. tostring(cd) ..' секунд.') end start_printer() chat.AddText(colors.green, 'Авто принтер включен') else chat.AddText(colors.red, 'Авто принтер выключен') end end) concommand.Add('printer_auto_update', function() update = !update if update then chat.AddText(colors.green, 'Авто обновление принтера выключена') else chat.AddText(colors.red, 'Авто обновление принтера включена') end end) concommand.Add('logs', function() logs = !logs if logs then chat.AddText(colors.green, 'Логи были включены') else chat.AddText(colors.red, 'Логи были выключены') end end) surface.CreateFont("Font", { font = "Arial", extended = true, size = 20 }) concommand.Add("printer_menu3", function() local faded_black = Color(0, 0, 0, 200) local DermaPanel = vgui.Create("DFrame") DermaPanel:SetSize(300, 200) -- Sets the size to 500x by 300y. DermaPanel:Center() -- Centers the panel. DermaPanel:SetTitle("") -- Set the title to nothing. DermaPanel:SetDraggable(true) DermaPanel:MakePopup() local DermaButton = vgui.Create( "Button", DermaPanel ) if enable then DermaButton:SetText( "Money Auto Printer | Enabled" ) else DermaButton:SetText( "Money Auto Printer | Disabled" ) end DermaButton:SetPos( 25, 50 ) DermaButton:SetFont( 'Font' ) DermaButton:SetSize( 250, 30 ) DermaButton:SetTextColor( Color(30, 30, 30) ) DermaButton.DoClick = function() enable = !enable if enable then start_printer() DermaButton:SetText( "Money Auto Printer | Enabled" ) chat.AddText(colors.green, 'Авто принтер включен') else chat.AddText(colors.red, 'Авто принтер выключен') DermaButton:SetText( "Money Auto Printer | Disabled" ) end end local TextEntryPH = vgui.Create( "DTextEntry", DermaPanel ) TextEntryPH:SetSize( 250, 30 ) TextEntryPH:SetPos( 25, 50 * 1.5 ) TextEntryPH:SetFont( 'Font' ) TextEntryPH:SetPlaceholderText( "Cooldown: " .. cooldown ) TextEntryPH.OnEnter = function( self ) if tonumber(self:GetValue()) then cooldown = self:GetValue() self:SetValue('') self:SetPlaceholderText( "Cooldown: " .. self:GetValue() ) chat.AddText(colors.green, 'Установленая задержка в: '.. self:GetValue() ..' секунд.\nПерезапустите авто принтер!') end end local DermaButton1 = vgui.Create( "Button", DermaPanel ) if update then DermaButton1:SetText( "Money Auto Update | Enabled" ) else DermaButton1:SetText( "Money Auto Update | Disabled" ) end DermaButton1:SetPos( 25, 50 * 2 ) DermaButton1:SetSize( 250, 30 ) DermaButton1:SetTextColor( Color(30, 30, 30) ) DermaButton1:SetFont( 'Font' ) DermaButton1.DoClick = function() update = !update if update then DermaButton1:SetText( "Money Auto Update | Enabled" ) chat.AddText(colors.green, 'Авто обновление принтера выключена') else chat.AddText(colors.red, 'Авто обновление принтера включена') DermaButton1:SetText( "Money Auto Update | Disabled" ) end end local DermaButton2 = vgui.Create( "Button", DermaPanel ) if logs then DermaButton2:SetText( "Money Printer Logs | Enabled" ) else DermaButton2:SetText( "Money Printer Logs | Disabled" ) end DermaButton2:SetPos( 25, 50 * 2.5 ) DermaButton2:SetSize( 250, 30 ) DermaButton2:SetTextColor( Color(30, 30, 30) ) DermaButton2:SetFont( 'Font' ) DermaButton2.DoClick = function() logs = !logs if logs then DermaButton2:SetText( "Money Printer Logs | Enabled" ) chat.AddText(colors.green, 'Логи были включены') else chat.AddText(colors.red, 'Логи были выключены') DermaButton2:SetText( "Money Printer Logs | Disabled" ) end end DermaPanel.Paint = function(self, w, h) draw.RoundedBox(10, 0, 0, w, h, faded_black) draw.SimpleText("Gambit RP | uWu", "Font", 100, 30, color_white, TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER) end end)