My random game generator will not display the amount of visits in a random game, also, the code displays even banned games (this allowed some bypassed words, which isn’t good, but it is pretty rare.)
Script:
local TeleportService = game:GetService("TeleportService")
local MarketplaceService = game:GetService("MarketplaceService")
local GetInfo = function(id)
local PlaceID = id
local thumbnail = "https://assetgame.roblox.com/Game/Tools/ThumbnailAsset.ashx?aid="..PlaceID .."&fmt=png&wd=420&ht=420"
local surfacegui = script.Parent.Parent.Parent.SurfaceGui
local Info = MarketplaceService:GetProductInfo(PlaceID,Enum.InfoType.Asset)
local CreationDate = MarketplaceService:GetProductInfo(PlaceID)
if Info.AssetTypeId == 9 then
surfacegui.Thumbnail.Image = thumbnail
surfacegui.PlaceName.Text = Info.Name
surfacegui.CreationDate.Text = Info.Created
surfacegui.LastUpdated.Text = Info.Updated
surfacegui.Visits.Text = Info.Visits
return PlaceID
end
end
local function GetRandomPlace()
local rnger = math.random(100000, 2147483647) -- you CAN'T go any higher than this or it won't work
local success, PlaceId = pcall(function()
return GetInfo(rnger)
end)
if success and PlaceId then
script.Parent.MouseClick:Connect(function(player)
TeleportService:Teleport(PlaceId, player)
end)
else
GetRandomPlace()
end
end
while task.wait(10) do
GetRandomPlace()
end