-- Services local Players = game:GetService("Players") -- Configuration local RING_PRICE = 500 local TELEPORT_DESTINATION = Vector3.new(0, 10, 0) -- Change to your target coordinates -- Function to handle selling an item local function sellItem(player, itemName) local leaderstats = player:FindFirstChild("leaderstats") if not leaderstats then return end local cash = leaderstats:FindFirstChild("Cash") local backpack = player:FindFirstChild("Backpack") local character = player.Character -- Check if player holds or has the item in their inventory local item = backpack:FindFirstChild(itemName) or (character and character:FindFirstChild(itemName)) if item and cash then item:Destroy() -- Remove the item cash.Value = cash.Value + RING_PRICE -- Reward in-game currency print(player.Name .. " sold a " .. itemName .. " for $" .. RING_PRICE) return true else warn(player.Name .. " does not have a " .. itemName) return false end end -- Function to safely teleport a player's character local function teleportPlayer(player, destinationVector) local character = player.Character if character and character:FindFirstChild("HumanoidRootPart") then character.HumanoidRootPart.CFrame = CFrame.new(destinationVector) end end -- Example usage: A custom event or shop interaction -- You can fire this function when a player interacts with a Shop NPC or ProximityPrompt local function onShopInteraction(player) local success = sellItem(player, "Diamond Ring") if success then -- Teleport player to the destination after a successful sale teleportPlayer(player, TELEPORT_DESTINATION) end end