MrGarretto's One-Command Creations

Giving the modded minecraft feeling to vanilla

Rocket Ships command (1.10.2)
About this command
This command adds rocket ships, which you can ride to the moon! Watch the video below to learn how to craft the rocket, build the launch pad, and fly away!
Show source commands

INIT:scoreboard objectives add RoS_I dummy
INIT:scoreboard objectives add RoS_ChPlat dummy
INIT:scoreboard objectives add RoS_isPart dummy
INIT:scoreboard objectives add RoS_Assemble dummy
INIT:scoreboard objectives add RoS_Stage dummy
INIT:scoreboard objectives add RoS_Ride dummy
INIT:scoreboard objectives add RoS_Life dummy
INIT:scoreboard objectives add RoS_Tick dummy
INIT:scoreboard objectives add RoS_Rem dummy
INIT:tellraw @a {"color":"dark_aqua","text":"Rocket Ships command module has been installed!"}
INIT:tellraw @a {"color":"red","text":"Command by MrGarretto"}
scoreboard players set @e[type=Item] RoS_I 1 {Item:{id:"minecraft:coal_block"}}
scoreboard players set @e[type=Item] RoS_I 2 {Item:{id:"minecraft:iron_block"}}
execute @e[score_RoS_I_min=1,score_RoS_I=1] ~ ~ ~ execute @e[r=1,score_RoS_I_min=2,score_RoS_I=2] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:"minecraft:furnace_minecart",Count:1,tag:{display:{Name:"FuelCell"}}}}
execute @e[score_RoS_I_min=1,score_RoS_I=1] ~ ~ ~ execute @e[r=1,score_RoS_I_min=2,score_RoS_I=2] ~ ~ ~ particle smoke ~ ~ ~ 0 0 0 0.2 50
execute @e[score_RoS_I_min=1,score_RoS_I=1] ~ ~ ~ execute @e[r=1,score_RoS_I_min=2,score_RoS_I=2] ~ ~ ~ kill @e[type=Item,r=3,score_RoS_I_min=1,score_RoS_I=2]
scoreboard players set @e[type=Item] RoS_I 3 {Item:{id:"minecraft:oak_stairs"}}
scoreboard players set @e[type=Item] RoS_I 4 {Item:{id:"minecraft:glass"}}
execute @e[score_RoS_I_min=3,score_RoS_I=3] ~ ~ ~ execute @e[r=1,score_RoS_I_min=4,score_RoS_I=4] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:"minecraft:hopper_minecart",Count:1,tag:{display:{Name:"RocketCockpit"}}}}
execute @e[score_RoS_I_min=3,score_RoS_I=3] ~ ~ ~ execute @e[r=1,score_RoS_I_min=4,score_RoS_I=4] ~ ~ ~ particle smoke ~ ~ ~ 0 0 0 0.2 50
execute @e[score_RoS_I_min=3,score_RoS_I=3] ~ ~ ~ execute @e[r=1,score_RoS_I_min=4,score_RoS_I=4] ~ ~ ~ kill @e[type=Item,r=3,score_RoS_I_min=3,score_RoS_I=4]
scoreboard players set @e[type=Item] RoS_I 5 {Item:{id:"minecraft:hopper"}}
scoreboard players set @e[type=Item] RoS_I 6 {Item:{id:"minecraft:fire_charge"}}
execute @e[score_RoS_I_min=5,score_RoS_I=5] ~ ~ ~ execute @e[r=1,score_RoS_I_min=6,score_RoS_I=6] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:"minecraft:hopper",Count:1,tag:{display:{Name:"RocketThruster"}}}}
execute @e[score_RoS_I_min=5,score_RoS_I=5] ~ ~ ~ execute @e[r=1,score_RoS_I_min=6,score_RoS_I=6] ~ ~ ~ particle smoke ~ ~ ~ 0 0 0 0.2 50
execute @e[score_RoS_I_min=5,score_RoS_I=5] ~ ~ ~ execute @e[r=1,score_RoS_I_min=6,score_RoS_I=6] ~ ~ ~ kill @e[type=Item,r=3,score_RoS_I_min=5,score_RoS_I=6]
scoreboard players set @e[type=Item] RoS_I 7 {Item:{id:"minecraft:furnace_minecart"}}
scoreboard players set @e[type=Item] RoS_I 8 {Item:{id:"minecraft:hopper_minecart"}}
execute @e[score_RoS_I_min=7,score_RoS_I=7] ~ ~ ~ execute @e[r=1,score_RoS_I_min=8,score_RoS_I=8] ~ ~ ~ execute @e[r=1,score_RoS_I_min=5,score_RoS_I=5] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:"minecraft:spawn_egg",Count:1,tag:{EntityTag:{id:Silverfish},display:{Name:"RocketShip"}}}}
execute @e[score_RoS_I_min=7,score_RoS_I=7] ~ ~ ~ execute @e[r=1,score_RoS_I_min=8,score_RoS_I=8] ~ ~ ~ execute @e[r=1,score_RoS_I_min=5,score_RoS_I=5] ~ ~ ~ particle smoke ~ ~ ~ 0 0 0 0.2 50
execute @e[score_RoS_I_min=7,score_RoS_I=7] ~ ~ ~ execute @e[r=1,score_RoS_I_min=8,score_RoS_I=8] ~ ~ ~ execute @e[r=1,score_RoS_I_min=5,score_RoS_I=5] ~ ~ ~ kill @e[type=Item,r=3,score_RoS_I_min=5,score_RoS_I=8]
# Placing the rocket
scoreboard players set @e[type=Silverfish,name=RocketShip] RoS_ChPlat 1
execute @e[type=Silverfish] ~ ~ ~ detect ~ ~-1 ~ iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~-1 ~-1 ~-1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~-1 ~ ~-1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~-1 ~1 ~-1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~-1 ~-1 ~1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~-1 ~ ~1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~-1 ~1 ~1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~1 ~-1 ~-1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~1 ~ ~-1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~1 ~1 ~-1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~1 ~-1 ~-1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~1 ~-1 ~1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~1 ~ ~1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~1 ~1 ~1 iron_bars -1 execute @e[c=0] ~ ~ ~ detect ~ ~-2 ~ nether_brick -1 execute @e[c=0] ~ ~ ~ detect ~1 ~-2 ~ nether_brick -1 execute @e[c=0] ~ ~ ~ detect ~-1 ~-2 ~ nether_brick -1 execute @e[c=0] ~ ~ ~ detect ~ ~-2 ~1 nether_brick -1 execute @e[c=0] ~ ~ ~ detect ~ ~-2 ~-1 nether_brick -1 execute @e[c=0] ~ ~ ~ detect ~-2 ~-2 ~ iron_block -1 execute @e[c=0] ~ ~ ~ detect ~2 ~-2 ~ iron_block -1 execute @e[c=0] ~ ~ ~ detect ~ ~-2 ~-2 iron_block -1 execute @e[c=0] ~ ~ ~ detect ~ ~-2 ~2 iron_block -1 execute @e[c=0] ~ ~ ~ detect ~-1 ~-2 ~-1 stone 6 execute @e[c=0] ~ ~ ~ detect ~-1 ~-2 ~-2 stone 6 execute @e[c=0] ~ ~ ~ detect ~-2 ~-2 ~-1 stone 6 execute @e[c=0] ~ ~ ~ detect ~-2 ~-2 ~-2 stone 6 execute @e[c=0] ~ ~ ~ detect ~-1 ~-2 ~1 stone 6 execute @e[c=0] ~ ~ ~ detect ~-2 ~-2 ~1 stone 6 execute @e[c=0] ~ ~ ~ detect ~-1 ~-2 ~2 stone 6 execute @e[c=0] ~ ~ ~ detect ~-2 ~-2 ~2 stone 6 execute @e[c=0] ~ ~ ~ detect ~1 ~-2 ~-1 stone 6 execute @e[c=0] ~ ~ ~ detect ~2 ~-2 ~-1 stone 6 execute @e[c=0] ~ ~ ~ detect ~1 ~-2 ~-2 stone 6 execute @e[c=0] ~ ~ ~ detect ~2 ~-2 ~-2 stone 6 execute @e[c=0] ~ ~ ~ detect ~1 ~-2 ~1 stone 6 execute @e[c=0] ~ ~ ~ detect ~2 ~-2 ~1 stone 6 execute @e[c=0] ~ ~ ~ detect ~1 ~-2 ~2 stone 6 execute @e[c=0] ~ ~ ~ detect ~2 ~-2 ~2 stone 6 execute @e[c=0] ~ ~ ~ detect ~-3 ~-2 ~-2 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~-3 ~-2 ~ nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~-3 ~-2 ~2 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~3 ~-2 ~-2 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~3 ~-2 ~ nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~3 ~-2 ~2 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~-2 ~-2 ~-3 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~ ~-2 ~-3 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~2 ~-2 ~-3 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~-2 ~-2 ~3 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~ ~-2 ~3 nether_brick_stairs -1 execute @e[c=0] ~ ~ ~ detect ~2 ~-2 ~3 nether_brick_stairs -1 scoreboard players set @e[c=0] RoS_ChPlat 2
# If the launch platform is not built correctly
execute @e[type=Silverfish,name=RocketShip,score_RoS_ChPlat_min=1,score_RoS_ChPlat=1] ~ ~ ~ tellraw @p {"color":"red","text":"The launch platform has not been constructed correctly!"}
execute @e[type=Silverfish,name=RocketShip,score_RoS_ChPlat_min=1,score_RoS_ChPlat=1] ~ ~ ~ summon Item ~ ~ ~ {Item:{id:"minecraft:spawn_egg",Count:1,tag:{EntityTag:{id:Silverfish},display:{Name:"RocketShip"}}}}
tp @e[type=Silverfish,name=RocketShip,score_RoS_ChPlat_min=1,score_RoS_ChPlat=1] ~ ~-500 ~
# If the launch platform is complete
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {CustomName:"RocketBase",Invisible:1,NoGravity:1}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:stained_hardened_clay",Damage:9}],CustomName:"ROSPthr1",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:stained_hardened_clay",Damage:9}],CustomName:"ROSPthr2",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:stained_hardened_clay",Damage:9}],CustomName:"ROSPthr3",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:stained_hardened_clay",Damage:9}],CustomName:"ROSPthr4",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:stained_hardened_clay",Damage:9}],CustomName:"ROSPthr5",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:stained_hardened_clay",Damage:9}],CustomName:"ROSPthr6",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:stained_hardened_clay",Damage:9}],CustomName:"ROSPthr7",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:stained_hardened_clay",Damage:9}],CustomName:"ROSPthr8",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {ArmorItems:[{},{},{},{id:"minecraft:quartz_block"}],CustomName:"ROSPbod1",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {ArmorItems:[{},{},{},{id:"minecraft:quartz_block"}],CustomName:"ROSPbod2",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {ArmorItems:[{},{},{},{id:"minecraft:coal_block"}],CustomName:"ROSPbod3",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {ArmorItems:[{},{},{},{id:"minecraft:quartz_block"}],CustomName:"ROSPbod4",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:coal_block"}],CustomName:"ROSPnose1",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ summon ArmorStand ~ ~ ~ {Small:1,ArmorItems:[{},{},{},{id:"minecraft:quartz_block"}],CustomName:"ROSPnose2",Invisible:1,NoGravity:1,Tags:["ROSPpart"]}
execute @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~ ~ scoreboard players set @e[type=ArmorStand,r=3,name=!RocketBase] RoS_isPart 1
tp @e[name=RocketShip,score_RoS_ChPlat_min=2] ~ ~-500 ~
# Make the rocket parts always in the right position, relative to the RocketBase armorstand
scoreboard players add @e[type=ArmorStand,score_RoS_isPart_min=1] RoS_Assemble 0
scoreboard players add @e[type=ArmorStand,score_RoS_isPart_min=1,score_RoS_Assemble=9] RoS_Assemble 1

execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPbod1] ~ ~-1.22 ~
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPbod2] ~ ~-0.6 ~
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPbod3] ~ ~.03125 ~
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPbod4] ~ ~0.65 ~
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPthr1] ~-0.3 ~-0.5 ~-0.3
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPthr2] ~-0.3 ~-0.5 ~0.3
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPthr3] ~0.3 ~-0.5 ~-0.3
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPthr4] ~0.3 ~-0.5 ~0.3
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPthr5] ~-0.3 ~-0.8 ~-0.3
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPthr6] ~-0.3 ~-0.8 ~0.3
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPthr7] ~0.3 ~-0.8 ~-0.3
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[score_RoS_Assemble_min=10,name=ROSPthr8] ~0.3 ~-0.8 ~0.3
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[type=ArmorStand,score_RoS_Assemble_min=10,name=ROSPnose1] ~ ~1.8 ~
execute @e[name=RocketBase,c=1] ~ ~ ~ teleport @e[type=ArmorStand,score_RoS_Assemble_min=10,name=ROSPnose2] ~ ~2.23 ~
# Making the rocket takeoff once a player enters it
scoreboard players add @e[type=ArmorStand,name=RocketBase] RoS_Stage 0
scoreboard players add @e[c=1,type=ArmorStand,name=RocketBase,score_RoS_Stage_min=1,score_RoS_Stage=1200] RoS_Stage 1
execute @e[type=ArmorStand,name=RocketBase] ~ ~ ~ scoreboard players set @a[r=1,c=1] RoS_Ride 1
execute @a[score_RoS_Ride_min=1] ~ ~ ~ scoreboard players set @e[c=1,type=ArmorStand,name=RocketBase,score_RoS_Stage=0] RoS_Stage 1
execute @a[score_RoS_Ride_min=1] ~ ~ ~ tp @a[c=0,score_RoS_Ride_min=1] @e[c=1,type=ArmorStand,name=RocketBase]
effect @a[score_RoS_Ride_min=1] invisibility 3 3 true
# Rocket takeoff effects
execute @e[name=RocketBase,score_RoS_Stage_min=5,score_RoS_Stage=5] ~ ~ ~ playsound block.fire.extinguish neutral @p ~ ~ ~ 1 0
execute @e[name=RocketBase,score_RoS_Stage_min=65,score_RoS_Stage=130] ~ ~ ~ playsound entity.cat.hiss neutral @a ~ ~ ~ 1 0
execute @e[name=RocketBase,score_RoS_Stage_min=500,score_RoS_Stage=500] ~ ~ ~ playsound entity.firework.blast neutral @a
execute @e[name=RocketBase,score_RoS_Stage_min=120,score_RoS_Stage=900] ~ ~ ~ playsound block.fire.extinguish neutral @p ~ ~ ~ 0.5 2
execute @e[name=RocketBase,score_RoS_Stage_min=660,score_RoS_Stage=660] ~ ~ ~ time set 18000
execute @e[name=RocketBase,score_RoS_Stage_min=5,score_RoS_Stage=120] ~ ~ ~ particle fireworksSpark ~-0.3 ~ ~-0.3 0 -0.4 0 0.01 10
execute @e[name=RocketBase,score_RoS_Stage_min=5,score_RoS_Stage=120] ~ ~ ~ particle fireworksSpark ~-0.3 ~ ~0.3 0 -0.4 0 0.01 10
execute @e[name=RocketBase,score_RoS_Stage_min=5,score_RoS_Stage=120] ~ ~ ~ particle fireworksSpark ~0.3 ~ ~-0.3 0 -0.4 0 0.01 10
execute @e[name=RocketBase,score_RoS_Stage_min=5,score_RoS_Stage=120] ~ ~ ~ particle fireworksSpark ~0.3 ~ ~0.3 0 -0.4 0 0.01 10
execute @e[name=RocketBase,score_RoS_Stage_min=60,score_RoS_Stage=180] ~ ~ ~ particle smoke ~ ~ ~ 1 0 1 0.05 100
execute @e[name=RocketBase,score_RoS_Stage_min=80,score_RoS_Stage=140] ~ ~ ~ particle cloud ~ ~ ~ 2 0 2 0.5 500
execute @e[name=RocketBase,score_RoS_Stage_min=120,score_RoS_Stage=1200] ~ ~ ~ particle flame ~ ~ ~ 0 0 0 0.05 100
execute @e[name=RocketBase,score_RoS_Stage_min=120,score_RoS_Stage=900] ~ ~ ~ particle cloud ~ ~ ~ 0 0 0 0.1 100
execute @e[name=RocketBase] ~ ~ ~ detect ~ ~-2 ~ end_stone -1 effect @a[r=20] resistance 20 4 true
# Countdown
execute @e[name=RocketBase,score_RoS_Stage_min=1,score_RoS_Stage=1] ~ ~ ~ tellraw @a {color:red,bold:true,text:"5"}
execute @e[name=RocketBase,score_RoS_Stage_min=20,score_RoS_Stage=20] ~ ~ ~ tellraw @a {color:red,bold:true,text:"4"}
execute @e[name=RocketBase,score_RoS_Stage_min=40,score_RoS_Stage=40] ~ ~ ~ tellraw @a {color:red,bold:true,text:"3"}
execute @e[name=RocketBase,score_RoS_Stage_min=60,score_RoS_Stage=60] ~ ~ ~ tellraw @a {color:red,bold:true,text:"2"}
execute @e[name=RocketBase,score_RoS_Stage_min=80,score_RoS_Stage=80] ~ ~ ~ tellraw @a {color:red,bold:true,text:"1"}
execute @e[name=RocketBase,score_RoS_Stage_min=100,score_RoS_Stage=100] ~ ~ ~ tellraw @a {color:red,bold:true,text:"Liftoff!"}
execute @e[name=RocketBase] ~ ~ ~ detect ~ ~-2 ~ end_stone -1 scoreboard players reset @p RoS_Ride
execute @e[name=RocketBase] ~ ~ ~ detect ~ ~-2 ~ end_stone -1 tp @a ~3 ~3 ~
execute @e[name=RocketBase] ~ ~ ~ detect ~ ~-2 ~ end_stone -1 playsound entity.generic.explode neutral @a ~ ~ ~ 1 1
execute @e[name=RocketBase] ~ ~ ~ detect ~ ~-2 ~ end_stone -1 particle explode ~ ~ ~ 0 1 0 1 500
execute @e[name=RocketBase] ~ ~ ~ detect ~ ~-2 ~ end_stone -1 kill @e[type=ArmorStand,r=3,name=!ROSMoon]
# Rocket movement
tp @e[name=RocketBase,score_RoS_Stage_min=120,score_RoS_Stage=159] ~ ~0.1 ~
tp @e[name=RocketBase,score_RoS_Stage_min=160,score_RoS_Stage=279] ~ ~0.2 ~
tp @e[name=RocketBase,score_RoS_Stage_min=280,score_RoS_Stage=399] ~ ~0.4 ~
tp @e[name=RocketBase,score_RoS_Stage_min=400,score_RoS_Stage=499] ~ ~0.7 ~
tp @e[name=RocketBase,score_RoS_Stage_min=500,score_RoS_Stage=900] ~ ~0.2 ~
execute @e[name=RocketBase,score_RoS_Stage_min=900] ~ ~ ~ detect ~ ~-2 ~ air 0 tp @e[type=ArmorStand,name=RocketBase] ~ ~-0.1 ~
execute @e[name=RocketBase,score_RoS_Stage_min=900,score_RoS_Stage=1000] ~ ~ ~ summon Bat ~ 200 ~ {CustomName:"ROSBat",Silent:1}
effect @e[type=Bat,name=ROSBat] invisibility 2 1 true
execute @e[name=RocketBase,score_RoS_Stage_min=900,score_RoS_Stage=900] ~ ~ ~ summon ArmorStand ~ 200 ~ {CustomName:"ROSMoon",Marker:1,Invisible:1,NoGravity:1}
execute @e[name=ROSMoon] ~ ~ ~ effect @a[r=60] jump_boost 2 2 true
execute @e[name=ROSMoon] ~ ~ ~ effect @a[r=60] slowness 2 1 true
execute @e[name=ROSMoon] ~ ~ ~ effect @a[r=60] mining_fatigue 2 1 true
scoreboard players add @a RoS_Tick 1
scoreboard players reset @a[score_RoS_Tick_min=21] RoS_Tick
execute @e[name=ROSMoon] ~ ~ ~ execute @a[r=60,score_RoS_Tick_min=20] ~ ~ ~ detect ~ ~-1 ~ end_stone -1 particle footstep ~ ~0.01 ~ 0 0 0 1 1
execute @e[name=ROSMoon] ~ ~ ~ execute @a[r=60,score_RoS_Tick_min=20] time set 18000
scoreboard players add @e[type=Bat,name=ROSBat] RoS_Life 1
execute @e[type=Bat,name=ROSBat] ~ ~ ~ fill ~-3 ~-7 ~-3 ~3 ~-2 ~3 end_stone
kill @e[type=Bat,score_RoS_Life_min=350]
# Remove the planet after the player jumps back to Earth
execute @a[y=120,r=5] ~ ~ ~ scoreboard players set @e[name=ROSMoon] RoS_Rem 1
execute @e[name=ROSMoon,score_RoS_Rem_min=1] ~ ~ ~ fill ~ ~-7 ~ ~38 ~13 ~38 air 0 replace end_stone
execute @e[name=ROSMoon,score_RoS_Rem_min=1] ~ ~ ~ fill ~ ~-7 ~ ~-38 ~13 ~38 air 0 replace end_stone
execute @e[name=ROSMoon,score_RoS_Rem_min=1] ~ ~ ~ fill ~ ~-7 ~ ~38 ~13 ~-38 air 0 replace end_stone
execute @e[name=ROSMoon,score_RoS_Rem_min=1] ~ ~ ~ fill ~ ~-7 ~ ~-38 ~13 ~-38 air 0 replace end_stone
execute @e[name=ROSMoon,score_RoS_Rem_min=1] ~ ~ ~ time set day
kill @e[name=ROSMoon,score_RoS_Rem_min=1]

For Minecraft version 1.10.2
Click here for other versions of this command!
How to use
Give yourself a command block with /give @p command_block. Place it then paste the command from below into it. One command creations are similar to Minecraft mods, but are much easier to add to your world!
Click here for other versions of this command!