Roblox Interview Question

Question involving string manipulation and removing consecutive characters