I made a new layer above the main game one, and made it black rather than transparent. Then created a new sprite on the same layer, which was just a white circle, set the blend mode to "Destination Out", and then made follow the player - That's how his lighting works.
The projectiles are sorta the same thing. Each time the mouse is clicked, it starts shooting bullets with a slight spread. So I made a smaller white circle on the "Lights" layer, set it to "Destination Out" and set an event for whenever a bullet was created, it would create this light ontop of it. This worked, but the light source stayed in a straight line while the bullets would veer off at different angles.
Then I made it so that every tick, the smaller light had it's position set to the bullet, and this worked. I don't know very much about programming at all so there might be a better way and it was a lot of trial and error but it works :)