Try this:
Code:
sub EVENT_LEVEL_UP {
if ($ulevel < 51) {
$client->AddAAPoints(2);
}
}
Edit: You were missing a { on the subroutine at the top and missing a > on $client->AddAAPoints.
Edit 2: This is Perl, not Lua, I didn't notice you said you were putting it in a Lua file.