Implementing Dynamic Team Switching with Gamepass Purchase

I’m trying to implement a process in my game where if a player would step on a specific part, it would trigger a prompt to purchase a gamepass. After purchasing, I want the player to keep the gamepass for a set duration, during which the triggering gamepass part disappears. Also, I am aiming to switch the player to a different team temporarily upon purchasing the gamepass. I’ve successfully implemented the purchase prompt when the player steps on the specific part, but I’m looking for help in integrating the team-switch and temporary duration functionality. This script is from the toolbox because I have no idea on how to script. Please help!!!
Screenshot 2024-01-09 at 7.51.23 PM