Advertisement
Guest User

leaky

a guest
Apr 4th, 2013
624
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 50.91 KB | None | 0 0
  1. /*
  2. 3661754147
  3. 1217776124
  4. 1833447947
  5. 380449519
  6. 3736849507
  7. 3213074641
  8. 4049813078
  9. 1936458157
  10. 1051044005
  11. 1220357655
  12. 831083134
  13. 2782136766
  14. 728404541
  15. 1288731371
  16. */
  17.  
  18. if SERVER then return end
  19.  
  20. // Little piece of C+P from Hera because I'm lazy.
  21. function AddCMD(Name,Function)
  22. K0N4T4Print("[ADDED] ConCommand: "..Name.."")
  23. return old_ccadd(Name,Function)
  24. end
  25.  
  26. function AddConVar(convar,str,save,data)
  27. return CreateClientConVar("K4_"..convar,str,true,false), K0N4T4Print("[ADDED] ConVar: K4_"..convar.." ["..str.."]")
  28. end
  29.  
  30. function K0N4T4Print(msg)
  31. print("[K0N4T4] "..msg)
  32. end
  33.  
  34. local g = table.Copy(_G)
  35.  
  36. /*
  37. Shortcuts, shortcuts everywhere
  38. */
  39.  
  40. local colors = {}
  41. red = Color(255,0,0,255);
  42. black = Color(0,0,0,255);
  43. green = Color(0,255,0,255);
  44. white = Color(255,255,255,255);
  45. blue = Color(0,0,255,255);
  46. cyan = Color(0,255,255,255);
  47. pink = Color(255,0,255,255);
  48. blue = Color(0,0,255,255);
  49. grey = Color(100,100,100,255);
  50. gold = Color(255,228,0,255);
  51. lblue = Color(155,205,248);
  52. lgreen = Color(174,255,0);
  53. iceblue = Color(116,187,251,255);
  54. purple = Color(255,0,255,255);
  55.  
  56. function MakeCVar(convar, str, save, data)
  57. return CreateClientConVar(convar, str, true, false)
  58. end
  59.  
  60.  
  61. /***********************
  62. ConVar's
  63. ***********************/
  64. -- AIM BOT --
  65. local dBotOn = MakeCVar("K4_aimbot", "1", true, false)
  66. local boneaim = MakeCVar("K4_aimbot_bone", "ValveBiped.Bip01_Head1", true, false)
  67. local K0N4T4 = MakeCVar("K4_aimbot_onshoot", "0", true, false)
  68. local infov1 = MakeCVar("K4_aimbot_infov", 0, true, false)
  69. local infov2 = MakeCVar("K4_aimbot_fov", 90, true, false)
  70. local silentAim = MakeCVar("K4_aimbot_silent", "0", true, false)
  71.  
  72. -- ESP / WALLHACK --
  73. local espOn = MakeCVar("K4_esp", "1", true, false)
  74. local wallHackOn = MakeCVar("K4_wallhack", "0", true, false)
  75. local wHackWire = MakeCVar("K4_wallhack_wire", "0", true, false)
  76. local EspDist = MakeCVar("K4_ESP_Distance", "180", true, false)
  77. local espBox = MakeCVar("K4_ESP_Box", "1", true, false)
  78. local espSkel = MakeCVar("K4_ESP_Skeleton", "1", true, false)
  79. local chamsMat = MakeCVar("K4_ESP_Chams_Material","Solid", true, false)
  80. local Glowing = MakeCVar("K4_ESP_Glow", "0", true, false)
  81. local Xray = MakeCVar("K4_ESP_Xray", "0", true, false)
  82. local Ents = MakeCVar("K4_ESP_Ents", "1", true, false)
  83. local tracers = MakeCVar("K4_ESP_Tracer", "1", true, false)
  84. local rpEnts = MakeCVar("K4_ESP_RPEnts", "1", true, false)
  85. local WireXray = MakeCVar("K4_ESP_Xray_Wires", "1", true, false)
  86.  
  87. concommand.Add( "k4_help", function()
  88. print([[
  89. Hello, user if this is your first time using K0N4T4 please enter the following command in console "find k4_"
  90. this will list all the commands included in this hack. (WARNING: If you are using the light version some commands may not work.)
  91.  
  92. Bellow you can find discriptions for the commands you will be using the most.
  93.  
  94. k4_esp 1|0 :: Toggle ESP (Player Info, and Visuals)
  95. k4_wallhack 1|0 :: Toggle the wallhack
  96. k4_wallhack_wire 1|0 :: Toggle wireframe mode for the wallhack
  97. k4_xray :: Toggle xray
  98. k4_esp_tracer 2|1|0 :: Toggle tracers ( 2 = Use the old tracers, 1 = Use the new tracers, 0 = Disable )
  99.  
  100. k4_aimbot 1|0 :: Toggle the aimbot, we recommend binding this to a key (ie. BindToggle r "k4_aimbot")
  101. ]])
  102. end )
  103.  
  104. -- HANDY HELPERS --
  105. local bhop = MakeCVar("K4_bhop", "0", true, false) --Bunny hop toggle.
  106. local menu = MakeCVar("K4_menu", "0", true, false) --Menu [WIP].
  107. local shspeed = MakeCVar("K4_sh_speed", "6.0", true, false) --Speed offset.
  108. local removerec = MakeCVar("K4_remove_recoil", "0", true, false) --No recoil.
  109. local logIds = MakeCVar("K4_log_steamids", "1", true, false) --SteamID logs.
  110. local TalkLogs = MakeCVar("K4_saylogs", "0", true, false) --Say logs in chat.
  111.  
  112. -- MISC --
  113. local rpGod = MakeCVar("K4_RPGOD", "0", true, false)
  114. local tHack = MakeCVar("K4_Misc_TTTHack", "0", true, false)
  115. local chatspam = MakeCVar("K4_Misc_CSpam", "0", true, false) --Chat Spam Toggle
  116. local spamMsg = MakeCVar("K4_Misc_CSpam_Msg", "-seffhakked-") --Chat Spam Message
  117. local crosshair = MakeCVar("K4_MISC_CROSSHAIR", "1", true, false) --Misc Crosshair
  118. local propspamen = MakeCVar("K4_Misc_PSpam", "0", true, false) --Spam toggle
  119. local propsmodel = MakeCVar("K4_Misc_PSpam_Model", "models/props_junk/watermelon01.mdl") --What model to spam
  120. local Changer = MakeCVar("K4_Misc_NameChanger", "0", true, false) --Name changer, most servers are protected from this.
  121. local Changer2 = MakeCVar("K4_Misc_JobChanger", "0", true, false) --Job changer.
  122. local ShowAdmins = MakeCVar("K4_Misc_PrintAdmins", "1", true, false) --Show the admins
  123.  
  124.  
  125.  
  126.  
  127.  
  128. -- Locals, do not edit. --
  129. local x = ScrW() / 2 --Crosshair
  130. local y = ScrH() / 2 --Crosshair
  131. local gap = 0 --Crosshair Gap
  132. local length = 10 --Crosshair Length
  133. local tblDB = {}
  134. local g = table.Copy(_G)
  135. local K4 = {}
  136. local K4_Admins = {}
  137. local Menu = {}
  138. local K4_version = "1.9b"
  139. local K4_dev = ""
  140. local phase = "Alpha"
  141. local old_ccadd = concommand.Add;
  142. local old_hookadd = hook.Add;
  143. local old_hookrem = hook.Remove;
  144. local plr = LocalPlayer()
  145. local TEAM_SPECTATOR = 1002
  146. local userauth = util.CRC(LocalPlayer():SteamID())
  147. local FAuth = file.Read("K4Auth.txt")
  148. local host = GetConVarString("ip")
  149. K4laser = {
  150. "weapon_pocket",
  151. "keys",
  152. "pocket",
  153. "weapon_toolgun",
  154. "weapon_physgun",
  155. "weapon_camera",
  156. "camera",
  157. "weapon_crowbar"
  158. }
  159.  
  160.  
  161. function K4:CreateMaterial()
  162. local BaseInfo = {
  163. ["$basetexture"] = "models/debug/debugwhite",
  164. ["$model"] = 1,
  165. ["$translucent"] = 1,
  166. ["$alpha"] = 1,
  167. ["$nocull"] = 1,
  168. ["$ignorez"] = 1
  169. }
  170. local mat
  171. if GetConVarString("K4_ESP_Chams_Material") == "Solid" then
  172. mat = CreateMaterial( "K4_solid", "VertexLitGeneric", BaseInfo )
  173. elseif GetConVarString("K4_ESP_Chams_Material") == "Wireframe" then
  174. mat = CreateMaterial( "K4_wire", "Wireframe", BaseInfo )
  175. end
  176. return mat
  177. end
  178.  
  179.  
  180. --Addhook & Removehook
  181. local function AddHook(Type,Function)
  182. Name = Type.." | "..math.random(1,1000),math.random(1,2000),math.random(1,3000) -- Simple hook names
  183. K0N4T4Print("[ADDED] Hook: ["..Type.."] | Name: "..Name.."")
  184. return old_hookadd(Type,Name,Function)
  185. end
  186.  
  187. -- RemoveHook
  188. local function RemoveHook(Type,Function)
  189. K0N4T4Print("[REMOVED] Hook: ["..Type.."]")
  190. return old_hookrem(Type,Function)
  191. end
  192.  
  193.  
  194.  
  195. /**************************
  196. Name: Derma shit
  197. Purpose: Anything Derma
  198. ***************************/
  199. function AddCheckBox( text, cvar, parent, x, y, tt )
  200. local checkbox = vgui.Create( "DCheckBoxLabel", parent )
  201. checkbox:SetPos( x, y )
  202. checkbox:SetText( text )
  203. checkbox:SetConVar( cvar )
  204. checkbox:SetTextColor(white)
  205. checkbox:SetTooltip( tt or "No Tool Tip" )
  206. checkbox:SizeToContents()
  207. end
  208.  
  209. // AddSlider for the derma
  210. function AddSlider( text, cvar, parent, min, max, decimals, x, y, wide, tt )
  211. local slider = vgui.Create( "DNumSlider" )
  212. slider:SetParent( parent )
  213. slider:SetPos( x, y )
  214. slider:SetWide( wide )
  215. slider:SetText( text )
  216. --slider:SetTextColor(BLACK)
  217. slider:SetMin( min )
  218. slider:SetMax( max )
  219. slider:SetDecimals( decimals )
  220. slider:SetConVar( cvar )
  221. slider:SetTooltip( tt or "No Tool Tip" )
  222. end
  223.  
  224. Gradient = surface.GetTextureID( "gui/gradient" )
  225. function DrawBox( x, y, wide, tall, dropsize )
  226. draw.RoundedBoxEx( 4, x, y, wide, dropsize, iceblue, true, true, false, false )
  227. draw.RoundedBoxEx( 4, x, y + dropsize, wide, tall - dropsize, Color( 0, 0, 0, 100 ), false, false, true, true )
  228. end
  229.  
  230.  
  231. /******************************
  232. Name: Get Admin Type
  233. Purpose: Get Admin Type..
  234. *******************************/
  235. local function GetAdminType(e)
  236. if e:IsAdmin() && !e:IsSuperAdmin() then
  237. return " [A] "
  238. elseif( e:IsSuperAdmin() ) then
  239. return " [SA] "
  240. end
  241. return " "
  242. end
  243.  
  244. /*************************
  245. Name: Notify
  246. Purpose: Chat functions
  247. Credits: K4
  248. *************************/
  249.  
  250. function K4.Notify(dosound,col,msg)
  251. if col then
  252. col = col
  253. end
  254. chat.AddText(
  255. purple, "[K4] ",
  256. col, msg)
  257. if dosound then
  258. local beep = Sound( "/buttons/button17.wav" )
  259. local beepsound = CreateSound( LocalPlayer(), beep )
  260. beepsound:Play()
  261. end
  262. end
  263.  
  264. -- SHORT CUTS --
  265. concommand.Add( "k4_xray", function()
  266. K4.Notify(true,green,[[XRAY TOGGLED]])
  267. local xrayval = 0
  268. if( GetConVarNumber("K4_ESP_Xray") == 1) then xrayval = 0 else xrayval = 1 end
  269. RunConsoleCommand("K4_ESP_Xray", tostring(xrayval))
  270. end )
  271.  
  272. /*************************
  273. Name: CreatePos
  274. Purpose: Create a position
  275. Credits: BaconBot
  276. ***************************/
  277. function CreatePos(v)
  278. local ply = LocalPlayer()
  279. local center = v:LocalToWorld( v:OBBCenter() )
  280. local min, max = v:OBBMins(), v:OBBMaxs()
  281. local dim = max - min local z = max + min
  282. local frt = ( v:GetForward() ) * ( dim.y / 2 )
  283. local rgt = ( v:GetRight() ) * ( dim.x / 2 )
  284. local top = ( v:GetUp() ) * ( dim.z / 2 )
  285. local bak = ( v:GetForward() * -1 ) * ( dim.y / 2 )
  286. local lft = ( v:GetRight() * -1 ) * ( dim.x / 2 )
  287. local btm = ( v:GetUp() * -1 ) * ( dim.z / 2 )
  288. local s = 1
  289. local FRT = center + frt / s + rgt / s + top / s; FRT = FRT:ToScreen()
  290. local BLB = center + bak / s + lft / s + btm / s; BLB = BLB:ToScreen()
  291. local FLT = center + frt / s + lft / s + top / s; FLT = FLT:ToScreen()
  292. local BRT = center + bak / s + rgt / s + top / s; BRT = BRT:ToScreen()
  293. local BLT = center + bak / s + lft / s + top / s; BLT = BLT:ToScreen()
  294. local FRB = center + frt / s + rgt / s + btm / s; FRB = FRB:ToScreen()
  295. local FLB = center + frt / s + lft / s + btm / s; FLB = FLB:ToScreen()
  296. local BRB = center + bak / s + rgt / s + btm / s; BRB = BRB:ToScreen()
  297. local z = 100
  298. if ( v:Health() <= 50 ) then z = 100 end
  299. local x, y = ( ( v:Health() / 100 ) ), 1
  300. if ( v:Health() <= 0 ) then x = 1 end
  301. local FRT3 = center + frt + rgt + top / x; FRT3 = FRT3; FRT3 = FRT3:ToScreen()
  302. local BLB3 = center + bak + lft + btm / x; BLB3 = BLB3; BLB3 = BLB3:ToScreen()
  303. local FLT3 = center + frt + lft + top / x; FLT3 = FLT3; FLT3 = FLT3:ToScreen()
  304. local BRT3 = center + bak + rgt + top / x; BRT3 = BRT3; BRT3 = BRT3:ToScreen()
  305. local BLT3 = center + bak + lft + top / x; BLT3 = BLT3; BLT3 = BLT3:ToScreen()
  306. local FRB3 = center + frt + rgt + btm / x; FRB3 = FRB3; FRB3 = FRB3:ToScreen()
  307. local FLB3 = center + frt + lft + btm / x; FLB3 = FLB3; FLB3 = FLB3:ToScreen()
  308. local BRB3 = center + bak + rgt + btm / x; BRB3 = BRB3; BRB3 = BRB3:ToScreen()
  309. local x, y, z = 1.1, 0.9, 1
  310. local FRT2 = center + frt / y + rgt / z + top / x; FRT2 = FRT2:ToScreen()
  311. local BLB2 = center + bak / y + lft / z + btm / x; BLB2 = BLB2:ToScreen()
  312. local FLT2 = center + frt / y + lft / z + top / x; FLT2 = FLT2:ToScreen()
  313. local BRT2 = center + bak / y + rgt / z + top / x; BRT2 = BRT2:ToScreen()
  314. local BLT2 = center + bak / y + lft / z + top / x; BLT2 = BLT2:ToScreen()
  315. local FRB2 = center + frt / y + rgt / z + btm / x; FRB2 = FRB2:ToScreen()
  316. local FLB2 = center + frt / y + lft / z + btm / x; FLB2 = FLB2:ToScreen()
  317. local BRB2 = center + bak / y + rgt / z + btm / x; BRB2 = BRB2:ToScreen()
  318. local maxX = math.max( FRT.x,BLB.x,FLT.x,BRT.x,BLT.x,FRB.x,FLB.x,BRB.x )
  319. local minX = math.min( FRT.x,BLB.x,FLT.x,BRT.x,BLT.x,FRB.x,FLB.x,BRB.x )
  320. local maxY = math.max( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
  321. local minY = math.min( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
  322. local minYhp2 = math.min( FRT.y,BLB.y,FLT.y,BRT.y,BLT.y,FRB.y,FLB.y,BRB.y )
  323. local maxXhp = math.max( FRT3.x,BLB3.x,FLT3.x,BRT3.x,BLT3.x,FRB3.x,FLB3.x,BRB3.x )
  324. local minXhp = math.min( FRT3.x,BLB3.x,FLT3.x,BRT3.x,BLT3.x,FRB3.x,FLB3.x,BRB3.x )
  325. local maxYhp = math.max( FRT3.y,BLB3.y,FLT3.y,BRT3.y,BLT3.y,FRB3.y,FLB3.y,BRB3.y )
  326. local minYhp = math.min( FRT3.y,BLB3.y,FLT3.y,BRT3.y,BLT3.y,FRB3.y,FLB3.y,BRB3.y )
  327. local maxX2 = math.max( FRT2.x,BLB2.x,FLT2.x,BRT2.x,BLT2.x,FRB2.x,FLB2.x,BRB2.x )
  328. local minX2 = math.min( FRT2.x,BLB2.x,FLT2.x,BRT2.x,BLT2.x,FRB2.x,FLB2.x,BRB2.x )
  329. local maxY2 = math.max( FRT2.y,BLB2.y,FLT2.y,BRT2.y,BLT2.y,FRB2.y,FLB2.y,BRB2.y )
  330. local minY2 = math.min( FRT2.y,BLB2.y,FLT2.y,BRT2.y,BLT2.y,FRB2.y,FLB2.y,BRB2.y )
  331. return maxX, minX, maxY, minY, maxX2, minX2, maxY2, minY2, minYhp, maxYhp
  332. end
  333. /////////////////////////////////////////////////////////
  334. if string.match(FAuth, userauth) then
  335. chat.AddText(
  336. Color(255,0,255,255), "[K4] ",
  337. Color(0,255,0,255), "Version " ..K4_version.. " " ..phase.. " Loaded" )
  338. surface.PlaySound("buttons/button14.wav")
  339. else
  340. chat.AddText(
  341. Color(255,0,255,255), "[ERROR] ",
  342. Color(255,0,0,0), "Unauthorized UserID Detected. Aborting..." )
  343. surface.PlaySound("buttons/button18.wav")
  344. return end
  345. ////////////////////////////////////////////////////
  346. function Changelog()
  347. http.Fetch("https://dl.dropbox.com/s/ok1ct6k36xx7z2y/changelog.txt", function(body, len, headers, code)
  348. -- local ChangeLog = vgui.Create("DFrame")
  349. -- ChangeLog:SetSize(250, 250)
  350. -- ChangeLog:SetPos(650, 650)
  351. -- ChangeLog:SetTitle("[K4] Changelog")
  352. -- ChangeLog:SetVisible( true )
  353. -- ChangeLog:SetDraggable( true )
  354. -- ChangeLog:ShowCloseButton( true )
  355. -- ChangeLog:MakePopup()
  356. -- draw.DrawText(""..body, "ChLg", 650, 550, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  357. file.Write("k4_changelog " ..K4_version.. ".txt", body)
  358. end)
  359. end
  360.  
  361.  
  362. --Flashlight spammer,
  363.  
  364. function CheckUpdate()
  365. K4.Notify(black,"Checking version...")
  366. http.Fetch("https://dl.dropbox.com/s/z1ueorym392oez4/check.txt", function(body, len, headers, code)
  367. if body == K4_version then
  368. K4.Notify(sound,green,"(Recently Updated) Your version of K0N4T4 is up to date! Changelog stored in garrysmod/garrysmod/data folder.")
  369. K4.Notify(sound,red, "ATTN: Another update won't come for a while as I'm going to be on vacation. I've currently got a build that I'm working on for 1.0, but nothing is quite ready yet. What I will do however, is update the DarkRP ents hack so that more is seen.")
  370. Changelog()
  371. else
  372. K4.Notify(sound,red,"Your version of K0N4T4 is outdated! Please update to version "..body.. " at:")
  373. chat.AddText(sound,green,"https://github.com/K0N4T4/K4-Hack")
  374. chat.AddText(sound,red, "or, if you have 1.9a or above, the hack will automatically update the next time it is started.")
  375. K4.Notify(sound,red, "ATTN: Another update won't come for a while as I'm going to be on vacation. I've currently got a build that I'm working on for 1.0, but nothing is quite ready yet. What I will do however, is update the DarkRP ents hack so that more is seen.")
  376. end
  377. end)
  378. end
  379. CheckUpdate()
  380.  
  381. ///////////////////////////////////////////////////
  382.  
  383. surface.CreateFont( "Logo", { font = "Calibri", size = 100, weight = 700, } )
  384. surface.CreateFont( "Misc", { font = "Calibri", size = 40, weight = 700, } )
  385. surface.CreateFont( "esp", { font = "Arial Black", size = 16, weight = 70 } )
  386. surface.CreateFont("ESPFont",{font = "ScoreboardText", size = 17, weight = 400, antialias = 0})
  387. surface.CreateFont("ESPFont_Small",{font = "Default", size = 12, weight = 200, antialias = 0})
  388. surface.CreateFont("Logo",{font = "akbar", size = 21, weight = 400, antialias = 0})
  389. surface.CreateFont("K4_ScoreboardText",{font = "ScoreboardText", size = 15, weight = 700, antialias = 0})
  390. surface.CreateFont("K4_coolvetica",{font = "ScoreboardText", size = 16, weight = 500, antialias = 0})
  391. surface.CreateFont("K4_hvh",{font = "ScoreboardTextt", size = 15, weight = 1000, antialias = 1})
  392. surface.CreateFont("ChLg", {font = "Calibri", size = 11, wieght = 500, })
  393.  
  394.  
  395. //SteamID logger, for when you run into an asshole and can't find him again.
  396.  
  397. function PrintSteamIDS()
  398. if logIds:GetBool() then
  399. for k, v in pairs( player.GetAll() ) do
  400. str = tostring( os.date() ).. ": | " ..v:Nick().. " | " ..v:SteamID().. " | PING: " ..v:Ping().. " | SERVER : (" ..GetHostName().. ") | MAP : " ..game.GetMap().. "|\n"
  401. file.Append("steamids.txt", str)
  402. print(tostring( os.date() ).. ": | " ..v:Nick().. " | " ..v:SteamID().. " | PING: " ..v:Ping().. " | SERVER : (" ..GetHostName().. ") | MAP : " ..game.GetMap().. "|\n")
  403.  
  404. end
  405. end
  406. end
  407. PrintSteamIDS()
  408.  
  409. -- function ChatSteamIDS()
  410. -- if TalkLogs:GetBool() then
  411. -- for k, v in pairs( player.GetAll() ) do
  412. -- RandInt = scareKids[ math.random( #scareKids ) ]
  413. -- str = " | " ..v:Nick().. " | " ..v:SteamID().. " | " ..RandInt.. " | PING: " ..v:Ping().. " | SERVER : (" ..GetHostName().. ") | MAP : " ..game.GetMap().. "|\n"
  414. -- RunConsoleCommand("say", str)
  415. -- end
  416. -- end
  417. -- end
  418.  
  419. -- ChatSteamIDS()
  420.  
  421. function DRPGod()
  422. if GetConVarNumber("K4_RPGOD") >= 1 then
  423. for k, v in pairs( player.GetAll() ) do
  424. if v:Health() < 75 then
  425. RunConsoleCommand("say", "/buyhealth")
  426. end
  427. end
  428. end
  429. end
  430. hook.Add("Think", "RpGod", DRPGod)
  431.  
  432. function spamChat()
  433. rapeChat = GetConVarString("K4_MISC_CSPAM_MSG")
  434. if chatspam:GetBool() then
  435. hook.Add("Think", "SPAMM", function()
  436. RunConsoleCommand("say", rapeChat)
  437. end)
  438. else
  439. hook.Remove("Think","SPAMM")
  440. end
  441. end
  442.  
  443. hook.Add("Think", "SpamCheck", spamChat)
  444.  
  445. //////////////////////////////////////////////////////////////////////////////
  446. //Animation Changer, DARKRP ONLY
  447. -- written by sokyru
  448. -- edited by Kio-Foxx
  449. -- original script written by Shinycow
  450.  
  451. local Enabled = CreateClientConVar("_k4_SwimAnimation", "0", true, false)
  452. local Enabled2 = CreateClientConVar("_k4_Autistic", "0", true, false)
  453. local Enabled3 = CreateClientConVar("_k4_DanceThing", "0", true, false)
  454. local Enabled4 = CreateClientConVar("_k4_Swing", "0", true, false)
  455.  
  456. concommand.Add("k4_anim",function(ply,cmd,args,str)
  457. args[1] = string.lower(args[1])
  458. if(args[1] == "0") then
  459. RunConsoleCommand("_k4_SwimAnimation", "0")
  460. RunConsoleCommand("_k4_Autistic", "0")
  461. RunConsoleCommand("_k4_DanceThing", "0")
  462. RunConsoleCommand("_k4_Swing", "0")
  463. elseif(args[1] == "1" or args[1] == "swim" or args[1] == "ground") then
  464. RunConsoleCommand("_k4_SwimAnimation", args[2])
  465. elseif(args[1] == "2" or args[1] == "zombie" or args[1] == "autisim") then
  466. RunConsoleCommand("_k4_Autistic", args[2])
  467. elseif(args[1] == "3" or args[1] == "dance") then
  468. RunConsoleCommand("_k4_DanceThing", args[2])
  469. elseif(args[1] == "4" or args[1] == "swing") then
  470. RunConsoleCommand("_k4_Swing", args[2])
  471. elseif(args[1] == "help") then
  472. print([[This is the shortcut command for animation forcing! || 1 = Swim in the ground | 2 = Zombie walk | 3 = Dance | 4 = Swing your arms when you attack. | 0 = Set all to 0]])
  473. end
  474. end, function()
  475. return {"k4_anim 1 1","k4_anim 2 1","k4_anim 3 1","k4_anim 4 1", "k4_anim 1 0","k4_anim 2 0","k4_anim 3 0","k4_anim 4 0"}
  476. end)
  477.  
  478. local function doAnim()
  479. if Enabled:GetBool() then
  480. RunConsoleCommand("_DarkRP_DoAnimation", "1627")
  481. end
  482. end
  483.  
  484. timer.Create("anim", 1, 0, doAnim)
  485.  
  486. local function doAutism()
  487. if Enabled2:GetBool() then
  488. RunConsoleCommand("_DarkRP_DoAnimation", "1631")
  489. end
  490. end
  491.  
  492. timer.Create("anim2", 1, 0, doAutism)
  493.  
  494. local function doDance()
  495. if Enabled3:GetBool() then
  496. RunConsoleCommand("_DarkRP_DoAnimation", "1635")
  497. end
  498. end
  499.  
  500. timer.Create("anim3", 8, 0, doDance)
  501.  
  502. local function doSwing()
  503. if Enabled4:GetBool() and ( LocalPlayer():KeyPressed(IN_ATTACK) or LocalPlayer():KeyReleased(IN_ATTACK) ) and (!timer.Exists("_k4_timer_delay")) then
  504. RunConsoleCommand("_DarkRP_DoAnimation", "1633")
  505. timer.Create("_k4_timer_delay", 1, 1, function() timer.Destroy("_k4_timer_delay") end)
  506. end
  507. end
  508. hook.Add("Think", "_k4_swing_hook", doSwing())
  509. ////////////////////////////////////////////////////////////////////////////////////
  510.  
  511. // Derma Crahp
  512.  
  513.  
  514.  
  515. concommand.Add("+dmenu", function()
  516.  
  517. local DButton = vgui.Create( "DNumSlider" )
  518. DButton:SetMin(0)
  519. DButton:SetMax(25)
  520. DButton:SetPos( 700, 350 )
  521. DButton:SetText( "Player Speed" )
  522. DButton:SetSize( 120, 10 )
  523. DButton:SetConVar("K4_sh_speed")
  524. DButton:MakePopup()
  525.  
  526. local hud = function()
  527. draw.RoundedBox(10, 635, ScrH() - 565 - 300, 650, 650, Color(25,25,25,200))
  528. draw.DrawText("K0N4T4", "Logo", 700, 220, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  529. draw.DrawText("V1", "Logo", 1120, 220, Color(255, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  530. end
  531. end)
  532.  
  533. function DRemove()
  534. concommand.Remove("+dmenu")
  535. end
  536.  
  537. concommand.Add("-dmenu", DRemove)
  538.  
  539. --Speedhack, now works! :D
  540.  
  541. require("cvar3")
  542.  
  543. TS = GetConVar('host_timescale')
  544. CH = GetConVar('sv_cheats')
  545.  
  546. function speedon()
  547. speed = GetConVarNumber("K4_sh_speed")
  548. CH:SetValue( 1.0 )
  549. TS:SetValue( speed )
  550. end
  551.  
  552. function speedoff()
  553. CH:SetValue(0)
  554. end
  555.  
  556. concommand.Add("+speedhack", speedon)
  557. concommand.Add("-speedhack", speedoff)
  558.  
  559.  
  560. hook.Add("HUDPaint", "K0N4T4Watermark", function()
  561. draw.DrawText("K0N4T4 V1", "Misc", 10, 10, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  562. end)
  563.  
  564. local function IsVisible( ent ) /* Huge credits to whoever made this tracer function! */
  565. local tracer = {}
  566. if(LocalPlayer():GetShootPos() != nil && ent:IsValid() && ent != nil && LocalPlayer():GetActiveWeapon():IsValid() && LocalPlayer():GetActiveWeapon() != nil && ent:LookupBone("ValveBiped.Bip01_Head1") != nil && ent:GetBonePosition(ent:LookupBone("ValveBiped.Bip01_Head1")) != nil) then
  567. tracer.start = LocalPlayer():GetShootPos()
  568. tracer.endpos = ent:GetBonePosition(ent:LookupBone("ValveBiped.Bip01_Head1"))
  569. tracer.filter = { LocalPlayer(), ent }
  570. tracer.mask = MASK_SHOT
  571. local trace = util.TraceLine( tracer )
  572. if trace.Fraction >= 1 then return true else return false end
  573. end
  574. end
  575.  
  576. local function InFov(ent)
  577. for k,v in pairs(ents.FindInCone(LocalPlayer():GetShootPos(), LocalPlayer():GetAimVector(), 3000, GetConVarNumber("K4_aim_fov"))) do
  578. if(v:IsPlayer() && ent == v) then
  579. return true
  580. else
  581. return false
  582. end
  583. end
  584. end
  585.  
  586. local function WHCheck(v)
  587. if v:Alive() == true && v:Health() ~= 0 && v:Health() >= 0 && v ~= LocalPlayer() && LocalPlayer():Alive() then
  588. return true
  589. else
  590. return false
  591. end
  592. end
  593.  
  594.  
  595. --[[
  596. CRAPAIM: Crap aimbot I based off of dead's. It's complete crap to say the least.
  597. ]]--
  598.  
  599. local function K0N4T4Aim()
  600. for k,v in pairs(player.GetAll()) do
  601. local bone = tostring(boneaim:GetString())
  602. if IsVisible( v ) and LocalPlayer():Alive() and v:Alive() and v ~= LocalPlayer() and v:Team() ~= TEAM_SPECTATOR and LocalPlayer():Team() ~= TEAM_SPECTATOR and GetConVarNumber("K4_aimbot") == 1 and LocalPlayer():GetActiveWeapon():GetClass() ~= "weapon_physgun" and LocalPlayer():GetActiveWeapon():GetClass() ~= "gmod_tool" and LocalPlayer():GetActiveWeapon():GetClass() ~= "gmod_camera" then
  603. if GetConVarNumber("K4_aimbot_onshoot") >= 1 then
  604. if LocalPlayer():KeyDown(IN_ATTACK) then
  605. if(GetConVarNumber("K4_aimbot_infov") == 1) then
  606. if(InFov(v)) then
  607. local head = v:LookupBone(bone)
  608. local headpos,targetheadang = v:GetBonePosition(head)
  609. LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  610. end
  611. else
  612. local head = v:LookupBone(bone)
  613. local headpos,targetheadang = v:GetBonePosition(head)
  614. LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  615. end
  616. end
  617. else
  618. if(GetConVarNumber("K4_aimbot_infov") == 1) then
  619. if(InFov(v)) then
  620. local head = v:LookupBone(bone)
  621. local headpos,targetheadang = v:GetBonePosition(head)
  622. LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  623. end
  624. else
  625. local head = v:LookupBone(bone)
  626. local headpos,targetheadang = v:GetBonePosition(head)
  627. LocalPlayer():SetEyeAngles((headpos - LocalPlayer():GetShootPos()):Angle())
  628. end
  629. end
  630. end
  631. end
  632. end
  633.  
  634. --Traitor Hack
  635. local Traitors = {};
  636. local PlayerIsTraitor = false
  637. timer.Simple( 3, function()
  638. if ( gmod.GetGamemode().Name ) == "Trouble in Terrorist Town" then
  639. local TWeapons = { "weapon_ttt_c4", "weapon_ttt_knife", "weapon_ttt_phammer", "weapon_ttt_sipistol", "weapon_ttt_flaregun", "weapon_ttt_push", "weapon_ttt_radio", "weapon_ttt_teleport", "(Disguise)" }
  640. local UsedWeapons = {}
  641. local MapWeapons = {}
  642. function IsATraitor( ply )
  643. for k, v in pairs( Traitors ) do
  644. if v == ply then
  645. return true
  646. else
  647. return false
  648. end
  649. end
  650. end
  651.  
  652. timer.Create("THakke", 0.8, 0, function()
  653. if GetConVarNumber("K4_MISC_TTTHACK") == 1 then
  654. if !IsATraitor( ply ) then
  655. for k, v in pairs( ents.FindByClass( "player" ) ) do
  656. if IsValid( v ) then
  657. if (!v:IsDetective()) then
  658. if v:Team() ~= TEAM_SPECTATOR then
  659. for wepk, wepv in pairs( TWeapons ) do
  660. for entk, entv in pairs( ents.FindByClass( wepv ) ) do
  661. if IsValid( entv ) then
  662. cookie.Set( entv, 100 - wepk )
  663. if !table.HasValue( UsedWeapons, cookie.GetNumber( entv ) ) then
  664. if !table.HasValue( MapWeapons, cookie.GetNumber( entv ) ) then
  665. local EntPos = ( entv:GetPos() - Vector(0,0,35) )
  666. if entv:GetClass() == wepv then
  667. if v:GetPos():Distance( EntPos ) <= 1 then
  668. table.insert( Traitors, v )
  669. K4.Notify(sound,red,v:Nick() .. " has traitor weapon: " .. wepv )
  670. if !table.HasValue( UsedWeapons, cookie.GetNumber( entv ) ) then
  671. table.insert( UsedWeapons, cookie.GetNumber( entv ) )
  672. else
  673. if !table.HasValue( MapWeapons, cookie.GetNumber( entv ) ) then
  674. table.insert( MapWeapons, cookie.GetNumber( entv ) )
  675. end
  676. end
  677. end
  678. end
  679. end
  680. end
  681. end
  682. end
  683. end
  684. end
  685. end
  686. end
  687. end
  688. end
  689. end
  690. end )
  691.  
  692. AddHook("HUDPaint",function()
  693. if GetConVarNumber("K4_MISC_TTT") == 1 then
  694. for k, e in pairs( Traitors ) do
  695. local maxX, minX, maxY, minY, maxX2, minX2, maxY2, minY2, minYhp, maxYhp = CreatePos( e )
  696. if IsValid( e ) then
  697. if e:Team() ~= TEAM_SPECTATOR then
  698. if ( !e:IsDetective() ) then
  699. PlayerIsTraitor = true
  700. draw.SimpleTextOutlined( "[TRAITOR]", "ESPFont", maxX2, minY2 -20, red, 4, 1, 1, black )
  701. end
  702. end
  703. end
  704. end
  705. end
  706. end )
  707.  
  708. AddHook("TTTPrepareRound",function()
  709. timer.Simple( 2, function()
  710. for k, v in pairs( Traitors ) do
  711. table.remove( Traitors, k )
  712. Traitors = {}
  713. end
  714. for k, v in pairs( UsedWeapons ) do
  715. table.remove( UsedWeapons, k )
  716. UsedWeapons = {}
  717. end
  718. for k, v in pairs( MapWeapons ) do
  719. table.remove( MapWeapons, k )
  720. MapWeapons = {}
  721. end
  722. end )
  723. end )
  724. end
  725. end )
  726.  
  727. --Weaker aimbot
  728. function aimbot()
  729. if silentAim:GetBool() then
  730. local ply = LocalPlayer()
  731. local trace = util.GetPlayerTrace( ply )
  732. local traceRes = util.TraceLine( trace )
  733. if traceRes.HitNonWorld then
  734. local target = traceRes.Entity
  735. if target:IsPlayer() then
  736. local targethead = target:LookupBone("ValveBiped.Bip01_Head1")
  737. local targetheadpos,targetheadang = target:GetBonePosition(targethead)
  738. ply:SetEyeAngles((targetheadpos - ply:GetShootPos()):Angle())
  739. end
  740. end
  741. end
  742. end
  743.  
  744.  
  745. --Name/job changer
  746. --Table below contains all the weird randomly generated names, delete and add your own if you want.
  747. nameTable = {
  748. "Munchbone","Twerpbump","Headfinger","Numbclotpuff","Clotpuff","Knockerknockair","Bonetwit"
  749. ,"Faceair","Beefpuff","Thimbleair","Clotskull","Meatcheese","Clownlump","Boneknock"
  750. ,"Cloddolt","Cheeseheadlump","Facepuffgrumble","Wimpairfumble","Footcorn","Clownnumb","Twerpmeathead"
  751. ,"Loafface","Lunktwit","Munchwimp","Twitsneeze","Doltgrumble","Grumblebone","Grumbledoof"
  752. ,"Nithead","Beeffoot","Wipeair","Grumblebumble","Doofthimble","Bumblefootface","Numbface"
  753. ,"Doltsnark","Dumbpin","Puffmeat","Dorkcorn","Anklepinbump","Nitwimp","Puffwimp"
  754. ,"Goofface","Wimpmunchbeef","Clodsneeze","Footfaceclot","Cheesefumble","Beefwipe","Pinwimp"
  755. ,"Knockerfootknuckle","Footmuck","Muckbeef","Twitpin","Pincheese","Wipewipe","Lumphead"
  756. ,"Bumpball","Twerpdumb","Fumbledoltbump","Dorklump","Wadface","Skullclown","Clotclodcorn"
  757. ,"Loaffinger","Knocklump","Knucklecheese","Nitbum","Beefthimble","Beefclodclod","Mucknitwipe"
  758. ,"Goofball","Bumknocker","Dooflump","Puffthimble","Knockknocker","Wipedork","Twitmeat"
  759. ,"Goofclot","Airgoof","Wadbumble","Knockhead","Goofknock","Bumbleball","Headdoof"
  760. ,"Headball","Corndumb","Snarklunk","Twerpdoof","Meatfinger","Lunkdolt","Wadfumble"
  761. ,"Sneezetwitlunk","Clodwipe","Corntwerpair","Mucknumb","Twitclown","Muckdumb","Clotdolt"
  762. ,"Anklebumble","Numbcheese","Fumblepinhead","Knockface","Bumpbone","Meatdolt","Dorkdolt"
  763. ,"Lumpcheese","Grumblefoot","Sneezedoof","Airdork","Anklefinger","Knockerloaf","Muckgrumble"
  764. ,"Facefinger","Dumbclown","Ballhead","Knuckledoof","Facewipe","Wimpwipepin","Clodmeatdolt"
  765.  
  766. }
  767.  
  768. jobTable = {"gundealer", "hobo"} --would add more, just lazy
  769.  
  770.  
  771. nameTableIndex = 1
  772. nameTableLastEntry = table.getn(nameTable)
  773.  
  774.  
  775. jobTableIndex = 1
  776. jobTableLastEntry = table.getn(jobTable)
  777.  
  778.  
  779. local function nameChange()
  780.  
  781. nameTableIndex = nameTableIndex + 1
  782.  
  783. if nameTableIndex > nameTableLastEntry then nameTableIndex = 1
  784. end
  785.  
  786.  
  787. name = nameTable[nameTableIndex]
  788.  
  789. if Changer:GetBool(name) then
  790. RunConsoleCommand("say", "/rpname " ..name)
  791. end
  792. end
  793.  
  794. -- local function nameChangeOld()
  795. -- print("Namechange says hello")
  796. -- name = string.random(10, "%l%d")
  797. -- print("Namechange says goodbye.")
  798.  
  799. -- if Changer:GetBool(name) then
  800. -- RunConsoleCommand("say", "/rpname " ..name)
  801. -- end
  802. -- end
  803.  
  804. timer.Create("name", 40, 0, nameChange)
  805.  
  806. local function jobChange()
  807.  
  808. jobTableIndex = jobTableIndex + 1
  809.  
  810. if jobTableIndex > jobTableLastEntry then jobTableIndex = 1
  811. end
  812.  
  813. job = jobTable[jobTableIndex]
  814.  
  815. if Changer2:GetBool(job) then
  816. RunConsoleCommand("say", "/" ..job)
  817. end
  818. end
  819.  
  820.  
  821. timer.Create("job", 11, 0, jobChange)
  822.  
  823. --creds to whoever made this random string function
  824. local Chars = {}
  825. for Loop = 0, 255 do
  826. Chars[Loop+1] = string.char(Loop)
  827. end
  828. local String = table.concat(Chars)
  829.  
  830. local Built = {['.'] = Chars}
  831.  
  832. local AddLookup = function(CharSet)
  833. local Substitute = string.gsub(String, '[^'..CharSet..']', '')
  834. local Lookup = {}
  835. for Loop = 1, string.len(Substitute) do
  836. Lookup[Loop] = string.sub(Substitute, Loop, Loop)
  837. end
  838. Built[CharSet] = Lookup
  839.  
  840. return Lookup
  841. end
  842.  
  843. function string.random(Length, CharSet)
  844. -- Length (number)
  845. -- CharSet (string, optional); e.g. %l%d for lower case letters and digits
  846.  
  847. local CharSet = CharSet or '.'
  848.  
  849. if CharSet == '' then
  850. return ''
  851. else
  852. local Result = {}
  853. local Lookup = Built[CharSet] or AddLookup(CharSet)
  854. local Range = table.getn(Lookup)
  855.  
  856. for Loop = 1,Length do
  857. Result[Loop] = Lookup[math.random(1, Range)]
  858. end
  859.  
  860. return table.concat(Result)
  861. end
  862. end
  863.  
  864. --No Recoil
  865. function NoRec()
  866. if GetConVarNumber("K4_remove_recoil") == 1 then
  867. if LocalPlayer():GetActiveWeapon().Primary then
  868. LocalPlayer():GetActiveWeapon().Primary.Recoil = 0
  869. end
  870. else
  871. if LocalPlayer():GetActiveWeapon().Primary then
  872. LocalPlayer():GetActiveWeapon().Primary.Recoil = 1.5
  873. end
  874. end
  875. end
  876.  
  877.  
  878.  
  879.  
  880. Aimbot = {}
  881. Aimbot.Target = nil
  882. Aimbot.DeathSequences = {
  883. ["models/barnacle.mdl"] = {4,15},
  884. ["models/antlion_guard.mdl"] = {44},
  885. ["models/hunter.mdl"] = {124,125,126,127,128},
  886. }
  887.  
  888.  
  889. function DrawRotatingCrosshair(x,y,time,length,gap)
  890. surface.DrawLine(
  891. x + (math.sin(math.rad(time)) * length),
  892. y + (math.cos(math.rad(time)) * length),
  893. x + (math.sin(math.rad(time)) * gap),
  894. y + (math.cos(math.rad(time)) * gap)
  895. )
  896. end
  897.  
  898. function GetCoordiantes(ent)
  899. local min,max = ent:OBBMins(),ent:OBBMaxs()
  900. local corners = {
  901. Vector(min.x,min.y,min.z),
  902. Vector(min.x,min.y,max.z),
  903. Vector(min.x,max.y,min.z),
  904. Vector(min.x,max.y,max.z),
  905. Vector(max.x,min.y,min.z),
  906. Vector(max.x,min.y,max.z),
  907. Vector(max.x,max.y,min.z),
  908. Vector(max.x,max.y,max.z)
  909. }
  910.  
  911. local minx,miny,maxx,maxy = ScrW() * 2,ScrH() * 2,0,0
  912. for _,corner in pairs(corners) do
  913. local screen = ent:LocalToWorld(corner):ToScreen()
  914. minx,miny = math.min(minx,screen.x),math.min(miny,screen.y)
  915. maxx,maxy = math.max(maxx,screen.x),math.max(maxy,screen.y)
  916. end
  917. return minx,miny,maxx,maxy
  918. end
  919.  
  920. function FixName(ent)
  921. if ent:IsPlayer() then return ent:Name() end
  922. if ent:IsNPC() then return ent:GetClass():sub(5,-1) end
  923. return ""
  924. end
  925.  
  926. function DrawCH()
  927. if GetConVarNumber("K4_MISC_CROSSHAIR") == 1 then
  928. local x,y = ScrW(),ScrH()
  929. local w,h = x/2,y/2
  930.  
  931. surface.SetDrawColor(Color(0,0,0,235))
  932. surface.DrawRect(w - 1, h - 3, 3, 7)
  933. surface.DrawRect(w - 3, h - 1, 7, 3)
  934.  
  935. surface.SetDrawColor(Color(0,255,10,230))
  936. surface.DrawLine(w, h - 2, w, h + 3)
  937. surface.DrawLine(w - 2, h, w + 3, h)
  938.  
  939. local time = CurTime() * -180
  940. local scale = 10 * 0.02 -- Cone
  941. local gap = 40 * scale
  942. local length = gap + 20 * scale
  943.  
  944. surface.SetDrawColor(0,255,0,150)
  945.  
  946. DrawRotatingCrosshair(w,h,time, length,gap)
  947. DrawRotatingCrosshair(w,h,time + 90, length,gap)
  948. DrawRotatingCrosshair(w,h,time + 180,length,gap)
  949. DrawRotatingCrosshair(w,h,time + 270,length,gap)
  950.  
  951. if Aimbot.Target ~= nil then
  952. local text = "Target locked... ("..self:FixName(Aimbot.Target)..")"
  953. surface.SetFont("Default")
  954. local size = surface.GetTextSize(text)
  955. draw.RoundedBox(4,36,y-135,size+10,20,Color(0,0,0,100))
  956. draw.DrawText(text,"Default",40,y-132,Color(255,255,255,200),TEXT_ALIGN_LEFT)
  957. local x1,y1,x2,y2 = self:GetCoordiantes(Aimbot.Target)
  958. local edgesize = 8
  959. surface.SetDrawColor(Color(255,0,0,200))
  960.  
  961. -- Top left.
  962. surface.DrawLine(x1,y1,math.min(x1 + edgesize,x2),y1)
  963. surface.DrawLine(x1,y1,x1,math.min(y1 + edgesize,y2))
  964.  
  965. -- Top right.
  966. surface.DrawLine(x2,y1,math.max(x2 - edgesize,x1),y1)
  967. surface.DrawLine(x2,y1,x2,math.min(y1 + edgesize,y2))
  968.  
  969. -- Bottom left.
  970. surface.DrawLine(x1,y2,math.min(x1 + edgesize,x2),y2)
  971. surface.DrawLine(x1,y2,x1,math.max(y2 - edgesize,y1))
  972.  
  973. -- Bottom right.
  974. surface.DrawLine(x2,y2,math.max(x2 - edgesize,x1),y2)
  975. surface.DrawLine(x2,y2,x2,math.max(y2 - edgesize,y1))
  976. end
  977. end
  978. end
  979.  
  980.  
  981. -- --Laser
  982. -- hook.Add("Think", "recoil", NoRec)
  983.  
  984. -- function LaserSight()
  985. -- if GetConVarNumber("K4_MISC_LSIGHT") == 1 then
  986. -- if LocalPlayer():Alive() then
  987. -- local ViewModel = LocalPlayer():GetViewModel()
  988. -- local Attach = ViewModel:LookupAttachment("1")
  989. -- if ( Attach == 0 ) then Attach = ViewModel:LookupAttachment("muzzle") end
  990. -- if( LocalPlayer():Alive() || LocalPlayer():GetActiveWeapon() == NULL ) then
  991. -- if( !table.HasValue( K4laser, LocalPlayer():GetActiveWeapon():GetClass() ) ) then
  992. -- local tr = util.TraceLine(util.GetPlayerTrace(LocalPlayer()));
  993. -- cam.Start3D( EyePos() , EyeAngles())
  994. -- -- Laser
  995. -- StartPos = ViewModel:GetAttachment( Attach ).Pos
  996. -- EndPos = LocalPlayer():GetEyeTrace().HitPos
  997. -- render.SetMaterial( Material( "trails/laser" ) )
  998. -- render.DrawBeam(StartPos, EndPos , 3, 0, 0, Color(0,255,0,255))
  999. -- -- End
  1000. -- render.SetMaterial(Material("Sprites/light_glow02_add_noz"))
  1001. -- render.DrawQuadEasy(tr.HitPos, (EyePos() - tr.HitPos), 10, 10, Color(0,255,0,50), 0 )
  1002. -- cam.End3D()
  1003. -- end
  1004. -- end
  1005. -- end
  1006. -- end
  1007. -- end
  1008. -- hook.Add("HUDPaint", "LaserBeam", LaserSight)
  1009.  
  1010. -- Esp --
  1011. local function K0N4T4Esp()
  1012. if espOn:GetBool() then
  1013. for k, e in pairs (player.GetAll() ) do
  1014. local maxX, minX, maxY, minY, maxX2, minX2, maxY2, minY2, minYhp, maxYhp = CreatePos( e )
  1015. local Name = e:Nick()
  1016. local TeamColor = team.GetColor(e:Team())
  1017. local HPColor = Color(255,255,255,255)
  1018. local Dist = e:GetPos():Distance(LocalPlayer():GetPos());
  1019. local wep = "Unknown"
  1020. local ESP = (e:EyePos()):ToScreen()
  1021. if e:GetActiveWeapon() and e:GetActiveWeapon():IsValid() then
  1022. wep = e:GetActiveWeapon():GetPrintName()
  1023. if e == LocalPlayer() then Name = "" else Name = e:Nick()
  1024. draw.SimpleText( Name..GetAdminType(e), "BudgetLabel", maxX2, minY2, TeamColor, -1,1,1,Color(0,0,0))
  1025. draw.SimpleText( "HP: " .. e:Health(), "BudgetLabel", maxX2, minY2 + 10, HPColor, -1,1, 1, black )
  1026. draw.SimpleText( "Dist: " .. math.floor(Dist), "BudgetLabel", maxX2, minY2 + 20, iceblue, -1, 1, 1, black )
  1027. draw.SimpleText( "Wep: " .. wep, "BudgetLabel", maxX2, minY2 + 30, iceblue, -1, 1, 1, black)
  1028. if e:GetFriendStatus() == "friend" then
  1029. draw.SimpleText( "[Friend]", "BudgetLabel", maxX2, minY2 - 10, iceblue, -1, 1,1,black)
  1030. end
  1031. if e:IsAdmin() && !e:IsSuperAdmin() then
  1032. draw.SimpleText("[Admin]","BudgetLabel",maxX2,minY2 -20,cyan, -1,1,1,black)
  1033. end
  1034. if e:IsSuperAdmin() then
  1035. draw.SimpleText("[Super Admin]", "BudgetLabel",maxX2,minY2 -20,white, -1,1,1,black)
  1036. end
  1037.  
  1038. if GetConVarNumber("K4_ESP_Box") == 1 then
  1039. surface.SetDrawColor(255,0,0,255)
  1040. surface.DrawLine( maxX, maxY, maxX, minY )
  1041. surface.DrawLine( maxX, minY, minX, minY )
  1042. surface.DrawLine( minX, minY, minX, maxY )
  1043. surface.DrawLine( minX, maxY, maxX, maxY )
  1044. end
  1045.  
  1046.  
  1047.  
  1048. local bones = {
  1049. { S = "ValveBiped.Bip01_Head1", E = "ValveBiped.Bip01_Neck1" },
  1050. { S = "ValveBiped.Bip01_Neck1", E = "ValveBiped.Bip01_Spine4" },
  1051. { S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_Spine2" },
  1052. { S = "ValveBiped.Bip01_Spine2", E = "ValveBiped.Bip01_Spine1" },
  1053. { S = "ValveBiped.Bip01_Spine1", E = "ValveBiped.Bip01_Spine" },
  1054. { S = "ValveBiped.Bip01_Spine", E = "ValveBiped.Bip01_Pelvis" },
  1055.  
  1056. { S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_L_UpperArm" },
  1057. { S = "ValveBiped.Bip01_L_UpperArm", E = "ValveBiped.Bip01_L_Forearm" },
  1058. { S = "ValveBiped.Bip01_L_Forearm", E = "ValveBiped.Bip01_L_Hand" },
  1059.  
  1060. { S = "ValveBiped.Bip01_Spine4", E = "ValveBiped.Bip01_R_UpperArm" },
  1061. { S = "ValveBiped.Bip01_R_UpperArm", E = "ValveBiped.Bip01_R_Forearm" },
  1062. { S = "ValveBiped.Bip01_R_Forearm", E = "ValveBiped.Bip01_R_Hand" },
  1063.  
  1064. { S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_L_Thigh" },
  1065. { S = "ValveBiped.Bip01_L_Thigh", E = "ValveBiped.Bip01_L_Calf" },
  1066. { S = "ValveBiped.Bip01_L_Calf", E = "ValveBiped.Bip01_L_Foot" },
  1067. { S = "ValveBiped.Bip01_L_Foot", E = "ValveBiped.Bip01_L_Toe0" },
  1068.  
  1069. { S = "ValveBiped.Bip01_Pelvis", E = "ValveBiped.Bip01_R_Thigh" },
  1070. { S = "ValveBiped.Bip01_R_Thigh", E = "ValveBiped.Bip01_R_Calf" },
  1071. { S = "ValveBiped.Bip01_R_Calf", E = "ValveBiped.Bip01_R_Foot" },
  1072. { S = "ValveBiped.Bip01_R_Foot", E = "ValveBiped.Bip01_R_Toe0" },
  1073. }
  1074. if GetConVarNumber("K4_ESP_Skeleton") == 1 then
  1075. for k, v in pairs( bones ) do
  1076. local sPos, ePos = e:GetBonePosition( e:LookupBone( v.S ) ):ToScreen(), e:GetBonePosition( e:LookupBone( v.E ) ):ToScreen()
  1077. if e:IsPlayer() and !e:IsNPC() then
  1078. surface.SetDrawColor(team.GetColor(e:Team()))
  1079. end
  1080. surface.DrawLine(sPos.x,sPos.y,ePos.x,ePos.y)
  1081. end
  1082. end
  1083.  
  1084. if GetConVarNumber("K4_ESP_Tracer") == 1 then
  1085. if not ( LocalPlayer() and LocalPlayer():Alive() ) then return end
  1086. cam.Start3D( EyePos() , EyeAngles())
  1087. render.SetMaterial( Material( "trails/laser" ) )
  1088. StartPos = LocalPlayer():GetEyeTrace().HitPos
  1089. EndPos = e:GetBonePosition(e:LookupBone("ValveBiped.Bip01_Head1"))
  1090. render.DrawBeam(StartPos, EndPos , 3, 0, 0, Color(0,255,0,255))
  1091. cam.End3D()
  1092. elseif GetConVarNumber("K4_ESP_Tracer") == 2 then
  1093. if not ( LocalPlayer() and LocalPlayer():Alive() ) then return end
  1094. if(e != LocalPlayer()) then
  1095. local ETrace = e:EyePos():ToScreen()
  1096. local x = ScrW() / 2
  1097. local y = ScrH() / 2
  1098. surface.SetDrawColor(0, 64, 255, 225)
  1099. surface.DrawLine(ETrace.x, ETrace.y, x, y)
  1100. end
  1101. end
  1102. end
  1103. end
  1104. end
  1105. end
  1106. end
  1107.  
  1108.  
  1109.  
  1110.  
  1111. concommand.Add("k4_esp_getinfo", function(ply)
  1112. print("----------------------\n||[K4] ESP INFO [K4]||\n----------------------")
  1113. PrintTable(ply:GetEyeTrace())
  1114. local targ = ply:GetEyeTrace().Entity
  1115. if(targ and targ:IsPlayer()) then
  1116. if not (targ:Alive()) then return end
  1117. print("\n----------------------\n||[K4] ESP SPEC [K4]||\n----------------------")
  1118. print( "SteamID: " .. tostring(targ:SteamID()) )
  1119. print( "Friend: " .. tostring(targ:GetFriendStatus()) )
  1120. print( "Frags: " .. tostring(targ:Frags()) )
  1121. print( "Deaths: " .. tostring(targ:Deaths()) )
  1122. print("\n-----------------------------\n||[K4] ESP TARGET INFO [K4]||\n-----------------------------")
  1123. local targeye = targ:GetEyeTrace()
  1124. PrintTable(targeye)
  1125. if(targeye.Entity and targeye.Entity:IsPlayer()) then
  1126. print("\n-----------------------------\n||[K4] ESP TARGET SPEC [K4]||\n-----------------------------")
  1127. print( "SteamID: " .. tostring(targeye.Entity:SteamID()) )
  1128. print( "Friend: " .. tostring(targeye.Entity:GetFriendStatus()) )
  1129. print( "Frags: " .. tostring(targeye.Entity:Frags()) )
  1130. print( "Deaths: " .. tostring(targeye.Entity:Deaths()) )
  1131. end
  1132. end
  1133. end)
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139. -- Wallhack
  1140.  
  1141. function IsCloseEnough(ent)
  1142. local dist = ent:GetPos():Distance( LocalPlayer():GetPos() )
  1143. if( dist <= GetConVarNumber("K4_ESP_Distance") and ent:GetPos() != Vector( 0, 0, 0 ) ) then
  1144. return true
  1145. end
  1146. return false
  1147. end
  1148.  
  1149. function Chams()
  1150. if GetConVarNumber("K4_wallhack") == 1 then
  1151. for k,v in pairs(player.GetAll()) do
  1152. if WHCheck(v) then
  1153. local chamcol = g.team.GetColor(v:Team()) or Color(134,13,255,255)
  1154. cam.Start3D(EyePos(), EyeAngles())
  1155. g.render.SuppressEngineLighting(false)
  1156. v:SetColor(Color(255, 255, 255))
  1157. v:SetMaterial("")
  1158. v:DrawModel()
  1159. cam.End3D()
  1160. end
  1161. end
  1162. end
  1163. end
  1164. hook.Add("HUDPaint", "Chams", Chams)
  1165. local listedents = {}
  1166.  
  1167. local allowedents = {
  1168. "money_printer",
  1169. "spawned_shipment",
  1170. "gunlab",
  1171. "printer"
  1172. }
  1173.  
  1174. function DarkRPEnts()
  1175. if GetConVarNumber("K4_ESP_RPEnts") == 1 then
  1176. hook.Add("HUDPaint", "PlayerSpawn", function()
  1177. cam.Start3D(EyePos(), EyeAngles())
  1178. for _,v in pairs(ents.GetAll()) do
  1179. if string.find("ent_mad", v:GetClass()) then
  1180. table.insert(allowedents, v:GetClass())
  1181. end
  1182. if table.HasValue(allowedents, v:GetClass()) then
  1183. v:SetMaterial("models/wireframe")
  1184. v:DrawModel()
  1185. v:SetMaterial("")
  1186. v:SetColor(Color(255,255,255,255))
  1187. end
  1188. end
  1189. cam.End3D()
  1190. end)
  1191. else
  1192. hook.Remove("HUDPaint", "PlayerSpawn")
  1193. end
  1194. end
  1195.  
  1196. concommand.Add("K4_ListAvailableEnts", function()
  1197. PrintTable(listedents)
  1198. end)
  1199.  
  1200. function NotifyMe()
  1201. if GetConVarNumber("K4_Misc_PrintAdmins") == 1 then
  1202. for k, v in pairs(player.GetAll()) do
  1203. if (v:IsAdmin() and not table.HasValue(K4_Admins, v)) then
  1204. table.insert(K4_Admins, v);
  1205. AdminNum = table.getn(K4_Admins)
  1206. K4.Notify(true,white,"Admin " .. v:Nick() .. " has joined!")
  1207. surface.PlaySound("buttons/blip1.wav");
  1208. end
  1209. end
  1210. end
  1211. end
  1212.  
  1213.  
  1214.  
  1215.  
  1216. hook.Add("HUDPaint", "L4DGlow", function()
  1217. for k,v in pairs(player.GetAll()) do
  1218. if(WHCheck(v) && GetConVarNumber("K4_ESP_Glow") == 1) then
  1219. effects.halo.Add({v}, team.GetColor(v:Team()), 1, 1, 1, true, true)
  1220.  
  1221. end
  1222. end
  1223. end)
  1224.  
  1225. --Props
  1226. local function propcheck(v)
  1227. if(string.find(v:GetClass(), "weapon_") or string.find(v:GetClass(), "gmod_") or string.find(v:GetClass(), "player") or string.find(v:GetClass(), "physgun") or string.find(v:GetClass(), "viewmodel")) then
  1228. return false
  1229. else
  1230. return true
  1231. end
  1232. end
  1233.  
  1234. local function XProps()
  1235. cam.Start3D(EyePos(), EyeAngles())
  1236. for k, v in pairs(ents.GetAll()) do
  1237. if(v:IsValid() && propcheck(v)) then
  1238. local islight = (string.find(v:GetClass(), "env_sprite") or string.find(v:GetClass(), "light_environment") or string.find(v:GetClass(), "light_spot"))
  1239. if(GetConVarNumber("K4_ESP_Xray") == 1) then
  1240. if(islight) then
  1241. v:SetColor(Color(255, 255, 255, 255))
  1242. v:SetRenderMode(RENDERMODE_NONE)
  1243. elseif(string.find(v:GetClass(), "func_door")) then
  1244. v:SetColor(Color(221, 0, 0, 190))
  1245. v:SetRenderMode(RENDERMODE_TRANSALPHA)
  1246. else
  1247. v:SetColor(Color(0, 0, 0, 190))
  1248. v:SetRenderMode(RENDERMODE_TRANSALPHA)
  1249. end
  1250. else
  1251. v:SetColor(Color(255, 255, 255, 255))
  1252. if(islight) then v:SetRenderMode(RENDERMODE_WORLDGLOW) end
  1253. end
  1254. end
  1255. end
  1256.  
  1257. cam.End3D()
  1258. end
  1259.  
  1260.  
  1261. -- Bhop --
  1262. if CLIENT then
  1263. concommand.Add("+bhop",function()
  1264. hook.Add("Think","hook",function()
  1265. RunConsoleCommand(((LocalPlayer():IsOnGround() or LocalPlayer():WaterLevel() > 0) and "+" or "-").."jump")
  1266. end)
  1267. end)
  1268.  
  1269. concommand.Add("-bhop",function()
  1270. RunConsoleCommand("-jump")
  1271. hook.Remove("Think","hook")
  1272. end)
  1273. end
  1274.  
  1275. --Propspammer lol
  1276. function Wot()
  1277. if propspamen:GetBool() then
  1278. psmodel = GetConVarString("K4_MISC_PSPAM_MODEL")
  1279. RunConsoleCommand("gm_spawn", psmodel)
  1280. end
  1281. end
  1282.  
  1283.  
  1284.  
  1285. --[[
  1286. HUD SHIT
  1287. ]]--
  1288.  
  1289. --Below is aimbot status check
  1290.  
  1291. hook.Add("HUDPaint", "AimStatus", function()
  1292. draw.DrawText("Aimbot: ", "Misc", 1700, 10, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1293. end)
  1294.  
  1295. function AimCheck()
  1296. if GetConVarNumber("K4_aimbot") >= 1 then
  1297. hook.Remove("HUDPaint", "DAimStatus2")
  1298. hook.Add("HUDPaint", "DAimStatus1", function()
  1299. draw.DrawText("On", "Misc", 1815, 10, Color(79, 225, 38, 107), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1300. end)
  1301. elseif GetConVarNumber("K4_aimbot") < 1 then
  1302. hook.Remove("HUDPaint", "DAimStatus1")
  1303. hook.Add("HUDPaint", "DAimStatus2", function()
  1304. draw.DrawText("Off", "Misc", 1815, 10, Color(255, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1305. end)
  1306. end
  1307. end
  1308.  
  1309.  
  1310.  
  1311.  
  1312. -- Below is Wallhack status check
  1313.  
  1314. hook.Add("HUDPaint", "WHStatus", function()
  1315. draw.DrawText("Wallhack: ", "Misc", 1700, 50, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1316. end)
  1317.  
  1318. function WallCheck()
  1319. if GetConVarNumber("K4_wallhack") >= 1 then
  1320. hook.Remove("HUDPaint", "WHStatus2")
  1321. hook.Add("HUDPaint", "WHStatus1", function()
  1322. draw.DrawText("On", "Misc", 1840, 50, Color(79, 225, 38, 107), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1323. end)
  1324. elseif GetConVarNumber("K4_wallhack") < 1 then
  1325. hook.Remove("HUDPaint", "WHStatus1")
  1326. hook.Add("HUDPaint", "WHStatus2", function()
  1327. draw.DrawText("Off", "Misc", 1840, 50, Color(255, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1328. end)
  1329. end
  1330. end
  1331.  
  1332.  
  1333.  
  1334. -- Below is Tracers Check
  1335.  
  1336. hook.Add("HUDPaint", "TracerStatus", function()
  1337. draw.DrawText("Tracers: ", "Misc", 1700, 90, Color(255, 255, 255, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1338. end)
  1339.  
  1340. function TracerCheck()
  1341. if GetConVarNumber("K4_ESP_Tracer") >= 1 then
  1342. hook.Remove("HUDPaint", "TStatus2")
  1343. hook.Add("HUDPaint", "TStatus1", function()
  1344. draw.DrawText("On", "Misc", 1815, 90, Color(79, 225, 38, 107), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1345. end)
  1346. elseif GetConVarNumber("K4_ESP_Tracer") < 1 then
  1347. hook.Remove("HUDPaint", "TStatus1")
  1348. hook.Add("HUDPaint", "TStatus2", function()
  1349. draw.DrawText("Off", "Misc", 1815, 90, Color(255, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1350. end)
  1351. end
  1352. end
  1353.  
  1354.  
  1355. /********************
  1356. -- THE KILL SWITCH --
  1357. --Credits to KateNF--
  1358. ********************/
  1359.  
  1360. -- Partial Kill --
  1361. concommand.Add( "k4_klag", function()
  1362. K4.Notify(true,red,[[WARNING: Some hooks have been removed. (To Reactivate Reload The Script Then Run 'k4_falco_resetlag') ]])
  1363. hook.Remove("HUDPaint", "Chams", Chams)
  1364. hook.Remove("Think", "_k4_swing_hook", doSwing())
  1365. RunConsoleCommand("k4_falco_stoplag")
  1366. end )
  1367.  
  1368. -- Full Kill --
  1369. concommand.Add( "k4_kill", function()
  1370. K4.Notify(true,red,[[WARNING: K0N4T4 IS NOW DEAD. (To Reactivate Reload The Script)]])
  1371. hook.Remove("HUDPaint", "XRAYProps", XProps)
  1372. hook.Remove("Think", "AimCheck", AimCheck)
  1373. hook.Remove("HUDPaint", "Chams", Chams)
  1374. hook.Remove("HUDPaint", "esp", K0N4T4Esp)
  1375. hook.Remove("Think", "_k4_swing_hook", doSwing())
  1376. end )
  1377.  
  1378. /*********************
  1379. -- EXTRA UTIL STUFF --
  1380. *********************/
  1381. concommand.Add( "k4_load", function()
  1382. local files, folders = file.Find("lua/K4/modules/*.lua", "GAME")
  1383. for k, v in pairs(files) do
  1384. include("K4/modules/" .. v)
  1385. end
  1386. end )
  1387.  
  1388. function noppcol()
  1389. for _,v in pairs(ents.GetAll()) do
  1390. if(string.find(v:GetMaterial():lower(), "pp/copy")) then
  1391. v:SetMaterial("models/debug/debugwhite")
  1392. end
  1393. end
  1394. end
  1395. hook.Add("Think", "noppcol", noppcol())
  1396.  
  1397.  
  1398. --Spawnprotection timer, for F2S:Stronghold, does not work. Can fix soon probably.
  1399.  
  1400. -- function SPTimer()
  1401. -- hook.Add("HUDPaint", "SpProtect4", function()
  1402. -- draw.DrawText("4", "Misc", 1815, 90, Color(255, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1403. -- end)
  1404. -- sleep(1000)
  1405. -- hook.Remove("HUDPaint", "SpProtect4")
  1406. -- hook.Add("HUDPaint", "SpProtect3", function()
  1407. -- draw.DrawText("3", "Misc", 1815, 90, Color(255, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1408. -- end)
  1409. -- sleep(1000)
  1410. -- hook.Remove("HUDPaint", "SpProtect3")
  1411. -- hook.Add("HUDPaint", "SpProtect2", function()
  1412. -- draw.DrawText("2", "Misc", 1815, 90, Color(255, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1413. -- end)
  1414. -- sleep(1000)
  1415. -- hook.Remove("HUDPaint", "SpProtect2")
  1416. -- hook.Add("HUDPaint", "SpProtect1", function()
  1417. -- draw.DrawText("2", "Misc", 1815, 90, Color(255, 0, 0, 255), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT)
  1418. -- end)
  1419. -- sleep(1000)
  1420. -- hook.Remove("HUDPaint", "SpProtect1")
  1421. -- end
  1422.  
  1423. --[[
  1424. HOOKS
  1425. ]]--
  1426.  
  1427. hook.Add("Think", "K0N4T4Aim", K0N4T4Aim)
  1428. hook.Add("Think","aimbot",aimbot)
  1429. hook.Add("Think", "Norecoil", NoRec)
  1430. hook.Add("HUDPaint", "crosshairmofo", DrawCH)
  1431. hook.Add("HUDPaint", "esp", K0N4T4Esp)
  1432. hook.Add("HUDPaint","CustomCross",Crosshair)
  1433. hook.Add("Think", "RPEnts", DarkRPEnts)
  1434. hook.Add("Think", "PrintAdmins", NotifyMe)
  1435. hook.Add("HUDPaint", "XRAYProps", XProps)
  1436. hook.Add("Tick", "WOTTT", Wot)
  1437. hook.Add("Think", "AimCheck", AimCheck)
  1438. hook.Add("Think", "WallCheck", WallCheck)
  1439. hook.Add("Think", "TracerCheck", TracerCheck)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement