Even though player.timeshit is the name of a player field used by SRB2, and the SRB2 Wiki claims it's Lua-compatible, Lua treats it as nil by default and seems to be unable to access the value stored by the game.

Code:

addHook("ThinkFrame", do
for player in players.iterate
if player.cmd.buttons & BT_USE then
player.timeshit = $1 + 1
end
end
end)