Guest User

Untitled

a guest
Jan 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.32 KB | None | 0 0
  1. local LESPSayPrefix = CreateClientConVar( "lix_lesp_sayprefix", "", true, false )
  2. local LESPSayDelay = 0
  3.  
  4. local LESPOn = CreateClientConVar( "lix_lesp_on", 1, true, false )
  5. local LESPHealth = CreateClientConVar( "lix_lesp_health", 1, true, false )
  6. local LESPWeapon = CreateClientConVar( "lix_lesp_weapon", 1, true, false )
  7. local LESPMoney = CreateClientConVar( "lix_lesp_money", 1, true, false )
  8. local LESPDistance = CreateClientConVar( "lix_lesp_distance", 1, true, false )
  9. local LESPSpeed = CreateClientConVar( "lix_lesp_speed", 1, true, false )
  10.  
  11. local LESPMirror = CreateClientConVar( "lix_lesp_mirror", 0, true, false )
  12. local LESPMirrorx = CreateClientConVar( "lix_lesp_mirrorx", 0, true, false )
  13. local LESPMirrory = CreateClientConVar( "lix_lesp_mirrory", 0, true, false )
  14. local LESPMirrorw = CreateClientConVar( "lix_lesp_mirrorw", 300, true, false )
  15. local LESPMirrorh = CreateClientConVar( "lix_lesp_mirrorh", 300, true, false )
  16. local LESPMirrorpitch = CreateClientConVar( "lix_lesp_mirrorpitch", -2, true, false )
  17. local LESPMirroryaw = CreateClientConVar( "lix_lesp_mirroryaw", 180, true, false )
  18. local LESPMirrorroll = CreateClientConVar( "lix_lesp_mirrorroll", 0, true, false )
  19.  
  20. local LESPRadar = CreateClientConVar( "lix_lesp_radar", 0, true, false )
  21. local LESPRadarx = CreateClientConVar( "lix_lesp_radarx", 0, true, false )
  22. local LESPRadary = CreateClientConVar( "lix_lesp_radary", 0, true, false )
  23. local LESPRadarw = CreateClientConVar( "lix_lesp_radarw", 300, true, false )
  24. local LESPRadarh = CreateClientConVar( "lix_lesp_radarh", 300, true, false )
  25. local LESPRadarfov = CreateClientConVar( "lix_lesp_radarfov", 300, true, false )
  26. local LESPRadarauto = CreateClientConVar( "lix_lesp_radarauto", 1, true, false )
  27.  
  28. local LESPAimdot = CreateClientConVar( "lix_lesp_aimdot", 0, true, false )
  29. local LESPAimdotfilt = CreateClientConVar( "lix_lesp_aimdotfilter", 1, true, false )
  30.  
  31. local LESPLight = false
  32. local LESPAura = false
  33. local LESPToggleCommands = {}
  34.  
  35. local LESPVoteTime = CreateClientConVar( "lix_lesp_votetime", 120, true, false )
  36. local LESPVoteVoted = {}
  37. local LESPVoteVotes = {}
  38. local LESPVoteType = 0
  39.  
  40. local LESPDetects = {}
  41. local LESPDetected = {}
  42. local LESPDetectShow = CreateClientConVar( "lix_lesp_detectshow", 1, true, false )
  43. local LESPDetectShowRad = CreateClientConVar( "lix_lesp_detectshowrad", 0, true, false )
  44. local LESPDetectThreshold = CreateClientConVar( "lix_lesp_detectthresh", 100, true, false )
  45. local LESPDetectTrace = CreateClientConVar( "lix_lesp_detecttrace", 0, true, false )
  46.  
  47. local LESPXRay = false
  48. local LESPXRayMat = CreateClientConVar( "lix_lesp_xraymat", "xraysolid", true, false )
  49. local LESPXRayColors = {}
  50. local LESPXRayMats = {}
  51.  
  52. local LESPReverseChat = CreateClientConVar( "lix_lesp_chatreverse", 0, true, false )
  53. local LESPCambChat = CreateClientConVar( "lix_lesp_chatcambridge", 0, true, false )
  54. local LESPByteChat = CreateClientConVar( "lix_lesp_chatbyte", 0, true, false )
  55.  
  56.  
  57. -- ENTITY SAVING
  58.  
  59. local LESPObjectsConvar = CreateClientConVar( "lix_lesp_objects", "", true, false )
  60. local LESPObjects = {}
  61. if LESPObjectsConvar:GetString() ~= "" then
  62. LESPObjects = string.Explode( "|", LESPObjectsConvar:GetString() )
  63. end
  64.  
  65. -- UTILITY
  66.  
  67. local function LESPGetOffset( ply )
  68. if !ValidEntity( ply ) then return Vector( 0, 0, 0 ) end
  69. if !ply:GetAttachment( ply:LookupAttachment( "eyes" ) ) then
  70. return ply:GetShootPos():ToScreen()
  71. else
  72. return ply:GetAttachment( ply:LookupAttachment( "eyes" ) ).Pos:ToScreen()
  73. end
  74. end
  75.  
  76. local function LESPSay( text )
  77. if string.len( LESPSayPrefix:GetString() .. text ) > 125 then
  78. timer.Simple( 2 * ( LESPSayDelay + 1 ), LESPSay, string.sub( LESPSayPrefix:GetString() .. text, 127 ) )
  79. end
  80. timer.Simple( 2 * LESPSayDelay, function()
  81. LESPSayDelay = LESPSayDelay - 1
  82. RunConsoleCommand( "say", LESPSayPrefix:GetString() .. text )
  83. end )
  84. LESPSayDelay = LESPSayDelay + 1
  85. end
  86.  
  87. -- MAIN DRAWING
  88.  
  89. local function LESPDraw()
  90. if LESPAimdot:GetInt() > 0 then
  91. for _, v in pairs( player.GetAll() ) do
  92. if LESPAimdotfilt:GetInt() > 0 then
  93. if !util.TraceLine( { start = LocalPlayer():GetShootPos(), endpos = v:GetEyeTrace().HitPos, filter = LocalPlayer() } ).Hit and v ~= LocalPlayer() then
  94. local o = v:GetEyeTrace().HitPos:ToScreen()
  95. surface.SetDrawColor( 0, 0, 0, 255 )
  96. surface.DrawRect( o.x - 2, o.y - 2, 4, 4 )
  97. local col = team.GetColor( v:Team() )
  98. surface.SetDrawColor( col.r, col.g, col.b, 255 )
  99. surface.DrawRect( o.x - 1, o.y - 1, 2, 2 )
  100.  
  101. surface.SetDrawColor( 0, 0, 0, 50 )
  102. surface.SetFont( "Default" )
  103. surface.DrawRect( o.x - surface.GetTextSize( v:Nick() ) / 2, o.y + 7, surface.GetTextSize( v:Nick() ) + 2, 12 )
  104. surface.SetTextColor( 255, 255, 255, 255 )
  105. surface.SetTextPos( o.x - ( surface.GetTextSize( v:Nick() ) ) / 2 + 1, o.y + 6 )
  106. surface.DrawText( v:Nick() )
  107. end
  108. else
  109. if v ~= LocalPlayer() then
  110. local o = v:GetEyeTrace().HitPos:ToScreen()
  111. surface.SetDrawColor( 0, 0, 0, 255 )
  112. surface.DrawRect( o.x - 2, o.y - 2, 4, 4 )
  113. local col = team.GetColor( v:Team() )
  114. surface.SetDrawColor( col.r, col.g, col.b, 255 )
  115. surface.DrawRect( o.x - 1, o.y - 1, 2, 2 )
  116.  
  117. surface.SetDrawColor( 0, 0, 0, 50 )
  118. surface.SetFont( "Default" )
  119. surface.DrawRect( o.x - surface.GetTextSize( v:Nick() ) / 2, o.y + 7, surface.GetTextSize( v:Nick() ) + 2, 12 )
  120. surface.SetTextColor( 255, 255, 255, 255 )
  121. surface.SetTextPos( o.x - ( surface.GetTextSize( v:Nick() ) ) / 2 + 1, o.y + 6 )
  122. surface.DrawText( v:Nick() )
  123. end
  124. end
  125. end
  126. end
  127. if LESPOn:GetInt() > 0 then
  128. for _, v in pairs( LESPObjects ) do
  129. if v ~= "" then
  130. for k, b in pairs( ents.GetAll() ) do
  131. if string.find( string.lower( b:GetClass() ), string.lower( v ) ) then
  132. local o = b:GetPos():ToScreen()
  133. surface.SetDrawColor( 0, 0, 0, 255 )
  134. surface.DrawRect( o.x - 6, o.y - 6, 12, 12 )
  135. surface.SetDrawColor( 255, 255, 255, 255 )
  136. surface.DrawRect( o.x - 5, o.y - 5, 10, 10 )
  137.  
  138. surface.SetFont( "Default" )
  139.  
  140. surface.SetDrawColor( 0, 0, 0, 50 )
  141. surface.DrawRect( o.x + 12, o.y - 6, surface.GetTextSize( b:GetClass() ) + 2, 12 )
  142. surface.SetTextColor( 255, 255, 255, 255 )
  143. surface.SetTextPos( o.x + 13, o.y - 7 )
  144. surface.DrawText( b:GetClass() )
  145.  
  146. surface.SetDrawColor( 0, 0, 0, 50 )
  147. surface.SetFont( "Default" )
  148. surface.DrawRect( o.x - 6, o.y - 19, surface.GetTextSize( "D: " .. math.floor( b:GetPos():Distance( LocalPlayer():GetPos() ) ) ) + 2, 12 )
  149. surface.SetTextColor( 255, 255, 255, 255 )
  150. surface.SetTextPos( o.x - 5, o.y - 20 )
  151. surface.DrawText( "D: " .. math.floor( b:GetPos():Distance( LocalPlayer():GetPos() ) ) )
  152. end
  153. end
  154. end
  155. end
  156. for _, v in pairs( player.GetAll() ) do
  157. if v:Alive() and v ~= LocalPlayer() then
  158. local o = LESPGetOffset( v )
  159.  
  160. if v:GetPos():Distance( LocalPlayer():GetPos() ) < 500 then
  161. o.y = o.y - ( 100 - v:GetPos():Distance( LocalPlayer():GetPos() ) / 5 )
  162. end
  163.  
  164. local color = team.GetColor( v:Team() )
  165. surface.SetDrawColor( 0, 0, 0, 255 )
  166. surface.DrawRect( o.x - 6, o.y - 6, 12, 12 )
  167. surface.SetDrawColor( 0, 0, 255, 255 )
  168. if v:IsSuperAdmin() then
  169. surface.SetDrawColor( 255, 0, 0, 255 )
  170. elseif v:IsAdmin() then
  171. surface.SetDrawColor( 0, 255, 0, 255 )
  172. end
  173. surface.DrawRect( o.x - 5, o.y - 5, 10, 10 )
  174. surface.SetDrawColor( 0, 0, 0, 255 )
  175. surface.DrawRect( o.x - 3, o.y - 3, 6, 6 )
  176. surface.SetDrawColor( color.r, color.g, color.b, 255 )
  177. surface.DrawRect( o.x - 2, o.y - 2, 4, 4 )
  178.  
  179. surface.SetFont( "Default" )
  180.  
  181. surface.SetDrawColor( 0, 0, 0, 50 )
  182. surface.DrawRect( o.x + 12, o.y - 6, surface.GetTextSize( v:Nick() ) + 2, 12 )
  183. surface.SetTextColor( 255, 255, 255, 255 )
  184. surface.SetTextPos( o.x + 13, o.y - 7 )
  185. surface.DrawText( v:Nick() )
  186.  
  187. if LESPDistance:GetInt() > 0 then
  188. surface.SetDrawColor( 0, 0, 0, 50 )
  189. surface.SetFont( "Default" )
  190. surface.DrawRect( o.x - 6, o.y - 19, surface.GetTextSize( "D: " .. math.floor( v:GetPos():Distance( LocalPlayer():GetPos() ) ) ) + 2, 12 )
  191. surface.SetTextColor( 255, 255, 255, 255 )
  192. surface.SetTextPos( o.x - 5, o.y - 20 )
  193. surface.DrawText( "D: " .. math.floor( v:GetPos():Distance( LocalPlayer():GetPos() ) ) )
  194. end
  195.  
  196. if LESPHealth:GetInt() > 0 then
  197. surface.SetDrawColor( 0, 0, 0, 50 )
  198. surface.SetFont( "Default" )
  199. surface.DrawRect( o.x - 6, o.y + 7, surface.GetTextSize( "HP: " .. v:Health() ) + 2, 12 )
  200. surface.SetTextColor( 255, 255, 255, 255 )
  201. surface.SetTextPos( o.x - 5, o.y + 6 )
  202. surface.DrawText( "HP: " .. v:Health() )
  203. end
  204.  
  205. if LESPMoney:GetInt() > 0 and v:GetNetworkedInt( "Money" ) ~= 0 then
  206. surface.SetDrawColor( 0, 0, 0, 50 )
  207. surface.SetFont( "Default" )
  208. local add = 19
  209. if LESPDistance:GetInt() > 0 then add = 32 end
  210. surface.DrawRect( o.x - 6, o.y - add, surface.GetTextSize( "$: " .. v:GetNWInt( "Money" ) ) + 2, 12 )
  211. surface.SetTextColor( 255, 255, 255, 255 )
  212. surface.SetTextPos( o.x - 5, o.y - add - 1 )
  213. surface.DrawText( "$: " .. v:GetNWInt( "Money" ) )
  214. end
  215.  
  216. if LESPWeapon:GetInt() > 0 and v:GetActiveWeapon():IsValid() then
  217. surface.SetDrawColor( 0, 0, 0, 50 )
  218. surface.SetFont( "Default" )
  219. local add = 6
  220. if LESPHealth:GetInt() > 0 then add = 19 end
  221. surface.DrawRect( o.x - 6, o.y + add + 1, surface.GetTextSize( v:GetActiveWeapon():GetPrintName() ) + 2, 12 )
  222. surface.SetTextColor( 255, 255, 255, 255 )
  223. surface.SetTextPos( o.x - 5, o.y + add )
  224. surface.DrawText( v:GetActiveWeapon():GetPrintName() )
  225. end
  226.  
  227. end
  228. end
  229. end
  230. if LESPMirror:GetInt() > 0 then
  231. local pitch = LESPMirrorpitch:GetInt()
  232. if pitch < 0 then pitch = pitch * LocalPlayer():EyeAngles().p end
  233. local yaw = LESPMirroryaw:GetInt()
  234. if yaw < 0 then yaw = yaw * LocalPlayer():EyeAngles().y end
  235. local roll = LESPMirrorroll:GetInt()
  236. if roll < 0 then roll = roll * LocalPlayer():EyeAngles().r end
  237.  
  238. local Cam = {}
  239. Cam.angles = Angle( LocalPlayer():EyeAngles().p + pitch, LocalPlayer():EyeAngles().y + yaw, LocalPlayer():EyeAngles().r + roll )
  240. Cam.origin = LocalPlayer():GetShootPos()
  241. Cam.x = LESPMirrorx:GetInt()
  242. Cam.y = LESPMirrory:GetInt()
  243. Cam.w = LESPMirrorw:GetInt()
  244. Cam.h = LESPMirrorh:GetInt()
  245. render.RenderView( Cam )
  246. surface.SetDrawColor( 0, 0, 0, 255 )
  247. surface.DrawOutlinedRect( LESPMirrorx:GetInt(), LESPMirrory:GetInt(), LESPMirrorw:GetInt(),LESPMirrorh:GetInt() )
  248. surface.SetDrawColor( 255, 255, 255, 255 )
  249. surface.DrawRect( ScrW() / 2 - 1, ScrH() / 2 - 1, 2, 2 )
  250. end
  251. if LESPRadar:GetInt() > 0 then
  252. local Cam = {}
  253. Cam.angles = Angle( 90, LocalPlayer():EyeAngles().y, 0 )
  254.  
  255. local Zvar = LESPRadarfov:GetInt()
  256. if LESPRadarauto:GetInt() > 0 then
  257. local trace = {}
  258. trace.start = LocalPlayer():GetPos() + Vector( 0, 0, 5 )
  259. trace.endpos = LocalPlayer():GetPos() + Vector( 0, 0, LESPRadarfov:GetInt() )
  260. trace.filter = LocalPlayer()
  261. if util.TraceLine( trace ).Hit then
  262. Zvar = util.TraceLine( trace ).HitPos.z - 5 - LocalPlayer():GetPos().z
  263. end
  264. end
  265.  
  266. Cam.origin = LocalPlayer():GetPos() + Vector( 0, 0, Zvar )
  267. Cam.x = LESPRadarx:GetInt()
  268. Cam.y = LESPRadary:GetInt()
  269. Cam.w = LESPRadarw:GetInt()
  270. Cam.h = LESPRadarh:GetInt()
  271. render.RenderView( Cam )
  272. surface.SetDrawColor( 0, 0, 0, 255 )
  273. surface.DrawOutlinedRect( LESPRadarx:GetInt(), LESPRadary:GetInt(), LESPRadarw:GetInt(),LESPRadarh:GetInt() )
  274. surface.SetDrawColor( 255, 255, 255, 255 )
  275. surface.DrawRect( ScrW() / 2 - 1, ScrH() / 2 - 1, 2, 2 )
  276. end
  277. for k, v in pairs( LESPDetects ) do
  278. if LESPDetectShow:GetInt() > 0 then
  279. local o = v:ToScreen()
  280. surface.SetDrawColor( 0, 0, 0, 255 )
  281. surface.DrawRect( o.x - 2, o.y - 2, 4, 4 )
  282. surface.SetDrawColor( 200, 50, 50, 255 )
  283. surface.DrawRect( o.x - 1, o.y - 1, 2, 2 )
  284.  
  285. surface.SetDrawColor( 0, 0, 0, 50 )
  286. surface.SetFont( "Default" )
  287. surface.DrawRect( o.x - surface.GetTextSize( "DET " .. k ) / 2, o.y + 7, surface.GetTextSize( "DET " .. k ) + 2, 12 )
  288. surface.SetTextColor( 255, 255, 255, 255 )
  289. surface.SetTextPos( o.x - ( surface.GetTextSize( "DET " .. k ) ) / 2 + 1, o.y + 6 )
  290. surface.DrawText( "DET " .. k )
  291. if LESPDetectShowRad:GetInt() > 0 then
  292. for i = 1, 6 do
  293. local o = ( v + Vector( math.sin( i * 1 ) * LESPDetectThreshold:GetInt(), math.cos( i * 1 ) * LESPDetectThreshold:GetInt(), 0 ) ):ToScreen()
  294. local o2 = ( v + Vector( math.sin( ( i + 1 ) * 1 ) * LESPDetectThreshold:GetInt(), math.cos( ( i + 1 ) * 1 ) * LESPDetectThreshold:GetInt(), 0 ) ):ToScreen()
  295.  
  296. surface.SetDrawColor( 255, 0, 0, 255 )
  297. surface.DrawLine( o.x, o.y, o2.x, o2.y )
  298. end
  299. end
  300. end
  301. end
  302. end
  303. hook.Add( "HUDPaint", "LESP", LESPDraw )
  304.  
  305. local function LESPThink()
  306. if LESPLight then
  307. local light = DynamicLight( LocalPlayer():UserID() )
  308. if light then
  309. light.Pos = LocalPlayer():GetEyeTrace().HitPos
  310. light.r = 255
  311. light.g = 255
  312. light.b = 255
  313. light.Brightness = 10
  314. light.Size = 800
  315. light.Decay = 0
  316. light.DieTime = CurTime() + 0.2
  317. end
  318. end
  319. if LESPAura then
  320. local light = DynamicLight( LocalPlayer():UserID() )
  321. if light then
  322. light.Pos = LocalPlayer():GetPos()
  323. light.r = 255
  324. light.g = 255
  325. light.b = 255
  326. light.Brightness = 10
  327. light.Size = 800
  328. light.Decay = 0
  329. light.DieTime = CurTime() + 0.2
  330. end
  331. end
  332. for k, v in pairs( LESPDetects ) do
  333. for b, n in pairs( player.GetAll() ) do
  334. if LESPDetectTrace:GetInt() > 0 then
  335. if n:GetPos():Distance( v ) < LESPDetectThreshold:GetInt() and !util.TraceLine( { start = v + Vector( 0, 0, 5 ), endpos = n:GetPos() } ).Hit and LESPDetected[ n:UniqueID() ] ~= true then
  336. chat.AddText( "Detector " .. k .. " breached by " .. n:Nick() )
  337. LESPDetected[ n:UniqueID() ] = true
  338. elseif n:GetPos():Distance( v ) > LESPDetectThreshold:GetInt() then
  339. LESPDetected[ n:UniqueID() ] = false
  340. end
  341. else
  342. if n:GetPos():Distance( v ) < LESPDetectThreshold:GetInt() and LESPDetected[ n:UniqueID() ] ~= true then
  343. chat.AddText( "Detector " .. k .. " breached by " .. n:Nick() )
  344. LESPDetected[ n:UniqueID() ] = true
  345. elseif n:GetPos():Distance( v ) > LESPDetectThreshold:GetInt() then
  346. LESPDetected[ n:UniqueID() ] = false
  347. end
  348. end
  349. end
  350. end
  351. end
  352. hook.Add( "Think", "LESP", LESPThink )
  353.  
  354. concommand.Add( "lix_lesp_light", function() LESPLight = !LESPLight end )
  355. concommand.Add( "lix_lesp_aura", function() LESPAura = !LESPAura end )
  356.  
  357. local function LESPDetectAdd()
  358. table.insert( LESPDetects, LocalPlayer():GetPos() )
  359. chat.AddText( "Detector " .. #LESPDetects .. " placed" )
  360. end
  361.  
  362. local function LESPDetectRemove()
  363. if #LESPDetects > 0 then
  364. local best = 99999
  365. local var = 0
  366. for k, v in pairs( LESPDetects ) do
  367. if v:Distance( LocalPlayer():GetPos() ) < best then
  368. best = v:Distance( LocalPlayer():GetPos() )
  369. var = k
  370. end
  371. end
  372. table.remove( LESPDetects, var )
  373. chat.AddText( "Detector " .. var .. " removed" )
  374. end
  375. end
  376.  
  377. concommand.Add( "lix_lesp_detectadd", LESPDetectAdd )
  378. concommand.Add( "lix_lesp_detectremove", LESPDetectRemove )
  379.  
  380.  
  381. -- VOTE
  382.  
  383. local function LESPVoteChat( ply, text, tchat, dead )
  384. if ply ~= LocalPlayer() and ply:EntIndex() ~= 0 and LESPVoteType ~= 0 then
  385. if !table.HasValue( LESPVoteVoted, ply ) then
  386. if LESPVoteType == 1 then
  387. if string.find( string.lower( text ), "!yes" ) then
  388. table.insert( LESPVoteVoted, ply )
  389. LESPVoteVotes[ "yes" ] = LESPVoteVotes[ "yes" ] + 1
  390. LESPSay( "Player " .. ply:Nick() .. " voted for. (+" .. LESPVoteVotes[ "yes" ] .. "/-" .. LESPVoteVotes[ "no" ] .. ")" )
  391. elseif string.find( string.lower( text ), "!no" ) then
  392. table.insert( LESPVoteVoted, ply )
  393. LESPVoteVotes[ "no" ] = LESPVoteVotes[ "no" ] + 1
  394. LESPSay( "Player " .. ply:Nick() .. " voted against. (+" .. LESPVoteVotes[ "yes" ] .. "/-" .. LESPVoteVotes[ "no" ] .. ")" )
  395. end
  396. end
  397. if LESPVoteType == 2 then
  398. if string.find( text, "!" ) then
  399. for k, v in pairs( LESPVoteVotes ) do
  400. if string.lower( string.sub( text, string.find( text, "!" ) + 1 ) ) == string.lower( k ) then
  401. table.insert( LESPVoteVoted, ply )
  402. LESPVoteVotes[ string.lower( string.sub( text, string.find( text, "!" ) + 1 ) ) ] = v + 1
  403. LESPSay( "Player " .. ply:Nick() .. " voted for " .. k .. " with " .. v .. " other(s)." )
  404. return
  405. end
  406. end
  407. table.insert( LESPVoteVoted, ply )
  408. LESPVoteVotes[ string.sub( text, string.find( text, "!" ) + 1 ) ] = 1
  409. LESPSay( "Player " .. ply:Nick() .. " voted for " .. string.sub( text, string.find( text, "!" ) + 1 ) .. "." )
  410. end
  411. end
  412. end
  413. end
  414. if ply == LocalPlayer() then
  415. LESPSayDelay = LESPSayDelay + 1
  416. timer.Simple( 2, function() LESPSayDelay = LESPSayDelay - 1 end )
  417. end
  418.  
  419. -- CHAT NOMMERS
  420.  
  421. if LESPReverseChat:GetInt() > 0 and ply ~= LocalPlayer() then
  422. LESPSay( string.reverse( text ) )
  423. end
  424.  
  425. if LESPByteChat:GetInt() > 0 and ply~= LocalPlayer() then
  426. local said = {}
  427. for _, k in pairs( string.ToTable( text ) ) do
  428. table.insert( said, string.byte( k ) )
  429. end
  430. LESPSay( table.concat( said, " " ) )
  431. end
  432.  
  433. if LESPCambChat:GetInt() > 0 and ply ~= LocalPlayer() then
  434. local tosay = ""
  435. for k, v in pairs( string.Explode( " ", text ) ) do
  436. if string.len( v ) > 1 then
  437. local word = string.sub( v, 2, string.len( v ) - 1 )
  438. word = string.ToTable( word )
  439. table.sort( word, function( a, b ) return ( math.random( 0, 1 ) == 0 ) end )
  440. word = table.concat( word, "" )
  441. tosay = tosay .. string.Left( v, 1 ) .. word .. string.Right( v, 1 ) .. " "
  442. else
  443. tosay = tosay .. v .. " "
  444. end
  445. end
  446. LESPSay( string.Left( tosay, string.len( tosay ) - 1 ) )
  447. end
  448. end
  449. hook.Add( "OnPlayerChat", "LESP", LESPVoteChat )
  450.  
  451. local function LESPVoteStartYN( ply, com, args )
  452. if LESPVoteType ~= 0 then
  453. LESPVoteStop()
  454. end
  455. LESPVoteType = 1
  456. LESPSay( "LESP: \"" .. ( args[1] or "VOTE" ) .. "\". Vote with !yes or !no" )
  457. LESPVoteVotes[ "yes" ] = 0
  458. LESPVoteVotes[ "no" ] = 0
  459. timer.Create( "LESPVote", LESPVoteTime:GetInt(), 1, RunConsoleCommand, "lix_lesp_votestop" )
  460. end
  461.  
  462. local function LESPVoteStartOpen( ply, com, args )
  463. if LESPVoteType ~= 0 then
  464. LESPVoteStop()
  465. end
  466. LESPVoteType = 2
  467. LESPSay( "LESP: \"" .. ( args[1] or "VOTE" ) .. "\". Vote with ! then what you want to vote." )
  468. timer.Create( "LESPVote", LESPVoteTime:GetInt(), 1, RunConsoleCommand, "lix_lesp_votestop" )
  469. end
  470.  
  471. local function LESPVoteStop()
  472. if timer.IsTimer( "LESPVote" ) then
  473. timer.Stop( "LESPVote" )
  474. end
  475.  
  476. LESPSay( "Vote Over. Results:" )
  477.  
  478. if LESPVoteType == 1 then
  479. local extra = ""
  480. if LESPVoteVotes[ "yes" ] > LESPVoteVotes[ "no" ] then
  481. extra = "Vote Passed."
  482. elseif LESPVoteVotes[ "yes" ] < LESPVoteVotes[ "no" ] then
  483. extra = "Vote Failed."
  484. elseif LESPVoteVotes[ "yes" ] + LESPVoteVotes[ "no" ] == 0 then
  485. extra = "Nobody Voted."
  486. elseif LESPVoteVotes[ "yes" ] == LESPVoteVotes[ "no" ] then
  487. extra = "Vote Undecided."
  488. else
  489. extra = "LOLWAT GLITCH"
  490. end
  491.  
  492. LESPSay( "+" .. LESPVoteVotes[ "yes" ] .. " -" .. LESPVoteVotes[ "no" ] .. " " .. extra )
  493. end
  494. if LESPVoteType == 2 then
  495. --if #LESPVoteVotes == 0 then
  496. -- LESPSay( "Nobody Voted." )
  497. --end
  498. local bestnum = 0
  499. for k, v in pairs( LESPVoteVotes ) do
  500. if v > bestnum then
  501. bestnum = v
  502. end
  503. end
  504. local best = {}
  505. for k, v in pairs( LESPVoteVotes ) do
  506. if v == bestnum then
  507. table.insert( best, k )
  508. end
  509. end
  510.  
  511. LESPSay( table.concat( best, ", " ) .. " had the most votes with " .. bestnum )
  512. --end
  513. end
  514.  
  515. LESPVoteType = 0
  516. LESPVoteVotes = {}
  517. LESPVoteVoted = {}
  518. end
  519.  
  520. concommand.Add( "lix_lesp_votestartyn", LESPVoteStartYN )
  521. concommand.Add( "lix_lesp_votestartopen", LESPVoteStartOpen )
  522.  
  523. concommand.Add( "lix_lesp_votestop", LESPVoteStop )
  524.  
  525. -- XRAY
  526.  
  527. concommand.Add( "lix_lesp_xraay", function()
  528. if !LESPXRay then
  529. surface.PlaySound("beep_synthtone01.wav") -- Alright, i'll show you where the sounds are.
  530. for _, v in pairs( ents.GetAll() ) do
  531. local r, g, b, a = v:GetColor()
  532. LESPXRayColors[ v:EntIndex() ] = Color( r, g, b, a )
  533. LESPXRayMats[ v:EntIndex() ] = v:GetMaterial()
  534. if v:IsNPC() then
  535. v:SetColor( 0, 0, 255, 255 )
  536. elseif v:IsWeapon() then
  537. v:SetColor( 150, 0, 255, 255 )
  538. elseif string.find( v:GetClass(), "ghost" ) then
  539. v:SetColor( 255, 255, 255, 100 )
  540. elseif v:GetClass() == "drug_lab" or v:GetClass() == "money_printer" then
  541. v:SetColor( 250, 50, 100, 50 )
  542. elseif v:GetClass() == "viewmodel" then
  543. v:SetColor( 50, 50, 250, 50 )
  544. else
  545. v:SetColor( 250, 250, 50, 100 )
  546. end
  547. v:SetMaterial( LESPXRayMat:GetString() )
  548. end
  549. LESPXRay = true
  550. else
  551. for _, v in pairs( ents.GetAll() ) do
  552. local col = LESPXRayColors[ v:EntIndex() ] or Color( 255, 255, 255, 255 )
  553. v:SetMaterial( LESPXRayMats[ v:EntIndex() ] )
  554. v:SetColor( col.r, col.g, col.b, col.a )
  555. LESPXRay = false
  556. end
  557. end
  558. if LESPXRay then
  559. surface.PlaySound("beep_error01.wav") -- When you turn it off, it will play this.
  560. end
  561. end )
  562.  
  563. local function LESPRenderScene()
  564. if LESPXRay == false then return end
  565. for _, v in pairs( ents.FindByClass( "prop_physics" ) ) do
  566. if ValidEntity( v ) then
  567. v:SetColor( 255, 0, 0, 155 )-- <------ Change that color if you like too.
  568. v:SetMaterial( LESPXRayMat:GetString() )
  569. end
  570.  
  571. end
  572. for _, v in pairs( player.GetAll() ) do
  573. if ValidEntity( v ) then
  574. v:SetColor( 255, 250, 0, 255 ) --
  575. v:SetMaterial( LESPXRayMat:GetString() )
  576.  
  577. end
  578. end
  579. end
  580. hook.Add( "RenderScene", "LESP", LESPRenderScene )
  581. -- You didn't put the other player color ? Like, admin and all ? I'll do it
  582.  
  583. -- RANDOM COMMANDS
  584.  
  585. concommand.Add( "lix_lesp_rotate1", function()
  586. LocalPlayer():SetEyeAngles( LocalPlayer():EyeAngles() + Angle( 0, 180, 0 ) )
  587. end )
  588.  
  589. concommand.Add( "lix_lesp_rotate2", function()
  590. LocalPlayer():SetEyeAngles( LocalPlayer():EyeAngles() + Angle( -2 * LocalPlayer():EyeAngles().p, 180, 0 ) )
  591. RunConsoleCommand( "+jump" )
  592. timer.Simple( 0.2, RunConsoleCommand, "-jump" )
  593. end )
  594.  
  595. concommand.Add( "lix_lesp_rotate3", function()
  596. RunConsoleCommand( "gm_spawn", "models/hunter/plates/plate1x1.mdl" )
  597. RunConsoleCommand( "+attack" )
  598. timer.Simple( 0.1, function()
  599. LocalPlayer():SetEyeAngles( LocalPlayer():EyeAngles() + Angle( -2 * LocalPlayer():EyeAngles().p, 180, 0 ) )
  600. RunConsoleCommand( "+jump" )
  601. timer.Simple( 0.1, RunConsoleCommand, "-jump" )
  602. timer.Simple( 0.1, function()
  603. RunConsoleCommand( "gmod_undo" )
  604. RunConsoleCommand( "-attack" )
  605. end )
  606. end )
  607. end )
  608.  
  609. concommand.Add( "lix_lesp_togglecommand", function( ply, com, args )
  610. if !args[1] then print( "No argument specified. Use attack instead of +attack." ) end
  611. if !LESPToggleCommands[ args[1] ] then LESPToggleCommands[ args[1] ] = false end
  612. if !LESPToggleCommands[ args[1] ] then
  613. RunConsoleCommand( "+" .. args[1] )
  614. else
  615. RunConsoleCommand( "-" .. args[1] )
  616. end
  617. LESPToggleCommands[ args[1] ] = !LESPToggleCommands[ args[1] ]
  618. end )
  619.  
  620. -- MENU
  621.  
  622. local LESPMenuFrame
  623. local function LESPMenu()
  624. gui.EnableScreenClicker( true )
  625.  
  626. if !LESPMenuFrame then
  627. LESPMenuFrame = vgui.Create( "DFrame" )
  628. LESPMenuFrame:SetSize( 300, 400 )
  629. LESPMenuFrame:Center()
  630. LESPMenuFrame:ShowCloseButton( false )
  631. LESPMenuFrame:SetDraggable( false )
  632. LESPMenuFrame:SetTitle( "" )
  633. LESPMenuFrame.Paint = function() end
  634.  
  635. local Sheet = vgui.Create( "DPropertySheet", LESPMenuFrame )
  636. Sheet:SetPos( 0, 0 )
  637. Sheet:SetSize( 300, 400 )
  638.  
  639. -- LESP Config
  640.  
  641. local Tab = vgui.Create( "DPanelList" )
  642. Tab:SetSpacing( 5 )
  643. Tab:SetPadding( 5 )
  644.  
  645. local Control = vgui.Create( "DCheckBoxLabel" )
  646. Control:SetText( "Enabled" )
  647. Control:SetConVar( "lix_lesp_on" )
  648. Tab:AddItem( Control )
  649.  
  650. local Control = vgui.Create( "DCheckBoxLabel" )
  651. Control:SetText( "Show Health" )
  652. Control:SetConVar( "lix_lesp_health" )
  653. Tab:AddItem( Control )
  654.  
  655. local Control = vgui.Create( "DCheckBoxLabel" )
  656. Control:SetText( "Show Weapon" )
  657. Control:SetConVar( "lix_lesp_weapon" )
  658. Tab:AddItem( Control )
  659.  
  660. local Control = vgui.Create( "DCheckBoxLabel" )
  661. Control:SetText( "Show Distance" )
  662. Control:SetConVar( "lix_lesp_distance" )
  663. Tab:AddItem( Control )
  664.  
  665. local Control = vgui.Create( "DCheckBoxLabel" )
  666. Control:SetText( "Show Money" )
  667. Control:SetConVar( "lix_lesp_money" )
  668. Tab:AddItem( Control )
  669.  
  670. local Control = vgui.Create( "DCheckBoxLabel" )
  671. Control:SetText( "Show Health" )
  672. Control:SetConVar( "lix_lesp_health" )
  673. Tab:AddItem( Control )
  674.  
  675. local Objects = vgui.Create( "DListView" )
  676. Objects:AddColumn( "Targets" )
  677. Objects:SetSize( 50, 100 )
  678. Objects:SetMultiSelect( false )
  679. function Objects:OnClickLine( line )
  680. line:SetSelected( true )
  681. for k, v in pairs( LESPObjects ) do
  682. if v == line:GetValue( 1 ) then
  683. table.remove( LESPObjects, k )
  684. end
  685. end
  686. RunConsoleCommand( "lix_lesp_objects", table.concat( LESPObjects, "|" ) )
  687. print( Objects:GetSelectedLine() )
  688. Objects:RemoveLine( Objects:GetSelectedLine() )
  689. end
  690. Tab:AddItem( Objects )
  691.  
  692. for _, v in pairs( LESPObjects ) do
  693. if v ~= "" then
  694. Objects:AddLine( v )
  695. end
  696. end
  697.  
  698. local Control = vgui.Create( "DButton" )
  699. Control:SetText( "Add" )
  700. Control.DoClick = function()
  701. Derma_StringRequest( "LESP", "Name of entity to add:", "", function( txt )
  702. table.insert( LESPObjects, txt )
  703. RunConsoleCommand( "lix_lesp_objects", table.concat( LESPObjects, "|" ) )
  704. Objects:AddLine( txt )
  705. end )
  706. end
  707. Tab:AddItem( Control )
  708.  
  709. local Control = vgui.Create( "DButton" )
  710. Control:SetText( "Add Looking at" )
  711. Control.DoClick = function()
  712. if LocalPlayer():GetEyeTrace().Hit and LocalPlayer():GetEyeTrace().Entity:IsValid() then
  713. table.insert( LESPObjects, LocalPlayer():GetEyeTrace().Entity:GetClass() )
  714. RunConsoleCommand( "lix_lesp_objects", table.concat( LESPObjects, "|" ) )
  715. Objects:AddLine( LocalPlayer():GetEyeTrace().Entity:GetClass() )
  716. end
  717. end
  718. Tab:AddItem( Control )
  719.  
  720. local Control = vgui.Create( "DButton" )
  721. Control:SetText( "Remove All" )
  722. Control.DoClick = function()
  723. Derma_Query( "Do you want to remove all Entites?", "LESP",
  724. "Yes", function()
  725. for i, v in pairs( string.Explode( "|", LESPObjects:GetString() ) ) do
  726. Objects:RemoveLine( i )
  727. end
  728. LESPObjects = {}
  729. RunConsoleCommand( "lix_lesp_objects", "" )
  730. end,
  731. "No", function() end )
  732. end
  733. Tab:AddItem( Control )
  734.  
  735. local Control = vgui.Create( "DCheckBoxLabel" )
  736. Control:SetText( "Aimdots" )
  737. Control:SetConVar( "lix_lesp_aimdot" )
  738. Tab:AddItem( Control )
  739.  
  740. local Control = vgui.Create( "DCheckBoxLabel" )
  741. Control:SetText( "Aimdot Filtering" )
  742. Control:SetConVar( "lix_lesp_aimdotfilter" )
  743. Tab:AddItem( Control )
  744.  
  745. Sheet:AddSheet( "LESP", Tab, "gui/silkicons/group", false, false, "LESP Configuration" )
  746.  
  747. -- Mirror Config
  748.  
  749. local Tab = vgui.Create( "DPanelList" )
  750. Tab:SetSpacing( 5 )
  751. Tab:SetPadding( 5 )
  752.  
  753. local Control = vgui.Create( "DCheckBoxLabel" )
  754. Control:SetText( "Mirror Enabled" )
  755. Control:SetConVar( "lix_lesp_mirror" )
  756. Tab:AddItem( Control )
  757.  
  758. local Control = vgui.Create( "DButton" )
  759. Control:SetText( "Enable Mirror Placement" )
  760. Control.DoClick = function()
  761. local PlaceFrame = vgui.Create( "DFrame" )
  762. RunConsoleCommand( "lix_lesp_mirror", 0 )
  763. PlaceFrame:SetSize( LESPMirrorw:GetInt(), LESPMirrorh:GetInt() )
  764. PlaceFrame:SetPos( LESPMirrorx:GetInt(), LESPMirrory:GetInt() )
  765. PlaceFrame:ShowCloseButton( false )
  766. PlaceFrame:SetSizable( true )
  767. PlaceFrame:SetTitle( "Move Da Mirror" )
  768.  
  769. local PlaceButton = vgui.Create( "DButton", PlaceFrame )
  770. PlaceButton:SetSize( 100, 40 )
  771. PlaceButton:SetPos( 5, 30 )
  772. PlaceButton:SetText( "Bitch Muddafuckin Stay Here" )
  773. PlaceButton.DoClick = function()
  774. local x, y = PlaceFrame:GetPos()
  775. local w, h = PlaceFrame:GetSize()
  776. RunConsoleCommand( "lix_lesp_mirrorx", x )
  777. RunConsoleCommand( "lix_lesp_mirrory", y )
  778. RunConsoleCommand( "lix_lesp_mirrorw", w )
  779. RunConsoleCommand( "lix_lesp_mirrorh", h )
  780. RunConsoleCommand( "lix_lesp_mirror", 1 )
  781. PlaceFrame:Close()
  782. end
  783. PlaceButton.Think = function()
  784. local x, y = PlaceFrame:GetPos()
  785. local w, h = PlaceFrame:GetSize()
  786. PlaceButton:SetSize( w - 10, h - 32 )
  787. PlaceButton:SetPos( 5, 27 )
  788. end
  789. end
  790. Tab:AddItem( Control )
  791.  
  792. local Control = vgui.Create( "DNumSlider" )
  793. Control:SetText( "Pitch" )
  794. Control:SetMin( -2 )
  795. Control:SetMax( 359 )
  796. Control:SetDecimals( 0 )
  797. Control:SetConVar( "lix_lesp_mirrorpitch" )
  798. Tab:AddItem( Control )
  799.  
  800. local Control = vgui.Create( "DNumSlider" )
  801. Control:SetText( "Yaw" )
  802. Control:SetMin( -2 )
  803. Control:SetMax( 359 )
  804. Control:SetDecimals( 0 )
  805. Control:SetConVar( "lix_lesp_mirroryaw" )
  806. Tab:AddItem( Control )
  807.  
  808. local Control = vgui.Create( "DNumSlider" )
  809. Control:SetText( "Roll" )
  810. Control:SetMin( -2 )
  811. Control:SetMax( 359 )
  812. Control:SetDecimals( 0 )
  813. Control:SetConVar( "lix_lesp_mirrorroll" )
  814. Tab:AddItem( Control )
  815.  
  816. local Control = vgui.Create( "DLabel" )
  817. Control:SetText( " " )
  818. Tab:AddItem( Control )
  819.  
  820. local Control = vgui.Create( "DCheckBoxLabel" )
  821. Control:SetText( "Radar Enabled" )
  822. Control:SetConVar( "lix_lesp_radar" )
  823. Tab:AddItem( Control )
  824.  
  825. local Control = vgui.Create( "DButton" )
  826. Control:SetText( "Enable Radar Placement" )
  827. Control.DoClick = function()
  828. local PlaceFrame = vgui.Create( "DFrame" )
  829. RunConsoleCommand( "lix_lesp_radar", 0 )
  830. PlaceFrame:SetSize( LESPRadarw:GetInt(), LESPRadarh:GetInt() )
  831. PlaceFrame:SetPos( LESPRadarx:GetInt(), LESPRadary:GetInt() )
  832. PlaceFrame:ShowCloseButton( false )
  833. PlaceFrame:SetSizable( true )
  834. PlaceFrame:SetTitle( "Radar Placement" )
  835.  
  836. local PlaceButton = vgui.Create( "DButton", PlaceFrame )
  837. PlaceButton:SetSize( 100, 40 )
  838. PlaceButton:SetPos( 5, 30 )
  839. PlaceButton:SetText( "CONFIRM" )
  840. PlaceButton.DoClick = function()
  841. local x, y = PlaceFrame:GetPos()
  842. local w, h = PlaceFrame:GetSize()
  843. RunConsoleCommand( "lix_lesp_radarx", x )
  844. RunConsoleCommand( "lix_lesp_radary", y )
  845. RunConsoleCommand( "lix_lesp_radarw", w )
  846. RunConsoleCommand( "lix_lesp_radarh", h )
  847. RunConsoleCommand( "lix_lesp_radar", 1 )
  848. PlaceFrame:Close()
  849. end
  850. PlaceButton.Think = function()
  851. local x, y = PlaceFrame:GetPos()
  852. local w, h = PlaceFrame:GetSize()
  853. PlaceButton:SetSize( w - 10, h - 32 )
  854. PlaceButton:SetPos( 5, 27 )
  855. end
  856. end
  857. Tab:AddItem( Control )
  858.  
  859. local Control = vgui.Create( "DNumSlider" )
  860. Control:SetText( "FOV" )
  861. Control:SetMin( 0 )
  862. Control:SetMax( 3000 )
  863. Control:SetDecimals( 0 )
  864. Control:SetConVar( "lix_lesp_radarfov" )
  865. Tab:AddItem( Control )
  866.  
  867. local Control = vgui.Create( "DCheckBoxLabel" )
  868. Control:SetText( "Auto Adjust" )
  869. Control:SetConVar( "lix_lesp_radarauto" )
  870. Tab:AddItem( Control )
  871.  
  872. Sheet:AddSheet( "Mirror", Tab, "gui/silkicons/magnifier", false, false, "Mirror and Radar Configuration" )
  873.  
  874. -- VOTE
  875.  
  876. local Tab = vgui.Create( "DPanelList" )
  877. Tab:SetSpacing( 5 )
  878. Tab:SetPadding( 5 )
  879.  
  880. local Control = vgui.Create( "DButton" )
  881. Control:SetText( "Start Yes / No Vote" )
  882. Control.DoClick = function()
  883. Derma_StringRequest( "LESP - Yes / No Vote", "Text to dispaly as vote:", "", function( txt )
  884. RunConsoleCommand( "lix_lesp_votestartyn", txt )
  885. end )
  886. end
  887. Tab:AddItem( Control )
  888.  
  889. local Control = vgui.Create( "DButton" )
  890. Control:SetText( "Start Open Vote" )
  891. Control.DoClick = function()
  892. Derma_StringRequest( "LESP - Open Vote", "Text to dispaly as vote:", "", function( txt )
  893. RunConsoleCommand( "lix_lesp_votestartopen", txt )
  894. end )
  895. end
  896. Tab:AddItem( Control )
  897.  
  898. local Control = vgui.Create( "DLabel" )
  899. Control:SetText( " " )
  900. Tab:AddItem( Control )
  901.  
  902. local Control = vgui.Create( "DNumSlider" )
  903. Control:SetText( "Vote Time" )
  904. Control:SetMin( 0 )
  905. Control:SetMax( 300 )
  906. Control:SetDecimals( 0 )
  907. Control:SetConVar( "lix_lesp_votetime" )
  908. Tab:AddItem( Control )
  909.  
  910. local Control = vgui.Create( "DButton" )
  911. Control:SetText( "Stop Vote" )
  912. Control.DoClick = function()
  913. RunConsoleCommand( "lix_lesp_votestop" )
  914. end
  915. Tab:AddItem( Control )
  916.  
  917. Sheet:AddSheet( "Vote", Tab, "gui/silkicons/sound", false, false, "Voting System" )
  918.  
  919. -- HOOKS
  920.  
  921. local Tab = vgui.Create( "DPanelList" )
  922. Tab:SetSpacing( 5 )
  923. Tab:SetPadding( 5 )
  924. Tab:EnableVerticalScrollbar( true )
  925.  
  926. local HooksTable = {}
  927.  
  928. local function CreateHooks()
  929.  
  930. local Var = hook.GetTable()
  931. table.sort( Var, function( a, b ) return a < b end )
  932.  
  933. for HookName, HookFunctions in pairs( Var ) do
  934. HooksTable[ HookName ] = vgui.Create( "DCollapsibleCategory" )
  935. HooksTable[ HookName ]:SetExpanded( 0 )
  936. HooksTable[ HookName ]:SetLabel( HookName )
  937.  
  938. HooksTable[ HookName ].Contents = vgui.Create( "DPanelList" )
  939. HooksTable[ HookName ].Contents:SetAutoSize( true )
  940. HooksTable[ HookName ].Contents:SetSpacing( 5 )
  941. HooksTable[ HookName ].Contents:SetPadding( 5 )
  942. HooksTable[ HookName ].Contents:EnableHorizontal( false )
  943. HooksTable[ HookName ].Contents:EnableVerticalScrollbar( true )
  944.  
  945. HooksTable[ HookName ]:SetContents( HooksTable[ HookName ].Contents )
  946.  
  947. Tab:AddItem( HooksTable[ HookName ] )
  948.  
  949. local Var2 = HookFunctions
  950. table.sort( Var2, function( a, b ) return a < b end )
  951.  
  952. for HookID, HookFunction in pairs( Var2 ) do
  953. HooksTable[ HookName ].Contents[ HookID ] = vgui.Create( "DButton" )
  954. HooksTable[ HookName ].Contents[ HookID ]:SetText( HookID )
  955. HooksTable[ HookName ].Contents[ HookID ].DoClick = function()
  956. local Menu = DermaMenu()
  957. Menu:AddOption( "Call Hook", function() hook.Call( HookName ) end )
  958. Menu:AddOption( "Remove Hook", function() hook.Remove( HookName, HookID ) HooksTable[ HookName ].Contents[ HookID ]:Remove() end )
  959. Menu:Open()
  960. end
  961. HooksTable[ HookName ].Contents:AddItem( HooksTable[ HookName ].Contents[ HookID ] )
  962. end
  963. end
  964. end
  965.  
  966. local Control = vgui.Create( "DButton" )
  967. Control:SetText( "Refresh" )
  968. Control.DoClick = function()
  969. for k, v in pairs( HooksTable ) do
  970. v:Remove()
  971. end
  972. CreateHooks()
  973. end
  974. Tab:AddItem( Control )
  975.  
  976. CreateHooks()
  977.  
  978. Sheet:AddSheet( "Hooks", Tab, "gui/silkicons/anchor", false, false, "Manage active Lua Hooks" )
  979.  
  980. -- OTHER
  981.  
  982. local Tab = vgui.Create( "DPanelList" )
  983. Tab:SetSpacing( 5 )
  984. Tab:SetPadding( 5 )
  985. Tab:EnableVerticalScrollbar( true )
  986.  
  987. local Control = vgui.Create( "DButton" )
  988. Control:SetText( "Light" )
  989. Control.DoClick = function()
  990. RunConsoleCommand( "lix_lesp_light" )
  991. end
  992. Tab:AddItem( Control )
  993.  
  994. local Control = vgui.Create( "DButton" )
  995. Control:SetText( "Aura Light" )
  996. Control.DoClick = function()
  997. RunConsoleCommand( "lix_lesp_aura" )
  998. end
  999. Tab:AddItem( Control )
  1000.  
  1001. local Control = vgui.Create( "DLabel" )
  1002. Control:SetText( " " )
  1003. Tab:AddItem( Control )
  1004.  
  1005. local Control = vgui.Create( "DButton" )
  1006. Control:SetText( "Add Detector" )
  1007. Control.DoClick = function()
  1008. RunConsoleCommand( "lix_lesp_detectadd" )
  1009. end
  1010. Tab:AddItem( Control )
  1011.  
  1012. local Control = vgui.Create( "DButton" )
  1013. Control:SetText( "Remove Detector" )
  1014. Control.DoClick = function()
  1015. RunConsoleCommand( "lix_lesp_detectremove" )
  1016. end
  1017. Tab:AddItem( Control )
  1018.  
  1019. local Control = vgui.Create( "DNumSlider" )
  1020. Control:SetText( "Detector Threshold" )
  1021. Control:SetMin( 0 )
  1022. Control:SetMax( 2000 )
  1023. Control:SetDecimals( 0 )
  1024. Control:SetConVar( "lix_lesp_detectthresh" )
  1025. Tab:AddItem( Control )
  1026.  
  1027. local Control = vgui.Create( "DCheckBoxLabel" )
  1028. Control:SetText( "Show Detectors" )
  1029. Control:SetConVar( "lix_lesp_detectshow" )
  1030. Tab:AddItem( Control )
  1031.  
  1032. local Control = vgui.Create( "DCheckBoxLabel" )
  1033. Control:SetText( "Show Thresholds" )
  1034. Control:SetConVar( "lix_lesp_detectshowrad" )
  1035. Tab:AddItem( Control )
  1036.  
  1037. local Control = vgui.Create( "DCheckBoxLabel" )
  1038. Control:SetText( "Trace Detection" )
  1039. Control:SetConVar( "lix_lesp_detecttrace" )
  1040. Tab:AddItem( Control )
  1041.  
  1042. local Control = vgui.Create( "DLabel" )
  1043. Control:SetText( " " )
  1044. Tab:AddItem( Control )
  1045.  
  1046. local Control = vgui.Create( "DCheckBoxLabel" )
  1047. Control:SetText( "Reverse Chat" )
  1048. Control:SetConVar( "lix_lesp_chatreverse" )
  1049. Tab:AddItem( Control )
  1050.  
  1051. local Control = vgui.Create( "DCheckBoxLabel" )
  1052. Control:SetText( "Cambridge Chat" )
  1053. Control:SetConVar( "lix_lesp_chatcambridge" )
  1054. Tab:AddItem( Control )
  1055.  
  1056. local Control = vgui.Create( "DLabel" )
  1057. Control:SetText( " " )
  1058. Tab:AddItem( Control )
  1059.  
  1060. local Control = vgui.Create( "DButton" )
  1061. Control:SetText( "Reload Scripts" )
  1062. Control.DoClick = function()
  1063. if LESPMenuFrame then
  1064. LESPMenuFrame:Close()
  1065. gui.EnableScreenClicker( false )
  1066. end
  1067. include( "autorun/client/LESP.lua" )
  1068. end
  1069. Tab:AddItem( Control )
  1070.  
  1071. Sheet:AddSheet( "Misc", Tab, "gui/silkicons/plugin", false, false, "Other Settings" )
  1072. else
  1073. LESPMenuFrame:SetVisible( true )
  1074. end
  1075. end
  1076.  
  1077. local function LESPMenuOff()
  1078. if LESPMenuFrame then
  1079. LESPMenuFrame:SetVisible( false )
  1080. gui.EnableScreenClicker( false )
  1081. end
  1082. end
  1083.  
  1084. concommand.Add( "+lix_lesp_menu", LESPMenu )
  1085. concommand.Add( "-lix_lesp_menu", LESPMenuOff )
  1086.  
  1087. concommand.Add( "lix_lesp_reload", function() include( "autorun/client/LESP.lua" ) end )
Add Comment
Please, Sign In to add comment