Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Build 65b
- --[[Tips:
- Want to change colors for the crosshair? Find the MB.ch.ch1 variables, then change the numbers.
- Want to disable it completely? Change MB.ch.bool = true to MB.ch.bool = false
- r = red (0-255)
- g = green (0-255)
- b = blue (0-255)
- a = alpha [transparency] (0-255) 255 = not transparent
- ]]
- -------------------------LOCALIZATION
- local math = math -------------------
- local table = table -----------------
- local player = player ---------------
- local string = string ---------------
- local tostring = tostring -----------
- local pairs = pairs -----------------
- local ipairs = ipairs ---------------
- local util = util -------------------
- local surface = surface -------------
- local draw = draw -------------------
- local cam = cam ---------------------
- local render = render ---------------
- local vgui = vgui -------------------
- local timer = timer -----------------
- local hook = hook -------------------
- local concommand = concommand -------
- local _G = _G -----------------------
- ---------------------LOCALIZATION END
- local MB = {}
- if string.find(string.lower(GAMEMODE.Name),"terror") then MB.TTT = true else MB.TTT = false end
- if string.find(string.lower(GAMEMODE.Name),"darkrp") then MB.DRP = true else MB.DRP = false end
- MB.lp = LocalPlayer
- MB.chars = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "_"}
- MB.ch = {}
- MB.ch.bool = true
- MB.ch.ch1 = {}
- MB.ch.ch1.r = 213
- MB.ch.ch1.g = 91
- MB.ch.ch1.b = 201
- MB.ch.ch1.a = 200
- MB.debug = {}
- MB.esp = {}
- MB.hooks = {}
- MB.commands = {}
- MB.convars = {}
- MB.timers = {}
- MB.aim = false
- MB.aimnotify = true
- MB.meep = true
- MB.shootwhileaim = false
- MB.meepbot = false
- MB.targ = nil
- MB.esp.color = "health"
- MB.allwep = {}
- MB.traitorz = {}
- MB.witnesses = {}
- MB.deadpplz = {}
- MB.mat = CreateMaterial(math.random(1337,13370), "VertexLitGeneric", {["$basetexture"] = "models/debug/debugwhite", ["$model"] = 1, ["$ignorez"] = 1})
- MB.donottrack = {"viewmodel", "weapon_ttt_wtester", "weapon_zm_improvised", "weapon_zm_magnetstick", "weapon_zm_carry", "weapon_ttt_unarmed", "env_fire", "ttt_flame", "ttt_knife_proj", "prop_ragdoll", "trace1", "rope", "func_physbox", "ttt_firegrenade_proj", "ttt_smokegrenade_proj", "ttt_confgrenade_proj"}
- for k, v in pairs(ents.GetAll()) do
- v.isPartOfMap = true
- if not table.HasValue(MB.allwep,v:GetClass()) and v:IsWeapon() and not table.HasValue(MB.donottrack,v:GetClass()) then
- table.insert(MB.allwep,v:GetClass())
- end
- end
- function MB.rs(minl,maxl)
- local result = ""
- for i = 1, math.random(minl,maxl) do
- result = result..MB.chars[math.random(1,#MB.chars)]
- end
- return result
- end
- function MB.AddHook(Type,Function)
- local Name = MB.rs(5,25)
- MB.hooks[Name] = {}
- MB.hooks[Name].name = Name
- MB.hooks[Name].type = Type
- hook.Add(Type,Name,Function)
- end
- function MB.AddConVar(val, desc)
- local aval = MB.rs(5,10)
- MB.convars[desc] = {}
- MB.convars[desc].name = aval
- MB.convars[desc].desc = desc
- CreateConVar(aval,val)
- end
- function MB.AddTimer(timerdesc,timeamt,times,functiontimer)
- local timername = MB.rs(6,14)
- timer.Create(timername,timeamt,times,functiontimer)
- MB.timers[timername] = {}
- MB.timers[timername].name = timername
- MB.timers[timername].desc = timerdesc
- end
- function MB.ToConsole(text,nextline)
- if nextline then
- MsgN("[MeepBot] "..text)
- else
- Msg("[MeepBot] "..text)
- end
- end
- function MB.ToChat(...)
- chat.AddText(Color(225,215,0),"[MeepBot] ",Color(210,180,0), ...)
- end
- function MB.AddCommand(Name, bool, Function)
- local number = ""
- if bool then
- number = tostring(bool)
- else
- number = MB.rs(4,15)
- end
- MB.commands[Name] = {}
- MB.commands[Name].number = number
- MB.commands[Name].name = Name
- concommand.Add(number,Function)
- end
- MB.AddCommand("MB.Debug.Gamemode", false, function()
- MB.ToConsole(tostring(GAMEMODE.Name),true)
- end)
- MB.AddCommand("MB.ESPWallhack.Toggle", false, function()
- MB.meep = not MB.meep
- end)
- MB.AddCommand("MB.Debug.TTTToggle", false, function()
- MB.TTT = not MB.TTT
- end)
- MB.AddCommand("MB.Aimbot.Toggle", "meepbot", function()
- MB.aim = not MB.aim
- end)
- MB.AddCommand("MB.Aimbot.ShootWhileAiming", false, function()
- MB.shootwhileaim = not MB.shootwhileaim
- end)
- function MB.MESPCheck(v)
- if MB.TTT then
- if IsValid(v) and v:IsPlayer() and not v:IsNPC() and v:IsTerror() ~= nil and v:IsTerror() and not table.HasValue(MB.deadpplz,v) and v ~= MB.lp() then
- return true
- else
- return false
- end
- else
- if IsValid(v) and v:IsPlayer() and not v:IsNPC() and not table.HasValue(MB.deadpplz,v) and v ~= MB.lp() then
- return true
- else
- return false
- end
- end
- end
- function MB.coordinates(ent)
- local min, max = ent:OBBMins(), ent:OBBMaxs()
- local corners = {
- Vector(min.x, min.y, min.z),
- Vector(min.x, min.y, max.z),
- Vector(min.x, max.y, min.z),
- Vector(min.x, max.y, max.z),
- Vector(max.x, min.y, min.z),
- Vector(max.x, min.y, max.z),
- Vector(max.x, max.y, min.z),
- Vector(max.x, max.y, max.z)
- }
- local minX, minY, maxX, maxY = ScrW() * 2, ScrH() * 2, 0, 0
- for _, corner in pairs(corners) do
- local onScreen = ent:LocalToWorld(corner):ToScreen()
- minX, minY = math.min(minX, onScreen.x), math.min(minY, onScreen.y)
- maxX, maxY = math.max(maxX, onScreen.x), math.max(maxY, onScreen.y)
- end
- return minX, minY, maxX, maxY
- end
- MB.AddHook("Think",function()
- for _,v in pairs(player.GetAll()) do
- if not v:Alive() and v:Health() < 1 and not v:IsNPC() and v:IsPlayer() then
- if not table.HasValue(MB.deadpplz,v) then
- table.insert(MB.deadpplz,v)
- MB.ToChat(v:Name().." died somehow!")
- end
- else
- for k,v2 in pairs (MB.deadpplz) do
- if v2 == v then
- table.remove(MB.deadpplz,k)
- end
- end
- end
- end
- end)
- MB.AddHook("CreateMove",function(cmd) --Thanks Tyler Wearing!
- local lp = MB.lp()
- local trace = util.GetPlayerTrace(lp)
- local traceRes = util.TraceLine(trace)
- if traceRes.HitNonWorld then
- local target = traceRes.Entity
- if target:Health() > 0 and IsValid(target) and v ~= lp then
- MB.temptarg = target
- end
- end
- if MB.aim and IsValid(MB.targ) and MB.targ:Health() > 0 and table.HasValue(player.GetAll(), MB.targ) then
- local targethead = MB.targ:LookupBone("ValveBiped.Bip01_Head1")
- if targethead then
- local targetheadpos,targetheadang = MB.targ:GetBonePosition(targethead)
- if targetheadpos and targetheadang then
- angle = (targetheadpos - lp:EyePos()):Angle()
- --angle.p = angle.p - 180
- --if angle.p < 360 and angle.p > 270 then angle.p = angle.p + 360 end
- cmd:SetViewAngles(angle) --Thanks Tyler Wearing!
- if traceRes.HitNonWorld and traceRes.Entity and IsValid(traceRes.Entity) and MB.shootwhileaim then
- cmd:SetButtons(bit.bor(cmd:GetButtons(), IN_ATTACK)) --Thanks Tyler Wearing!
- end
- end
- end
- else
- MB.aim = false
- MB.targ = MB.temptarg
- end
- end)
- MB.AddHook("HUDPaint", function()
- local lp = MB.lp()
- local trace = util.GetPlayerTrace(lp)
- local traceRes = util.TraceLine(trace)
- if traceRes.HitNonWorld then
- local target = traceRes.Entity
- draw.DrawText(target:GetClass(),"BudgetLabel", 30, ScrH() / 2 + 15,Color(255,255,255,255))
- end
- local numspec = 0
- for k,v in pairs(player.GetAll()) do
- if v:GetObserverTarget() == lp then
- numspec = numspec + 1
- end
- end
- draw.DrawText(numspec.." Spectating You","BudgetLabel", 30, ScrH() / 2 + 30,Color(255,0,255,255))
- if MB.aim and MB.aimnotify then
- if IsValid(MB.targ) and MB.targ then
- draw.DrawText(MB.targ:Nick(), "BudgetLabel", 30, ScrH() / 2, Color(255, 255, 255, 255))
- end
- end
- if MB.ch["bool"] then
- surface.SetDrawColor(Color(MB.ch.ch1.r, MB.ch.ch1.g, MB.ch.ch1.b, MB.ch.ch1.a))
- local x, y = ScrW() / 2, ScrH() / 2
- local gap = 0
- local length = 15
- local exgap = 5
- if lp and lp:GetActiveWeapon() and MB.TTT and MB.MESPCheck(lp) then
- --stole code below
- local scale = math.max(0.2, 10 * lp:GetActiveWeapon().Primary.Cone)
- local sights = lp:GetActiveWeapon():GetIronsights()
- exgap = 20 * scale * (sights and 0.8 or 1)
- end
- surface.DrawLine( x - length, y, x - gap, y )
- surface.DrawLine( x + length, y, x + gap, y )
- surface.DrawLine( x, y - length, x, y - gap )
- surface.DrawLine( x, y + length, x, y + gap )
- if MB.TTT then
- surface.DrawLine(x - exgap,y + length / exgap, x - exgap, y - length / exgap)
- surface.DrawLine(x + exgap,y + length / exgap, x + exgap, y - length / exgap)
- surface.DrawLine(x - length / exgap,y + exgap, x + length / exgap, y + exgap)
- surface.DrawLine(x - length / exgap,y - exgap, x + length / exgap, y - exgap)
- end
- end
- if MB.meep then
- cam.Start2D()
- for k,v in pairs (ents.GetAll()) do
- if string.find(string.lower(v:GetClass()),"money") and MB.DRP then
- local pos = v:GetPos():ToScreen()
- local x, y = pos.x, pos.y
- draw.DrawText(tostring(v:GetClass()),"BudgetLabel",x,y,Color(100,150,125,255),TEXT_ALIGN_CENTER)
- elseif string.find(string.lower(tostring(v:GetClass())),"shipment") and MB.DRP then
- local pos = v:GetPos():ToScreen()
- local x, y = pos.x, pos.y
- local ct = v:Getcontents() or ""
- local cts = CustomShipments[ct] or ""
- local ctsn = cts.name
- draw.DrawText(tostring(v:GetClass()..(": "..ctsn.."; Amount: "..v:Getcount() or "")),"BudgetLabel",x,y,Color(100,150,125,255),TEXT_ALIGN_CENTER)
- end
- end
- for k,v in pairs (player.GetAll()) do
- if MB.MESPCheck(v) then
- --Name Draw start
- local Position = v:GetPos():ToScreen()
- local name = v:Name()
- local isadmin = v:IsAdmin() or false
- local issuperadmin = v:IsSuperAdmin() or false
- local text = ""
- if issuperadmin then text = "[SuperAdmin]\n"..name.."\n" elseif isadmin then text = "[Admin]\n"..name.."\n" else text = "\n"..name.."\n" end
- local extra = ""
- local color = Color(0,0,0,255)
- if MB.TTT then
- if v:IsDetective() then
- extra = "Detective"
- color = Color(0, 0, 255, 250)
- elseif table.HasValue(MB.traitorz,v) then
- extra = "Traitor"
- color = Color(0, 255, 0, 250)
- else
- extra = "Innocent"
- color = Color(0, 255, 0, 250)
- end
- elseif MB.DRP then
- extra = tostring(team.GetName(v:Team()))
- color = team.GetColor(v:Team())
- else
- color = Color(102, 102, 255, 250 )
- end
- draw.DrawText(text..extra, "BudgetLabel", Position.x, Position.y, color, 1)
- --Name Draw finish
- end
- end
- cam.End2D()
- end
- end)
- MB.AddHook("RenderScreenspaceEffects", function()
- if MB.meep then
- local lp = MB.lp()
- cam.Start3D(lp:EyePos(), lp:EyeAngles())
- render.SuppressEngineLighting(true)
- render.MaterialOverride(MB.mat)
- for k,v in pairs(player.GetAll()) do
- if MB.MESPCheck(v) then
- --draw people start
- --part 1
- local green = 0
- local red = 0
- local blue = 0
- local alpha = 1
- if MB.esp.color == "health" then
- h = v:Health()
- green = (2.55 * h) / 255
- red = (255 - 2.00 * h) / 255
- elseif MB.esp.color == "team" then
- local color = team.GetColor(v:Team())
- red = color.r / 255
- green = color.g / 255
- blue = color.b / 255
- alpha = color.a / 255
- elseif MB.esp.color == "white" then
- red = 1
- blue = 1
- green = 1
- elseif MB.esp.color == "red" then
- red = 1
- elseif MB.esp.color == "blue" then
- blue = 1
- elseif MB.esp.color == "green" then
- green = 1
- end
- render.SetColorModulation(red, green, blue, alpha)
- render.MaterialOverride(MB.mat)
- v:DrawModel()
- --part 2
- render.MaterialOverride()
- render.SetModelLighting(4, 0.78, 0.19, 0.19)
- v:DrawModel()
- --draw people finish
- --draw guns start
- if IsValid(v:GetActiveWeapon()) then
- render.SetColorModulation(0, 0, 0, 1)
- render.MaterialOverride(MB.mat)
- v:GetActiveWeapon():DrawModel()
- render.SetColorModulation(0, 0, 0, 1)
- render.MaterialOverride()
- v:GetActiveWeapon():DrawModel()
- end
- --draw guns finish
- end
- end
- render.SuppressEngineLighting(false)
- cam.End3D()
- end
- end)
- if MB.TTT then
- MB.AddHook("TTTPrepareRound",function()
- traitorfinder = false
- for k, v in pairs(MB.allwep) do
- table.remove(MB.allwep, k)
- MB.allwep = {}
- end
- MB.targ = nil
- MB.temptarg = nil
- for _,v in pairs(ents.GetAll()) do
- v.isPartOfMap = true
- end
- end)
- MB.AddHook("TTTBeginRound",function()
- traitorfinder = true
- for k, v in pairs(ents.GetAll()) do
- v.isPartOfMap = true
- if not table.HasValue(MB.allwep,v:GetClass()) and v:IsWeapon() and not table.HasValue(MB.donottrack,v:GetClass()) then
- table.insert(MB.allwep,v:GetClass())
- end
- end
- MB.traitorz = {}
- MB.deadpplz = {}
- end)
- end
- MB.AddHook("PostDrawOpaqueRenderables", function()
- if MB.TTT then
- for k, v in pairs(ents.GetAll()) do
- if v and MB.meep and traitorfinder and IsValid(v) then
- if not table.HasValue(MB.allwep,v:GetClass()) and v.CanBuy and not v.isPartOfMap and not v.wasESPTracked and not table.HasValue(MB.donottrack,v:GetClass()) then
- pl = v.Owner
- if MB.MESPCheck(pl) and IsValid(pl) and pl and not pl:IsDetective() then
- v.wasESPTracked = true
- table.insert(MB.traitorz,pl)
- MB.ToChat(pl, Color(255,125,0), " has a ",Color(255,0,0),tostring(v:GetPrintName()).."!")
- end
- end
- end
- end
- end
- end)
- MB.AddCommand("ShowWindow", false, function()
- -- the width in between things should be 5
- local frame = vgui.Create("DFrame")
- frame:SetTitle("MeepBot")
- frame:SetSize(400, 300) -- 398, 278 = the size of the actual window
- frame:SetPos(25, 25)
- frame:SetSizable(false)
- frame:MakePopup()
- local vguiselfdestructb = vgui.Create("DButton", frame)
- vguiselfdestructb:SetText("Self Destruct")
- vguiselfdestructb:SetPos(6,27)
- vguiselfdestructb:SetWide(388)
- vguiselfdestructb:SetHeight(20)
- vguiselfdestructb:SetTextColor(Color(0,100,0,255))
- function vguiselfdestructb:DoClick()
- for _,v in pairs(MB.hooks) do
- hook.Remove(v.type,v.name)
- MB.ToConsole(v.name.." was removed! ("..v.type..")",true)
- end
- for _,v in pairs (MB.timers) do
- timer.Remove(v.name)
- MB.ToConsole(v.desc.." was removed! ("..v.name..")",true)
- end
- for _,v in pairs (MB.commands) do
- concommand.Remove(v.number)
- MB.ToConsole(v.name.." was removed! ("..v.number..")",true)
- end
- frame:SetVisible(false)
- end
- local vguibindb = vgui.Create("DButton", frame)
- vguibindb:SetPos(7, 53)
- vguibindb:SetHeight(20)
- vguibindb:SetWide(97)
- vguibindb:SetText("List binds in ~")
- function vguibindb:DoClick()
- for _,v in pairs(MB.commands) do
- MB.ToConsole(v.name.." is "..v.number,true)
- end
- end
- local vguimaintoggleb = vgui.Create("DButton", frame)
- if MB.meep then vguimaintoggleb:SetText("Wallhack on") else vguimaintoggleb:SetText("Wallhack off") end
- vguimaintoggleb:SetPos(105, 53)
- vguimaintoggleb:SetWide(97)
- vguimaintoggleb:SetHeight(20)
- function vguimaintoggleb:DoClick()
- MB.meep = !MB.meep
- if MB.meep then self:SetText("Wallhack on") else self:SetText("Wallhack off") end
- end
- local btn1 = vgui.Create("DComboBox", frame)
- btn1:SetPos(7,79)
- btn1:SetHeight(20)
- btn1:SetWide(97)
- btn1:SetValue("Color of people")
- btn1:AddChoice("health")
- btn1:AddChoice("team")
- btn1:AddChoice("white")
- btn1:AddChoice("black")
- btn1:AddChoice("red")
- btn1:AddChoice("green")
- btn1:AddChoice("blue")
- function btn1:OnSelect(k,v,d)
- MB.esp.color = v
- end
- end)
- MB.AddCommand("MB.Debug.ESPSettings", false, function()
- local rows = 2
- local columns = 3
- local extrah = 27
- local extraw = 3
- local totalwidth = 3 + 103 * (columns * 3)
- local totalheight = 27 * (rows + 1)
- local Frame = vgui.Create("DFrame")
- Frame:SetSize(209,totalheight)
- Frame:SetPos(25,25)
- Frame:SetText("ESP settings")
- Frame:MakePopup()
- local btn1 = vgui.Create("DComboBox",Frame)
- btn1:SetPos(extraw,extrah)
- btn1:SetWide(100)
- btn1:AddChoice("health")
- btn1:AddChoice("team")
- btn1:AddChoice("red")
- btn1:AddChoice("green")
- btn1:AddChoice("blue")
- btn1:AddChoice("white")
- btn1:AddChoice("black")
- btn1:SetSelectedItems({btn1:SelectByName(MB.esp.color)})
- btn1:SetSelected(true)
- function btn1:OnSelect(k,v,d)
- MB.esp.color = v
- end
- local vguimaintoggleb = vgui.Create("DButton",Frame)
- if MB.meep then vguimaintoggleb:SetText("Wallhack on") else vguimaintoggleb:SetText("Wallhack off") end
- vguimaintoggleb:SetPos(extraw,extrah * 2)
- vguimaintoggleb:SetWide(100)
- function vguimaintoggleb:DoClick()
- MB.meep = !MB.meep
- if MB.meep then self:SetText("Wallhack on") else self:SetText("Wallhack off") end
- end
- local vguibindb = vgui.Create("DButton",Frame)
- vguibindb:SetPos(extraw * 2 + 100,extrah * 2)
- vguibindb:SetWide(100)
- vguibindb:SetText("List binds in ~")
- function vguibindb:DoClick()
- for _,v in pairs(MB.commands) do
- MB.ToConsole(v.name.." is "..v.number,true)
- end
- end
- local vguiselfdestructb = vgui.Create("DButton",Frame)
- vguiselfdestructb:SetPos(extraw * 2 + 100,extrah)
- vguiselfdestructb:SetWide(100)
- vguiselfdestructb:SetText("Self Destruct")
- function vguiselfdestructb:DoClick()
- for _,v in pairs(MB.hooks) do
- hook.Remove(v.type,v.name)
- MB.ToConsole(v.name.." was removed! ("..v.type..")",true)
- end
- for _,v in pairs (MB.timers) do
- timer.Remove(v.name)
- MB.ToConsole(v.desc.." was removed! ("..v.name..")",true)
- end
- for _,v in pairs (MB.commands) do
- concommand.Remove(v.number)
- MB.ToConsole(v.name.." was removed! ("..v.number..")",true)
- end
- Frame:SetVisible(false)
- end
- end)
- MB.ToChat("Bind a key to: ",Color(255,0,0),MB.commands["ShowWindow"].number)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement