Guest User

functiondump.lua

a guest
Jun 1st, 2014
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.44 KB | None | 0 0
  1. local AntiCheat = false
  2. for k,v in pairs(net.Receivers) do
  3.     if string.find(string.lower(debug.getinfo(v).short_src),string.char(108,101,121)) then
  4.         print(tostring(k),tostring(debug.getinfo(v).short_src))
  5.         AntiCheat = true
  6.     end
  7. end
  8.  
  9. if AntiCheat == true then
  10.     RunConsoleCommand("disconnect")
  11.     print("An Anticheat has been detected, Connect to a different server!")
  12.     return
  13. end
  14.  
  15.  
  16. local GG = {}
  17.  
  18. local b = table
  19. GG.Use_print_func = GG.Use_print_func or function() end
  20.  
  21. if debug.getinfo(print).short_src == "[C]" then
  22.     GG.Use_print_func = _G.print
  23. elseif debug.getinfo(Msg).short_src == "[C]" then
  24.     GG.Use_print_func = _G.Msg
  25. elseif debug.getinfo(MsgN).short_src == "[C]" then
  26.     GG.Use_print_func = _G.MsgN
  27. elseif debug.getinfo(chat.AddText).short_src == "[C]" then
  28.     GG.Use_print_func = _G.chat.AddText
  29. end
  30.  
  31. GG.Use_print_func("-----------------------")
  32. GG.Use_print_func("-[Good Game] -Starting-")
  33. GG.Use_print_func("-----------------------")
  34.  
  35.  
  36. GG.Plugin_Name = "Plugin Loaded"
  37.  
  38. GG.Use_print_func("[Good Game] - " .. GG.Plugin_Name.. " GG Table Init")
  39. local dasl = _G.FindMetaTable
  40. GG.WP = {}
  41. GG.WP['Aimbot'] = true
  42. GG.WP['Big_Aimbot'] = false
  43. GG.WP.StoreTarg = {}
  44.  
  45. GG.Use_print_func("[Good Game] - " .. GG.Plugin_Name.. " Well Played Loaded")
  46.  
  47. local t = b.Copy(dasl("Player"))
  48.  
  49. GG.ply = FindMetaTable("Player")
  50. function GG.ply:EyeVisible(ent)
  51.     if (!IsValid(ent)) then return end
  52.     local trace = {start = self:LocalToWorld(self:OBBCenter()), endpos = ent:LocalToWorld(ent:OBBCenter()), filter = {self, ent}, mask = 1174421507};
  53.     local tr = util.TraceLine(trace);
  54.     return (tr.Fraction == 1);
  55. end
  56.  
  57. GG.Targ = function()
  58.    
  59.     if GG.WP['Big_Aimbot'] == true then
  60.         for k,v in pairs(player.GetAll()) do
  61.             if v ~= LocalPlayer() then
  62.                 table.insert(GG.WP.StoreTarg, v)
  63.             end
  64.         end
  65.        
  66.         local targ = LocalPlayer():GetEyeTrace().Entity
  67.        
  68.         if targ and !targ:IsPlayer() then return end
  69.        
  70.         return targ
  71.     end
  72.    
  73.     if GG.WP['Big_Aimbot'] == false then
  74.  
  75.         if #GG.WP.StoreTarg > #player.GetAll() - 1 then GG.WP.StoreTarg = {} end
  76.        
  77.         for k,v in pairs(player.GetAll()) do
  78.             if v ~= LocalPlayer() and LocalPlayer():EyeVisible(v) and v:Health() > 0 then
  79.                 table.insert(GG.WP.StoreTarg, v)
  80.             end
  81.         end
  82.        
  83.         return table.Random(GG.WP.StoreTarg)
  84.        
  85.     end
  86.    
  87.    
  88. end
  89. local d = b.Copy(dasl("Entity"))
  90.  
  91. GG.Rand = function(tbl)
  92.     return tbl[math.random(1,#tbl)]
  93. end
  94.  
  95. GG.Timer = 0
  96.  
  97. local target = NULL
  98.  
  99. GG.ChooseBonesHead = "ValveBiped.Bip01_Head1"
  100. GG.ChooseBonesNeck = "ValveBiped.Bip01_Neck1"
  101. GG.ChooseBonesSpine = "ValveBiped.Bip01_Spine"
  102.  
  103. GG.ChooseBonesAll = "ValveBiped.Bip01_Spine","ValveBiped.Bip01_Neck1"
  104.  
  105. GG.ChooseBones = {GG.ChooseBonesHead}
  106.  
  107. GG.RunFunc = function()
  108.     local wep = LocalPlayer():GetActiveWeapon()
  109.     if IsValid(wep) then
  110.         if not string.find(string.lower(wep:GetClass()),"weapon_") then return end
  111.     end
  112.     if IsValid(wep) and wep:Clip1() <= 0 then
  113.         LocalPlayer():ConCommand("+reload")
  114.         timer.Simple(0.2, function() LocalPlayer():ConCommand("-reload") end)
  115.     end
  116.     if LocalPlayer():KeyDown(IN_SPEED) and GG.WP['Aimbot'] == true and GG.WP['Big_Aimbot'] == true then
  117.         target = GG.Targ()
  118.     end
  119.     if LocalPlayer():KeyDown(IN_ATTACK) and GG.WP['Aimbot'] == true then
  120.         if GG.WP['Big_Aimbot'] == false then
  121.             target = GG.Targ()
  122.         end
  123.         if target ~= nil and target ~= NULL and target:Health() > 0 then
  124.             local targethead = target:LookupBone(GG.Rand(GG.ChooseBones))
  125.             if targethead ~= nil then
  126.                 local targetheadpos,targetheadang = target:GetBonePosition(targethead)
  127.                 if LocalPlayer():EyeVisible(target) and target:IsPlayer() then
  128.                     if IsValid(wep) and wep.Primary ~= nil then
  129.                         wep.Primary.Recoil = 0
  130.                         wep.Primary.Cone = 0
  131.                     end
  132.                     t:SetEyeAngles((targetheadpos - LocalPlayer():GetShootPos()):Angle())
  133.                 end
  134.             end    
  135.         end
  136.     end
  137. end
  138.  
  139. GG.BypassScreen = false
  140.  
  141. GG.CustomTimer = function()
  142.     GG.RunFunc()
  143.     timer.Simple(0.0001, function() GG.CustomTimer() end)
  144. end
  145. GG.CustomTimer()
  146.  
  147.  
  148.  
  149. if GG.BypassScreen == false then
  150.     halo.Add( ents.FindByClass( "player" ), Color( 255, 0, 0 ), 2, 2, 2, true, true )
  151.     halo.Add( ents.FindByClass( "weapon" ), Color( 255, 0, 0 ), 5, 5, 2, true, true  )
  152. end
  153.    
  154. if debug.getinfo(render.Capture).short_src == "[C]" then
  155.  
  156. if _G == nil then _G = {} end
  157.  
  158. GG.OldScr = _G.render.Capture
  159.  
  160. function _G.render.Capture( tbl )
  161.     timer.Simple(2, function() LocalPlayer():ChatPrint("Screenshotted but we've bypassed it") end)
  162.     GG.BypassScreen = true
  163.     timer.Simple(10, function() GG.BypassScreen = false end)
  164.     return GG.OldScr( tbl )
  165. end
  166.    
  167. end
  168.  
  169. GG.Use_print_func("[Good Game] - " .. GG.Plugin_Name.. " Custom Timer Created")
  170.  
  171. /*function GAMEMODE:CalcView( ply, pos, ang, fov )
  172.     local view = {}
  173.  
  174.     view.origin = pos-( ang:Forward()*120 )
  175.     view.angles = ang - Angle(0,0,0)
  176.     view.fov = 40
  177.  
  178.     return view
  179. end
  180.  
  181. function GAMEMODE:ShouldDrawLocalPlayer()
  182.     return true
  183. end*/
  184.  
  185. GG.Use_print_func("[Good Game] - " .. GG.Plugin_Name.. " CalcView Created")
  186.  
  187. GG.Use_print_func("-----------------")
  188. GG.Use_print_func("[Good Game] -End-")
  189. GG.Use_print_func("-----------------")
  190.  
  191. GG.Url = "https://dl.dropboxusercontent.com/u/17743302/update.txt"
  192. GG.Version = 0.8
  193. http.Fetch(GG.Url, function(c)
  194. local ver = string.Explode(" ",c)
  195.  
  196. if GG.Version != tonumber(ver[1]) then
  197.     _G.print("Your version is out of date download newest here.. "..tostring(ver[2]))
  198.     else
  199.     _G.print("Your version is up to date")
  200. end
  201.  
  202. end, function(err) _G.print(err) end)
Advertisement
Add Comment
Please, Sign In to add comment