Don't like ads? PRO users don't see any ads ;-)
Guest

hax

By: a guest on May 16th, 2012  |  syntax: Lua  |  size: 9.57 KB  |  hits: 46  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. hook.Add('HUDPaint', 'retaded_esp', function()
  2.             for k, v in pairs(ents.GetAll()) do
  3.                     if v:IsPlayer() then
  4.                             if v:Alive() and v:GetPos() != Vector(0, 0, 0) then
  5.                                     local pos1 = v:GetPos() + Vector(0, 0, 64);
  6.                                     local pos2 = (pos1 + Vector(0, 0, 10)):ToScreen();
  7.                                     local trace = {}
  8.                                     trace.start = OurPos
  9.                                     trace.endpos = pos1
  10.                                     trace.filter = {LocalPlayer(), v};
  11.                                     local tr = util.TraceLine( trace )            
  12.                                     if v:IsAdmin() then
  13.                                             draw.SimpleText(v:Nick(), 'Trebuchet18', pos2.x, pos2.y, Color(255, 0, 0,255), 1, 1, 1)
  14.                                                                                         draw.SimpleText("HP: "..v:Health(), 'Trebuchet18', pos2.x, pos2.y + 9, Color(255, 0, 0,255), 1, 1, 1)
  15.                                                                                         draw.SimpleText((math.Round(LocalPlayer():GetPos():Distance(v:GetPos())/39.37).." m"), 'Trebuchet18', pos2.x, pos2.y + 18, Color(255, 0, 0,255), 1, 1, 1)
  16.                                     elseif v:IsUserGroup("operator") then
  17.                                                                                         draw.SimpleText(v:Nick(), 'Trebuchet18', pos2.x, pos2.y, Color(175, 175, 0,255), 1, 1, 1)
  18.                                                                                         draw.SimpleText("HP: "..v:Health(), 'Trebuchet18', pos2.x, pos2.y + 9, Color(175, 175, 0,255), 1, 1, 1)
  19.                                                                                         draw.SimpleText((math.Round(LocalPlayer():GetPos():Distance(v:GetPos())/39.37).." m"), 'Trebuchet18', pos2.x, pos2.y + 18, Color(175, 175, 0,255), 1, 1, 1)
  20.                                                                         else
  21.                                             draw.SimpleText(v:Nick(), 'Trebuchet18', pos2.x, pos2.y, Color(0, 255, 0,255), 1, 1, 1)
  22.                                                                                         draw.SimpleText("HP: "..v:Health(), 'Trebuchet18', pos2.x, pos2.y + 9, Color(0, 255, 0,255), 1, 1, 1)
  23.                                                                                         draw.SimpleText((math.Round(LocalPlayer():GetPos():Distance(v:GetPos())/39.37).." m"), 'Trebuchet18', pos2.x, pos2.y + 18, Color(0, 255, 0,255), 1, 1, 1)
  24.                                     end
  25.                             end
  26.                     end
  27.                     if v:GetClass() == "aura_cash" then
  28.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  29.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  30.                             draw.SimpleText("Cash", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  31.                     end
  32.                     if v:GetClass() == "aura_item" then
  33.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  34.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  35.                                                         draw.SimpleText(v:GetModel(), 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  36.                                                         //local Sep = string.Explode("/", v:GetModel)
  37.                                                         //for k2,v2 in pairs (Sep) do
  38.                                                                 //if (v2 == "weapon" or v2 == "weapons") then
  39.                                                                         //draw.SimpleText("Weapon", 'Trebuchet18', pos2.x, pos2.y, Color(255, 0, 0,255), 1, 1, 1)
  40.                                                                 //else
  41.                                                                         //draw.SimpleText(v:GetModel(), 'Trebuchet18', pos2.x, pos2.y, Color(255, 0, 0,255), 1, 1, 1)
  42.                                                                 //end
  43.                                                         //end
  44.                                                        
  45.                     end
  46.                     if v:GetClass() == "aura_rationprinter" then
  47.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  48.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  49.                             draw.SimpleText("Money Printer", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  50.                     end
  51.                     if v:GetClass() == "aura_belongings" then
  52.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  53.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  54.                             draw.SimpleText("Belongings", 'Trebuchet18', pos2.x, pos2.y, Color(255, 0, 0,255), 1, 1, 1)
  55.                     end
  56.                     if v:GetClass() == "aura_rationproducer" then
  57.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  58.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  59.                             draw.SimpleText("Money Printer", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  60.                     end
  61.                     if v:GetClass() == "aura_shipment" then
  62.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  63.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  64.                             draw.SimpleText("Item Shipment", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  65.                     end
  66.                     if v:GetClass() == "aura_salesman" then
  67.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  68.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  69.                             draw.SimpleText("Salesman", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  70.                     end
  71.                     if v:GetClass() == "aura_propguarder" then
  72.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  73.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  74.                             draw.SimpleText("Prop Guarder", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  75.                     end
  76.                     if v:GetClass() == "aura_doorguarder" then
  77.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  78.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  79.                             draw.SimpleText("Door Guarder", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  80.                     end
  81.                     if v:GetClass() == "aura_rationguarder" then
  82.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  83.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  84.                             draw.SimpleText("Ration Guarder", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  85.                     end
  86.                     if v:GetClass() == "aura_safebox" then
  87.                             local pos1 = v:GetPos() + Vector(0, 0, 0);
  88.                             local pos2 = (pos1 + Vector(0, 0, 5)):ToScreen();
  89.                             draw.SimpleText("Safebox", 'Trebuchet18', pos2.x, pos2.y, Color(0, 0, 255,255), 1, 1, 1)
  90.                     end
  91.             end
  92.     end)
  93.  
  94. local On = false
  95. local Glow
  96. function Night( on )
  97.  
  98.         function think()
  99.                 for k,v in pairs(ents.GetAll()) do
  100.                         local sep = string.Explode("_",v:GetClass())
  101.                         if sep[1] == "npc" or v:GetClass() == "player" then
  102.                                 if Glow then
  103.                                 v:SetMaterial("models/weapons/v_slam/new light1") end
  104.                         end
  105.                         if (sep[1] == "npc" or v:GetClass() == "player") and !on then
  106.                                 v:SetMaterial("") end
  107.                         end
  108.                 end
  109.         hook.Add("Think","ehyuj",think)
  110.         local mul
  111.         if on then mul = 1 On = true else mul = 0 On = false end
  112.         if on then
  113.         surface.PlaySound( "items/nvg_on.wav" ) else
  114.         surface.PlaySound( "items/nvg_off.wav" ) end
  115.        
  116. function Think()
  117. local ply = LocalPlayer()
  118. if ply:Crouching() then plyht = 32 else plyht = 64 end
  119. local dlight = DynamicLight( ply:EntIndex() )
  120. if ( dlight ) then
  121. dlight.Pos = ply:GetPos()+Vector( 0,0,plyht )
  122. dlight.r = 0
  123. dlight.g = 1 * mul
  124. dlight.b = 0
  125. dlight.Brightness = 0.01
  126. dlight.Size = 10000
  127. dlight.Decay = 5
  128. dlight.DieTime = CurTime() + 1
  129. end
  130. end
  131. hook.Add( "Think", "Think", Think )
  132.  
  133.  
  134. local function ArghItBurns()
  135. DrawBloom( 0, 1, 2, 2, 2, 3, 5*mul, 5*mul, 5*mul )
  136. end
  137. hook.Add( "RenderScreenspaceEffects", "NoMoreEyesForYou!", ArghItBurns )
  138.  
  139. local function PUMPPPTEST()
  140.  
  141. local tab = {}
  142. tab[ "$pp_colour_addr" ] = 0
  143. tab[ "$pp_colour_addg" ] = 0
  144. tab[ "$pp_colour_addb" ] = 0
  145. tab[ "$pp_colour_brightness" ] = 0.005*mul
  146. tab[ "$pp_colour_contrast" ] = 1
  147. tab[ "$pp_colour_colour" ] = 1
  148. tab[ "$pp_colour_mulr" ] = 0
  149. tab[ "$pp_colour_mulg" ] = 0
  150. tab[ "$pp_colour_mulb" ] = 0
  151.  
  152. DrawColorModify( tab )
  153. end
  154. hook.Add( "RenderScreenspaceEffects", "RenderColorModifyPOO", PUMPPPTEST )
  155. end
  156.  
  157. function TogNight()
  158.         if On == true then On = false
  159.         elseif On == false then On = true end
  160.         Night( On )
  161. end
  162. concommand.Add( "nightvision", TogNight )
  163.  
  164. local GoodWeps = {
  165. "hands",
  166. "weapon_zipties",
  167. "aura_hands",
  168. "aura_keys",
  169. "weapon_physgun",
  170. "weapon_physcannon",
  171. "aura_flashlight"
  172. };
  173.  
  174. local SpecWeps = {
  175. "gmod_tool"
  176. };
  177.  
  178. function ESPWeapons()
  179. for k, v in pairs( player.GetAll() ) do
  180. if( v == LocalPlayer() ) then return; end
  181. local pos = v:EyePos():ToScreen();
  182. local runy = pos.y;
  183. for _, n in pairs( v:GetWeapons() ) do
  184. if( table.HasValue( GoodWeps, n:GetClass() ) ) then continue; end
  185. wepCol = Color( 255, 255, 255, 255 );
  186. if( n == v:GetActiveWeapon() ) then
  187. wepCol = Color( 255, 0, 0, 255 );
  188. end
  189. if( table.HasValue( SpecWeps, n:GetClass() ) ) then
  190. wepCol = Color( 128, 128, 128, 255 );
  191. end
  192. local toPrint = "(" .. n:GetClass() .. ")";
  193. if( n.PrintName ) then
  194. toPrint = n.PrintName;
  195. end
  196. draw.DrawText( toPrint, "ChatFont", pos.x+5, runy, wepCol );
  197. runy = runy + 12;
  198. end
  199. end
  200. end
  201. hook.Add( "HUDPaint", "ESPWeapons", ESPWeapons );