Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » HOW TO MAKE SHOP SCRIPT
- 26GirlCoder
-
Scratcher
6 posts
HOW TO MAKE SHOP SCRIPT
So I made the button, but I need to make a script where if you press the button, it will open up a shop thing and you can waste your ‘puppy love’ in this case. And how to buy an item. Or an upgrade. JUST SHOW ME THE SCRIPT!

- Dezach
-
Scratcher
100+ posts
HOW TO MAKE SHOP SCRIPT
We will need more details to what exactly it will do, because “how to buy an item” is too vague: there are multiple ways to get there.
You can use the broadcast block to send a message when you click on a button to other scripts/sprites.
You can use the broadcast block to send a message when you click on a button to other scripts/sprites.
when this sprite clicked
broadcast [open shop]
when I receive [open shop]
do something
- joe21212112
-
Scratcher
20 posts
HOW TO MAKE SHOP SCRIPT
hi,
ı am joe21212112 you can look at my santa clicker game. There was a shope and thinks. You can put it on your backpack.
ı am joe21212112 you can look at my santa clicker game. There was a shope and thinks. You can put it on your backpack.

- HedwigsHat
-
Scratcher
1000+ posts
HOW TO MAKE SHOP SCRIPT
In your main sprite
quote for more of the script.
when green flag clickedIn sprite1
switch backdrop to [shop v]
broadcast (go in v)
stop [this script v]
when I receive [go in v]to be continued…
yes you may
define yes you may
go to (invisible sprite in the store and no code v)
quote for more of the script.
- wrenchythewrench123
-
Scratcher
71 posts
HOW TO MAKE SHOP SCRIPT
So I made the button, but I need to make a script where if you press the button, it will open up a shop thing and you can waste your ‘puppy love’ in this case. And how to buy an item. Or an upgrade. JUST SHOW ME THE SCRIPT!
This has a shop, but it's kinda complicated… : https://scratch.mit.edu/projects/444022951/
- 26GirlCoder
-
Scratcher
6 posts
HOW TO MAKE SHOP SCRIPT
So I made the button, but I need to make a script where if you press the button, it will open up a shop thing and you can waste your ‘puppy love’ in this case. And how to buy an item. Or an upgrade. JUST SHOW ME THE SCRIPT!
This has a shop, but it's kinda complicated… : https://scratch.mit.edu/projects/444022951/
Thank you thank you!!!!!!!!!! With all the answers together in this discussion, I will make a shop!!! Thank you again

(I really can't explain how grateful I am)
- 26GirlCoder
-
Scratcher
6 posts
HOW TO MAKE SHOP SCRIPT
We will need more details to what exactly it will do, because “how to buy an item” is too vague: there are multiple ways to get there.
You can use the broadcast block to send a message when you click on a button to other scripts/sprites.when this sprite clicked
broadcast [open shop]
when I receive [open shop]
do something
Thanks even that was helpful!!!

- 26GirlCoder
-
Scratcher
6 posts
HOW TO MAKE SHOP SCRIPT
In your main spritewhen green flag clickedIn sprite1
switch backdrop to [shop v]
broadcast (go in v)
stop [this script v]when I receive [go in v]to be continued…
yes you may
define yes you may
go to (invisible sprite in the store and no code v)
quote for more of the script.
Thx!!!
- 26GirlCoder
-
Scratcher
6 posts
HOW TO MAKE SHOP SCRIPT
hi,
ı am joe21212112 you can look at my santa clicker game. There was a shope and thinks. You can put it on your backpack.
Can you show me the link of your santa clicker game??? Thank you.

- imake_thing
-
Scratcher
2 posts
HOW TO MAKE SHOP SCRIPT
can i have a shop script pls
Last edited by imake_thing (March 9, 2022 12:51:09)
- plantperson23
-
Scratcher
16 posts
HOW TO MAKE SHOP SCRIPT
You are very vague, so this code is also gonna be vague but here we go:
In the button to open shop:
In other sprites that you want to hide when shop is open:
In sprites that go in the shop:
In upgrade sprites:
If you could give me the Project Link i'd gladly help/make the script for you
Or even more context as to what you want.
In the button to open shop:
when this sprite clicked
if <(shopOpened) = [1]> then
show
set [shopOpened] to [0]
broadcast [shopClose v]
else
hide
set [shopOpened v] to [1]
broadcast [shopOpen v]
end
In other sprites that you want to hide when shop is open:
when gf clicked
forever
if <(shopOpened) = [1]> then
hide
else
show
end
end
In sprites that go in the shop:
when green flag clicked
forever
if <(shopOpened) = [0]> then
hide
else
show
end
end
In upgrade sprites:
when this sprite clicked
if <<(Currency/Money) > [Upgrade Price]> or <(Currency/Money) = [Upgrade Price]>> then
change [Currency/Money v] by [Negative Upgrade Price]
change [Amount of This Upgrade v] by [1]
end
If you could give me the Project Link i'd gladly help/make the script for you

Or even more context as to what you want.
- medians
-
Scratcher
1000+ posts
HOW TO MAKE SHOP SCRIPT
when this sprite clicked
if <(shopOpen) = [true]> then
broadcast [exitShop v]
else
broadcast [openShop v]
end
- SINWASTAKEN
-
Scratcher
42 posts
HOW TO MAKE SHOP SCRIPT
when this sprite clicked
broadcast [shop v]
when I receive [ shopv]
hide
- LORDHEAVEN21
-
Scratcher
2 posts
HOW TO MAKE SHOP SCRIPT
, I made a shop but idk now to make it do extra clicks if you know what I me. pls help me here’s the link
- Thunderguy9090
-
Scratcher
4 posts
HOW TO MAKE SHOP SCRIPT
In your main spritewhen green flag clickedIn sprite1
switch backdrop to [shop v]
broadcast (go in v)
stop [this script v]when I receive [go in v]to be continued…
yes you may
define yes you may
go to (invisible sprite in the store and no code v)
quote for more of the script.
Last edited by Thunderguy9090 (Jan. 10, 2026 22:15:37)
- Discussion Forums
- » Help with Scripts
-
» HOW TO MAKE SHOP SCRIPT