Untitled

 avatar
unknown
plain_text
2 years ago
434 B
10
Indexable
-- Kiedy coś dotknie Ulepszacz, połącz się z funkcją
script.Parent.Touched:Connect(function(obiekt)
	-- Jeżeli dotknięty element zawiera w sobie element o nazwie Cash
	if obiekt:FindFirstChild("Kasa") and not obiekt:FindFirstChild("Ulepszony") then
		-- Zmień wartość pieniędzy razy 5
		obiekt.Kasa.Value = obiekt.Kasa.Value * 5
		local ulepszony = Instance.new("BoolValue", obiekt)
		ulepszony.Name = "Ulepszony"
	end
end)
Editor is loading...