upgradeStuff=model:clone()wait(1)model:remove()owner=script.Parent.Parent.Parent.OwnerName local r=0 function onTouched(f)if r==0 then r=1 check=f.Parent:FindFirstChild("\072\117\109\097\110\111\105\100")if check~=nil then if f.Parent.Name==owner.Value then local r=game.Players:GetPlayerFromCharacter(f.Parent)local a=r:findFirstChild("\108\101\097\100\101\114\115\116\097\116\115")if a~=nil then local r=a:findFirstChild("\067\097\115\104")if r.Value>Upgradecost-1 then r.Value=r.Value-Upgradecost upgradeStuff.Parent=script.Parent.Parent.Parent script.Parent.Parent:remove()end end end end r=0 end end script.Parent.Touched:connect(onTouched)

upgradeStuff = model:clone()
wait(1)
model:remove()
owner = script.Parent.Parent.Parent.OwnerName 
local ting = 0
function onTouched(hit)
	if ting == 0 then
	ting = 1
	check = hit.Parent:FindFirstChild("Humanoid")
	if check ~= nil then
	if hit.Parent.Name == owner.Value then
		local user = game.Players:GetPlayerFromCharacter(hit.Parent)
		local stats = user:findFirstChild("leaderstats")
		if stats ~= nil then
			local cash = stats:findFirstChild("Cash")
			if cash.Value > (Upgradecost-1) then
				cash.Value = cash.Value - Upgradecost
				upgradeStuff.Parent = script.Parent.Parent.Parent
				script.Parent.Parent:remove()
			end
		end
	end
	end
	ting = 0
	end
end
script.Parent.Touched:connect(onTouched)
