In todays short I show you how to make a gamepass only gui in Roblox Studio. This is a great thing to have in your game if you want gamepass owners to have a special message! I Hope you enjoyed the video, Have a lovely rest of your day! If you are a bit confused what to do, Feel free to message me on Discord and Ill help you out!
NEW!! IRL FloppyFish Merch Store: https://itz-floppyfish.creator-spring...
Script 1 (TextButton Local Script) :
local MarketplaceService = game:GetService("MarketplaceService")
local GamepassID = 1234567890 -- Change to your Gamepass ID
local Gui = script.Parent.Parent.Parent.Frame -- Change "Frame" to whatever your frame name is which inside the screengui
script.Parent.MouseButton1Click:Connect(function()
local player = game.Players.LocalPlayer
local hasPass = MarketplaceService:UserOwnsGamePassAsync(player.UserId, GamepassID)
if hasPass then
Gui.Visible = true
else
local purchasePrompt = MarketplaceService:PromptGamePassPurchase(player, GamepassID)
purchasePrompt.Completed:Connect(function(purchaseSuccess)
if purchaseSuccess then
Gui.Visible = true
else
Gui.Visible = false
end
end)
end
end)
Script 2 (Close Script) :
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
if not script.Parent.Parent.Visible then
end
end)
-- This closes the gui. It is a simple script that listens for the MouseButton1Click event on the TextButton. When it is clicked, it sets the Visible property of the parent Frame to false. This hides the gui from view.
If you would like to support me even more, Super Thanks and becoming a Member is also another way to show your appreciation!
🌟 Floppys Discord Server: / discord
🌟 Floppys Roblox Game : https://www.roblox.com/games/11301003...
Roblox Studio Tutorial
Roblox Studio
Studio Tutorials
Watch video HOW TO MAKE A GAMEPASS ONLY GUI 🛠️ Roblox Studio Tutorial online without registration, duration hours minute second in high quality. This video was added by user Itz_FloppyFish 05 July 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 27,367 once and liked it 1.5 thousand people.