-- Define the source code to obfuscate
local sourceCode = [[
-- Original Lua code goes here
local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()
local Window = Rayfield:CreateWindow({
Name = "Arsenal",
LoadingTitle = "VolHub",
LoadingSubtitle = "by binary.phantom",
ConfigurationSaving = {
Enabled = true,
FolderName = nil, -- Create a custom folder for your hub/game
FileName = "Big Hub"
},
Discord = {
Enabled = false,
Invite = "noinvitelink", -- The Discord invite code, do not include discord.gg/. E.g. discord.gg/ABCD would be ABCD
RememberJoins = true -- Set this to false to make them join the discord every time they load it up
},
KeySystem = false, -- Set this to true to use our key system
KeySettings = {
Title = "Untitled",
Subtitle = "Key System",
Note = "No method of obtaining the key is provided",
FileName = "Key", -- It is recommended to use something unique as other scripts using Rayfield may overwrite your key file
SaveKey = true, -- The user's key will be saved, but if you change the key, they will be unable to use your script
GrabKeyFromSite = false, -- If this is true, set Key below to the RAW site you would like Rayfield to get the key from
Key = {"Hello"} -- List of keys that will be accepted by the system, can be RAW file links (pastebin, github etc) or simple strings ("hello","key22")
}
})
local MainTab = Window:CreateTab("Home", nil) -- Title, Image
local MainSection = MainTab:CreateSection("Main")
Rayfield:Notify({
Title = "You executed the script",
Content = "Thanks for using my script!",
Duration = 5,
Image = nil,
Actions = { -- Notification Buttons
Ignore = {
Name = "Okay!",
Callback = function()
print("The user tapped Okay!")
end
},
},
})
local Button = MainTab:CreateButton({
Name = "Infinite Jump Toggle",
Callback = function()
--Toggles the infinite jump between on or off on every script run
_G.infinjump = not _G.infinjump
if _G.infinJumpStarted == nil then
--Ensures this only runs once to save resources
_G.infinJumpStarted = true
--Notifies readiness
game.StarterGui:SetCore("SendNotification", {Title="Youtube Hub"; Text="Infinite Jump Activated!"; Duration=5;})
--The actual infinite jump
local plr = game:GetService('Players').LocalPlayer
local m = plr:GetMouse()
m.KeyDown:connect(function(k)
if _G.infinjump then
if k:byte() == 32 then
humanoid = game:GetService'Players'.LocalPlayer.Character:FindFirstChildOfClass('Humanoid')
humanoid:ChangeState('Jumping')
wait()
humanoid:ChangeState('Seated')
end
end
end)
end
end,
})
local Slider = MainTab:CreateSlider({
Name = "WalkSpeed",
Range = {0, 300},
Increment = 1,
Suffix = "Speed",
CurrentValue = 16,
Flag = "Slider1", -- A flag is the identifier for the configuration file, make sure every element has a different flag if you're using configuration saving to ensure no overlaps
Callback = function(Value)
game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = (Value)
end,
})
]]
-- Define the substitution cipher function
local function substituteCipher(input)
local alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
local shuffled = "lxUIg0RwosKtDz4CvJNrdm5ujX1EY7AMGb3h6Pi9ZyFO2kqBnQL8SVTfaeHcpW-"
local result = {}
for i = 1, #input do
local char = input:sub(i, i)
local index = alphabet:find(char, 1, true)
if index then
result[i] = shuffled:sub(index, index)
else
result[i] = char
end
end
return table.concat(result)
end
-- Define the obfuscator function
local function obfuscate(code)
-- Introduce multiple layers of code obfuscation
local obfuscatedCode = code
for _ = 1, 10 do
-- Apply substitution cipher
obfuscatedCode = substituteCipher(obfuscatedCode)
-- Introduce random code insertion and duplication
local insertionPoint = math.random(1, #obfuscatedCode)
local randomCode = ""
for _ = 1, math.random(10, 20) do
randomCode = randomCode .. string.char(math.random(33, 126)) -- ASCII printable characters
end
obfuscatedCode = obfuscatedCode:sub(1, insertionPoint) .. randomCode .. obfuscatedCode:sub(insertionPoint)
-- Apply random character substitution
obfuscatedCode = obfuscatedCode:gsub(".", function(c)
return math.random() < 0.7 and string.char(math.random(33, 126)) or c -- ASCII printable characters
end)
-- Introduce XOR encryption with a random key
local xorKey = math.random(0, 255)
obfuscatedCode = string.char(xorKey) .. obfuscatedCode:gsub(".", function(c)
return string.char((c:byte() ~ xorKey) % 256)
end)
end
-- Make the "Hello, World!" statement longer
obfuscatedCode = obfuscatedCode:gsub('"Hello, World!"', function(match)
local extension = "ExtraTextToAddToMakeItLonger"
return '"' .. match .. extension .. '"'
end)
-- Remove spaces from the obfuscated code
obfuscatedCode = obfuscatedCode:gsub("%s+", "")
-- Generate dynamic code to decrypt and execute the obfuscated code
local dynamicCode = obfuscatedCode
return dynamicCode
end
-- Obfuscate the source code
local obfuscatedCode = obfuscate(sourceCode)
-- Construct the final protected code
local protectionMessage = "([[This file was protected with BinSec V1]])"
local protectedCode = protectionMessage .. obfuscatedCode
-- Output the protected code
print(protectedCode)
To embed this project on your website, copy the following code and paste it into your website's HTML: