local g=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local w=g:WaitForChild("\077\111\100\117\108\101\115")local v=require(w.src.utils.Logger)local A=require(w.src.GamePasses)local C=require(w.src.DeveloperProducts)local Q=require(w.M)local t=A.HIGH_JUMP_ID local c=A.GHOST_MODE_ID local U={GAME_PASS="\071\097\109\101 \080\097\115\115\101\115";PET="\080\101\116\115";COLLECTABLE="\067\111\108\108\101\099\116\097\098\108\101\115",COIN="\067\111\105\110\115",COIN_PACK="\067\111\105\110 \080\097\099\107\115",ROOM="\082\111\111\109\115"}local B={TRAIL="\084\082\065\073\076";SPEED="\083\080\069\069\068";LIGHT="\076\073\071\072\084"}local S={[t]=A:getGamePass(t),[c]=A:getGamePass(c)}local T={[C.COINS_1]=C:getProduct(C.COINS_1),[C.COINS_2]=C:getProduct(C.COINS_2);[C.COINS_3]=C:getProduct(C.COINS_3);[C.COINS_4]=C:getProduct(C.COINS_4)}local R={["\049\048\048\048\049"]={name="\083\112\101\101\100 \080\101\116 \049";price=300;modelName="\083\112\101\101\100 \080\101\116 \049",modelFolder="\080\101\116\115",cameraOffset=CFrame.new(1,.5,-3);isRotating=false,ability=B.SPEED;speed=25};["\049\048\048\048\050"]={name="\083\112\101\101\100 \080\101\116 \050",price=1000,modelName="\083\112\101\101\100 \080\101\116 \050";modelFolder="\080\101\116\115",cameraOffset=CFrame.new(1,.5,-3),isRotating=false;ability=B.SPEED;speed=35},["\049\048\048\048\051"]={name="\083\112\101\101\100 \080\101\116 \051";price=6000,modelName="\083\112\101\101\100 \080\101\116 \051",modelFolder="\080\101\116\115";cameraOffset=CFrame.new(1,.5,-3);isRotating=false,ability=B.SPEED;speed=45};["\049\048\048\048\052"]={name="\083\112\101\101\100 \080\101\116 \052";price=10000;modelName="\083\112\101\101\100 \080\101\116 \052",modelFolder="\080\101\116\115";cameraOffset=CFrame.new(1,.5,-3),isRotating=false;ability=B.SPEED;speed=55};["\049\048\048\048\053"]={name="\083\112\101\101\100 \080\101\116 \053";price=60000,modelName="\083\112\101\101\100 \080\101\116 \053";modelFolder="\080\101\116\115";cameraOffset=CFrame.new(1,.5,-3),isRotating=false,ability=B.SPEED;speed=65};["\049\048\048\048\054"]={name="\083\112\101\101\100 \080\101\116 \054",price=500000,modelName="\083\112\101\101\100 \080\101\116 \054";modelFolder="\080\101\116\115";cameraOffset=CFrame.new(1,.5,-3),isRotating=false;ability=B.SPEED;speed=75};["\050\048\048\048\049"]={name="\080\097\116\104 \080\101\116 \082\101\100",price=10000;modelName="\080\097\116\104 \080\101\116 \082\101\100",modelFolder="\080\101\116\115",cameraOffset=CFrame.new(1,.5,-2),isRotating=false,ability=B.TRAIL;trailModelName="\082\101\100\084\114\097\105\108"};["\050\048\048\048\050"]={name="\080\097\116\104 \080\101\116 \071\114\101\101\110";price=10000,modelName="\080\097\116\104 \080\101\116 \071\114\101\101\110",modelFolder="\080\101\116\115",cameraOffset=CFrame.new(1,.5,-2);isRotating=false,ability=B.TRAIL;trailModelName="\071\114\101\101\110\084\114\097\105\108"},["\050\048\048\048\051"]={name="\080\097\116\104 \080\101\116 \089\101\108\108\111\119";price=10000;modelName="\080\097\116\104 \080\101\116 \089\101\108\108\111\119",modelFolder="\080\101\116\115",cameraOffset=CFrame.new(1,.5,-2);isRotating=false;ability=B.TRAIL;trailModelName="\089\101\108\108\111\119\084\114\097\105\108"};["\050\048\048\048\052"]={name="\080\097\116\104 \080\101\116 \082\097\105\110\098\111\119";price=100000;modelName="\080\097\116\104 \080\101\116 \082\097\105\110\098\111\119",modelFolder="\080\101\116\115",cameraOffset=CFrame.new(1,.5,-2),isRotating=false;ability=B.TRAIL;trailModelName="\082\097\105\110\098\111\119\084\114\097\105\108"};["\051\048\048\048\049"]={name="\076\105\103\104\116 \080\101\116 \049",price=100,modelName="\076\105\103\104\116 \080\101\116 \049",modelFolder="\080\101\116\115";cameraOffset=CFrame.new(1,.5,-2);isRotating=false;ability=B.LIGHT},["\051\048\048\048\050"]={name="\076\105\103\104\116 \080\101\116 \050",price=1000;modelName="\076\105\103\104\116 \080\101\116 \050";modelFolder="\080\101\116\115";cameraOffset=CFrame.new(1,.5,-2),isRotating=false,ability=B.LIGHT};["\051\048\048\048\051"]={name="\076\105\103\104\116 \080\101\116 \051";price=9000;modelName="\076\105\103\104\116 \080\101\116 \051";modelFolder="\080\101\116\115",cameraOffset=CFrame.new(1,.5,-2),isRotating=false,ability=B.LIGHT},["\051\048\048\048\052"]={name="\076\105\103\104\116 \080\101\116 \052",price=30000;modelName="\076\105\103\104\116 \080\101\116 \052",modelFolder="\080\101\116\115",cameraOffset=CFrame.new(1,.5,-2),isRotating=false;ability=B.LIGHT};["\051\048\048\048\053"]={name="\076\105\103\104\116 \080\101\116 \053",price=100000,modelName="\076\105\103\104\116 \080\101\116 \053",modelFolder="\080\101\116\115";cameraOffset=CFrame.new(1,.5,-2);isRotating=false,ability=B.LIGHT}}local O={["\053\048\048\048\048\048\048\049"]={name="\067\104\101\114\114\121";modelName="\099\104\101\114\114\121",icon="\114\098\120\097\115\115\101\116\105\100\058\047\047\053\048\053\048\054\052\048\057\049\056"}}local W={["\049\048\048\048\048\048\048\049"]={name="\086\101\114\121\069\097\115\121";modelName="\086\101\114\121\069\097\115\121\082\111\111\109";price=0,config={width=5,height=5;prizeCoins=50;playTime=60}};["\049\048\048\048\048\048\048\050"]={name="\069\097\115\121";modelName="\069\097\115\121\082\111\111\109";price=500,config={width=10,height=10,prizeCoins=250;playTime=180}},["\049\048\048\048\048\048\048\051"]={name="\078\111\114\109\097\108",modelName="\078\111\114\109\097\108\082\111\111\109",price=2000,config={width=15,height=15,prizeCoins=2000,playTime=300}},["\049\048\048\048\048\048\048\052"]={name="\072\097\114\100",modelName="\072\097\114\100\082\111\111\109";price=10000,config={width=20,height=20;prizeCoins=10000,playTime=600}},["\049\048\048\048\048\048\048\053"]={name="\073\110\115\097\110\101",modelName="\073\110\115\097\110\101\082\111\111\109",price=50000,config={width=30,height=30,prizeCoins=10000,playTime=1200}},["\049\048\048\048\048\048\048\054"]={name="\067\114\097\122\121";modelName="\067\114\097\122\121\082\111\111\109",price=500000;config={width=50;height=50,prizeCoins=600000,playTime=2400}};["\049\048\048\048\048\048\048\055"]={name="\069\120\114\101\109\101",modelName="\069\120\116\114\101\109\101\082\111\111\109";price=3000000;config={width=70;height=70,prizeCoins=4000000;playTime=3600}},["\049\048\048\048\048\048\048\056"]={name="\073\109\112\111\115\115\105\098\108\101";modelName="\073\109\112\111\115\115\105\098\108\101\082\111\111\109";price=20000000,config={width=81;height=81,prizeCoins=20000000;playTime=10800}},["\049\048\048\048\048\054\054\054"]={name="\072\111\114\114\111\114\077\097\122\101";modelName="\072\111\114\114\111\114\077\097\122\101",config={noTimer=true;prizeCoins=25000}}}local F={["\057\048\048\048\048\048\049"]={name="\099\111\105\110 \049",value=1};["\057\048\048\048\048\048\053"]={name="\099\111\105\110\115 \053";value=5};["\057\048\048\048\048\048\056"]={name="\099\111\105\110\115 \056",value=8},["\057\048\048\050\048\048\056"]={name="\099\111\105\110\115 \050\052\049\056",value=2418;onePerPlayer=true};["\057\048\048\050\048\048\057"]={name="\099\111\105\110\115 \050\053\055\056";value=2578;onePerPlayer=true},["\057\048\048\050\048\049\048"]={name="\099\111\105\110\115 \051\049\049\051";value=3113,onePerPlayer=true},["\057\048\048\050\048\049\049"]={name="\099\111\105\110\115 \051\054\055\049";value=3671;onePerPlayer=true};["\057\048\048\050\048\049\050"]={name="\099\111\105\110\115 \049\052\054\050\056";value=14628,onePerPlayer=true}}local function H(g)return function(w,v)return Q.extend(w,{id=v,type=g})end end local N=Q.map(R,H(U.PET))local s=Q.map(O,H(U.COLLECTABLE))local X=Q.map(W,H(U.ROOM))local f=Q.map(F,H(U.COIN))local I=Q.map(S,H(U.GAME_PASS))local x=Q.map(T,H(U.COIN_PACK))local o={}local n={}local l={}Q.extend(o,N,s,I,X,x)Q.extend(n,N,I,x)Q.extend(l,N,I,X,x)return{OBJECT_TYPES=U;PET_TYPES=B;HIGH_JUMP_ID=t;PetObjects=N;GamePassObjects=I,CoinPackObjects=x;RoomObjects=X,WorldObjects=s;CoinObjects=f,ShopObjects=n;BuyObjects=l,AllObjects=o}
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
local logger = require(Modules.src.utils.Logger)
local GamePasses = require(Modules.src.GamePasses)
local DeveloperProducts = require(Modules.src.DeveloperProducts)
local M = require(Modules.M)

