I have one word for you.........Failsafes. There isnt 1 failsafe in that script and failsafes are what makes a script good. Look through tuts and other scripts so you can add failsafes and backup options and stuff.
Lets use this an example....
SCAR Code:
Procedure FindChest;
Begin
Repeat
FindColorTolerance(x, y, 4018270, 6, 6, 514, 337, 40);
MMouse(x, y, 2, 2);
Until(IsUpText('hest'));
End;
This is a neverending loop if it doesnt find the test which is strictly forbiden in scar scripting. Always have a buckup if it doesnt find it because this procedure can very easily run all night without ever finding the chest because maybe you die, a random comes, something else is the same color (which is VERY possible because you have a very high tolerance) and much more. Have backup features and failsafes.