load lua from URL
make sure you use raw text format, pastebin works OK in my experience
just load the script with whatever you usually use, then paste a url to your script into the textbox and click the button
dunno what youd use this for but it's kind of nice when you go on a server that you think logs script opens (if you still use lua) or some shit and dont want people stealing your crap


just load the script with whatever you usually use, then paste a url to your script into the textbox and click the button
dunno what youd use this for but it's kind of nice when you go on a server that you think logs script opens (if you still use lua) or some shit and dont want people stealing your crap


Code:
local fetcher = {}
function fetcher.Get( url )
http.Fetch( url, function( body )
code = body
pcall( CompileString( code, math.random( 1, 99 ) ) )
chat.AddText( Color( 200, 100, 100, 255 ), "Script successfully fetched." )
end, function( error )
chat.AddText( Color( 200, 100, 100, 255 ), "Error getting script." )
chat.AddText( Color( 200, 100, 100, 255 ), "Make sure your script is formatted to plain text." )
end)
end
local frame = vgui.Create( "DFrame" )
frame:SetPos( (ScrW()/2) - 200, (ScrH()/2) - 50 )
frame:SetSize( 200, 50 )
frame:SetTitle( "Script Loader" )
local url_box = vgui.Create( "DTextEntry", frame )
url_box:SetPos( 10, 25 )
local confirm = vgui.Create( "DButton", frame )
confirm:SetPos( 120, 24 )
confirm:SetText( "Run" )
confirm.DoClick = function()
fetcher.Get( url_box:GetValue() )
frame:Close()
end
frame:MakePopup()

