Lets say when a part is removed then the script inside that part will add currency to itself.
Like when the parent of the script which is the part , gets removed the script will add the currency to the player.
-- Part getting removed currency = currency + 1 end
local Workspace = game.Workspace local part = Workspace.Part Workspace.ChildRemoved:Connect(function(child) if child == part then currency = currency + 1 end end)
ChildRemoved fires when a child of the object is removed and
child is the object that got removed