execute as @s if entity @s[nbt={ActiveEffects:[{Id:28}]}] run tellraw @s {"text": "RTP cannot be triggered while slow falling is active...", "color": "red", "bold":false}
execute as @s if entity @s[nbt={ActiveEffects:[{Id:28}]}] run scoreboard players set @s darkrtp 0

execute as @s if entity @s[nbt={Dimension:"create_dimension:steamworks_realm"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"irons_spellbooks:pocket_dimension"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"compactmachines:compact_world"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"spellbladenext:glassocean"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ae2:spatial_storage"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"javd:void"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:moon"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:moon_orbit"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:mars"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:mars_orbit"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:mercury"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:mercury_orbit"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:venus"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:venus_orbit"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:glacio"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:glacio_orbit"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}
execute as @s if entity @s[nbt={Dimension:"ad_astra:earth_orbit"}] run tellraw @s {"text": "RTP cannot be triggered in this Dimension", "color": "red", "bold":false}

execute as @s if entity @s[nbt={Dimension:"create_dimension:steamworks_realm"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"irons_spellbooks:pocket_dimension"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"compactmachines:compact_world"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"spellbladenext:glassocean"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ae2:spatial_storage"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"javd:void"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:moon"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:moon_orbit"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:mars"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:mars_orbit"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:mercury"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:mercury_orbit"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:venus"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:venus_orbit"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:glacio"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:glacio_orbit"}] run scoreboard players set @s darkrtp 0
execute as @s if entity @s[nbt={Dimension:"ad_astra:earth_orbit"}] run scoreboard players set @s darkrtp 0

execute as @s[scores={darkrtp=1..}] as @s run function darkrtp:darkrtp