Under the 30% ruling you can opt for the ‘partial non-residency status’. You are then considered to be a non-resident tax payer in Box 2 and Box 3, even though you are living in the Netherlands. For Box 1 income you are considered a resident tax payer, therefore you do not pay income tax on assets in Boxes 2 and 3 (except for real estate located in the Netherlands and substantial shareholding in a Dutch resident BV) and you are entitled to the partnership ruling in Box︀ 1.
You only pay tax for income NL source. And you can easily get tax︁ residency certificate in NL being on 30 ruling. Only downside it's only for 5 years.︂ Some time ago it was 10 then reduced..