print("Player Died") if Player dies
If you want to go from coding small stuff to coding an entire game, you really just need to practice, try searching things up online, or go to the Api-Reference. When I first started to learn how to script, I really just asked questions, so you're on the right track already. I also watched YouTube videos that clarified what I needed to learn. And to answer the "If player dies" thing, well.. you want something to happen when your player dies, all you have to do is go to google/YouTube and type "roblox how to do something when player dies", then you will get your answer very easily. I learned a lot from these YouTubers
You can also find various discord servers that provide "coding help" channels.
Goodluck!