execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 0 summon item_frame ~ ~-1 ~ {Tags:["tsFlySpawn"]}
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 0 execute @e[tag=tsFlySpawn,c=1] ~ ~ ~ summon armor_stand ~ ~-0.5 ~0.475 {Tags:["tsFly","tsFlyD"],Invisible:1,ArmorItems:[{},{},{},{id:"red_sandstone_stairs",Count:1}],Rotation:[180f,0f],Marker:1,NoGravity:1,Silent:1b}
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 0 setblock ~ ~-1 ~ air
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 1 summon item_frame ~ ~-1 ~ {Tags:["tsFlySpawn"]}
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 1 execute @e[tag=tsFlySpawn,c=1] ~ ~ ~ summon armor_stand ~ ~-0.5 ~0.475 {Tags:["tsFly","tsFlyA"],Invisible:1,ArmorItems:[{},{},{},{id:"red_sandstone_stairs",Count:1}],Rotation:[0f,0f],Marker:1,NoGravity:1,Silent:1b}
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 1 setblock ~ ~-1 ~ air
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 3 summon item_frame ~ ~-1 ~ {Tags:["tsFlySpawn"]}
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 3 execute @e[tag=tsFlySpawn,c=1] ~ ~ ~ summon armor_stand ~ ~-0.5 ~0.475 {Tags:["tsFly","tsFlyC"],Invisible:1,ArmorItems:[{},{},{},{id:"red_sandstone_stairs",Count:1}],Rotation:[90f,0f],Marker:1,NoGravity:1,Silent:1b}
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 3 setblock ~ ~-1 ~ air
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 2 summon item_frame ~ ~-1 ~ {Tags:["tsFlySpawn"]}
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 2 execute @e[tag=tsFlySpawn,c=1] ~ ~ ~ summon armor_stand ~ ~-0.5 ~0.475 {Tags:["tsFly","tsFlyB"],Invisible:1,ArmorItems:[{},{},{},{id:"red_sandstone_stairs",Count:1}],Rotation:[270f,0f],Marker:1,NoGravity:1,Silent:1b}
execute @e ~ ~ ~ detect ~ ~-1 ~ red_sandstone_stairs 2 setblock ~ ~-1 ~ air

kill @e[tag=tsFlySpawn]

tp @e[tag=tsFly,score_tsFly=50] ~ ~0.1 ~ 
execute @e[tag=tsFly,score_tsFly=50] ~ ~1 ~ teleport @a[r=1] ~ ~-0.4 ~
execute @e[tag=tsFly,score_tsFly=50] ~ ~1 ~ teleport @e[type=falling_block,r=1] ~ ~-0.4 ~

scoreboard players add @e[tag=tsFly] tsFly 1
execute @e[tag=tsFly,score_tsFly_min=50] ~ ~ ~ entitydata @s {ArmorItems:[{},{},{},{}]}
execute @e[tag=tsFlyA,score_tsFly_min=50,score_tsFly=50] ~ ~ ~ setblock ~ ~ ~ red_sandstone_stairs 6
execute @e[tag=tsFlyB,score_tsFly_min=50,score_tsFly=50] ~ ~ ~ setblock ~ ~ ~ red_sandstone_stairs 4
execute @e[tag=tsFlyC,score_tsFly_min=50,score_tsFly=50] ~ ~ ~ setblock ~ ~ ~ red_sandstone_stairs 5
execute @e[tag=tsFlyD,score_tsFly_min=50,score_tsFly=50] ~ ~ ~ setblock ~ ~ ~ red_sandstone_stairs 7

scoreboard players tag @e[tag=tsFly,score_tsFly_min=50] add tsFlyRemove
execute @a ~ ~ ~ scoreboard players tag @e[tag=tsFly,r=2] remove tsFlyRemove

execute @e[tag=tsFlyRemove] ~ ~ ~ setblock ~ ~ ~ air
execute @e[tag=tsFlyRemove] ~ ~ ~ setblock ~ ~-1 ~ air
execute @e[tag=tsFlyRemove] ~ ~ ~ execute @s[tag=tsFlyA] ~ ~ ~ summon armor_stand ~ ~-1 ~  {Tags:["tsFlyFall","tsFlyFallA"],Invisible:1,ArmorItems:[{},{},{},{id:"red_sandstone_stairs",Count:1}],Rotation:[0f,0f],Silent:1b}
execute @e[tag=tsFlyRemove] ~ ~ ~ execute @s[tag=tsFlyB] ~ ~ ~ summon armor_stand ~ ~-1 ~  {Tags:["tsFlyFall","tsFlyFallB"],Invisible:1,ArmorItems:[{},{},{},{id:"red_sandstone_stairs",Count:1}],Rotation:[270f,0f],Silent:1b}
execute @e[tag=tsFlyRemove] ~ ~ ~ execute @s[tag=tsFlyC] ~ ~ ~ summon armor_stand ~ ~-1 ~  {Tags:["tsFlyFall","tsFlyFallC"],Invisible:1,ArmorItems:[{},{},{},{id:"red_sandstone_stairs",Count:1}],Rotation:[90f,0f],Silent:1b}
execute @e[tag=tsFlyRemove] ~ ~ ~ execute @s[tag=tsFlyD] ~ ~ ~ summon armor_stand ~ ~-1 ~  {Tags:["tsFlyFall","tsFlyFallD"],Invisible:1,ArmorItems:[{},{},{},{id:"red_sandstone_stairs",Count:1}],Rotation:[180f,0f],Silent:1b}
kill @e[tag=tsFlyRemove]

scoreboard players add @e[tag=tsFlyFall] tsFly 1
execute @e[tag=tsFlyFallA,score_tsFly_min=20] ~ ~ ~ setblock ~ ~ ~ red_sandstone_stairs 1
execute @e[tag=tsFlyFallB,score_tsFly_min=20] ~ ~ ~ setblock ~ ~ ~ red_sandstone_stairs 2
execute @e[tag=tsFlyFallC,score_tsFly_min=20] ~ ~ ~ setblock ~ ~ ~ red_sandstone_stairs 3
execute @e[tag=tsFlyFallD,score_tsFly_min=20] ~ ~ ~ setblock ~ ~ ~ red_sandstone_stairs 0 
kill @e[tag=tsFlyFall,score_tsFly_min=20]