local httpService = game:GetService("HttpService") local replicatedStorage = game.ReplicatedStorage local remotes = replicatedStorage:WaitForChild("Remotes") local createTemplate = remotes:WaitForChild("CreateTemplate") local codes = { ["PLAY"] = { function(player) player.leaderstats.Diamonds.Value += 100000 end, false }, ["PET"] = { function(player) local petName = "18" local id = httpService:GenerateGUID() local pet = Instance.new("StringValue", player.Pets) pet.Name = petName pet.Value = id createTemplate:FireClient(player, petName, id) end, false }, } remotes:WaitForChild("UseCode").OnServerInvoke = function(player, code) if codes[tostring(code)] then if player.Codes then if type(codes) == "table" then if player.Codes:FindFirstChild(tostring(code)) then return "Already" else if codes[tostring(code)][2] == true then return "Expired" else codes[tostring(code)][1](player) local value = Instance.new("StringValue", player.Codes) value.Name = tostring(code) return "Successfully" end end else return "Unknown" end else return "Unknown" end else return "Invalid" end end