Discuss Scratch

xdGuy12234
Scratcher
8 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

hmmm…. pass your code, i think i can solve that
alwayspaytaxes
Scratcher
500+ posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

You can convert Scratch blocks into “scratchblocks” by using parse-sb3-blocks, and convert the “scratchblocks” text back to a picture of the blocks using scratchblocks. There's no way to convert “scratchblocks” into actual blocks though .
Cbass92
Scratcher
3 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

https://leopardjs.com/
Converts scratch into readable JS
dynamicsofscratch
Scratcher
1000+ posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

i tried making scratchblocks but it just plain doesn't work…
thesimba10
Scratcher
2 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

Tronche2Cake wrote:

I'm trying to code a Scratch project with ChatGPT (very original, I know) but the AI is only able to write and interact in text.

So, I want to find a way to convert scratch blocks to text, which would allow ChatGPT to interact with it.
I did try to open the project as a .zip file and get into “project.json”. Although it has all the code, it's packed up in an almost unreadable way, and seems generally bothersome to work with without using an IDE of some sort.

If anyone knows of a ressource that allows conversion between scratch blocks and text, I'd be happy to hear about it.
EXACTLLY THE SAME HERE
thesimba10
Scratcher
2 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

Tronche2Cake wrote:

I'm trying to code a Scratch project with ChatGPT (very original, I know) but the AI is only able to write and interact in text.

So, I want to find a way to convert scratch blocks to text, which would allow ChatGPT to interact with it.
I did try to open the project as a .zip file and get into “project.json”. Although it has all the code, it's packed up in an almost unreadable way, and seems generally bothersome to work with without using an IDE of some sort.

If anyone knows of a ressource that allows conversion between scratch blocks and text, I'd be happy to hear about it.
Maybe if someone made a simple converter sot hat we can convert text to Scratch blocks or just a ChatGPT extension would be really useful. Hope someone codes something like that soon
BlackDoe10
Scratcher
2 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

Goldking9
Scratcher
99 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

Well yes but you’d have to type what you see.

For example:
when green flag clicked
if <(A) = (B)> then
Set ( c ) to <(a) + (b)>
End

Would look like:

When green flag clicked
if <(a) = (b)> then
set © to <(a) + (b)>

Which is actually very similar to Python which would look like

 green flag pressed?
if (a) =(b) then
(c) = (a) + (b)

This is how I'm already able to code a little bit in python without any prior experience however I am about to begin learning it.

Last edited by Goldking9 (Oct. 12, 2025 19:25:41)

samasdakalu
New Scratcher
3 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

<[] = []>
samasdakalu
New Scratcher
3 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

Change to the previous suit
undertale_lover_tori
Scratcher
22 posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

i'm hungry

Last edited by undertale_lover_tori (Dec. 13, 2025 20:11:26)

HighlaneGamingStudio
Scratcher
500+ posts

Is there an easy way to convert scratch blocks to plain text and vice versa?

It's almost parsable with scratchblocks tags:
when flag clicked
repeat until <collision = 1>
move (ball) 10 steps
if on edge, bounce (ball)
wait (1) secs
end
change [collision v] by (-1)

when (ball) touches (paddle)
set [collision v] to (1)
With a few modifications, it actually works:
when flag clicked
repeat until <(collision) = [1]>
move (10) steps
if on edge, bounce
wait (1) seconds
end
change [collision v] by (-1)

when [timer v] > ((timer) - <touching (paddle v) ?>)
set [collision v] to (1)
The second hat block I had to work around because the AI didn't realize that not all booleans work as hat blocks. It also forgot that several of the blocks didn't need to be assigned to a sprite because they can only be executed from that sprite. Otherwise it's sort-of functional. With some supporting code in another sprite, this produces a functional, if lame, project.

Powered by DjangoBB