-- this is a representation of computing the payload in the ROBLOX exploit "Celery"'s src
local Reference = 123
function GetPayload(StackReference)
    local Bytes = {}
    Bytes[1] = bit32.band(bit32.rshift(StackReference, 24), 0xFF)
    Bytes[2] = bit32.band(bit32.rshift(StackReference, 16), 0xFF)
    Bytes[3] = bit32.band(bit32.rshift(StackReference, 8), 0xFF)
    Bytes[4] = bit32.band(StackReference, 0xFF)
    
    local BytesArray = {
        255, 210, 86, 87, 83, 82, 191, 0, 0, 0, 0, 139, 63, 139, 116, 36, 20, 137, 55, 139, 116, 36, 24,
        137, 119, 4, 139, 116, 36, 28, 137, 119, 8, 139, 116, 36, 32, 137, 119, 12, 139, 116, 36, 36,
        137, 119, 16, 191, 0, 0, 0, 0, 131, 124, 36, 24, 0, 119, 7, 199, 71, 4, 0, 0, 0, 0, 139, 116,
        36, 32, 129, 126, 16, 0, 16, 0, 0, 116, 25, 129, 126, 16, 0, 32, 0, 0, 116, 16, 129, 126, 16, 0,
        48, 0, 0, 116, 7, 90, 91, 95, 94, 194, 24, 0, 144, 144, 144, 144, 144, 144, 144, 144, 144, 144,
        144, 144, 131, 126, 20, 64, 116, 7, 90, 91, 95, 94, 194, 24, 0, 139, 116, 36, 32, 199, 70, 8, 1,
        0, 0, 0, 199, 70, 16, 0, 0, 1, 0, 199, 70, 20, 1, 0, 0, 0, 139, 116, 36, 24, 191, 0, 0, 0, 0, 131,
        127, 4, 32, 119, 14, 131, 71, 4, 4, 139, 223, 3, 95, 4, 131, 195, 4, 137, 51, 90, 91, 95, 94, 194, 24, 0
    }
    
    BytesArray[8] = Bytes[1]
    BytesArray[9] = Bytes[2]
    BytesArray[10] = Bytes[3]
    BytesArray[11] = Bytes[4]
    
    BytesArray[49] = Bytes[1]
    BytesArray[50] = Bytes[2]
    BytesArray[51] = Bytes[3]
    BytesArray[52] = Bytes[4]
    
    BytesArray[160] = Bytes[1]
    BytesArray[161] = Bytes[2]
    BytesArray[162] = Bytes[3]
    BytesArray[163] = Bytes[4]
    
    return BytesArray
end
local PayloadToString = function(Payload)
    local String = "" do
        for Index = 1, #Payload do
            String = String .. string.format("%02X ", Payload[Index])
        end
    end
    
    return String
end
local Payload = GetPayload(Reference)
print(PayloadToString(Payload))