local playerstoteleport = {} local TeleportService = game:GetService("TeleportService") local debounce = false local BadgeService = game:GetService("BadgeService") local BadgeId = 0 -- Badge player gets for completing the level local placeId = 0 -- Place ID Player gets sent to local function awardBadge(player, badgeId) local success, badgeInfo = pcall(function() return BadgeService:GetBadgeInfoAsync(badgeId) end) if success then if badgeInfo.IsEnabled then local awarded, errorMessage = pcall(function() BadgeService:AwardBadge(player.UserId, badgeId) end) if not awarded then warn("Error while awarding badge:", errorMessage) end end else warn("Error while fetching badge info!") end end script.Parent.Touched:Connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then if not table.find(playerstoteleport, hit.Parent) then table.insert(playerstoteleport,hit.Parent) end end end) local timetotp = script.Parent.Parent.Parent.Sign.SurfaceGui.SIGN.Text while true do script.Parent.Parent.Parent.Sign.SurfaceGui.SIGN.Text = tonumber(script.Parent.Parent.Parent.Sign.SurfaceGui.SIGN.Text) - 1 if tonumber(script.Parent.Parent.Parent.Sign.SurfaceGui.SIGN.Text) <= 0 then local playerstoteleportprep = {} for i,v in pairs(playerstoteleport) do if game.Players:GetPlayerFromCharacter(v) then table.insert(playerstoteleportprep,game.Players:GetPlayerFromCharacter(v)) awardBadge(game.Players:GetPlayerFromCharacter(v), BadgeId) end end if #playerstoteleportprep > 0 then local server = TeleportService:ReserveServer(placeId) TeleportService:TeleportToPrivateServer(placeId,server,playerstoteleportprep) end task.wait(3) table.clear(playerstoteleport) script.Parent.Parent.Parent.Sign.SurfaceGui.SIGN.Text = timetotp end task.wait(1) end
there theres the code ^^^^^^^^^^