Random Maze generation with premade assets

hello i need help making this script , im stuck on it
the premade assests are walls and tiles which will get randomly swaped by traps , its for a minigame map im making