local HIGH_JUMP_ID = GamePasses.HIGH_JUMP_ID
local GHOST_MODE_ID = GamePasses.GHOST_MODE_ID

local OBJECT_TYPES = {
	GAME_PASS = 'Game Passes',
	PET = 'Pets',
	COLLECTABLE = 'Collectables',
	COIN = 'Coins',
	COIN_PACK = 'Coin Packs',
	ROOM = 'Rooms',
}
local PET_TYPES = {
	TRAIL = 'TRAIL',
	SPEED = 'SPEED',
	LIGHT = 'LIGHT',
}

local GamePassObjects = {
	[HIGH_JUMP_ID] = GamePasses:getGamePass(HIGH_JUMP_ID),
	[GHOST_MODE_ID] = GamePasses:getGamePass(GHOST_MODE_ID),
}

local CoinPackObjects = {
	[DeveloperProducts.COINS_1] = DeveloperProducts:getProduct(DeveloperProducts.COINS_1),
	[DeveloperProducts.COINS_2] = DeveloperProducts:getProduct(DeveloperProducts.COINS_2),
	[DeveloperProducts.COINS_3] = DeveloperProducts:getProduct(DeveloperProducts.COINS_3),
	[DeveloperProducts.COINS_4] = DeveloperProducts:getProduct(DeveloperProducts.COINS_4),
}

