Skip to content

Instantly share code, notes, and snippets.

@Core-commits
Created August 17, 2020 21:38
Show Gist options
  • Save Core-commits/bbc3d03b52b6a19fc4188fb1d89fc31a to your computer and use it in GitHub Desktop.
Save Core-commits/bbc3d03b52b6a19fc4188fb1d89fc31a to your computer and use it in GitHub Desktop.
HopityTheUserBlacklist
--[[
when a username that you enter in the table below joins the game,
it will kick you automatically so they don't see you exploiting
i use it with staff member's names so if they join i dont get banned
]]
-- Settings
usernames = {"username","other username","another username lol"}
--- General Code:
function TeleportToRandomServer()
local HttpService = game:GetService("HttpService")
local Instances = {}
local AmountCheck = 0
local TotalCollectionSize = HttpService:JSONDecode(game:HttpGet("https://www.roblox.com/games/getgameinstancesjson?placeId=" .. game.PlaceId .. "&startindex=0")).TotalCollectionSize
local FloorCollectionSize = math.floor(TotalCollectionSize / 10) * 10
for a=0,FloorCollectionSize / 10 do
spawn(function()
local GameInst = HttpService:JSONDecode(game:HttpGet("https://www.roblox.com/games/getgameinstancesjson?placeId=" .. game.PlaceId .. "&startindex=".. a*10))
for a,b in pairs(GameInst.Collection) do
if b.Capacity > #b.CurrentPlayers then
table.insert(Instances, b.Guid)
end
end
AmountCheck = AmountCheck + 1
end)
end
repeat
wait(.1)
print(AmountCheck, "/", (FloorCollectionSize / 10) - 1)
until AmountCheck >= (FloorCollectionSize / 10) - 1
game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, Instances[math.random(1, #Instances)])
end
game:GetService("Players").PlayerAdded:Connect(function(plr)
for i,v in pairs(usernames) do
if plr.Name == v then
TeleportToRandomServer()
end
end
end)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment