GIve your player 2 variables "ammo" and "cooldown"
when the player spawns, or picks up ammo, set his "ammo" variable to whatever you want.
set to starting value of the cooldown to "2" lets say.
event(3 conditions)
keyboard "on button press "space"
cooldown = 0
ammo > 0
action
create bullet at player.x, player.y
set cooldown to 2
event
every 1 seconds -> player.cooldown -1
This the player can only shoot if the cooldown reaches 0 and has more than 0 ammo