Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------ StarterGUI LocalScript ------------------
- local player = game.Players.LocalPlayer
- local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,6052861) ------ Your Gamepass ID here
- if ownsGamepass then
- local sword = game:GetService("ReplicatedStorage"):WaitForChild("ClassicSword"):Clone() -------- Change "ClassicSword" to your tool's name
- sword.Parent = player.Backpack
- end
- ------------------ TextButton LocalScript ------------------
- script.Parent.MouseButton1Click:Connect(function()
- game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,6052861) --------- Your Gamepass ID here
- end)
- ------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement