Opening Shop Gui Script
Opening Shop Gui Script
Youtube Video tutorial: (Coming Soon)
Steps:
Create a screengui in startergui.
Add a frame into the screengui and customize it. That will be ur shop frame.
Add a textbutton into the screengui and customize it that will be ur open shop button.
Click on the frame and go to the properties of that frame and find visble and turn it off.
Then add a local script into the screengui and open the local script and paste the script into it. Then change the "FrameName" to the name of ur frame and the "TextButtonName" to ur TextButton name (caps are important and no spaces in the name!!)
Script:
local screengui = script.Parent
local frame = screengui.Frame
local textbutton = screengui.TextButton
textbutton.MouseButton1Click:Connect(function()
if frame.Visible == false then --CB
frame.Visible = true
else
frame.Visible = false
end
end)
-- script made by Content Bakery
Extra on click it makes a sound:
do the same steps then do step 2.
Add a sound into screengui you could find it in toolbox or find a sound id
then change the script to this script:
local screengui = script.Parent
local frame = screengui.Frame
local textbutton = screengui.TextButton
local sound = screengui.SoundName
textbutton.MouseButton1Click:Connect(function()
if frame.Visible == false then
sound:Play()
frame.Visible = true --CB
else
sound:Play()
frame.Visible = false
end
end)
-- script made by Content Bakery