Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Elebot Aka Apples - CREDITS: 4/19/2010-iKen0's Lua/Menu
- surface.CreateFont("Tahoma", 24, 700, true, false, "ElebotPlayerTitle")
- surface.CreateFont("Tahoma", 12, 400, true, false, "ElebotPlayerInfo")
- local target = nil;
- if (cmdStr != nil and cmdStr != NULL) then
- concommand.Remove("+"..cmdStr)
- concommand.Remove("-"..cmdStr)
- end
- local cmdStr = "apples"
- local offset = CreateClientConVar(cmdStr.."_offset", 24, true, false)
- local targetTeam = CreateClientConVar(cmdStr.."_targetteam", 0, true, false)
- local simpleColors = CreateClientConVar(cmdStr.."_simplecolors", 0, true, false)
- local maxView = CreateClientConVar(cmdStr.."_maxview", 4800, true, false)
- local minView = CreateClientConVar(cmdStr.."_minview", 120, true, false)
- local boxSize = CreateClientConVar(cmdStr.."_boxsize", 10, true, false)
- local red = CreateClientConVar(cmdStr.."_redcolor", 255, true, false)
- local blue = CreateClientConVar(cmdStr.."_bluecolor", 255, true, false)
- local green = CreateClientConVar(cmdStr.."_greencolor", 0, true, false)
- local filledBox = CreateClientConVar(cmdStr.."_filledbox", 0, true, false)
- local showAdmin = CreateClientConVar(cmdStr.."_showadmin", 0, true, false)
- local shouldESP = CreateClientConVar(cmdStr.."_esp", 0, true, false)
- local filterProps = CreateClientConVar(cmdStr.."_xray", 0, true, false)
- local steamfriends = CreateClientConVar(cmdStr.."_friends", 0, true, false )
- local CrossHair = CreateClientConVar(cmdStr.."_cross",0, true, false)
- local function afriend(ply)
- if ply:GetFriendStatus()=="friend" && !steamfriends:GetBool() then return false end
- for a,b in pairs(friendslist) do
- //Msg("1:"..string.Replace(string.Replace(ply:Name(),"[",""),"]","").."\n")
- //Msg(string.lower(b))
- if string.find(string.lower(ply:Name()),string.lower(b),0,true) then
- return false
- end
- end
- if #friendslist==0 then return true end
- return true
- end
- local function TrackTarget(UCMD)
- if !target or !ValidEntity(target) then
- local filterTable = {LocalPlayer()}
- if (!filterProps:GetBool()) then
- if (ents.GetAll()[1]:IsWorld()) then
- table.insert(filterTable, ents.GetAll()[1])
- end
- for k,v in pairs (ents.GetAll()) do
- if !(v:IsNPC() or v:IsPlayer()) then
- table.insert(filterTable, v)
- end
- end
- end
- /*
- if (ents.FindByClass("worldspawn") != nil) then
- print("Found world entity!")
- table.insert(filterTable, ents.FindByClass("worldspawn")[1])
- end
- */
- local trace = util.QuickTrace(LocalPlayer():GetShootPos(), LocalPlayer():GetAimVector() * 100000, filterTable)
- /*
- local traceTable = {start = LocalPlayer():GetShootPos(), endpos = LocalPlayer():GetAimVector() * 10000, filter = filterTable}
- local trace = util.TraceLine(traceTable)
- */
- /*
- if (trace.Entity and ValidEntity(trace.Entity) and trace.Entity:IsValid() and (trace.Entity:IsPlayer() or trace.Entity:IsNPC())) then
- if trace.Entity:IsPlayer() and !targetTeam:GetBool() and trace.Entity:Team() == LocalPlayer():Team() then
- return
- else
- target = trace.Entity
- end
- else
- return
- end
- */
- if (trace.Entity and ValidEntity(trace.Entity)) then
- if (trace.Entity:IsPlayer()) then
- if !targetTeam:GetBool() and trace.Entity:Team() == LocalPlayer():Team() then
- return
- else
- target = trace.Entity
- end
- else
- if (trace.Entity:IsNPC()) then
- target = trace.Entity
- else
- return
- end
- end
- else
- return
- end
- end
- /*
- if (target:OBBMaxs().z < offset:GetFloat() or string.find(target:GetModel(), "crab") or string.find(target:GetModel(), "torso")) then
- UCMD:SetViewAngles((target:GetPos() + Vector(0, 0, target:OBBMaxs().z * 0.25) - LocalPlayer():GetShootPos()):Normalize():Angle())
- else
- UCMD:SetViewAngles((target:GetPos() + Vector(0, 0, offset:GetFloat()) - LocalPlayer():GetShootPos()):Normalize():Angle())
- end
- */
- if (target:GetAttachment(target:LookupAttachment("eyes"))) then //Standard
- UCMD:SetViewAngles((target:GetAttachment(target:LookupAttachment("eyes")).Pos - LocalPlayer():GetShootPos()):Normalize():Angle())
- elseif (target:GetAttachment(target:LookupAttachment("forward"))) then //CSS models
- UCMD:SetViewAngles((target:GetAttachment(target:LookupAttachment("forward")).Pos - LocalPlayer():GetShootPos()):Normalize():Angle())
- elseif (target:GetAttachment(target:LookupAttachment("head"))) then //Zombies
- UCMD:SetViewAngles((target:GetAttachment(target:LookupAttachment("head")).Pos - LocalPlayer():GetShootPos()):Normalize():Angle())
- else //Headcrabs, antlions, etc.
- UCMD:SetViewAngles((target:GetPos() + Vector(0, 0, offset:GetFloat()) - LocalPlayer():GetShootPos()):Normalize():Angle())
- end
- end
- local function PaintTargets()
- if (!shouldESP:GetBool()) then return end
- local adminList = "";
- for k,v in pairs (ents.GetAll()) do
- if v:IsNPC() then
- local pos = (v:GetPos() + Vector(0, 0, offset:GetFloat())):ToScreen()
- if v:OBBMaxs().z < offset:GetFloat() then
- pos = (v:GetPos() + Vector(0, 0, v:OBBMaxs().z * 0.25)):ToScreen()
- end
- if (pos.visible) then
- local alpha = math.Clamp((maxView:GetFloat() - v:GetPos():Distance(LocalPlayer():GetShootPos())) * (255 / (maxView:GetFloat() - minView:GetFloat())), 30, 255)
- draw.SimpleText(string.gsub(v:GetClass(), "npc_", ""), "ElebotPlayerTitle", pos.x, pos.y, Color(0, 255, 0, alpha), 1, 1)
- local boxCenter = (v:GetPos() + Vector(0, 0, v:OBBMaxs().z)):ToScreen()
- local bL = boxSize:GetFloat()
- if (filledBox:GetBool() && bL != 0) then
- draw.RoundedBox(1, boxCenter.x - bL, boxCenter.y - bL, bL * 2, bL * 2, Color(0, 255, 0, alpha))
- else
- if (!filledBox:GetBool() && bL != 0) then
- local bL = boxSize:GetFloat()
- surface.SetDrawColor(0, 255, 0, alpha)
- surface.DrawLine(boxCenter.x - bL, boxCenter.y + bL, boxCenter.x - bL, boxCenter.y - bL) //Left vertical
- surface.DrawLine(boxCenter.x - bL, boxCenter.y + bL, boxCenter.x + bL, boxCenter.y + bL) //Bottom horizontal
- surface.DrawLine(boxCenter.x + bL, boxCenter.y - bL, boxCenter.x - bL, boxCenter.y - bL) // Top horizontal
- surface.DrawLine(boxCenter.x + bL, boxCenter.y - bL, boxCenter.x + bL, boxCenter.y + bL) //Right vertical
- end
- end
- end
- else
- if v:IsPlayer() then
- local pos = (v:GetPos() + Vector(0, 0, offset:GetFloat())):ToScreen()
- if string.find(v:GetModel(), "crab") or string.find(v:GetModel(), "torso") then
- pos = (v:GetPos() + Vector(0, 0, v:OBBMaxs().z * 0.25)):ToScreen()
- end
- if (pos.visible and v != LocalPlayer() and v.Nick and v.Health and v.GetActiveWeapon and v:GetActiveWeapon().GetPrintName) then
- local alpha = math.Clamp((maxView:GetFloat() - v:GetPos():Distance(LocalPlayer():GetShootPos())) * (255 / (maxView:GetFloat() - minView:GetFloat())), 30, 255)
- local tcol// = team.GetColor(v:Team())
- if (simpleColors:GetBool()) then
- if (v:Team() == LocalPlayer():Team()) then
- tcol = Color(0, 255, 0, alpha)
- else
- tcol = Color(255, 0, 0, alpha)
- end
- else
- tcol = team.GetColor(v:Team())
- tcol = Color(tcol.r, tcol.g, tcol.b, alpha)
- end
- local stuff = v:GetPos():Distance(LocalPlayer():GetShootPos()) - 72
- if(stuff < 0) then
- stuff = 0
- end
- draw.SimpleText(v:Nick(), "ElebotPlayerTitle", pos.x, pos.y, tcol, 1, 1)
- draw.SimpleText("HP: "..v:Health(), "ElebotPlayerInfo", pos.x, pos.y + 25, tcol, 1, 1)
- draw.SimpleText("Weapon: "..v:GetActiveWeapon():GetPrintName(), "ElebotPlayerInfo", pos.x, pos.y + 38, tcol, 1, 1)
- draw.SimpleText("Disance: "..math.Round(stuff), "ElebotPlayerInfo", pos.x, pos.y + 52, tcol, 1, 1)
- local boxCenter = ((v:GetPos() + Vector(0, 0, v:OBBMaxs().z * 0.9))):ToScreen()
- local bL = boxSize:GetFloat()
- if (filledBox:GetBool() && bL != 0) then
- draw.RoundedBox(1, boxCenter.x - bL, boxCenter.y - bL, bL * 2, bL * 2, tcol)
- else
- if (!filledBox:GetBool() && bL != 0) then
- surface.SetDrawColor(tcol.r, tcol.g, tcol.b, alpha)
- surface.DrawLine(boxCenter.x - bL, boxCenter.y + bL, boxCenter.x - bL, boxCenter.y - bL) //Left vertical
- surface.DrawLine(boxCenter.x - bL, boxCenter.y + bL, boxCenter.x + bL, boxCenter.y + bL) //Bottom horizontal
- surface.DrawLine(boxCenter.x + bL, boxCenter.y - bL, boxCenter.x - bL, boxCenter.y - bL) // Top horizontal
- surface.DrawLine(boxCenter.x + bL, boxCenter.y - bL, boxCenter.x + bL, boxCenter.y + bL) //Right vertical
- end
- end
- end
- if v:IsAdmin() or v:IsSuperAdmin() then
- adminList = adminList..", "..v:Nick()
- end
- local x = ScrW() / 2.0
- local y = ScrH() / 2.0
- local r = red:GetFloat()
- local b = blue:GetFloat()
- local g = green:GetFloat()
- if (CrossHair:GetBool()) then
- surface.SetDrawColor( r, g, b, 150)
- surface.DrawLine( x, y, x+10, y )
- surface.DrawLine( x, y, x-10, y )
- surface.DrawLine( x, y, x, y+5 )
- surface.DrawLine( x, y, x, y-5 )
- end
- end
- end
- end
- if (showAdmin:GetBool()) then
- if (adminList != "") then
- adminList = string.sub(adminList, 3, string.len(adminList))
- draw.SimpleText("Admins: "..adminList, "ElebotPlayerInfo", ScrW() * 0.8, ScrH() * 0.2, Color(0, 255, 0, 200), 1, 1)
- else
- draw.SimpleText("No admins online!", "ElebotPlayerInfo", ScrW() * 0.8, ScrH() * 0.2, Color(255, 0, 0, 200), 1, 1)
- end
- end
- end
- hook.Add("HUDPaint", "PaintTargets", PaintTargets)
- local function AimbotOn(ply, cmd, args)
- hook.Add("CreateMove", "TrackTarget", TrackTarget)
- end
- concommand.Add("+"..cmdStr, AimbotOn)
- local function AimbotOff(ply, cmd, args)
- target = nil
- hook.Remove("CreateMove", "TrackTarget")
- end
- concommand.Add("-"..cmdStr, AimbotOff)
- --[[NOTIFY_GENERIC = 0
- NOTIFY_ERROR = 1
- NOTIFY_UNDO = 2
- NOTIFY_HINT = 3
- NOTIFY_CLEANUP = 4
- if NoticeMaterial == nil then
- NoticeMaterial = {}
- end
- NoticeMaterial[ NOTIFY_GENERIC ] = surface.GetTextureID( "vgui/notices/generic" )
- NoticeMaterial[ NOTIFY_ERROR ] = surface.GetTextureID( "vgui/notices/error" )
- NoticeMaterial[ NOTIFY_UNDO ] = surface.GetTextureID( "vgui/notices/undo" )
- NoticeMaterial[ NOTIFY_HINT ] = surface.GetTextureID( "vgui/notices/hint" )
- NoticeMaterial[ NOTIFY_CLEANUP ] = surface.GetTextureID( "vgui/notices/cleanup" )
- HUDNote_c = 0
- HUDNote_i = 1
- HUDNotes = {}
- function AddBotNotify( str, type, length )
- local tab = {}
- tab.text = str
- tab.recv = CurTime()
- tab.len = length
- tab.velx = -5
- tab.vely = 0
- tab.x = ScrW() + 200
- tab.y = ScrH()
- tab.a = 255
- tab.type = type
- table.insert( HUDNotes, tab )
- HUDNote_c = HUDNote_c + 1
- HUDNote_i = HUDNote_i + 1
- end]]
- // Attempt at creating ClientCvar For Derma
- // Derma Menu Created By iKen0
- function DumbDumb()
- local DermaPanel = vgui.Create( "DFrame" )
- DermaPanel:SetPos( 25,50 )
- DermaPanel:SetSize( 200, 400 )
- DermaPanel:SetTitle( "Apples Derma Menu Made By IKen0" )
- DermaPanel:SetVisible( true )
- DermaPanel:SetDraggable( true )
- DermaPanel:ShowCloseButton( true )
- DermaPanel:MakePopup()
- local NumSliderThingy = vgui.Create( "DNumSlider", DermaPanel )
- NumSliderThingy:SetPos( 25,50 )
- NumSliderThingy:SetSize( 150, 220 )
- NumSliderThingy:SetText( "BoxSize" )
- NumSliderThingy:SetMin( 0 )
- NumSliderThingy:SetMax( 50 )
- NumSliderThingy:SetDecimals( 0 )
- NumSliderThingy:SetConVar( "apples_boxsize" )
- local CheckBox2 = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBox2:SetPos( 25,95)
- CheckBox2:SetText( "Enable ESP?" )
- CheckBox2:SetConVar( "apples_esp" )
- CheckBox2:SizeToContents()
- local CheckBox3 = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBox3:SetPos( 25,115)
- CheckBox3:SetText( "Enable Filled Box?" )
- CheckBox3:SetConVar( "apples_filledbox" )
- CheckBox3:SizeToContents()
- local CheckBox4 = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBox4:SetPos( 25,135)
- CheckBox4:SetText( "Friends?" )
- CheckBox4:SetConVar( "apples_friends" )
- CheckBox4:SizeToContents()
- local CheckBox5 = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBox5:SetPos( 25,155)
- CheckBox5:SetText( "Show Admin's?" )
- CheckBox5:SetConVar( "apples_showadmin" )
- CheckBox5:SizeToContents()
- local CheckBox6 = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBox6:SetPos( 25,175)
- CheckBox6:SetText( "Enable Simple Color's?" )
- CheckBox6:SetConVar( "apples_simplecolors" )
- CheckBox6:SizeToContents()
- local CheckBox7 = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBox7:SetPos( 25,195)
- CheckBox7:SetText( "Enable Target Team?" )
- CheckBox7:SetConVar( "apples_targetteam" )
- CheckBox7:SizeToContents()
- local CheckBox8 = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBox8:SetPos( 25,215)
- CheckBox8:SetText( "X-Ray" )
- CheckBox8:SetConVar( "apples_xray" )
- CheckBox8:SizeToContents()
- local CheckBox9 = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBox9:SetPos( 25,235)
- CheckBox9:SetText( "Crosshair?" )
- CheckBox9:SetConVar( "apples_cross" )
- CheckBox9:SizeToContents()
- local NumSlider1 = vgui.Create( "DNumSlider", DermaPanel )
- NumSlider1:SetPos( 25,255 )
- NumSlider1:SetSize( 150, 220 )
- NumSlider1:SetText( "Red" )
- NumSlider1:SetMin( 0 )
- NumSlider1:SetMax( 255 )
- NumSlider1:SetDecimals( 0 )
- NumSlider1:SetConVar( "apples_redcolor" )
- local NumSlider2 = vgui.Create( "DNumSlider", DermaPanel )
- NumSlider2:SetPos( 25,295 )
- NumSlider2:SetSize( 150, 220 )
- NumSlider2:SetText( "Blue" )
- NumSlider2:SetMin( 0 )
- NumSlider2:SetMax( 255 )
- NumSlider2:SetDecimals( 0 )
- NumSlider2:SetConVar( "apples_bluecolor" )
- local NumSlider3 = vgui.Create( "DNumSlider", DermaPanel )
- NumSlider3:SetPos( 25,335 )
- NumSlider3:SetSize( 150, 220 )
- NumSlider3:SetText( "Green" )
- NumSlider3:SetMin( 0 )
- NumSlider3:SetMax( 255 )
- NumSlider3:SetDecimals( 0 )
- NumSlider3:SetConVar( "apples_greencolor" )
- local button1 = vgui.Create( "DButton", DermaPanel )
- button1:SetText("Bind F to aimbot")
- button1:SetVisible( true )
- button1:SetPos( 25, 375)
- button1:SetSize(150, 20)
- button1.DoClick = function()
- LocalPlayer():ChatPrint("Type: Bind f ''+apples'' in console") end
- --AddBotNotify( "Type: Bind f ''+apples'' in console", NOTIFY_HINT, 6 ) end
- end
- concommand.Add("apples_menu", DumbDumb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement