Quick actions

cmd+k|ctrl+k

Navigation

Languages

remote_security

Snippet info

Language

Lua

Visibility

public

Author

techhog

Created

2021-05-13T13:08:36.934846Z

Updated

2021-05-25T14:51:20.517838Z

local remote = 'game:GetService("ReplicatedStorage").MainGameRemote'
local args = {'chicken', 'strips'}

function getName()
    local _ = ''
    for i = 0,21 do 
       _ = _ .. string.char(math.random(97,122))
    end
    return _.."_TechHogsRemoteSecurity"
end
function getVariable(ic)
    local name = getName()
    local funnynumber = ''
    local funnystring = ''
    for i = 0,15 do 
        funnynumber = tostring(math.random(111111,999999))
    end 
    funnystring = 'local '..name..' = '
    local loopnumber = math.random(20,30)
    for i = 0,loopnumber do 
        if i == loopnumber then
            funnystring = funnystring..funnynumber
        elseif i == math.random(2,loopnumber-1) then
            funnystring = funnystring..string.byte(string.byte(ic))..'+'
        else
            funnystring = funnystring..funnynumber..'+'
        end
    end 
    for i = 0,loopnumber do 
        funnystring = funnystring..'-'..funnynumber
    end 
    return funnystring
end 
function indexInTable(t, v)
    for a,b in pairs(t) do
        if b then
            if b == v then
                return a 
            end
        end
    end
end
function tableLength(t)
    local _ = 0
    for a,b in pairs(t) do 
        if b then _ = _ + 1 end
    end 
    return _
end 
function splitString(inputstr)
    t={}
    inputstr:gsub(".",function(c) table.insert(t,c) end)
    return t
end

local total = ''
for a,arg in pairs(args) do 
    _G[arg..'_variables'] = {}
    local split = splitString(arg)
    for a,b in pairs(split) do 
        local variable = getVariable(b)
        total = total .. variable..'\n'
        table.insert(_G[arg..'_variables'],variable)
    end
end 

total = total..'\n'..remote..':FireServer('
for a,arg in pairs(args) do
    total = total..'{'
    local variables = _G[arg..'_variables']
    for a,variable in pairs(variables) do
        local variableName = string.sub(variable, #'local  ')
        variableName = string.reverse(string.sub(string.reverse(variableName), #variableName-44))
        if indexInTable(variables, variable) == tableLength(variables) then
            total = total..variableName
        else
            total = total..variableName..', '
        end
    end
    
    if indexInTable(args, arg) == tableLength(args) then
        total = total..'}'
    else
        total = total..'}, '
    end
end
total = total ..')'

print(total)
INFO