Discuss Scratch
- Discussion Forums
- » Show and Tell
- » Programming Language 2.0 - Community Programs
- Death-Eye
-
Scratcher
9 posts
Programming Language 2.0 - Community Programs
This is the Import and Export codes for Programming Language 2.0
This is where the community can upload any programs, functions, games, or libraries they create using this project for others to look at and use since there is not enough space in a comment. Everyone feel free to upload, and don't be scared of what others will think of your creation

(ofc by doing this you realize that you are signing away your program, scratch account, and life away to me to use as I please)
- Death-Eye
-
Scratcher
9 posts
Programming Language 2.0 - Community Programs
Hi again! Here is the source code to one of the examples in the project (the 3rd one) goto(main)
I used Basic Editor to program this (as using the inbuilt editor would have been impossible
the features of this are:
Although these are the only features right now, and nest listing doesn't work, feel free to use this and/or improve upon it. To use this, just copy from the top to the #main, and to call the functions just specify the inputs (parameters) and the line:
================================================================
Calling a function:
set(line,theseTwoNeedToBeUniquelyTheSame)
set(input1,myArray)
set(input2,{“item 1” “item 2” “item 3” “item 4” “item 5” “item 6” “you get the picture!”})
goto(createArray)
#theseTwoNeedToBeUniquelyTheSame
================================================================
Goodluck in using it:
#header
#increment
set(l,add(var(l),1))
#skipSpaces
if(letter(var(var(input1)),var(l)),==, )
goto(increment)
goto(var(line2))
#createArray
set(var(input1),var(input2))
goto(var(line))
#getLength
set(return,0)
set(l,1)
#getLengthLoop1
set(l,add(var(l),1))
set(line2,endSkipSpaces1)
goto(skipSpaces)
#endSkipSpaces1
if(letter(var(var(input1)),var(l)),==,})
goto(var(line))
set(return,add(var(return),1))
#getLengthLoop2
set(l,add(var(l),1))
if(letter(var(var(input1)),var(l)),==,“)
goto(getLengthLoop1)
goto(getLengthLoop2)
#getItem
set(return,)
set(i,0)
set(l,1)
#getItemLoop1
set(l,add(var(l),1))
set(line2,endSkipSpaces2)
goto(skipSpaces)
#endSkipSpaces2
if(var(i),==,var(input2))
goto(var(line))
set(i,add(var(i),1))
#getItemLoop2
set(l,add(var(l),1))
if(letter(var(var(input1)),var(l)),==,”)
goto(getItemLoop1)
if(var(i),==,var(input2))
set(return,join(var(return),letter(var(var(input1)),var(l))))
goto(getItemLoop2)
#main
print(Hi\, I am Death-Eye.)
delay(3)
print(With this library\, you can create arrays\, \(or lists\) using the createArray function)
delay(5)
print(You can get the length of an array using the getLength function)
delay(3)
print(And you can access an element using the getItem function.)
delay(3)
get(Press enter to continue…)
cls()
set(line,tag1)
set(input1,myArray)
set(input2,{“apple” “banana” “orange” “pear” “grapes” “kiwifruit” “potato”})
goto(createArray)
#tag1
print(var(myArray))
delay(2)
set(line,tag2)
set(input1,myArray)
goto(getLength)
#tag2
print(join(The length is: ,var(return)))
delay(2)
set(line,tag3)
set(input1,myArray)
set(input2,get(join(join(Type an index. \(number from 1 to ,var(return)),\))))
goto(getItem)
#tag3
print(join(This element is: ,var(return)))
delay(2)
print(You can use this in your projects by getting the #header part of this script on the forums page :\))
#end
print(<terminated>)
I used Basic Editor to program this (as using the inbuilt editor would have been impossible

the features of this are:
- Create Lists
- Access Elements in that List
- Get the length of that list
Although these are the only features right now, and nest listing doesn't work, feel free to use this and/or improve upon it. To use this, just copy from the top to the #main, and to call the functions just specify the inputs (parameters) and the line:
================================================================
Calling a function:
set(line,theseTwoNeedToBeUniquelyTheSame)
set(input1,myArray)
set(input2,{“item 1” “item 2” “item 3” “item 4” “item 5” “item 6” “you get the picture!”})
goto(createArray)
#theseTwoNeedToBeUniquelyTheSame
================================================================
Goodluck in using it:
#header
#increment
set(l,add(var(l),1))
#skipSpaces
if(letter(var(var(input1)),var(l)),==, )
goto(increment)
goto(var(line2))
#createArray
set(var(input1),var(input2))
goto(var(line))
#getLength
set(return,0)
set(l,1)
#getLengthLoop1
set(l,add(var(l),1))
set(line2,endSkipSpaces1)
goto(skipSpaces)
#endSkipSpaces1
if(letter(var(var(input1)),var(l)),==,})
goto(var(line))
set(return,add(var(return),1))
#getLengthLoop2
set(l,add(var(l),1))
if(letter(var(var(input1)),var(l)),==,“)
goto(getLengthLoop1)
goto(getLengthLoop2)
#getItem
set(return,)
set(i,0)
set(l,1)
#getItemLoop1
set(l,add(var(l),1))
set(line2,endSkipSpaces2)
goto(skipSpaces)
#endSkipSpaces2
if(var(i),==,var(input2))
goto(var(line))
set(i,add(var(i),1))
#getItemLoop2
set(l,add(var(l),1))
if(letter(var(var(input1)),var(l)),==,”)
goto(getItemLoop1)
if(var(i),==,var(input2))
set(return,join(var(return),letter(var(var(input1)),var(l))))
goto(getItemLoop2)
#main
print(Hi\, I am Death-Eye.)
delay(3)
print(With this library\, you can create arrays\, \(or lists\) using the createArray function)
delay(5)
print(You can get the length of an array using the getLength function)
delay(3)
print(And you can access an element using the getItem function.)
delay(3)
get(Press enter to continue…)
cls()
set(line,tag1)
set(input1,myArray)
set(input2,{“apple” “banana” “orange” “pear” “grapes” “kiwifruit” “potato”})
goto(createArray)
#tag1
print(var(myArray))
delay(2)
set(line,tag2)
set(input1,myArray)
goto(getLength)
#tag2
print(join(The length is: ,var(return)))
delay(2)
set(line,tag3)
set(input1,myArray)
set(input2,get(join(join(Type an index. \(number from 1 to ,var(return)),\))))
goto(getItem)
#tag3
print(join(This element is: ,var(return)))
delay(2)
print(You can use this in your projects by getting the #header part of this script on the forums page :\))
#end
print(<terminated>)
- Pheonix_on_fire
-
Scratcher
19 posts
Programming Language 2.0 - Community Programs
to be honest its a shame that no one is programming for this engine, as i quite like it, anyway, here is a very simple chat bot that i made:
set(player_info,get(Hello!));set(string,Hi!);if(var(player_info),=,var(string));print(Nice to meet you!);set(player_info,get(How are you feeling today?));set(string,not good);set(second_response,good);set(third_response,ok);set(fourth_response,bad);if(var(player_info),=,var(fourth_response));goto(13);if(var(player_info),=,var(string));print(Well I'm sorry about that);if(var(player_info),=,var(second_response));print(Well I'm glad to hear that!);if(var(player_info),=,var(third_response));Print(ok then);delay(2);set(player_info,get(Anyways bye for now!));set(string,bye);if(var(player_info),=,var(string));print(Shutting down……..);delay(1)
you have to add the brackets at the beginning and the end, as scratch thinks its…idk what it thinks it is but it doesnt show up
also, tbh its sorta fun to not even use the editor at all and just write your own save code in like notepad or smth
set(player_info,get(Hello!));set(string,Hi!);if(var(player_info),=,var(string));print(Nice to meet you!);set(player_info,get(How are you feeling today?));set(string,not good);set(second_response,good);set(third_response,ok);set(fourth_response,bad);if(var(player_info),=,var(fourth_response));goto(13);if(var(player_info),=,var(string));print(Well I'm sorry about that);if(var(player_info),=,var(second_response));print(Well I'm glad to hear that!);if(var(player_info),=,var(third_response));Print(ok then);delay(2);set(player_info,get(Anyways bye for now!));set(string,bye);if(var(player_info),=,var(string));print(Shutting down……..);delay(1)
you have to add the brackets at the beginning and the end, as scratch thinks its…idk what it thinks it is but it doesnt show up
also, tbh its sorta fun to not even use the editor at all and just write your own save code in like notepad or smth
Last edited by Pheonix_on_fire (Oct. 8, 2020 14:57:16)
- Pheonix_on_fire
-
Scratcher
19 posts
Programming Language 2.0 - Community Programs
made this squiggly line generator, you have to use forkphorus or turbowarp for it, otherwise its really slow, it also took me WAAAYYYYY too long to make
set(number,1);#zeroup;#zeroup loop;print(var(number));set(number,join(var(number),0));delay(0.001);if(var(number),=,1000000000000000000000);goto(zerodown);goto(zeroup loop);#zerodown;set(repeat,19);#zerodown loop;set(number,div(var(number),10));print(var(number));set(repeat,diff(1,var(repeat)));delay(0.001);if(var(repeat),=,0);goto(zeroup);goto(zerodown loop)
you have to add the brackets back in
also, i made a version of the programming language that instead of adding to the output, inserts at line 1, so that you dont have to scroll: https://scratch.mit.edu/projects/439224481/
set(number,1);#zeroup;#zeroup loop;print(var(number));set(number,join(var(number),0));delay(0.001);if(var(number),=,1000000000000000000000);goto(zerodown);goto(zeroup loop);#zerodown;set(repeat,19);#zerodown loop;set(number,div(var(number),10));print(var(number));set(repeat,diff(1,var(repeat)));delay(0.001);if(var(repeat),=,0);goto(zeroup);goto(zerodown loop)
you have to add the brackets back in
also, i made a version of the programming language that instead of adding to the output, inserts at line 1, so that you dont have to scroll: https://scratch.mit.edu/projects/439224481/
Last edited by Pheonix_on_fire (Oct. 21, 2020 15:09:55)
- DewMcStew
-
Scratcher
100+ posts
Programming Language 2.0 - Community Programs
haven't made anything yet as i don't have the time but its cool so BUMP
- Yaeyboyy2
-
Scratcher
2 posts
Programming Language 2.0 - Community Programs
#start;cls();print(wait…);set(time,rand(1,10));delay(var(time));if(get(how long has it been in seconds?),=,var(time));goto(win);goto(lose);#win;print(correct!);delay(3);goto(start);#lose;print(join(wrong it was ,var(time)));delay(3);goto(start)
it's a time precision game. it waits a certain amount of time and after the time, you have to guess how long it has been
add brackets at the ends of the code because scratch shows it as nothing for some reason
it's a time precision game. it waits a certain amount of time and after the time, you have to guess how long it has been
add brackets at the ends of the code because scratch shows it as nothing for some reason
Last edited by Yaeyboyy2 (Nov. 25, 2025 06:24:51)
- Discussion Forums
- » Show and Tell
-
» Programming Language 2.0 - Community Programs