#LoafScript | A programming language made entirely within RetroStudio! [1163915202_50]

1 messages · Page 2 of 1

hollow jetty
#

i think ive heard of it?

pine fable
#

templeOS is an OS made by some christian dude

#

it has a custom programming language named holyC

#

also a terminal

hollow jetty
#

AHA

#

YES

#

I HAVE HEARD OF IT BEFORE

#

searching it up jogged my memory

#

too complicated

#

lowk

#

BUT

#

an entire like OS in retrostudio could be fun to make

#

like a fake computer

#

AND

#

I can add loafscript support to it

pine fable
#

tbh make a really really lite version of linux that supports loafscript

hollow jetty
#

so you can code loafscript INSIDE THE OS

hollow jetty
hollow jetty
#

similar to how instead of recreating how real programming languages work, loafscript is extremely simplified with a lot of workarounds

#

i mean after a programming language it makes sense to make an OS

#

imagine like LoafOS, login, password, desktop, different apps, a fake internet, etc etc

#

tbh sounds too complicated

#

i want to make it possible to make 2d games with loafscript one day

pine fable
#

is loafscript's whole thing like

hollow jetty
#

like in the menu, a new button to make a game with loafscript

#

instead of just a script

pine fable
hollow jetty
hollow jetty
#

and then it loops through all lines

#

executes a run code function

#

where it does all the checks on the separated string

pine fable
#

oh so it like checks the syntax

hollow jetty
#

yr

#

yea

#

basically

#

theres a lot more to it but thats the very basics

pine fable
#

this genuinely amazes me

hollow jetty
#

also the variables you make are stored in a CreatedVariables table

#

when i make functions ill make a CreatedFunctions table as well

pine fable
#

loafstar if you make this a more advanced scripting language could you make a version of loafscript that is like roblox script editor but it gets turned into visual source inside retrostudio using plugins

hollow jetty
#

I just figured out how to make if statements

#

Like in my head

#

Basically I can make the code runners ignore lines that start with ">" or "else"

This would mean the syntax would be:

> print String: yo,_its_0
else
> print String: oh_no_its_not_0```

THEN to make it run the code when the if statement is true I use the same block code from the "execute from line" except change the from and to values accordingly by adding or subtracting from the current line (current line would be the if statement line)

or maybe run the code if the statement is true in a different way idk yet
wispy galleon
#

YO if statements?!?!

#

and looping?

#

if statements are still missing tho...

hollow jetty
#

but i will still add functions

#

when functions get added, execute from line will become useless

hollow jetty
#

im gonna do this in like an hour from now

hollow jetty
#
print string: eee
else
print string: noo
end```
#

this is how the syntax will be like

#

im gonna make if statements right now

hollow jetty
#

@brisk hull in the next update the output text will be smaller

#

much nicer

#

and more consisten with text size

hollow jetty
#

sneak peek

grizzled plaza
#

try make a documentation for this custom language

hollow jetty
#

another sneak peek

pine fable
brisk hull
#

Thats cool

hollow jetty
#

Currently, this fucking works

#

BUT

#

It can get censored :(

brisk hull
#

a

hollow jetty
#

and also I haven't made it save when you leave yet.

brisk hull
#

Sad

hollow jetty
#

yea

#

im not releasing it till i fix the censoring issues

brisk hull
#

is it published?

#

oh

#

i dont think u can really fix it though

hollow jetty
#

theres a way i think

forest tapir
#

add the ability to split strings and table support

hollow jetty
#

sure

#

but tables.

#

i havent made tbales yetr

#

so wait

forest tapir
#

so someone can make LoafScript inside of LoafScript

hollow jetty
#

chat this took me way too long to make

forest tapir
#

does it save

hollow jetty
#

vro watch the video

#

pay attention to the video

forest tapir
#

bro I mean when you leave and rejoin

hollow jetty
#

oh

#

not yet

#

im focusing on trying to stop it getting tagged

#

i have no clue how to do this

#

i tried combine string with number

#

idk if i did it right

forest tapir
#

you basically can't

hollow jetty
#

this is completely local

#

why is it getting tagged

forest tapir
#

you load variable from a script (not local), right?

hollow jetty
#

every script in this game is local

#

as of now

forest tapir
#

you can make it not tag

hollow jetty
forest tapir
#

you just have to save the string somewhere, in a script or even in the game.

#

as a stringvalue or smth

hollow jetty
#

so i should put it in a string value object

#

???

wispy galleon
hollow jetty
#

the code?

forest tapir
#

get object property doesn't tag, and locally saving in the same script won't tag either.

forest tapir
#

you can set object property locally without filtering

#

not really a bypass if you can't broadcast it to everyone forcefully

hollow jetty
#

the code editor?

forest tapir
#

I guess?
the one that has the script. (LoafScript)

hollow jetty
#

alr

#

only set the value when its saved?

#

duh

#

but hold on

forest tapir
#

yeah

hollow jetty
#

this is ONE string value.

#

for all code.

#

is that ok?

forest tapir
#

yes

hollow jetty
#

like its one string value obj

#

Ok

#

got it

forest tapir
#

new lines work with stringvalues

hollow jetty
#

WAIT

signal fulcrum
#

why does print Number: math 20 * 20 output "Hello, world!"

hollow jetty
#

its already getting object property

hollow jetty
#

oh its cause thats wrong syntax

#

you cant print math

#

make it a variable first

#

then print the variable

signal fulcrum
#

oh alr

hollow jetty
wispy galleon
hollow jetty
hollow jetty
forest tapir
hollow jetty
#

this is how it works already

forest tapir
#

creating a new script will make a new stringvalue with the default code

hollow jetty
#

do i still need the stupid combine string with number

#

someone said that that stops it from filtering but it didnt work for me

forest tapir
#

no, you don't need any combine block.

#

just set the textbox's text to the value of the stringvalue

hollow jetty
#

ok

hollow jetty
hollow jetty
#

set the value to the textbox text or the other way round???

forest tapir
#

opening a script

hollow jetty
#

alr

hollow jetty
#

what do i do with the table

forest tapir
#

wait

#

Get Object Property still for TextBox tho

#
Code = Get Object Property(Textbox, "Text")
Set Table Value(Table, CodeName, Code)

load/open:
Code = Get Table Value(Table, CodeName)
Set Object Property(Textbox, "Text", Code)```
hollow jetty
#

uh

hollow jetty
forest tapir
#

how does your table work right now

hollow jetty
#

see, its like, 2 local scripts communicating with eachothr

#

the table is in the myscripts localscript

forest tapir
#

and you receive a BindableEvent/Function?

hollow jetty
#

yea

#

to save iut

forest tapir
#

yeah that filters

hollow jetty
#

from the code editor

#

hold on

#

let me show you my code

forest tapir
#

you could rescript the myscripts localscript to be a modulescript probably

empty jackal
#

I may sleep now. Thank you

hollow jetty
#

so yes loops are possible now

#

just no way to end the fucking loooop

empty jackal
#

How will you add if statements?

#

Like

#

Do you have a plan or na

hollow jetty
#

guaranteed to work in my head

#

i know how to make it execute if its true in my head
and how to make it ignore stuff inside if statements so it only happens when its true

#

i just gotta put those two together

#

havent gotten around to it yet

empty jackal
#

Nice

night mortar
#

bro, this is insane

hollow jetty
night mortar
#

you are so good at scripting

#

but making your own language inside of RetroStudio

#

wow

hollow jetty
#

@brisk hull I stole your script and saved it to my scripts

hollow jetty
#

I GOT SAVING SCRIPTS WORKING

#

IT DOESNT TAG

#

but because it doesnt tag, no datastores

#

so yeah fuck

brisk hull
#

is it like the default script you get

hollow jetty
#

but oh well what can you do

hollow jetty
#

i will be publishing the save code update soon

night mortar
#

Very cool

#

I'm testing and it's fire

brisk hull
hollow jetty
brisk hull
#

oh

#

sad

hollow jetty
#

wym sad

#

the scripts got tagged and that was an issue

#

also the names of the scripts cant get tagged

hollow jetty
#

Vro was one of the first loafscripters

brisk hull
#

im a og

night mortar
hollow jetty
#

i want this forum to be a place to share scripts

night mortar
#

ok

#

I can't record with roblox, maybe a memory issue

#

so instead here are a before and after images

#

yeah it prints the variable "ez"

#

which is a string

#

then it waits a few seconds

#

then it creates new variables but with Numbers this time

#

2 var called "num1" and "num2"

hollow jetty
#

vro

#

just copy paste here

night mortar
#

then it do some maths and boom

night mortar
#

lazy

hollow jetty
#

son

#

also cool

#

ty for playing!

#

i will be adding if statements and saving scripts soon

brisk hull
#
var Number: maxValue = 10

// loop

print Variable: currentValue

var Number: currentValue = math currentValue + 1
wait Number: 1

execute from line 6```
reposting this
night mortar
#

hello miguel

brisk hull
night mortar
#
print Variable: ez
wait Number: 3
var Number: num1 = 1
var Number: num2 = 2
var Number: Answer = math num1 - num2
print Variable: Answer```
#

how do I make it copy and pasteable?

hollow jetty
night mortar
#

ok ty

hollow jetty
#

there ya go

night mortar
#

W

night mortar
#

gonna make one from yours

hollow jetty
night mortar
#

oohhhh I understand the "maxValue"

hollow jetty
#

from whos

#

oh

night mortar
#

the script from miguel

#

he made the value "maxValue" when the "if" statement will come

#

I actually tryed to make his thing to work even if the if statement isn't here yet

#

but my wifi went down

#

sadly

#

yeah nah my thing doesn't work

#

because execute from line or execute line just skip all the code until the given line

#

Here is a more complex script I've just made:

var Bool: Bvar1 = true
var Bool: Bvar2 = false

// script itself:

wait Variable: Nvar1
print Variable: Bvar1
wait Variable: Nvar1
var Variable: Bvar1 = Bvar2
print Variable: Bvar1

execute from line 2```
#

It turns false and then true

#

in loop

night mortar
#

you could just do:

print String: true
wait Number: 1
print String: false
execute from line 1

#

but idk

#

I changed the script a bit

#

if you watch

#

I edited

night mortar
#

I changed the place of the var Nvar1 to the first line

#

just to avoid a reset of the variable just incase (which is useless)

hollow jetty
#

LoafScriptLogo HUGE UPDATE

  • replaced New script button in the menu with My scripts
  • new menu to see all your scripts and save them and delete them and stuff yayay
  • this took so many hours
hollow jetty
#

watch the whole vid pls

#

this took me way too long

night mortar
#

you can't publish yet but wow

hollow jetty
night mortar
#

let me rejoin

night mortar
hollow jetty
#

when i get to it, ill change the publish button to an export button

#

itll give you a json to copy paste

#

and therell also be an import button

night mortar
#

nice

#

um

#

I clicked delete button

#

but I can't remove it

#

I don't want to delete one of my scripts

#

or rejoin

#

you should add a button to delete script

#

to remove the "page" to delete a cript if you don't want to delete a script.

hollow jetty
#

I made it suffer eternally as revenge for the pain I had to go through for the fucking save script system

hollow jetty
#

next time dont press it if you wasnt planning to delete something vro

night mortar
hollow jetty
night mortar
#

YOUR GAME DOESN'T SAVE BRUH BRUH

#

I SAVED MY SCRIPT BRRUHHHHH

#

IT DOESN'T SAVEEEEEEEEEEEEEE

#

BRBUHHHHHHHHHHHHHHHHHHHBYECZkgq

#

yeah save button doesn't save

#

because I had 2 scripts

#

now I rejoined

#

and I have 0 script

forest tapir
night mortar
#

bruh

#

then there is no point adding a save button for nothing

forest tapir
#

just like, copy the script to a textfile on your computer.
that's basically the same.

forest tapir
night mortar
forest tapir
#

if you leave all your data will be GONE

#

so just copy the script to a textfile on your computer.

night mortar
#

ok

hollow jetty
rough tendon
#

Can you add ifs

hollow jetty
#

Longest LoafScript script ever made so far!

Calculator by @spark wraith

var Number: second = 3
var Number: third = 1
var Number: fourth = 1
var Number: fifth = 1
var Number: sixth = 1
var Number: seventh = 1
var Number: eighth = 1
var Number: ninth = 1
var Number: tenth = 1

execute from line 66 // This decides which operation will be executed

// Line 21 : Addition
// Line 36 : Subtraction
// Line 51 : Multiplication (Dont forget to set all the unused number cases to 1)
// Line 66 : Division (Dont forget to set all the unused number cases to 1)


// Addition
var Number: addone = math first + second
var Number: addtwo = math third + fourth
var Number: addthree = math fifth + sixth
var Number: addfour = math seventh + eighth
var Number: addfive = math ninth + tenth

var Number: addsix = math addone + addtwo
var Number: addseven = math addsix + addthree
var Number: addeight = math addseven + addfour
var Number: addnine = math addeight + addfive
print Variable: addnine
stop


// Subtraction
var Number: subone = math first - second
var Number: subtwo = math third - fourth
var Number: subthree = math fifth - sixth
var Number: subfour = math seventh - eighth
var Number: subfive = math ninth - tenth

var Number: subsix = math subone - subtwo
var Number: subseven = math subsix - subthree
var Number: subeight = math subseven - subfour
var Number: subnine = math subeight - subfive
print Variable: subnine
stop


// Multiplication
var Number: mulone = math first * second
var Number: multwo = math third * fourth
var Number: multhree = math fifth * sixth
var Number: mulfour = math seventh * eighth
var Number: mulfive = math ninth * tenth

var Number: mulsix = math mulone * multwo
var Number: mulseven = math mulsix * multhree
var Number: muleight = math mulseven * mulfour
var Number: mulnine = math muleight * mulfive
print Variable: mulnine
stop


// Division
var Number: divone = math first / second
var Number: divtwo = math third / fourth
var Number: divthree = math fifth / sixth
var Number: divfour = math seventh / eighth
var Number: divfive = math ninth / tenth

var Number: divsix = math divone / divtwo
var Number: divseven = math divsix / divthree
var Number: diveight = math divseven / divfour
var Number: divnine = math diveight / divfive
print Variable: divnine
stop```
spark wraith
#

so if you want to do addition for example you just change the numbers you want and set the rest you arent gonna use to 0

#

same goes for subtraction

#

now if youre gonna do division or multiplication you set the unused numbers to 1 instead of 0

hollow jetty
#

wowie

spark wraith
hollow jetty
#

so poweredbread, hows it like coding with loafscript for the first time

spark wraith
hollow jetty
#

is the syntax easy to understand

spark wraith
spark wraith
hollow jetty
hollow jetty
hollow jetty
#

which would take so long

#

which is why i suggested richtext for potatomod

hidden sandal
#

88

hollow jetty
hollow jetty
#

LoafScriptLogo UPDATE

IF STATEMENTS ARE HEREEEEE!!!!!!!

SYNTAX:

// do stuff
end```
#

GO HAVE FUN ITS PUBLISHED YAYAYAYAAYYAYAYA

brisk hull
#

@hollow jetty can u compare variables with if?

hollow jetty
#

theres too much stuff that loafscript can do now

#

we need documentation

brisk hull
#

as a button

hollow jetty
hollow jetty
#

yessssss it works

brisk hull
#
var Number: NumberResult = 10 // while we dont have random numbers lets use this

if NumberGambled == NumberResult
print string: You got it!!
print Variable: NumberResult
print Variable: NumberGambled
end

if NumberGambled ~= NumberResult
print string: Awww dang it!
print Variable: NumberResult
print Variable: NumberGambled
end```
#

@hollow jetty

#

Try this

#

Made it on mobile not sure if its working

hollow jetty
brisk hull
#

idk uhhhh

#

cell phone

#

phone

hollow jetty
#

vro this does nothing

#

no prints nothing

#

it ends instantly

brisk hull
#

does variable if work

rough tendon
#

Oh wait I need variables for everything?

grizzled plaza
#

this is supporting instances properties?

hollow jetty
rough tendon
brisk hull
#

hmmmm idk whats wrong then

grizzled plaza
hollow jetty
#

this shit genuinely, like doesnt even show "running"

brisk hull
#
var Number: NumberResult = 10 // while we dont have random numbers lets use this

if NumberGambled == NumberResult
print String: You got it!!
print Variable: NumberResult
print Variable: NumberGambled
end

if NumberGambled ~= NumberResult
print String: Awww dang it!
print Variable: NumberResult
print Variable: NumberGambled
end```

@hollow jetty
hollow jetty
#

it plays the "the code is done" sound immediately

brisk hull
#

try this maybe

hollow jetty
#

idk if this is ur code or loafscript

brisk hull
#

prob my code

hollow jetty
#

ITS YOUR CODE

#

YOU FORGOT THE DATA TYPES

#

FOR BOTH VALUES

#

IN THE IF STATMENT

brisk hull
#

lol

brisk hull
#

now

hollow jetty
#

here ill fix it for you

#
var Number: NumberResult = 10 // while we dont have random numbers lets use this

if variable: NumberGambled == variable: NumberResult
print String: You got it!!
print Variable: NumberResult
print Variable: NumberGambled
end

if variable: NumberGambled ~= variable: NumberResult
print String: Awww dang it!
print Variable: NumberResult
print Variable: NumberGambled
end```
#

@brisk hull

#

this is the fixed code i think

wispy galleon
#

when tables

slim zodiac
#

Wait this is so cool

night mortar
#

Brother ty for adding IF statement

#

now PLEEAASASSEEEEEEE add random number thing

#

RandomNumber (0; 10)

#

so it takes a random number from 0 to 10 for exemple

#

.

flat haven
#

Imma try this game soon

#

Rn I can't

night mortar
#

I hope my suggestion will be added

#

Add Random Number type plsss

like make it like this:
var RandomNumber: randomNumberValue = (0; 10)
and then we can do things like:
print Variable: randomNumberValue
or this:
print RandomNumber: (0; 10)

brisk hull
night mortar
#

"numberRandom" is the variable name of the answer of math 10; 50

#

cool

#

my suggestion attracts lol

#

adding random number will allow much more scripts with IF statement

hollow jetty
#

"RandomNumber" is not a data type broski

hollow jetty
hollow jetty
forest tapir
#

random [number 1] [number 2]

hollow jetty
#

I cant put () or [] around things that you change, like the number 1 and number 2

#

and also that's inconsistent

forest tapir
hollow jetty
forest tapir
#

random 1 2

#

random -10 10

hollow jetty
#

it looks like 12

#

also its still inconsistent

#

why does random exist separately from math

#

i like miguel's idea

forest tapir
#

readability I guess

hollow jetty
#

:D

hollow jetty
#

but sure someday

slim zodiac
#

you should add music playlist

#

that can turned on or turned down

hollow jetty
#

maybe ill finally get around to it today

slim zodiac
hollow jetty
#

we lowk need a wiki page

#

the "How to write LoafScript" section of this forum post is getting huge

#

I need to make official documentationnnnn :(

night mortar
#

mine was a suggestion

night mortar
hollow jetty
#

multiple people asked i think

night mortar
#

ok

#

I didn't see

hollow jetty
#

the cycle of loafscript is

people ask for something to be added -> i add it -> everyone happy -> people ask for something to be added

#

as soon as i add one requested feature another feature is asked for

hollow jetty
#

😭

night mortar
#

and that's cool for us

#

but if it's too hard for you

hollow jetty
#

i was gonna add if statements anyways lmao

night mortar
#

don't do it

hollow jetty
#

also math random would be SO easy to add

night mortar
hollow jetty
#

its like a break from complicated stuff like if statement and script saving

night mortar
#

please

hollow jetty
#

yup im on it

#

right after i brush my teeth lowk

night mortar
night mortar
hollow jetty
#

im gonna add play sound rbxassetid://12345678

#

would be cool

#

imagine a gamble machine that does a victory sound when you win

rough tendon
hollow jetty
#

will be publishing this update soon 👀

hollow jetty
#

LoafScriptLogo UPDATE

  • Added a way to make random numbers with math
    var number: VariableName = math 1 , 10

  • Added a way to play sound effects
    play sound rbxassetid://123456789

night mortar
hollow jetty
#

my very awesome gambling script

print string: Rolling...
var number: RolledNumber = math 1 , 10
wait number: 1

if variable: RolledNumber == number: 1
play sound rbxassetid://115570527328265
print string: You_win
end

if variable: RolledNumber ~= number: 1
play sound rbxassetid://116672405522828
print string: Aw_dang_it!
end

// Super cool gamble machine by lifestar999```
fathom axle
#

what about containers

#

in order to have any real system you need some way of storing a list

hollow jetty
#

i mean

#

ok

#

like do you mean like

fathom axle
#

tables

hollow jetty
#

oh

#

okay

#

first everyone asks for if statements now tables

#

i hope ts wont be complicated to make

fathom axle
#

it's like the basic things of a programming language

#

i dont think you have loops either

hollow jetty
#

execute from line lets you do loops

fathom axle
#

proper loops

hollow jetty
#

:(

#

fineeeeeeeeeeeeeeeeee

#

ill add loop while and for loop

#

wait hwy do i need loop while

#

just do

wait number: 1
execute from line 1
end```
with line 1 being the if statement
#

theres a while loop

#

boom

#

it loops as long as number 1 is number 1

fathom axle
#

why dont we just use goto for all our loops

#

in lua

#

or c

#

there's only one language that uses gotos to make loops

#

and that is assembly

#

do you want to make assembly

hollow jetty
#

AAAAAAAAAAAAAAAAAAAAAAAAAAAuhg

fathom axle
#

also what if you want to add a few more lines of code

#

above that loop

#

suddenly you have to change every line number below that

hollow jetty
#

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaghhhhhhhhhhhhhhh

fathom axle
#

one reason is because line numbers dont mean anything when its compiled

#

the second is for that

#

they use labels instead

hollow jetty
#

infinite gambling loop

wait number: 1.5

play sound rbxassetid://18796775087
wait number: 1.3
execute from line 4```
fathom axle
#

infinite gambling loop but with no... gambling...

#

also you're making a system heavily dependent on line numbers

#

and your code editor doesnt even have line numbers

#

does execute from line support a variable

hollow jetty
hollow jetty
hollow jetty
fathom axle
#

why does it not

hollow jetty
#

cuz i couldnt think of any reasons someone would want it

fathom axle
#

subroutines

hollow jetty
#

/??

fathom axle
#

subroutines are basically simplified functions

#

instead of making a function call

#

you set a few variables and jump to the subroutine

#

the subroutine does stuf with the variables and jumps back to the caller

#

the problem: if execute from line only takes static numbers then you cant jump back

#

i wanted to make a subroutine and then realized there is no way to return execution

wispy galleon
fathom axle
#

well excecute from line does not take variables

#

very reliable

hollow jetty
#

i swear it does

fathom axle
#

alright why does it produce different results on different runs

hollow jetty
#

it deletes all variables when you stop AND when you run

fathom axle
#

the first run printed out the correct answer

#

the subsequent ones print 1 (wrong answer)

hollow jetty
#

add a wait at the start

hollow jetty
#

ive tested this so long ago

#

maybe the wait will fix it

fathom axle
#

had to rewrite the code because the scripts dont save

hollow jetty
fathom axle
#

now it prints nothing

brisk hull
#

loaf u added random numbers?

#

if yes can i gamlble

#

yay

hollow jetty
brisk hull
#

oh theres sound effects too cool

hollow jetty
#

is it because its waiting 0

#

make it wait 1 sec

brisk hull
#

u should add a way to clean the output

#

like

hollow jetty
brisk hull
#

clean

fathom axle
#

i removed the wait and made the script the exact same as before

hollow jetty
fathom axle
#

and now it still doesnt print anything

hollow jetty
#

WAIT

#

i know

#

I KNOW WHY

#

did you paste the code from notepad?

fathom axle
#

i did not

#

typed it entirely

hollow jetty
#

wha

#

paste the code here

fathom axle
#
var number: n = 15
var number: p = 1
if variable: n <= number: 1
execute from line 9
end
var number: p = math p * n
var number: n = math n - 1
execute from line 3
print variable: p
#

the first iteration of the code included a tab character on line 4 for indentation but it doesnt recognize it

hollow jetty
#

indentation doesnt exist

#

in loafscript

fathom axle
#

it appears my output was scrolled down

#

anyway its now complaining n doesnt exist

hollow jetty
hollow jetty
fathom axle
#

line 1 defines n to be 15

hollow jetty
#

thats weird

fathom axle
#

i pasted the code i posted above and it also complains line 5 has an invalid function/keyword

#

alongside n not existing

#

why does it matter that code was pasted instead of typed or whatever

#

the same text should give the same result

hollow jetty
#

line 5 is "end", theres no way it doesnt work

fathom axle
#

well doing something resolved the line 5 error

#

but the line 3 error still stands

#

printing n does not seem to print anything

hollow jetty
fathom axle
#

i already did

hollow jetty
#

the current ver

fathom axle
#
var number: n = 15
var number: p = 1
print variable: n
if variable: n <= number: 1
execute from line 10
end
var number: p = math p * n
var number: n = math n - 1
execute from line 4
print variable: p
stop
#

in case you havent figured it out this code calculates the factorial of n (15! = 1307674368000)

hollow jetty
#

whats the point of the stop

#

its at the end

#

why

#

it stops anyways

fleet skiff
#

make so lines have line number next to them like any law abiding programming language would

fathom axle
#

sometimes the code just loops on itself and prints indefinitely

hollow jetty
#

you do know how execute from line works right

#

it keeps going until the end of the script

#

but it starts from that line

#

maybe its stacking

fathom axle
#

define stacking

#

count the lines and line 10 prints p

hollow jetty
fathom axle
#

this code doesnt print indefinitely if it runs

#

it just prints once

#

but another code i have does do that

hollow jetty
#

ye see

#

this loops

#

because executing from line 1 will also hit execute from line 3 because it passes it

fathom axle
#

please count the lines

#

line 10 is print variable: p

hollow jetty
#

but it doesnt print e

#

because it stops when encountering an execute from line

fathom axle
#

because it errors

hollow jetty
#

which is good to know

#

ok rq im gonna add line numbers now

#

ts is annoying me

#

how should i go about doing this?

fathom axle
#

this code prints indefinitely

#

or just simply

if number: 4 > number: 5
execute line 3
print string: hello
end
execute line 2
#

execute line 2 executes execute line 3 which executes line 3 which finishes so execute line 3 finishes so execute line 2 finishes

#

it should terminate

#

and yet it does not

hollow jetty
fathom axle
#

something tells me you did not consider if anyone would use execute line to execute execute line
and so the return line gets overwritten by execute line 3

#

and so it finishes and goes to line 4 and reaches execute line 2 again

hollow jetty
#

what

fathom axle
#

refer to the simplified code

#

how execute line should work is that it will return after the line in question finishes executing

hollow jetty
#

alr

fathom axle
#

in the simplified code execute line 2 will return after execute line 3 finishes
and execute line 3 finishes when line 3 finishes

#

so in total it should only run line 3 once

#

and yet it runs infinitely

#

my hypothesis is that you only have a single number to store what line to return to

#

when execute line 2 is ran it would be 6 (the line after execute line 2)

#

but when execute line 3 is ran it overwrites that and its now 4

#

so it jumps to 4, slides to 5 and runs execute line 2 again

hollow jetty
#

i just make it do the function that runs the code

#

it executes the line while it keeps going through the code

fathom axle
#

but what if the line it executes is also an execute line

hollow jetty
#

starting to get bored of working on this

#

should i make it open source

#

and then just do something else

#

like a fake computer

#

thatd be so cool to mak

#

so fun

#

i can imagine coding the apps to open in a little window

#

maybe even add a loafscript app

fathom axle
hollow jetty
#

well the only reason i made loafscript was cuz i was bored and wanted to see if a sort of text based coding was possible

#

it was very very fun

fathom axle
#

also what would execute line -> execute from line do

hollow jetty
fathom axle
#

how is execute from line implemented

hollow jetty
#

i can make the game uncopylocked lowk

#

i kinda wanna now

fathom axle
#

in an abstract way

#

does it set the program counter (current line) to that line

hollow jetty
#

would be cool to let people make their own versions and use it as a basis for better coding languages

fathom axle
#

the main question would be how execute line works

#

to see what would happen if an execute line goes into an execute from line

#

would execute from line override the current line so execute line continues somewhere else

hollow jetty
#

LEAKED code

brisk hull
#

@hollow jetty i will try to make a music maker herw

#

not sure

#

if i did it would be a simple loop but it works i guess

brisk hull
#

@hollow jetty can u add so you can use variables to play sounds?

brisk hull
#

music maker

hollow jetty
#

LoafScript is now uncopylocked!

1163915202_50

Please read the description if you want to copy it

forest tapir
brisk hull
hollow jetty
night mortar
#

does it means that you stop working on it?

#

is it a troll?

#

gonna see by myself

hollow jetty
#

im bored of it

#

i only worked on it for fun

#

and now im bored

#

so

#

fuck it

#

do your own updates

#

lmao

night mortar
#

ok

#

I don't understand anything in your scripts but why not

#

maybe a day I will decode that for myself

night mortar
#

I'm pretty new to scripts

hollow jetty
night mortar
#

I still learn what block do what

#

And I do random stuff

#

yeah

#

I hope someone will take your job and work instead of you on this

#

to replace you

#

it's sad that it lasts not that much time

brisk hull
hollow jetty
#

gng

#

loafscript's code is not that confusing

#

make your own language or make like loafscript+

#

idfk

#

have fun

#

im gonna make a computer now

#

in retrostudio

#

like a fake OS

#

will be fun

#

btye

empty jackal
rough tendon
#

will allow to use tables, math library and more

swift blade
#

What a beauty

fossil wadi
#

AHHHHHHHHHHHHHHHHH

gritty juniper
#

this is insane

grizzled plaza
#

on parts

hollow jetty
#

no 3d stuff

grizzled plaza
hollow jetty
grizzled plaza
grizzled plaza
# hollow jetty no

ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤۦ

rough tendon
#

ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤۦ

swift blade
#

ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤۦ

#

ㅤㅤㅤ

brisk hull
#

rip loaf script

#

we'll miss you

hollow jetty
#

its uncopylocked now

#

if anything its less dead

#

plus i had to stop working on it because i have a REAL game to work on in Godot

#

cant waste time on RetroStudio

pine fable
pine fable
hollow jetty
#

no

#

its not possible

#

the games uncopylocked go try do it yourself

#

best youre gonna get is:
print " hello "
and thatll overcomplicate everything

#

the language already runs slow enough

pine fable
#

ok then how do you use the strings and could you add documentation

#

use github or add it to a discord channel in the LS discord if you have it

hollow jetty
hollow jetty
#

not for some lame retrostudio thing

hollow jetty
#

its not abnormal

fathom axle
#

you only use them to declare variables and functions

hollow jetty
#

do you realize how much slower loafscript would run if it had to check for quotes at the start and end and all that detecting stuff

#

to figure out your stupid little type

#

this is just the simpler way

#

thats the design philosophy

hollow jetty
#

BUMP

grizzled plaza
#

BURP

grizzled plaza
#

boop

grizzled plaza
#

BURP

empty jackal
#

bro pepe

grizzled plaza
hollow jetty
#

why did this die

brisk hull
hollow jetty
#

and also you can make your own updates

brisk hull
#

im lazy