Posted
THIS IS NOT 100% ACCURATE due to it only checking if you are the only player
So this is a Private Server Checker its really simple and im really new to scripting
This has been tested on a free executer
Code:
local playerAmount = 0
function checkServerType(doKick, plrlim, playerAdd)
for i,v in pairs(game.Players:GetChildren()) do
playerAmount = playerAmount + 1
print(v)
end
print("Found ", playerAmount, " Players")
if doKick == true then
if playerAmount > plrlim then
if playerAdd == false then
game.Players.LocalPlayer:Kick("Not Private Server")
else
game.Players.LocalPlayer:Kick("Player Joined")
end
end
end
end
checkServerType(true, 1, false)
game.Players.PlayerAdded:Connect(function()
checkServerType(true, 1, true)
end)
Replied
so this just kicks you if theres more than an amount of players? you should change the title, a private server checker would check if the current server is a private server not if theres more than x amount of players
Cancel
Post
Did I mention I use arch btw?
Users viewing this thread:
( Members: 0, Guests: 1, Total: 1 )
Cancel
Post