local PetObjects = {
	['10001'] = {
		name = 'Speed Pet 1',
		price = 300,
		modelName = 'Speed Pet 1',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -3),
		isRotating = false,
		ability = PET_TYPES.SPEED,
		speed = 25,
	},
	['10002'] = {
		name = 'Speed Pet 2',
		price = 1000,
		modelName = 'Speed Pet 2',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -3),
		isRotating = false,
		ability = PET_TYPES.SPEED,
		speed = 35,
	},
	['10003'] = {
		name = 'Speed Pet 3',
		price = 6000,
		modelName = 'Speed Pet 3',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -3),
		isRotating = false,
		ability = PET_TYPES.SPEED,
		speed = 45,
	},
	['10004'] = {
		name = 'Speed Pet 4',
		price = 10000,
		modelName = 'Speed Pet 4',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -3),
		isRotating = false,
		ability = PET_TYPES.SPEED,
		speed = 55,
	},
	['10005'] = {
		name = 'Speed Pet 5',
		price = 60000,
		modelName = 'Speed Pet 5',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -3),
		isRotating = false,
		ability = PET_TYPES.SPEED,
		speed = 65,
	},
	['10006'] = {
		name = 'Speed Pet 6',
		price = 500000,
		modelName = 'Speed Pet 6',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -3),
		isRotating = false,
		ability = PET_TYPES.SPEED,
		speed = 75,
	},
	['20001'] = {
		name = 'Path Pet Red',
		price = 10000,
		modelName = 'Path Pet Red',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.TRAIL,
		trailModelName = 'RedTrail',
	},
	['20002'] = {
		name = 'Path Pet Green',
		price = 10000,
		modelName = 'Path Pet Green',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.TRAIL,
		trailModelName = 'GreenTrail',
	},
	['20003'] = {
		name = 'Path Pet Yellow',
		price = 10000,
		modelName = 'Path Pet Yellow',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.TRAIL,
		trailModelName = 'YellowTrail',
	},
	['20004'] = {
		name = 'Path Pet Rainbow',
		price = 100000,
		modelName = 'Path Pet Rainbow',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.TRAIL,
		trailModelName = 'RainbowTrail',
	},
	['30001'] = {
		name = 'Light Pet 1',
		price = 100,
		modelName = 'Light Pet 1',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.LIGHT,
	},
	['30002'] = {
		name = 'Light Pet 2',
		price = 1000,
		modelName = 'Light Pet 2',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.LIGHT,
	},
	['30003'] = {
		name = 'Light Pet 3',
		price = 9000,
		modelName = 'Light Pet 3',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.LIGHT,
	},
	['30004'] = {
		name = 'Light Pet 4',
		price = 30000,
		modelName = 'Light Pet 4',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.LIGHT,
	},
	['30005'] = {
		name = 'Light Pet 5',
		price = 100000,
		modelName = 'Light Pet 5',
		modelFolder = 'Pets',
		cameraOffset = CFrame.new(1, 0.5, -2),
		isRotating = false,
		ability = PET_TYPES.LIGHT,
	},
}

