The spaces don't matter for lua, whitespace is ignored. you can have your entire script on one line if you use semicolons to separate chunks and don't want commenting, but newlines with indentation and the like makes it human readable
also if you want to print "ray casted" you need to do print("ray casted"), it's a string.