load lua from URL

Posts 1–15 of 22 · Page 1 of 2
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




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()
Quote Originally Posted by BigBadWilly View Post
Useful and very Unique
Not as unique as you big fella
No it's really not unique, it's been done multiple times before.
Jesus Christ why do you have to be an enabler? You could've just kept it to yourself and a few friends instead of giving every annoying propkiller it.
Quote Originally Posted by Axisofaj View Post
No it's really not unique, it's been done multiple times before.
Jesus Christ why do you have to be an enabler? You could've just kept it to yourself and a few friends instead of giving every annoying propkiller it.
Cause all these super awesome prop killers are going to be loading their pkill scripts from a URL. Most of them would pick the ez way and load theirs from system32
Quote Originally Posted by Axisofaj View Post
No it's really not unique, it's been done multiple times before.
Jesus Christ why do you have to be an enabler? You could've just kept it to yourself and a few friends instead of giving every annoying propkiller it.
I have AIDS.
"omg ur soch a enablre"

^ typical person who can't code
This thread went to hell fast....
why not use runstring instead of compilestring
Quote Originally Posted by D3M0L1T10N View Post
why not use runstring instead of compilestring
using straight eval is never a good idea
Gimme dat ip snatcher code / link
Quote Originally Posted by MumbleHS View Post
Gimme dat ip snatcher code / link
ill release it once it doesn't matter and somebody leaks the method eventually
Doesn't it just download the ulx logs? lmfao.
Quote Originally Posted by MumbleHS View Post
Doesn't it just download the ulx logs? lmfao.
Theres one for ULX extended, steals the recent dc logs.
Pretty sure thats what this one does? (The IP Snatcher shown in the pic)
Posts 1–15 of 22 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us