Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.75 KB | None | 0 0
  1. // Elebot Aka Apples - CREDITS: 4/19/2010-iKen0's Lua/Menu
  2. surface.CreateFont("Tahoma", 24, 700, true, false, "ElebotPlayerTitle")
  3. surface.CreateFont("Tahoma", 12, 400, true, false, "ElebotPlayerInfo")
  4.  
  5. local target = nil;
  6.  
  7. if (cmdStr != nil and cmdStr != NULL) then
  8. concommand.Remove("+"..cmdStr)
  9. concommand.Remove("-"..cmdStr)
  10. end
  11.  
  12. local cmdStr = "apples"
  13. local offset = CreateClientConVar(cmdStr.."_offset", 24, true, false)
  14. local targetTeam = CreateClientConVar(cmdStr.."_targetteam", 0, true, false)
  15. local simpleColors = CreateClientConVar(cmdStr.."_simplecolors", 0, true, false)
  16. local maxView = CreateClientConVar(cmdStr.."_maxview", 4800, true, false)
  17. local minView = CreateClientConVar(cmdStr.."_minview", 120, true, false)
  18. local boxSize = CreateClientConVar(cmdStr.."_boxsize", 10, true, false)
  19. local red = CreateClientConVar(cmdStr.."_redcolor", 255, true, false)
  20. local blue = CreateClientConVar(cmdStr.."_bluecolor", 255, true, false)
  21. local green = CreateClientConVar(cmdStr.."_greencolor", 0, true, false)
  22. local filledBox = CreateClientConVar(cmdStr.."_filledbox", 0, true, false)
  23. local showAdmin = CreateClientConVar(cmdStr.."_showadmin", 0, true, false)
  24. local shouldESP = CreateClientConVar(cmdStr.."_esp", 0, true, false)
  25. local filterProps = CreateClientConVar(cmdStr.."_xray", 0, true, false)
  26. local steamfriends = CreateClientConVar(cmdStr.."_friends", 0, true, false )
  27. local CrossHair = CreateClientConVar(cmdStr.."_cross",0, true, false)
  28.  
  29.  
  30.  
  31. local function afriend(ply)
  32. if ply:GetFriendStatus()=="friend" && !steamfriends:GetBool() then return false end
  33. for a,b in pairs(friendslist) do
  34. //Msg("1:"..string.Replace(string.Replace(ply:Name(),"[",""),"]","").."\n")
  35. //Msg(string.lower(b))
  36. if string.find(string.lower(ply:Name()),string.lower(b),0,true) then
  37. return false
  38. end
  39. end
  40. if #friendslist==0 then return true end
  41. return true
  42. end
  43.  
  44. local function TrackTarget(UCMD)
  45. if !target or !ValidEntity(target) then
  46.  
  47. local filterTable = {LocalPlayer()}
  48.  
  49. if (!filterProps:GetBool()) then
  50. if (ents.GetAll()[1]:IsWorld()) then
  51. table.insert(filterTable, ents.GetAll()[1])
  52. end
  53. for k,v in pairs (ents.GetAll()) do
  54. if !(v:IsNPC() or v:IsPlayer()) then
  55. table.insert(filterTable, v)
  56. end
  57. end
  58. end
  59.  
  60. /*
  61. if (ents.FindByClass("worldspawn") != nil) then
  62. print("Found world entity!")
  63. table.insert(filterTable, ents.FindByClass("worldspawn")[1])
  64. end
  65. */
  66.  
  67.  
  68. local trace = util.QuickTrace(LocalPlayer():GetShootPos(), LocalPlayer():GetAimVector() * 100000, filterTable)
  69.  
  70. /*
  71. local traceTable = {start = LocalPlayer():GetShootPos(), endpos = LocalPlayer():GetAimVector() * 10000, filter = filterTable}
  72.  
  73. local trace = util.TraceLine(traceTable)
  74. */
  75. /*
  76. if (trace.Entity and ValidEntity(trace.Entity) and trace.Entity:IsValid() and (trace.Entity:IsPlayer() or trace.Entity:IsNPC())) then
  77. if trace.Entity:IsPlayer() and !targetTeam:GetBool() and trace.Entity:Team() == LocalPlayer():Team() then
  78. return
  79. else
  80. target = trace.Entity
  81. end
  82. else
  83. return
  84. end
  85. */
  86.  
  87. if (trace.Entity and ValidEntity(trace.Entity)) then
  88. if (trace.Entity:IsPlayer()) then
  89. if !targetTeam:GetBool() and trace.Entity:Team() == LocalPlayer():Team() then
  90. return
  91. else
  92. target = trace.Entity
  93. end
  94. else
  95. if (trace.Entity:IsNPC()) then
  96. target = trace.Entity
  97. else
  98. return
  99. end
  100. end
  101. else
  102. return
  103. end
  104. end
  105.  
  106. /*
  107. if (target:OBBMaxs().z < offset:GetFloat() or string.find(target:GetModel(), "crab") or string.find(target:GetModel(), "torso")) then
  108. UCMD:SetViewAngles((target:GetPos() + Vector(0, 0, target:OBBMaxs().z * 0.25) - LocalPlayer():GetShootPos()):Normalize():Angle())
  109. else
  110. UCMD:SetViewAngles((target:GetPos() + Vector(0, 0, offset:GetFloat()) - LocalPlayer():GetShootPos()):Normalize():Angle())
  111. end
  112. */
  113. if (target:GetAttachment(target:LookupAttachment("eyes"))) then //Standard
  114. UCMD:SetViewAngles((target:GetAttachment(target:LookupAttachment("eyes")).Pos - LocalPlayer():GetShootPos()):Normalize():Angle())
  115. elseif (target:GetAttachment(target:LookupAttachment("forward"))) then //CSS models
  116. UCMD:SetViewAngles((target:GetAttachment(target:LookupAttachment("forward")).Pos - LocalPlayer():GetShootPos()):Normalize():Angle())
  117. elseif (target:GetAttachment(target:LookupAttachment("head"))) then //Zombies
  118. UCMD:SetViewAngles((target:GetAttachment(target:LookupAttachment("head")).Pos - LocalPlayer():GetShootPos()):Normalize():Angle())
  119. else //Headcrabs, antlions, etc.
  120. UCMD:SetViewAngles((target:GetPos() + Vector(0, 0, offset:GetFloat()) - LocalPlayer():GetShootPos()):Normalize():Angle())
  121. end
  122. end
  123.  
  124. local function PaintTargets()
  125. if (!shouldESP:GetBool()) then return end
  126. local adminList = "";
  127. for k,v in pairs (ents.GetAll()) do
  128. if v:IsNPC() then
  129. local pos = (v:GetPos() + Vector(0, 0, offset:GetFloat())):ToScreen()
  130.  
  131. if v:OBBMaxs().z < offset:GetFloat() then
  132. pos = (v:GetPos() + Vector(0, 0, v:OBBMaxs().z * 0.25)):ToScreen()
  133. end
  134.  
  135. if (pos.visible) then
  136. local alpha = math.Clamp((maxView:GetFloat() - v:GetPos():Distance(LocalPlayer():GetShootPos())) * (255 / (maxView:GetFloat() - minView:GetFloat())), 30, 255)
  137. draw.SimpleText(string.gsub(v:GetClass(), "npc_", ""), "ElebotPlayerTitle", pos.x, pos.y, Color(0, 255, 0, alpha), 1, 1)
  138. local boxCenter = (v:GetPos() + Vector(0, 0, v:OBBMaxs().z)):ToScreen()
  139. local bL = boxSize:GetFloat()
  140. if (filledBox:GetBool() && bL != 0) then
  141. draw.RoundedBox(1, boxCenter.x - bL, boxCenter.y - bL, bL * 2, bL * 2, Color(0, 255, 0, alpha))
  142. else
  143. if (!filledBox:GetBool() && bL != 0) then
  144. local bL = boxSize:GetFloat()
  145. surface.SetDrawColor(0, 255, 0, alpha)
  146. surface.DrawLine(boxCenter.x - bL, boxCenter.y + bL, boxCenter.x - bL, boxCenter.y - bL) //Left vertical
  147. surface.DrawLine(boxCenter.x - bL, boxCenter.y + bL, boxCenter.x + bL, boxCenter.y + bL) //Bottom horizontal
  148. surface.DrawLine(boxCenter.x + bL, boxCenter.y - bL, boxCenter.x - bL, boxCenter.y - bL) // Top horizontal
  149. surface.DrawLine(boxCenter.x + bL, boxCenter.y - bL, boxCenter.x + bL, boxCenter.y + bL) //Right vertical
  150. end
  151. end
  152. end
  153. else
  154. if v:IsPlayer() then
  155. local pos = (v:GetPos() + Vector(0, 0, offset:GetFloat())):ToScreen()
  156.  
  157. if string.find(v:GetModel(), "crab") or string.find(v:GetModel(), "torso") then
  158. pos = (v:GetPos() + Vector(0, 0, v:OBBMaxs().z * 0.25)):ToScreen()
  159. end
  160.  
  161. if (pos.visible and v != LocalPlayer() and v.Nick and v.Health and v.GetActiveWeapon and v:GetActiveWeapon().GetPrintName) then
  162. local alpha = math.Clamp((maxView:GetFloat() - v:GetPos():Distance(LocalPlayer():GetShootPos())) * (255 / (maxView:GetFloat() - minView:GetFloat())), 30, 255)
  163. local tcol// = team.GetColor(v:Team())
  164. if (simpleColors:GetBool()) then
  165. if (v:Team() == LocalPlayer():Team()) then
  166. tcol = Color(0, 255, 0, alpha)
  167. else
  168. tcol = Color(255, 0, 0, alpha)
  169. end
  170. else
  171. tcol = team.GetColor(v:Team())
  172. tcol = Color(tcol.r, tcol.g, tcol.b, alpha)
  173. end
  174.  
  175. local stuff = v:GetPos():Distance(LocalPlayer():GetShootPos()) - 72
  176. if(stuff < 0) then
  177. stuff = 0
  178. end
  179. draw.SimpleText(v:Nick(), "ElebotPlayerTitle", pos.x, pos.y, tcol, 1, 1)
  180. draw.SimpleText("HP: "..v:Health(), "ElebotPlayerInfo", pos.x, pos.y + 25, tcol, 1, 1)
  181. draw.SimpleText("Weapon: "..v:GetActiveWeapon():GetPrintName(), "ElebotPlayerInfo", pos.x, pos.y + 38, tcol, 1, 1)
  182. draw.SimpleText("Disance: "..math.Round(stuff), "ElebotPlayerInfo", pos.x, pos.y + 52, tcol, 1, 1)
  183. local boxCenter = ((v:GetPos() + Vector(0, 0, v:OBBMaxs().z * 0.9))):ToScreen()
  184. local bL = boxSize:GetFloat()
  185. if (filledBox:GetBool() && bL != 0) then
  186. draw.RoundedBox(1, boxCenter.x - bL, boxCenter.y - bL, bL * 2, bL * 2, tcol)
  187. else
  188. if (!filledBox:GetBool() && bL != 0) then
  189. surface.SetDrawColor(tcol.r, tcol.g, tcol.b, alpha)
  190. surface.DrawLine(boxCenter.x - bL, boxCenter.y + bL, boxCenter.x - bL, boxCenter.y - bL) //Left vertical
  191. surface.DrawLine(boxCenter.x - bL, boxCenter.y + bL, boxCenter.x + bL, boxCenter.y + bL) //Bottom horizontal
  192. surface.DrawLine(boxCenter.x + bL, boxCenter.y - bL, boxCenter.x - bL, boxCenter.y - bL) // Top horizontal
  193. surface.DrawLine(boxCenter.x + bL, boxCenter.y - bL, boxCenter.x + bL, boxCenter.y + bL) //Right vertical
  194. end
  195. end
  196. end
  197.  
  198. if v:IsAdmin() or v:IsSuperAdmin() then
  199. adminList = adminList..", "..v:Nick()
  200. end
  201. local x = ScrW() / 2.0
  202. local y = ScrH() / 2.0
  203. local r = red:GetFloat()
  204. local b = blue:GetFloat()
  205. local g = green:GetFloat()
  206. if (CrossHair:GetBool()) then
  207. surface.SetDrawColor( r, g, b, 150)
  208.  
  209. surface.DrawLine( x, y, x+10, y )
  210. surface.DrawLine( x, y, x-10, y )
  211. surface.DrawLine( x, y, x, y+5 )
  212. surface.DrawLine( x, y, x, y-5 )
  213. end
  214.  
  215.  
  216. end
  217. end
  218. end
  219.  
  220. if (showAdmin:GetBool()) then
  221. if (adminList != "") then
  222. adminList = string.sub(adminList, 3, string.len(adminList))
  223. draw.SimpleText("Admins: "..adminList, "ElebotPlayerInfo", ScrW() * 0.8, ScrH() * 0.2, Color(0, 255, 0, 200), 1, 1)
  224. else
  225. draw.SimpleText("No admins online!", "ElebotPlayerInfo", ScrW() * 0.8, ScrH() * 0.2, Color(255, 0, 0, 200), 1, 1)
  226. end
  227. end
  228. end
  229. hook.Add("HUDPaint", "PaintTargets", PaintTargets)
  230.  
  231.  
  232. local function AimbotOn(ply, cmd, args)
  233. hook.Add("CreateMove", "TrackTarget", TrackTarget)
  234. end
  235. concommand.Add("+"..cmdStr, AimbotOn)
  236.  
  237. local function AimbotOff(ply, cmd, args)
  238. target = nil
  239. hook.Remove("CreateMove", "TrackTarget")
  240. end
  241. concommand.Add("-"..cmdStr, AimbotOff)
  242.  
  243.  
  244. --[[NOTIFY_GENERIC = 0
  245. NOTIFY_ERROR = 1
  246. NOTIFY_UNDO = 2
  247. NOTIFY_HINT = 3
  248. NOTIFY_CLEANUP = 4
  249.  
  250. if NoticeMaterial == nil then
  251. NoticeMaterial = {}
  252. end
  253. NoticeMaterial[ NOTIFY_GENERIC ] = surface.GetTextureID( "vgui/notices/generic" )
  254. NoticeMaterial[ NOTIFY_ERROR ] = surface.GetTextureID( "vgui/notices/error" )
  255. NoticeMaterial[ NOTIFY_UNDO ] = surface.GetTextureID( "vgui/notices/undo" )
  256. NoticeMaterial[ NOTIFY_HINT ] = surface.GetTextureID( "vgui/notices/hint" )
  257. NoticeMaterial[ NOTIFY_CLEANUP ] = surface.GetTextureID( "vgui/notices/cleanup" )
  258.  
  259. HUDNote_c = 0
  260. HUDNote_i = 1
  261. HUDNotes = {}
  262.  
  263. function AddBotNotify( str, type, length )
  264.  
  265. local tab = {}
  266. tab.text = str
  267. tab.recv = CurTime()
  268. tab.len = length
  269. tab.velx = -5
  270. tab.vely = 0
  271. tab.x = ScrW() + 200
  272. tab.y = ScrH()
  273. tab.a = 255
  274. tab.type = type
  275.  
  276. table.insert( HUDNotes, tab )
  277.  
  278. HUDNote_c = HUDNote_c + 1
  279. HUDNote_i = HUDNote_i + 1
  280.  
  281. end]]
  282. // Attempt at creating ClientCvar For Derma
  283.  
  284.  
  285. // Derma Menu Created By iKen0
  286.  
  287. function DumbDumb()
  288. local DermaPanel = vgui.Create( "DFrame" )
  289. DermaPanel:SetPos( 25,50 )
  290. DermaPanel:SetSize( 200, 400 )
  291. DermaPanel:SetTitle( "Apples Derma Menu Made By IKen0" )
  292. DermaPanel:SetVisible( true )
  293. DermaPanel:SetDraggable( true )
  294. DermaPanel:ShowCloseButton( true )
  295. DermaPanel:MakePopup()
  296.  
  297. local NumSliderThingy = vgui.Create( "DNumSlider", DermaPanel )
  298. NumSliderThingy:SetPos( 25,50 )
  299. NumSliderThingy:SetSize( 150, 220 )
  300. NumSliderThingy:SetText( "BoxSize" )
  301. NumSliderThingy:SetMin( 0 )
  302. NumSliderThingy:SetMax( 50 )
  303. NumSliderThingy:SetDecimals( 0 )
  304. NumSliderThingy:SetConVar( "apples_boxsize" )
  305.  
  306. local CheckBox2 = vgui.Create( "DCheckBoxLabel", DermaPanel )
  307. CheckBox2:SetPos( 25,95)
  308. CheckBox2:SetText( "Enable ESP?" )
  309. CheckBox2:SetConVar( "apples_esp" )
  310. CheckBox2:SizeToContents()
  311.  
  312. local CheckBox3 = vgui.Create( "DCheckBoxLabel", DermaPanel )
  313. CheckBox3:SetPos( 25,115)
  314. CheckBox3:SetText( "Enable Filled Box?" )
  315. CheckBox3:SetConVar( "apples_filledbox" )
  316. CheckBox3:SizeToContents()
  317.  
  318. local CheckBox4 = vgui.Create( "DCheckBoxLabel", DermaPanel )
  319. CheckBox4:SetPos( 25,135)
  320. CheckBox4:SetText( "Friends?" )
  321. CheckBox4:SetConVar( "apples_friends" )
  322. CheckBox4:SizeToContents()
  323.  
  324. local CheckBox5 = vgui.Create( "DCheckBoxLabel", DermaPanel )
  325. CheckBox5:SetPos( 25,155)
  326. CheckBox5:SetText( "Show Admin's?" )
  327. CheckBox5:SetConVar( "apples_showadmin" )
  328. CheckBox5:SizeToContents()
  329.  
  330. local CheckBox6 = vgui.Create( "DCheckBoxLabel", DermaPanel )
  331. CheckBox6:SetPos( 25,175)
  332. CheckBox6:SetText( "Enable Simple Color's?" )
  333. CheckBox6:SetConVar( "apples_simplecolors" )
  334. CheckBox6:SizeToContents()
  335.  
  336. local CheckBox7 = vgui.Create( "DCheckBoxLabel", DermaPanel )
  337. CheckBox7:SetPos( 25,195)
  338. CheckBox7:SetText( "Enable Target Team?" )
  339. CheckBox7:SetConVar( "apples_targetteam" )
  340. CheckBox7:SizeToContents()
  341.  
  342. local CheckBox8 = vgui.Create( "DCheckBoxLabel", DermaPanel )
  343. CheckBox8:SetPos( 25,215)
  344. CheckBox8:SetText( "X-Ray" )
  345. CheckBox8:SetConVar( "apples_xray" )
  346. CheckBox8:SizeToContents()
  347.  
  348. local CheckBox9 = vgui.Create( "DCheckBoxLabel", DermaPanel )
  349. CheckBox9:SetPos( 25,235)
  350. CheckBox9:SetText( "Crosshair?" )
  351. CheckBox9:SetConVar( "apples_cross" )
  352. CheckBox9:SizeToContents()
  353.  
  354. local NumSlider1 = vgui.Create( "DNumSlider", DermaPanel )
  355. NumSlider1:SetPos( 25,255 )
  356. NumSlider1:SetSize( 150, 220 )
  357. NumSlider1:SetText( "Red" )
  358. NumSlider1:SetMin( 0 )
  359. NumSlider1:SetMax( 255 )
  360. NumSlider1:SetDecimals( 0 )
  361. NumSlider1:SetConVar( "apples_redcolor" )
  362.  
  363. local NumSlider2 = vgui.Create( "DNumSlider", DermaPanel )
  364. NumSlider2:SetPos( 25,295 )
  365. NumSlider2:SetSize( 150, 220 )
  366. NumSlider2:SetText( "Blue" )
  367. NumSlider2:SetMin( 0 )
  368. NumSlider2:SetMax( 255 )
  369. NumSlider2:SetDecimals( 0 )
  370. NumSlider2:SetConVar( "apples_bluecolor" )
  371.  
  372. local NumSlider3 = vgui.Create( "DNumSlider", DermaPanel )
  373. NumSlider3:SetPos( 25,335 )
  374. NumSlider3:SetSize( 150, 220 )
  375. NumSlider3:SetText( "Green" )
  376. NumSlider3:SetMin( 0 )
  377. NumSlider3:SetMax( 255 )
  378. NumSlider3:SetDecimals( 0 )
  379. NumSlider3:SetConVar( "apples_greencolor" )
  380.  
  381.  
  382. local button1 = vgui.Create( "DButton", DermaPanel )
  383. button1:SetText("Bind F to aimbot")
  384. button1:SetVisible( true )
  385. button1:SetPos( 25, 375)
  386. button1:SetSize(150, 20)
  387. button1.DoClick = function()
  388. LocalPlayer():ChatPrint("Type: Bind f ''+apples'' in console") end
  389. --AddBotNotify( "Type: Bind f ''+apples'' in console", NOTIFY_HINT, 6 ) end
  390. end
  391.  
  392. concommand.Add("apples_menu", DumbDumb)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement