-
-
Save leegao/250608 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function string.split(t,b) | |
local cmd = {} | |
local match = "[^%s]+" | |
if type(b) == "string" then match = "[^"..b.."]+" end | |
for word in string.gmatch(t, match) do table.insert(cmd, word) end | |
return cmd | |
end | |
function new_account(user,pw) | |
local file = assert(io.open("sys/lua/Fun Server/user_accounts/"..user..".txt","w")) | |
file:write(pw) | |
file:close() | |
end | |
addhook("say","fs_say") | |
function fs_say(id,txt) | |
local text = txt:split() | |
if text[1] == "!register" then | |
new_account(text[2],text[3]) | |
return 1 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment