03-walkspeedboost.lua
local require = require(game:GetService("ReplicatedStorage"):WaitForChild("Modules"))
local VirtualNumberValue = require("VirtualValue:Types.Number")
local BONUS_WALK_SPEED = 8
local part = script.Parent
local debounce = false
local function onTouched(otherPart)
if debounce then return end
local WalkSpeedDV = otherPart.Parent:FindFirstChild("WalkSpeedDV")
if not WalkSpeedDV then return end
debounce = true
part.BrickColor = BrickColor.Black()
local dvnv = require(WalkSpeedDV)
local vnv = VirtualNumberValue.new(BONUS_WALK_SPEED)
dvnv:addChild(vnv)
wait(2)
part.BrickColor = BrickColor.Red()
debounce = false
wait(6)
dvnv:removeChild(vnv)
vnv:cleanup()
vnv = nil
end
part.Touched:Connect(onTouched)
part.BrickColor = BrickColor.Red()