here is the fixed code, i saw some missing 'end'
function OnObjectCreate(o) --whenever an object is created
if Is_A_Star(o) then --check if they're a real player
Attach_Script_Once(o, "myscript", "")
-- attach myscript to them if they are players
end
end
myscript = {}
function myscript:Killed(ID, obj, killer)
-- called if someone get killed by someone else, not called if killed by null objects, like dying from falling.
print("Killed", ID, obj, killer)
end
Register_Script("myscript", "", myscript) --register script
this should work