local WorldObjects = {
	['50000001'] = {
		name = 'Cherry',
		modelName = 'cherry',
		icon = 'rbxassetid://5050640918',
	},
}

local RoomObjects = {
	['10000001'] = {
		name = 'VeryEasy',
		modelName = 'VeryEasyRoom',
		price = 0,
		config = {
			width = 5,
			height = 5,
			prizeCoins = 50,
			playTime = 1 * 60,
		},
	},
	['10000002'] = {
		name = 'Easy',
		modelName = 'EasyRoom',
		price = 500,
		config = {
			width = 10,
			height = 10,
			prizeCoins = 250,
			playTime = 3 * 60,
		},
	},
	['10000003'] = {
		name = 'Normal',
		modelName = 'NormalRoom',
		price = 2000,
		config = {
			width = 15,
			height = 15,
			prizeCoins = 2000,
			playTime = 5 * 60,
		},
	},
	['10000004'] = {
		name = 'Hard',
		modelName = 'HardRoom',
		price = 10000,
		config = {
			width = 20,
			height = 20,
			prizeCoins = 10000,
			playTime = 10 * 60,
		},
	},
	['10000005'] = {
		name = 'Insane',
		modelName = 'InsaneRoom',
		price = 50000,
		config = {
			width = 30,
			height = 30,
			prizeCoins = 10000,
			playTime = 20 * 60,
		},
	},
	['10000006'] = {
		name = 'Crazy',
		modelName = 'CrazyRoom',
		price = 500000,
		config = {
			width = 50,
			height = 50,
			prizeCoins = 600000,
			playTime = 40 * 60,
		},
	},
	['10000007'] = {
		name = 'Exreme',
		modelName = 'ExtremeRoom',
		price = 3000000,
		config = {
			width = 70,
			height = 70,
			prizeCoins = 4000000,
			playTime = 60 * 60,
		},
	},
	['10000008'] = {
		name = 'Impossible',
		modelName = 'ImpossibleRoom',
		price = 20000000,
		config = {
			width = 81,
			height = 81,
			prizeCoins = 20000000,
			playTime = 3 * 60 * 60,
		},
	},
	['10000666'] = {
		name = 'HorrorMaze',
		modelName = 'HorrorMaze',
		config = {
			noTimer = true,
			prizeCoins = 25000,
		},
	},
}

