Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Made by Dark, Many thanks to Gravko for the help!
- -- Deligit hooking system and optimiziation of esp and xray a great help-
- print [[______ _ _____ _ _ _ _ __
- | _ \ | | / __ (_) | | (_) | | \ \
- | | | |__ _ _ __| | _| / \/_ __| | ___ ___ ___ ___ _ __ _ _ __ | |_ ___ (_) |
- | | | / _` | '__| |/ / | | |/ _` |/ _ \/ __| / __|/ __| '__| | '_ \| __/ __| | |
- | |/ / (_| | | | <| \__/\ | (_| | __/\__ \ \__ \ (__| | | | |_) | |_\__ \ _| |
- |___/ \__,_|_| |_|\_\\____/_|\__,_|\___||___/ |___/\___|_| |_| .__/ \__|___/ (_) |
- | | /_/
- |_|
- ---------------------------------
- -----LIST OF CONSOLE COMMANDS----
- ---------------------------------
- dark_menu -- Opens the menu
- dark_xray -- toggles the general xray
- dark_entity -- toggles the Entity finder/esp (printers,money,weapons)
- dark_180 -- Do a 180 flip
- darkbhop -- Toggles bunny hop
- dark_chat-- Toggles the autospam default message is (ooc) Dark is cool!
- dark_music -- Toggles a hl2 song
- dark_adminalert -- Toggles the admin alert
- darkide_adminalert_distance -- Admin alert distance
- dark_chatspam - Toggle the chatspam on and off default message is "default message"
- dark_chatspam_msg -- You can change the chatspam message via the menu press enter on the chatspam input or do dark_chatspam yourmessagehere
- dark_flashspam -- Toggles the Flashlight spammer!
- dark_rainbow - Toggles the rainbow physgun, It is clientside only so YOU only see this!
- dark_unload -- Unloads the script! (Exits the script May be buggy)
- ]]
- if dark then
- rawset(_G, "dark", nil)
- end
- local dark = {} // make local table
- dark.g = table.Copy(_G); // copy _G
- function dark.Copy(t, lookup_table)
- if (t == nil) then return nil end
- local copy = {}
- setmetatable(copy, getmetatable(t))
- for i,v in pairs(t) do
- if ( !istable(v) ) then
- copy[i] = v
- else
- lookup_table = lookup_table or {}
- lookup_table[t] = copy
- if lookup_table[v] then
- copy[i] = lookup_table[v]
- else
- copy[i] = dark.Copy(v,lookup_table) --
- end
- end
- end
- return copy
- end
- dark.new_gm_hooks = {};
- dark.gm_hooks = {};
- dark.old_gm_hooks = {};
- dark.OrigFuncs = {};
- dark.FakeFuncs = {};
- dark.CmdHooks = {};
- dark.Plys = {} // table for valid players
- dark.me = dark.g.LocalPlayer()
- dark.gm = table.Copy(GAMEMODE)
- dark.cm = dark.Copy(dark.g.FindMetaTable("CUserCmd")) // we need these
- dark.am = dark.Copy(dark.g.FindMetaTable("Angle")) // we need these
- dark.vm = dark.Copy(dark.g.FindMetaTable("Vector")) // we need these
- dark.wm = dark.Copy(dark.g.FindMetaTable("Weapon")) // we need these
- dark.em = dark.Copy(dark.g.FindMetaTable("Entity")) // we need these
- dark.pm = dark.Copy(dark.g.FindMetaTable("Player")) // we need these
- dark.r = dark.Copy(dark.g.debug.getregistry()) // we need these
- dark.ConCMD = dark.Copy(concommand)
- dark.odbginf = debug.getinfo;
- dark.ogmt = getmetatable;
- dark.shouldbhop = CreateClientConVar("darkbhop", "0", true, true)
- dark.xrei = CreateClientConVar("dark_xray", 0, false, false)
- dark.adminwarning = CreateClientConVar("dark_adminalert", "1", true, false)
- dark.espon = CreateClientConVar("dark_esp", "1", false, false)
- dark.g.surface.CreateFont(
- "darkhud", {
- font = "Trebuchet24",
- size = 14,
- weight = 50,
- }
- )
- function dark.DetourFunc(func, newfunc) // luv from deligit to my nigga Function <3
- dark.g.table.insert(dark.OrigFuncs, func);
- dark.g.table.insert(dark.FakeFuncs, newfunc);
- end
- function dark.CopyTable(t, lookup_table)
- if (t == nil) then return nil end
- local copy = {}
- setmetatable(copy, getmetatable(t))
- for i,v in dark.g.pairs(t) do
- if ( !istable(v) ) then
- copy[i] = v
- else
- lookup_table = lookup_table or {}
- lookup_table[t] = copy
- if lookup_table[v] then
- copy[i] = lookup_table[v]
- else
- copy[i] = dark.CopyTable(v,lookup_table) --
- end
- end
- end
- return copy
- end
- setmetatable(_G, {
- ['__index'] = function(self, k)
- if k == "dark" then
- return dark;
- end
- end,
- ['__newindex'] = function(self, k, v)
- dark.g.rawset(self, k, v);
- if k == "GAMEMODE" then
- for k,v in dark.g.pairs(GAMEMODE) do
- dark.old_gm_hooks[k] = v;
- end
- local GMTbl = GAMEMODE;
- if !(getmetatable(GMTbl)) then
- setmetatable(GMTbl, {
- ['__newindex'] = function(self, k, v)
- dark.old_gm_hooks[k] = v;
- end,
- ['__call'] = function(self, k, id, v)
- if (not dark.gm_hooks[k]) then dark.gm_hooks[k] = {}; end
- dark.gm_hooks[k][id] = v
- if (not dark.new_gm_hooks[k]) then
- dark.new_gm_hooks[k] = function(GM, ...)
- if (dark.old_gm_hooks[k]) then
- dark.old_gm_hooks[k](GM, ...);
- end
- for k,v in dark.g.pairs(dark.gm_hooks[k]) do
- v(...);
- end
- end
- dark.DetourFunc(dark.old_gm_hooks[k], dark.new_gm_hooks[k]);
- end
- dark.g.rawset(self, k, dark.new_gm_hooks[k]);
- end,
- ['__index'] = function(self, k)
- local returnval = dark.old_gm_hooks[k] or rawget(self, k);
- return returnval
- end,
- });
- end
- end
- end,
- });
- function dark.Hook(typ, func)
- if dark.gm[typ] and GAMEMODE[typ] then
- GAMEMODE[typ] = function(...)
- dark.gm[typ](...)
- func(...)
- end
- end
- end
- local ndbginf = function(func, ...)
- local args = {...};
- local targ = func;
- local arg = args[1] or false;
- for i, fakefunc in dark.g.pairs(dark.FakeFuncs) do
- if (func == fakefunc) then
- targ = dark.OrigFuncs[i];
- break;
- end
- end
- local tbl = arg and dark.odbginf(targ, arg) or dark.odbginf(targ);
- if (tbl.func) then tbl.func = func; end
- return(tbl)
- end
- local ngmt = function(tbl, ...)
- if (dark.gdebug.traceback() and (tbl == _G or tbl == GAMEMODE)) then return nil; end
- return dark.ogmt(tbl, ...);
- end
- dark.DetourFunc(debug.getinfo, ndbginf);
- debug.getinfo = ndbginf;
- function dark.GetPlys() // faster than calling player.GetAll all the time
- dark.Plys = {}
- local humans = dark.g.player.GetAll()
- for i = 1, #humans do
- local v = humans[i]
- if (!IsValid(v) || v == dark.me || !v:Alive() || v:Health() < 1) then continue end
- dark.Plys[i] = v
- end
- dark.g.timer.Simple(2, dark.GetPlys) // better than using hooks
- end
- dark.GetPlys()
- dark.Hook("DrawOverlay", function(ucmd)
- local humans = dark.g.player.GetAll()
- if dark.espon:GetBool() then
- for k,v in next, humans do
- if (!IsValid(v) || v == dark.me || !v:Alive() || v:Health() < 1 || v:Name() == nil) then continue end
- local c = v:LocalToWorld( v:OBBCenter() ):ToScreen()
- -- dark.g.draw.SimpleTextOutlined( v:Name(), "darkhud", c.x, c.y + 20, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- -- dark.g.draw.SimpleTextOutlined( v:Health(), "darkhud", c.x, c.y - 10, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- -- dark.g.draw.SimpleTextOutlined( team.GetName( v:Team()), "darkhud", c.x, c.y, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- -- dark.g.draw.SimpleTextOutlined( v:GetUserGroup(), "darkhud", c.x, c.y + 10, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- -- dark.g.draw.SimpleTextOutlined( dark.g.math.Round( v:GetPos():Distance(LocalPlayer():GetPos())), "darkhud", c.x, c.y - 20, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0))
- dark.g.draw.RoundedBox( 4, c.x - 10 , c.y - 65, 20, 5, (team.GetColor( v:Team() )))
- dark.g.draw.SimpleTextOutlined( dark.g.math.Round( v:GetPos():Distance(LocalPlayer():GetPos())), "darkhud", c.x , c.y - 55, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color( 9, 94 , 0))
- dark.g.draw.SimpleTextOutlined( v:Health(), "darkhud", c.x , c.y - 45, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color( 9, 94 , 0 ))
- dark.g.draw.SimpleTextOutlined( v:GetUserGroup(), "darkhud", c.x , c.y - 35, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color( 9, 94 , 0 ))
- dark.g.draw.SimpleTextOutlined( v:Name(), "darkhud", c.x , c.y - 25, Color( 255, 255, 255, 255 ), TEXT_ALIGN_CENTER, TEXT_ALIGN_CENTER, 1, Color( 9, 94 , 0 ))
- end
- end
- end)
- -------------- ESP POSISTIONING ON THIS VERSION IS SCREWED UP DONT UPLOAD WITH THIS ACTIVE UNTIL THE ESP IS FULLY FIXED ALSO EXPERIMENTAL METHODS OF DOING THINGS ARE HERE MUST DO SURVEYS/OPINIONS BEFORE USING THIS VERSION!
- ---dark.Hook("DrawOverlay", function(ucmd)
- --- local humans = dark.g.player.GetAll()
- ---- for k,v in next, humans do
- ---- if (!IsValid(v) || v == dark.me || !v:Alive() || v:Health() < 1 || v:Name() == nil) then continue end
- ----- local c = v:LocalToWorld( v:OBBCenter() ):ToScreen()
- -------------- ESP POSISTIONING ON THIS VERSION IS SCREWED UP DONT UPLOAD UNTIL THE ESP IS FULLY FIXED ALSO EXPERIMENTAL METHODS OF DOING THINGS ARE HERE MUST DO SURVEYS/OPINIONS BEFORE USING THIS VERSION!
- --- dark.g.draw.RoundedBox( 6, c.x - 26, c.y - 100, 50, 70, Color( 255, 255, 255, 100 ) ) --- need to get peoples opinions before i can use this
- ----dark.g.draw.SimpleTextOutlined( dark.g.math.Round( v:GetPos():Distance(LocalPlayer():GetPos())), "darkhud", c.x - 20, c.y - 90, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0))
- ---dark.g.draw.WordBox( 8, c.x - 26, c.y - 100, v:Health(), "darkhud", team.GetColor( v:Team() ), Color(255,255,255,255) ) -- maybe good idea??????????????????? wordboxes look good but are big and cant make any smaller,.,
- ----dark.g.draw.WordBox( 8, c.x - 26, c.y - 100, ( team.GetName( v:Team())), "darkhud", team.GetColor( v:Team() ), Color(255,255,255,255) )
- ---- dark.g.draw.SimpleTextOutlined( team.GetName( v:Team()), "darkhud", c.x - 20 , c.y - 80 , team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- ----- dark.g.draw.SimpleTextOutlined( v:Health(), "darkhud", c.x - 20, c.y - 70, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- ---- dark.g.draw.SimpleTextOutlined( v:GetUserGroup(), "darkhud", c.x - 20, c.y - 60, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- ---- dark.g.draw.SimpleTextOutlined( v:Name(), "darkhud", c.x - 20, c.y - 50, team.GetColor( v:Team() ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- ---- end
- ---- end)
- dark.Hook("CreateMove", function(data, ucmd)
- if (ucmd:KeyDown(2) && !dark.me:IsOnGround() && dark.shouldbhop:GetBool()) then
- ucmd:SetButtons( bit.band( ucmd:GetButtons(), bit.bnot(2) ) );
- end
- end)
- local pm = FindMetaTable("Player");
- local ogethands = dark.pm.GetHands; -- Note: Only for c_ viewmodels
- function pm.GetHands(...)
- return false && ogethands(...);
- end
- function dark.AdminAlert()
- if dark.adminwarning:GetBool() then
- for k,v in next, dark.Plys do
- local amdminipos = v:LocalToWorld(v:OBBCenter()):ToScreen()
- local admindist = dark.g.math.floor((LocalPlayer():GetPos():Distance( v:GetPos()))/40)
- if v:GetUserGroup() != "user" and v != LocalPlayer() then
- dark.g.draw.DrawText( "An admin is nearby!", "DermaLarge", ScrW() * 0.5, ScrH() * 0.7, Color( 255, 0, 0, 255 ), TEXT_ALIGN_CENTER )
- dark.g.surface.PlaySound ("vo/trainyard/female01/cit_bench01.wav")
- dark.g.surface.SetDrawColor(255,0,0)
- dark.g.surface.DrawLine(ScrW() * .5, ScrH() * .5, amdminipos.x, amdminipos.y)
- end
- end
- end
- end
- local chamsmat = dark.g.CreateMaterial("z", "VertexLitGeneric", {
- ["$ignorez"] = 1,
- ["$model"] = 1,
- ["$basetexture"] = "models/debug/debugwhite",
- });
- local chamsmat2 = dark.g.CreateMaterial("y", "vertexlitgeneric", {
- ["$ignorez"] = 0,
- ["$model"] = 1,
- ["$basetexture"] = "models/debug/debugwhite",
- });
- dark.xraymat = dark.g.CreateMaterial(dark.g.util.CRC("dark_xraymat"), "VertexLitGeneric", {
- ["$basetexture"] = "models/debug/debugwhite"
- })
- dark.Hook("HUDPaint", function()
- local allprops = dark.g.ents.FindByClass("prop_physics")
- for i = 1, #allprops do
- local v = allprops[i]
- if !dark.em.IsValid(v) then continue end
- if !dark.xrei:GetBool() then
- dark.em.SetNoDraw(v, false)
- continue
- end
- dark.g.cam.Start3D()
- dark.g.render['SuppressEngineLighting'](true)
- dark.g.render['MaterialOverride'](dark.xraymat)
- dark.g.render.SetColorModulation(0,191,255)
- v:SetColor(Color(255,255,255))
- dark.g.render.SetBlend(0.10)
- dark.em.DrawModel(v)
- dark.em.SetNoDraw(v, true)
- dark.g.render['SuppressEngineLighting'](false)
- dark.em.DrawModel(v)
- dark.g.cam.End3D()
- end
- if !ShowSpec then return end
- local spectatePlayers = {}
- local x = 0
- for k,v in dark.g.next, dark.Plys do
- if v:GetObserverTarget() == LocalPlayer() then
- dark.g.table.insert(spectatePlayers, v:Name())
- end
- end
- if #spectatePlayers == 0 then return end
- local textLength = surface.GetTextSize(dark.g.table.concat(spectatePlayers) ) / 3
- dark.g.draw.RoundedBox(1, ScrW() - 180, ScrH() - ScrH() + 15, 150, 30 + textLength, Color(0,0,0,150))
- dark.g.draw.SimpleText("Spectators", "TabLarge", ScrW() - 140, ScrH() - ScrH() + 18, Color(130, 0, 255, 255))
- dark.g.draw.SimpleText("Spectators", "TabLarge", ScrW() - 140, ScrH() - ScrH() + 16, Color(0, 255, 25, 255))
- for k,v in dark.g.next, spectatePlayers do
- dark.g.draw.SimpleText(v, "TabLarge", ScrW() - 140, ScrH() - ScrH() + 37 + x, Color(130, 0, 255, 255))
- dark.g.draw.SimpleText(v, "TabLarge", ScrW() - 140, ScrH() - ScrH() + 35 + x, Color(75, 255, 25, 255))
- x = x + 15
- end
- end)
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Welcome to Dark's scripts!")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Type dark_menu in console to open the menu!")
- cvars.AddChangeCallback("dark_xray", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_xray") == 1 then
- surface.PlaySound ("npc/sniper/reload1.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Xray is turned on!")
- elseif GetConVarNumber("dark_xray") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Xray is deactivated!")
- surface.PlaySound ("vehicles/APC/apc_shutdown.wav")
- end
- end)
- cvars.AddChangeCallback("darkbhop", function(convar_name, value_old, value_new)
- if GetConVarNumber("darkbhop") == 1 then
- surface.PlaySound ("ambient/machines/thumper_startup1.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Bunnyhop is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("darkbhop") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Bunnyhop is turned", Color( 255,110,0 ), " off!" )
- surface.PlaySound ("buttons/combine_button5.wav")
- end
- end)
- cvars.AddChangeCallback("dark_entity", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_entity") == 1 then
- surface.PlaySound ("buttons/combine_button1.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Entity finder is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_entity") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Entity finder is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("buttons/combine_button2.wav")
- end
- end)
- cvars.AddChangeCallback("dark_adminalert", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_adminalert") == 1 then
- surface.PlaySound ("buttons/combine_button1.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Admin alert is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_adminalert") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Admin alert is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("buttons/combine_button2.wav")
- end
- end)
- cvars.AddChangeCallback("dark_chatspam", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_chatspam") == 1 then
- surface.PlaySound ("buttons/combine_button1.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Chat spammer is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_chatspam") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Chat spammer is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("buttons/combine_button2.wav")
- end
- end)
- cvars.AddChangeCallback("dark_flashspam", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_flashspam") == 1 then
- surface.PlaySound ("buttons/combine_button1.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Flaslight spammer is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_flashspam") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Flashlight spammer is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("buttons/combine_button2.wav")
- end
- end)
- cvars.AddChangeCallback("dark_rainbow", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_rainbow") == 1 then
- surface.PlaySound ("ambient/energy/whiteflash.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Rainbow physgun is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_rainbow") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Rainbow physgun is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("npc/roller/code2.wav")
- end
- end)
- cvars.AddChangeCallback("dark_hud", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_hud") == 1 then
- surface.PlaySound ("npc/scanner/combat_scan2.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "HUD is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_hud") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"HUD is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("npc/scanner/combat_scan5.wav")
- end
- end)
- cvars.AddChangeCallback("dark_watermark", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_watermark") == 1 then
- surface.PlaySound ("npc/scanner/combat_scan2.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Watermark is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_watermark") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Watermark is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("npc/scanner/combat_scan5.wav")
- end
- end)
- cvars.AddChangeCallback("dark_crosshair", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_crosshair") == 1 then
- surface.PlaySound ("npc/roller/mine/rmine_blip3.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Crosshair is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_crosshair") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"Crosshair is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("npc/roller/mine/combine_mine_deactivate1.wav")
- end
- end)
- cvars.AddChangeCallback("dark_crosshair2", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_crosshair2") == 1 then
- surface.PlaySound ("npc/roller/mine/rmine_blip3.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "2nd Crosshair is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_crosshair2") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"2nd Crosshair is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("npc/roller/mine/combine_mine_deactivate1.wav")
- end
- end)
- cvars.AddChangeCallback("dark_esp", function(convar_name, value_old, value_new)
- if GetConVarNumber("dark_esp") == 1 then
- surface.PlaySound ("npc/roller/mine/rmine_blip3.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "ESP is turned", Color( 13, 255, 134 ), " on!")
- elseif GetConVarNumber("dark_esp") == 0 then
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ),"ESP is turned", Color( 255,110,0 ), " off!")
- surface.PlaySound ("npc/roller/mine/combine_mine_deactivate1.wav")
- end
- end)
- dark.Hook("RenderScreenspaceEffects", function()
- if dark.xrei:GetBool() then
- for k,v in dark.g.next, dark.Plys do
- if(!dark.em.IsValid(v) || dark.em.Health(v) < 1 || v == dark.me || dark.em.IsDormant(v)) then continue; end
- dark.g.cam.Start3D();
- dark.g.render.MaterialOverride(chamsmat);
- dark.g.render.SetColorModulation(1,1,1);
- dark.em.DrawModel(v);
- dark.g.render.SetColorModulation(1,1,1);
- dark.g.render.MaterialOverride(chamsmat2);
- dark.em.DrawModel(v);
- dark.g.cam.End3D();
- end
- end
- end)
- dark.ConCMD['Add']("dark_openscript", function( ply, cmd, args )
- local lua = dark.g.file.Read( args[1] )
- dark.g.RunString( lua )
- end )
- dark.ConCMD['Add']("showspecs", function(ply, command, args)
- ShowSpec = !ShowSpec
- end)
- dark.ConCMD['Add']("dark_180", function()
- LocalPlayer():SetEyeAngles( LocalPlayer():EyeAngles() + Angle( -2 * LocalPlayer():EyeAngles().p,180, 0) )
- end)
- dark.ConCMD['Add']("dark_music", function()
- dark.g.surface.PlaySound("music/HL2_song23_SuitSong3.mp3")
- end)
- local espCvar = CreateClientConVar("dark_entity", 1, false, false)
- cvars.AddChangeCallback( "dark_entity", function( cvar, old, new )
- enableESP = tobool( new )
- end, "updatevalue" )
- local enableESP = espCvar:GetBool()
- local lookup = {
- money_printer = true,
- spawned_weapon = true,
- spawned_money = true,
- }
- local itemOffset = Vector( 8, -10, 30 )
- local swepOffset = Vector( 3, 0, 20 )
- local moneyOffset = Vector( 3, 0, 10 )
- local itemColor = Color( 255, 255, 0 )
- local swepColor = Color( 255, 0, 0 )
- local moneyColor = Color( 0, 255, 0 )
- hook.Add( "HUDPaint", "ESP", function()
- if ( not enableESP ) then return end
- local pos, ent
- local entTable = ents.GetAll()
- for i = 1, #entTable do
- ent = entTable[ i ]
- if ( not IsValid( ent ) ) then continue end
- if ( not lookup[ ent:GetClass() ] ) then continue end
- if ( ent:GetClass() == "money_printer" ) then
- ------ new wordboxes!----
- pos = ( ent:GetPos() + itemOffset ):ToScreen()
- -- draw.SimpleTextOutlined( "Money Printer", "Trebuchet18", pos.x, pos.y, itemColor, 0,0,1, color_black )
- draw.WordBox (2, pos.x,pos.y, "Money Printer", "Trebuchet18", Color(128,128,128,100), Color(255,0,0,255))
- elseif ( ent:GetClass() == "spawned_weapon" ) then
- pos = ( ent:GetPos() + swepOffset ):ToScreen()
- ---draw.SimpleTextOutlined( "Weapon", "Trebuchet18", pos.x, pos.y, swepColor, 0,0,1, color_black )
- draw.WordBox (2, pos.x,pos.y, "Weapon", "Trebuchet18", Color(128,128,128,100), Color(255,230,0,255))
- elseif ( ent:GetClass() == "spawned_money" ) then
- pos = ( ent:GetPos() + moneyOffset ):ToScreen()
- ---draw.SimpleTextOutlined( "Money", "Trebuchet18", pos.x, pos.y, moneyColor, 0,0,1, color_black )
- draw.WordBox (2, pos.x,pos.y, "Money", "Trebuchet18", Color(128,128,128,100), Color(0,255,40,255))
- end
- end
- end )
- concommand.Add( "dark_about", function()
- Derma_Message( "This addon was made by Dark.", "About", "OK" )
- surface.PlaySound ("notify.wav")
- end)
- concommand.Add( "dark_menu", function()
- surface.PlaySound ("ambient/machines/combine_terminal_idle4.wav")
- local DermaPanel = vgui.Create( "DFrame" )
- DermaPanel:SetPos( 200, 300)
- DermaPanel:SetSize( 350, 280 )
- DermaPanel:Center()
- DermaPanel:SetTitle( "Dark's scripts" )
- DermaPanel:SetVisible( true )
- DermaPanel:SetDraggable( true )
- DermaPanel:ShowCloseButton( true )
- DermaPanel:MakePopup()
- DermaPanel.Paint = function()
- surface.SetDrawColor( 34, 123, 149, 255 )
- surface.DrawRect( 0, 0, DermaPanel:GetWide(), DermaPanel:GetTall() )
- surface.SetDrawColor( 255, 255, 255, 255 )
- surface.DrawOutlinedRect( 0, 0, DermaPanel:GetWide(), DermaPanel:GetTall() )
- end
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,30 )
- CheckBoxThing:SetText( "X-ray" )
- CheckBoxThing:SetConVar( "dark_xray" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 29 )
- DermaImage:SetImage( "icon16/shape_ungroup.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,50 )
- CheckBoxThing:SetText( "Auto-jump (Bhop)" )
- CheckBoxThing:SetConVar( "darkbhop" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 49 )
- DermaImage:SetImage( "icon16/arrow_up.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,70 )
- CheckBoxThing:SetText( "Admin alert feature" )
- CheckBoxThing:SetConVar( "dark_adminalert" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 69 )
- DermaImage:SetImage( "icon16/exclamation.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,90 )
- CheckBoxThing:SetText( "Chat Spammer" )
- CheckBoxThing:SetConVar( "dark_chatspam" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 89 )
- DermaImage:SetImage( "icon16/comments.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,110 )
- CheckBoxThing:SetText( "Flashlight Spammer" )
- CheckBoxThing:SetConVar( "dark_flashspam" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 109 )
- DermaImage:SetImage( "icon16/asterisk_orange.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,130 )
- CheckBoxThing:SetText( "Entity finder" )
- CheckBoxThing:SetConVar( "dark_entity" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 129 )
- DermaImage:SetImage( "icon16/magnifier.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,150 )
- CheckBoxThing:SetText( "Rainbow Physgun" )
- CheckBoxThing:SetConVar( "dark_rainbow" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 149 )
- DermaImage:SetImage( "icon16/color_wheel.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,170 )
- CheckBoxThing:SetText( "HUD" )
- CheckBoxThing:SetConVar( "dark_hud" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 169 )
- DermaImage:SetImage( "icon16/layout.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,190 )
- CheckBoxThing:SetText( "Crosshair 1" )
- CheckBoxThing:SetConVar( "dark_crosshair" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 189 )
- DermaImage:SetImage( "icon16/bullet_green.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,210 )
- CheckBoxThing:SetText( "Crosshair 2" )
- CheckBoxThing:SetConVar( "dark_crosshair2" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 209 )
- DermaImage:SetImage( "icon16/bullet_red.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,230 )
- CheckBoxThing:SetText( "Watermark" )
- CheckBoxThing:SetConVar( "dark_watermark" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 229 )
- DermaImage:SetImage( "icon16/text_smallcaps.png" )
- DermaImage:SizeToContents()
- local CheckBoxThing = vgui.Create( "DCheckBoxLabel", DermaPanel )
- CheckBoxThing:SetPos( 30,250 )
- CheckBoxThing:SetText( "ESP" )
- CheckBoxThing:SetConVar( "dark_esp" )
- CheckBoxThing:SizeToContents()
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 10, 249 )
- DermaImage:SetImage( "icon16/eye.png" )
- DermaImage:SizeToContents()
- local DermaButton = vgui.Create( "DButton" )
- DermaButton:SetParent( DermaPanel )
- DermaButton:SetText( "Music" )
- DermaButton:SetPos( 240, 84 )
- DermaButton:SetSize( 90, 30 )
- DermaButton.DoClick = function ()
- RunConsoleCommand( "dark_music" )
- end
- local DermaButton = vgui.Create( "DButton" )
- DermaButton:SetParent( DermaPanel )
- DermaButton:SetText( "180" )
- DermaButton:SetPos( 240, 124 )
- DermaButton:SetSize( 90, 30 )
- DermaButton.DoClick = function ()
- RunConsoleCommand( "dark_180" )
- end
- local DermaButton = vgui.Create( "DButton" )
- DermaButton:SetParent( DermaPanel )
- DermaButton:SetText( "About" )
- DermaButton:SetPos( 240,164 )
- DermaButton:SetSize( 90, 30 )
- DermaButton.DoClick = function ()
- RunConsoleCommand( "dark_about" )
- end
- local DermaButton = vgui.Create( "DButton" )
- DermaButton:SetParent( DermaPanel )
- DermaButton:SetText( "Unload" )
- DermaButton:SetPos( 240, 204 )
- DermaButton:SetSize( 90, 30 )
- DermaButton.DoClick = function ()
- surface.PlaySound ("unload.mp3")
- chat.AddText( Color( 0, 88, 117 ), "Dark's scripts unloaded!")
- chat.AddText( Color( 0, 88, 117 ), "ESP MAY remain until you rejoin the server!")
- RunConsoleCommand( "dark_unload" )
- end
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 240, 30 )
- DermaImage:SetImage( "icon16/application_osx_terminal.png" )
- DermaImage:SizeToContents()
- local DLabel = vgui.Create( "DLabel", Panel )
- DLabel:SetParent (DermaPanel)
- DLabel:SetPos( 192, 30)
- DLabel:SetText( "Run Lua" )
- local DLabel = vgui.Create( "DLabel", Panel )
- DLabel:SetParent (DermaPanel)
- DLabel:SetPos( 191.5, 58)
- DLabel:SetText( "Chatspam" )
- DermaImage = vgui.Create( "DImageButton", DermaPanel )
- DermaImage:SetPos( 240, 60 )
- DermaImage:SetImage( "icon16/comments_add.png" )
- DermaImage:SizeToContents()
- local DermaText = vgui.Create( "DTextEntry", DermaPanel )
- DermaText:SetPos( 260,28 )
- DermaText:SetTall( 20 )
- DermaText:SetWide( 60 )
- DermaText:SetEnterAllowed( true )
- DermaText.OnEnter = function ()
- RunConsoleCommand ("dark_openscript", DermaText:GetValue())
- surface.PlaySound ("npc/scanner/scanner_scan2.wav")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Lua entered!" )
- end
- local DermaText = vgui.Create( "DTextEntry", DermaPanel )
- DermaText:SetPos( 260,58 )
- DermaText:SetTall( 20 )
- DermaText:SetWide( 60 )
- DermaText:SetEnterAllowed( true )
- DermaText.OnEnter = function ()
- RunConsoleCommand ("dark_chatspam_msg", DermaText:GetValue())
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Chat message confirmed!" )
- surface.PlaySound ("npc/scanner/scanner_scan1.wav")
- end
- end)
- dark.g.surface.PlaySound("startup.mp3")
- dark.g.notification.AddProgress("DeLiGiTwashere", "DarkCides scripts loaded")
- dark.g.timer.Simple(5, function() dark.g.notification.Kill("DeLiGiTwashere") end)
- ----- Chat spammer -----
- CreateClientConVar("dark_chatspam_msg", "Default message", false, false)
- CreateClientConVar("dark_chatspam", "0", false, false)
- hook.Add("Think", "dark_chatspam_hook", function()
- if GetConVarNumber("dark_chatspam") != 1 then return end
- RunConsoleCommand("say", tostring(GetConVarString("dark_chatspam_msg")))
- end)
- ---- flashlight spammer----
- CreateClientConVar("dark_flashspam", "0", true, false)
- hook.Add("Think", "darkflash", function()
- if GetConVarNumber("dark_flashspam") != 1 then return end
- RunConsoleCommand("impulse", "100")
- end)
- --- rainbow phsygun (clientside only)
- CreateClientConVar ("dark_rainbow", "0", true, false )
- hook.Add("Think","darkrainbow",function()
- if GetConVarNumber ("dark_rainbow") != 1 then return end
- LocalPlayer():SetWeaponColor(VectorRand())
- end)
- ---------watermark---------------
- CreateClientConVar ("dark_watermark","1", true ,false )
- hook.Add("HUDPaint", "watermark",function()
- if GetConVarNumber("dark_watermark") != 1 then return end
- surface.DrawRect( 0, 0, 100, 25 )
- draw.SimpleTextOutlined( "Darks scripts V1", "trebuchet18", 5, 5, Color( 255, 255, 255, 255 ), TEXT_ALIGN_LEFT, TEXT_ALIGN_LEFT, 1, Color( 9, 94 , 0 ))
- end)
- surface.CreateFont( "darkhud2", {
- font = "trebuchet18",
- size = 30,
- weight = 500,
- } )
- -------- HUD must be updated to show more info, possibly admin stuff too.------------------
- RunConsoleCommand ("dark_hud","1")
- RunConsoleCommand ("dark_watermark","1")
- CreateClientConVar ("dark_hud","1", true ,false )
- hook.Add("HUDPaint", "huddesign",function()
- if GetConVarNumber("dark_hud") != 1 then return end
- local showvel = math.floor(LocalPlayer():GetVelocity():Length())
- draw.RoundedBox(34, ScrW()/2.5, ScrH()/1.1, ScrW()/4.57, ScrH()/10.8, Color(0, 0, 0, 255))
- draw.RoundedBox(32, ScrW()/2.42, ScrH()/1.08, ScrW()/5.08, ScrH()/15.43, Color(0, 242, 255, 255))
- draw.RoundedBox(16, ScrW()/2.35, ScrH()/1.13, ScrW()/6, ScrH()/33.75, Color(0, 0, 0, 255))
- draw.DrawText("Dark HUD", "darkhud2", ScrW()/2.09, ScrH()/1.13, Color(0, 255, 0, 255))
- draw.DrawText("Speed:"..showvel, "darkhud2", ScrW()/2.34, ScrH()/1.06, Color(0, 0, 0, 255))
- ---local coolglow = Material("models/props_combine/combine_fenceglow")
- ---- surface.SetMaterial(coolglow)
- --- surface.SetDrawColor(Color(41, 128, 185, 255))
- --- surface.DrawTexturedRect(300, ScrH()-105, 340, 100, Color(41, 128, 185, 255))
- end)
- ---- workshop crosshairs modified until I figure out a more efficent method----
- CreateClientConVar ("dark_crosshair","1", true ,false )
- hook.Add("HUDPaint", "crosshair",function()
- if GetConVarNumber("dark_crosshair") != 1 then return end
- local x = ScrW() / 2
- local y = ScrH() / 2
- surface.SetDrawColor( 0, 255, 0, 255 )
- local gap = 5
- local length = gap + 15
- surface.DrawLine( x - length, y, x - gap, y )
- surface.DrawLine( x + length, y, x + gap, y )
- surface.DrawLine( x, y - length, x, y - gap )
- surface.DrawLine( x, y + length, x, y + gap )
- end)
- CreateClientConVar ("dark_crosshair2","0", true ,false )
- hook.Add("HUDPaint", "crosshair2",function()
- if GetConVarNumber("dark_crosshair2") != 1 then return end
- local x = ScrW() / 2
- local y = ScrH() / 2
- surface.SetDrawColor( 255, 0, 0, 255 )
- local gap = 2
- local length = gap + 15
- surface.DrawLine( x - length, y, x - gap, y )
- surface.DrawLine( x + length, y, x + gap, y )
- surface.DrawLine( x, y - length, x, y - gap )
- surface.DrawLine( x, y + length, x, y + gap )
- end)
- ---surface.DrawLine good method i hope
- -- NOT DONE YET--- DO NOT TOUCH --- REMEMBER TO ADD ADDITONAL HOOKS/concommands here, hmm can't add any function that uses deligits detouring thing NEED FIX ASAP.
- concommand.Add( "dark_unload", function()
- ---- surface.PlaySound("ambient/levels/labs/teleport_winddown1.wav") -- should i use this or custom sound? hmmm....,
- RunConsoleCommand ("dark_esp","0")
- RunConsoleCommand ("dark_hud","0")
- RunConsoleCommand ("dark_xray","0")
- RunConsoleCommand ("dark_entity","0")
- RunConsoleCommand ("dark_watermark","0")
- RunConsoleCommand ("dark_crosshair","0")
- RunConsoleCommand ("dark_crosshair2","0")
- RunConsoleCommand ("dark_flashspam","0")
- concommand.Remove( "dark_entity" )
- concommand.Remove( "dark_xray" )
- concommand.Remove( "dark_about" )
- concommand.Remove( "dark_menu" )
- concommand.Remove ("dark_esp")
- concommand.Remove ("dark_openscript")
- concommand.Remove ("dark_180")
- concommand.Remove ("dark_help")
- concommand.Remove ("darkbhop")
- concommand.Remove ("dark_adminalert")
- concommand.Remove ("darkide_adminalert_distance")
- concommand.Remove ("dark_chatspam")
- concommand.Remove ("dark_chatspam_msg")
- concommand.Remove ("dark_crosshair")
- concommand.Remove ("dark_crosshair2")
- hook.Remove ( "Think", "dark_chatspam_hook")
- hook.Remove ( "HUDPaint", "ESP")
- hook.Remove ("RenderScreenspaceEffects","dark.GetPlys")
- timer.Remove("dark.GetPlys")
- timer.Destroy("dark.GetPlys")
- hook.Remove ("Think","darkflash")
- concommand.Remove ("dark_flashspam")
- concommand.Remove ("dark_rainbow")
- hook.Remove ("Think","darkrainbow")
- hook.Remove ("HUDPaint", "crosshair2")
- hook.Remove ("HUDPaint", "crosshair")
- hook.Remove ("HUDPaint", "huddesign")
- hook.Remove ("HUDPaint", "watermark")
- concommand.Remove ("dark_hud")
- concommand.Remove ("dark_watermark")
- concommand.Remove ("dark_crosshair")
- concommand.Remove ("dark_crosshai2")
- chat.AddText( Color( 100, 255, 100 ) ,"DARK NOTICE:" , Color( 0, 157, 209 ), "Dark's scripts unloaded! Type lua_openscript_cl darkv1.lua to open it again!" )
- chat.AddText ( Color( 0, 157, 209 ), "The ESP will remain until you rejoin the server.")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement