The problem with your styling is that there are huge line gaps, indentation is all wrong.
PHP Code:
function onCreated() {
if (player.hearts > 5) {
this.chat = "Hello!";
}
}
function onPlayerTouchsme() {
if (player.ap > 80) {
player.hearts += 1;
if (player.hearts >= 10) {
this.chat = "Thats a lot of hearts!";
}
}
}
Beginning and ending curly braces are on their own line. Code inside said braces is indented more. Any code inside those braces is indented even more.
This makes reading scripts much easier.
Do not use the built in style function on rc, as it tends to muck things up, and it is much better practice to style as you go along, instead of coding a giant wall of text, then attempting to style afterwards.
Beginning braces should be on the same line as the function declaration, and ending braces should be on their own line.