Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this script is created by Joriangames go check out his video if you want to know how this works: https://www.youtube.com/watch?v=kNo_-haHev0&lc=Ugx-rS3QGtfEwLBoVCp4AaABAg. If you have questions please contact me on discord: https://discord.gg/jpSF5jA
- --script in your part:
- local Players = game:GetService("Players")
- local MarketPlaceService = game:GetService("MarketplaceService")
- local function onTouch(hit)
- local player = Players:GetPlayerFromCharacter(hit.Parent)
- if player then
- MarketPlaceService:PromptGamePassPurchase(player,9978345) --change the number to your gamepass ID
- end
- end
- script.Parent.Touched:Connect(onTouch)
- --put this localscript below in your image/textbutton:
- script.Parent.MouseButton1Click:Connect(function()
- game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,9978345) --change the number to your gamepassID
- end)
Add Comment
Please, Sign In to add comment