Hi I Made This Script That Lets You Teleport If You Buy A Gamepass. But If You Did Not Buy It You Can Still Teleport. I'm Tired Of Roblox Studio. And Lua. Im Slowly Losing My Sanity To Roblox Studio. Here Is The Code This is In A LocalScript

local MPS = game:GetService("MarketplaceService")
local plr = game.Players.LocalPlayer
local stuff = 11904284
local OwnsMoreDeaths = MPS:UserOwnsGamePassAsync(plr.UserId,stuff)
local char = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.CharacterAdded:Wait()

if OwnsMoreDeaths then
	script.Parent.Mikewasoki.Text = "mike wazowski"
	script.Parent.Traffic.Text = "Traffic"
end

script.Parent.Traffic.MouseButton1Click:Connect(function()
	if OwnsMoreDeaths then
		char.HumanoidRootPart.CFrame = workspace.Traffic.Roadsidetp.CFrame
		script.Parent.Parent.Visible = false
		script.Parent.Parent.Parent.Close.Visible = false
	else
		script.Parent.Traffic.Text = "ERR:Not Purchased Yet."
		script.Parent.Mikewasoki.TextColor3 = Color3.new(0.666667, 0, 0)
		wait(2)
		script.Parent.Traffic.Text = "Traffic"
		script.Parent.Traffic.TextColor3 = Color3.new(255,255,255)
	end
end)

I Hope This Does Not Get Taken Down . Leave Your Suggestions Below!

3 comments

0

Just visited your game and it works, keep in mind when you create a gamepass, you own it instantly

0

Use Server Test mode, for testing gamepasses.

0

Ok Thanks For The Help! I Did Not Know That I you own the gamepass. when you create it