JustPaste
HomeCategoriesAboutDonateContactTerms of UsePrivacy Policy
JustPaste

Free online notepad — write and share instantly

Navigate

  • Home
  • Timeline
  • Categories

Info

  • About
  • Donate
  • Contact

Legal

  • Terms of Use
  • Privacy Policy

© 2026 JustPaste.app. All rights reserved.

Made with ♥ by JustPaste

ff | JustPaste.app
2 months ago3 views
👨‍💻Programming

ff

local Players = game:GetService("Players")

local tool = script.Parent
local scoop = tool.Handle

local function onTouch(partTouched)
	local character = tool.Parent
	local player = Players:GetPlayerFromCharacter(character)
	if not player then return end

	local playerStats = player:WaitForChild("leaderstats")
	local playerItems = playerStats:WaitForChild("Items")
	local playerSpaces = playerStats:WaitForChild("Spaces")

	local canHarvest = partTouched:FindFirstChild("CanHarvest")
	if canHarvest and canHarvest.Value and playerItems.Value < playerSpaces.Value then
		playerItems.Value += 1
		canHarvest.Value = false
		partTouched.Transparency = 1
		partTouched.CanCollide = false

		task.wait(5)

		canHarvest.Value = true
		partTouched.Transparency = 0
		partTouched.CanCollide = true
	end
end

scoop.Touched:Connect(onTouch)
← Back to timeline