local passId = 396490188
function isAuthenticated(player)
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end
game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
print(plr.Name .. " has bought the game pass with id " .. passId)
end
function ontouch()
game:GetService("TeleportService").CustomizedTeleportUI = true
local teleportService = game:GetService("TeleportService")
local otherPlaceId = 215389447
local button = script.Parent
local loadingScreen = script.Parent.Parent
local player = game.Players.LocalPlayer
button.MouseButton1Down:connect(function()
game:GetService("TeleportService"):Teleport(otherPlaceId, player)
loadingScreen.Visible = true
for i = 1, 0, -.05 do
loadingScreen.BackgroundTransparency = i
wait()
end
loadingScreen.BackgroundTransparency = 0
Thanks for answering! The goal of the script is to see if you have the game pass and if you do teleport you to another part of the universe. I tested the script out ingame and when I touched the part that was suppose to do that It wasn't doing it and I can't spot anything wrong with this script so I came to you guys for help, again thanks! :)