local CoinObjects = {
	['9000001'] = {
		name = 'coin 1',
		value = 1,
	},
	['9000005'] = {
		name = 'coins 5',
		value = 5,
	},
	['9000008'] = {
		name = 'coins 8',
		value = 8,
	},
	['9002008'] = {
		name = 'coins 2418',
		value = 2418,
		onePerPlayer = true,
	},
	['9002009'] = {
		name = 'coins 2578',
		value = 2578,
		onePerPlayer = true,
	},
	['9002010'] = {
		name = 'coins 3113',
		value = 3113,
		onePerPlayer = true,
	},
	['9002011'] = {
		name = 'coins 3671',
		value = 3671,
		onePerPlayer = true,
	},
	['9002012'] = {
		name = 'coins 14628',
		value = 14628,
		onePerPlayer = true,
	},
}

local function keyById(type)
	return function(item, key)
		return M.extend(item, {
			id = key,
			type = type,
		})
	end
end

local remappedPet = M.map(PetObjects, keyById(OBJECT_TYPES.PET))
local remappedWorld = M.map(WorldObjects, keyById(OBJECT_TYPES.COLLECTABLE))
local remappedRoom = M.map(RoomObjects, keyById(OBJECT_TYPES.ROOM))
local remappedCoins = M.map(CoinObjects, keyById(OBJECT_TYPES.COIN))
local remappedGamePasses = M.map(GamePassObjects, keyById(OBJECT_TYPES.GAME_PASS))
local remappedCoinPackObjects = M.map(CoinPackObjects, keyById(OBJECT_TYPES.COIN_PACK))

local AllObjects = {}
local ShopObjects = {}
local BuyObjects = {}

M.extend(
	AllObjects,
	remappedPet,
	remappedWorld,
	remappedGamePasses,
	remappedRoom,
	remappedCoinPackObjects
)

M.extend(ShopObjects, remappedPet, remappedGamePasses, remappedCoinPackObjects)

M.extend(BuyObjects, remappedPet, remappedGamePasses, remappedRoom, remappedCoinPackObjects)

return {
	OBJECT_TYPES = OBJECT_TYPES,
	PET_TYPES = PET_TYPES,
	HIGH_JUMP_ID = HIGH_JUMP_ID,
	PetObjects = remappedPet,
	GamePassObjects = remappedGamePasses,
	CoinPackObjects = remappedCoinPackObjects,
	RoomObjects = remappedRoom,
	WorldObjects = remappedWorld,
	CoinObjects = remappedCoins,
	ShopObjects = ShopObjects,
	BuyObjects = BuyObjects,
	AllObjects = AllObjects,
}