Roblox/luau_corpus huggingface dataset:
--					end
				end
				local distanceFactor = distance / explosion.BlastRadius -- get the distance as a value between 0 and 1
				distanceFactor = math.abs( 1 - distanceFactor )-- flip the amount, so that lower == closer == more damage
				-- humanoid:TakeDamage(maxDamage * distanceFactor) -- TakeDamage to respect ForceFields
				--print(maxDamage,distanceFactor)
				--print("<", ownerMe, "> AOE Damage = ", maxDamage * distanceFactor," to <",humanoid.Parent.Name,">")
				Damage:Take(human, humanoid, maxDamage * distanceFactor) -- from, to, damage
			end
		end
	end)
 
	explosion.Parent = game.Workspace
end


function blow(hit)
	--!!!!!! проверяем на то, что не повреждается
	-- if string.lower(hit.Name)=="cannon" or string.lower(hit.Name)=="sphera" then return end
--[=[
	@function Emphasise
	@within ColourUtils

	:::tip

	Emphasise is also available under the `Emphasize` alias.

	:::

	@param colour Color3 -- The colour to emphasise.
	@param coefficient number -- The amount to emphasise by [0-1].
	@param threshold? number -- The threshold for light/dark [0-1] (defaults to 0.5).
	@return Color3 -- The emphasised colour.
]=]
return function(colour: Color3, coefficient: number, threshold: number?): Color3
	threshold = type(threshold) == "number" and threshold or 0.5
	return GetLuminance(colour) > threshold and Darken(colour, coefficient) or Lighten(colour, coefficient)
end
--===============--
--// Techyfied \\--
-- This script was automatically created by Bubble Chat Customizer Plugin --
-- This script customized bubble chat depending on the settings you have created on the plugin --
--===============--


local settings = {
	BubbleDuration = script.Info.BubbleDuration.Value,
	MaxBubbles = script.Info.MaxBubbles.Value,
	BackgroundColor3 = script.Info.BackgroundColor3.Value,
	TextColor3 = script.Info.TextColor3.Value,
	TextSize = script.Info.TextSize.Value,
	Font = Enum.Font[script.Info.Font.Value],
	Transparency = script.Info.Transparency.Value,
	CornerRadius = UDim.new(0, script.Info.CornerRadius.Value),
	TailVisible = script.Info.TailVisible.Value,
	Padding = script.Info.Padding.Value,
	MaxWidth = script.Info.MaxWidth.Value,
	VerticalStudsOffset = script.Info.VerticalStudsOffset.Value,
	BubblesSpacing = script.Info.BubblesSpacing.Value,
	MinimizeDistance = script.Info.MinimizeDistance.Value,
	MaxDistance = script.Info.MaxDistance.Value,
}

pcall(function()
	game:GetService("Chat"):SetBubbleChatSettings(settings)
end)
-- message recieved, delete StringValue
animStringValueObject.Parent = nil
toolAnimTime = time + .3
end
if time > toolAnimTime then
toolAnimTime = 0
toolAnim = "None"
end
animateTool()
else
stopToolAnimations()
toolAnim = "None"
toolAnimInstance = nil
toolAnimTime = 0
end
end
-- Dependencies
local Util = require(ReplicatedStorage.Libraries.Util)

local localPlayer = Players.LocalPlayer
local playerGui = localPlayer.PlayerGui
local _playerIsBot = Util.isPlayerBot(localPlayer)
local Roact = require(ReplicatedStorage.Packages.Roact)

local RECS = require(ReplicatedStorage.Libraries.RECS)
local Steppers = require(ReplicatedStorage.Steppers)
local App = require(ReplicatedStorage.RoactComponents.App)
--- Shows Cmdr window
function Cmdr:Show ()
	if not self.Enabled then
		return
	end

	Interface.Window:Show()
end
--please?
script.Parent.Equipped:connect(on)
script.Parent.Unequipped:connect(off)
--[ Events ]--
Detector.MouseEnter:Connect(function()
	N:TweenPosition(UDim2.new(-0.775, 0, 0, 0), "Out", "Quad", .25)
end)
Detector.MouseLeave:Connect(function()
	N:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", .25)
end)
Detector.MouseMoved:Connect(function()
	if N.Position == UDim2.new(0,0,0,0) then
		N:TweenPosition(UDim2.new(-0.775, 0, 0, 0), "Out", "Quad", .25)
	else
		N:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", .25)
	end
end)
while true do
	spawn(UpdateHealth)
	wait()
end
--				{ id = "slash.xml", weight = 10 } 
			},
	toollunge = {
				{ id = "http://www.roblox.com/asset/?id=129967478", weight = 10 } 
			},
}

math.randomseed(tick())

function configureAnimationSet(name, fileList)
	if (animTable[name] ~= nil) then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0	
	animTable[name].connections = {}

	-- check for config values
	local config = script:FindFirstChild(name)
	if (config ~= nil) then
-- called to check for dead connections and run their cleanup tasks
local function runCleanupTasks()
	if numTasks == 0 then
		return
	end

	-- we want to clean as much stuff up as possible, but we don't want to hang
	-- the client, so we forcibly terminate after a short while
	local startTime = os.clock()
	local endTime = startTime + 1/1000

	-- run at most `numTask` times
	for _=1, numTasks do
		local taskData = tasks[currentIndex]

		if taskData.connection.Connected then
			-- instance is still alive, so move on to the next task
			currentIndex += 1
		else
			-- instance destroyed, so run cleanup and remove the task
			taskData.cleaned = true
			-- print("cleaning up", taskData.debugName)
			cleanup(taskData.task)

			table.remove(tasks, currentIndex)
			numTasks -= 1
		end

		-- wrap around if we passed the end of the task list
		if currentIndex > numTasks then
			currentIndex = 1
		end

		-- if this took too long, exit early to avoid hanging
		if os.clock() > endTime then
			break
		end
	end
end

RunService.Heartbeat:Connect(runCleanupTasks)

local function cleanupOnDestroy(instance: Instance, task: cleanup.Task): (() -> ())
	-- set up connection so we can check if the instance is alive
	-- we don't care about the event we're connecting to, just that we can see
	-- when it's disconnected by the garbage collector
	local connection = instance:GetPropertyChangedSignal("ClassName"):Connect(noOp)

	-- store data about the task for later
	local taskData = {
		debugName = instance.Name,
		connection = connection,
		task = task,
		cleaned = false
	}

	-- remove instance reference so we don't accidentally inhibit gc
	instance = nil

	-- add task to list
	numTasks += 1
	tasks[numTasks] = taskData

	-- return disconnect function to stop listening for destroy
	return function()
		if taskData.cleaned then
			return
		end

		taskData.cleaned = true
		connection:Disconnect()

		local index = table.find(tasks, taskData)
		if index ~= nil then
			table.remove(tasks, index)
			numTasks -= 1
		end
	end
end

return cleanupOnDestroy
--	print(animName .. " " .. idx .. " [" .. origRoll .. "]")
	
	local anim = animTable[animName][idx].anim

	-- switch animation		
	if (anim ~= currentAnimInstance) then
		
		if (currentAnimTrack ~= nil) then
			currentAnimTrack:Stop(transitionTime)
			currentAnimTrack:Destroy()
		end

		currentAnimSpeed = 1.0
	
		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)
		 
		-- play the animation
		currentAnimTrack:Play(transitionTime)
		currentAnim = animName
		currentAnimInstance = anim

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:Connect(keyFrameReachedFunc)
		
	end

end
--[[

This is a script that makes an anchored brick rotate!
Just resize the brick to your desired size!
This script was made by ProjectTwo
Free for anyone to use!
]]
while true do 
wait() 
script.Parent.CFrame = script.Parent.CFrame * CFrame.fromEulerAnglesXYZ(0, math.pi/-100, 0)
end
-- This store is used both on client and server. The server version is a subset of the client one, containing only
-- merch data defined by the dev (while the client store may also contain data related to the UI's state). The server
-- store is automatically synchronized with the client stores.
local serverStore = Rodux.Store.new(serverReducer, nil, { Rodux.thunkMiddleware })

return serverStore
-- When the weapon is deactivated
function weaponTemplate:OnDeactivate()
	
end

function weaponTemplate:OnStartFiring()
	if not self.spoolTimer:IsRunning() and not self.isFiring and self.isClient then
		self.isFiring = true
	end
	
	if not self.spoolTimer:IsRunning() and not self.isFiring and not self.isClient then
		
		self.gun.Barrel.Begin.TimePosition = 0
		self.gun.Barrel.Begin:Play()
		
		spawn(function() 
			for i = 1, 20 do
				self.gun.Barrel.HingeConstraint.AngularVelocity = i
				wait(0.043)
			end
		end)
			
		self.spoolTimer:Start()
	end
end

function weaponTemplate:OnStopFiring()
	
	-- Is Client
	if self.spoolTimer:IsRunning() and self.isFiring and self.isClient then
		self.isFiring = false
	end
	
	-- Is Server
	if self.spoolTimer:IsRunning() and self.isFiring and not self.isClient then
		self.gun.Barrel.End.TimePosition = 0
		self.gun.Barrel.End:Play()
		
		self.gun.Barrel.HingeConstraint.AngularVelocity = 0
		

		self.spoolTimer:Stop()
		self.rewardTimer:Stop()
		self.isFiring = false
		self.gun.Barrel.Loop:Stop()
		
		
		for i = 20, 0, -1 do
			self.gun.Barrel.HingeConstraint.AngularVelocity = i
			wait(0.043)
		end
	end
end

function weaponTemplate:OnFire()
	if self.isFiring then
		
		-- Is Client
		if self.isClient and self.gun.Barrel.Loop.IsPlaying then
			local newProjectile = self.projectileModel:Clone()
			local randomPoint = weaponTemplate.getUnitSpherePoint()
			local newBullet = bullet.new(newProjectile, self.ownerPlayer, 50, self.gun.firePart.Position, self.gun.firePart.CFrame.LookVector + randomPoint * self.coneSpread, 500, "Physics", false)
			newBullet.Name = newProjectile.Name
			replicateProjectile_Re:FireServer(newBullet)
		end
		
		-- Is Server
		if not self.gun.Barrel.Loop.IsPlaying and not self.isClient then
			self.gun.Barrel.Loop:Play()
			self.gun.Barrel.HingeConstraint.AngularVelocity = 50
			
		elseif not self.isClient then
			-- Ensure they don't run multiple timers
			if not self.rewardTimer:IsRunning() and self.rewardTimer.runningTicks == 0 then
				self.rewardTimer:Start()
			end
		end
	end
end
-- Decompiled with the Synapse X Luau decompiler.

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
local v1 = {};
local u2 = {};
function v1.Owns(p1)
	if u2[p1] then
		return u2[p1];
	end;
	local v2 = u1.StatService.Get(true);
	if not v2 then
		return;
	end;
	local v3 = u1.Functions.SearchArray(v2.Upgrades, p1);
	if v3 then
		u2[p1] = v3;
	end;
	return v3;
end;
return v1;
-- Activate when we die.
getHumanoid().Died:Connect(function()
	if ( script.ActivateOnDeath.Value ) then
		script.Activate.Value = true;
	end
end);
--[[
	Cancels the promise, disallowing it from rejecting or resolving, and calls
	the cancellation hook if provided.
]]
function Promise.prototype:cancel()
	if self._status ~= Promise.Status.Started then
		return
	end

	self._status = Promise.Status.Cancelled

	if self._cancellationHook then
		self._cancellationHook()
	end

	if self._parent then
		self._parent:_consumerCancelled(self)
	end

	for child in pairs(self._consumers) do
		child:cancel()
	end

	self:_finalize()
end
-- << RETRIEVE FRAMEWORK >>
local main = _G.HDAdminMain
local settings = main.settings
--- Initialize required modules
local CollectionService: CollectionService = game:GetService("CollectionService")
local HitboxData = require(script.HitboxCaster)
local Signal = require(script.GoodSignal)

local RaycastHitbox = {}
RaycastHitbox.__index = RaycastHitbox
RaycastHitbox.__type = "RaycastHitboxModule"
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------


function onRunning(speed)
	if speed>0 then
		playAnimation("walk", 0.1, Humanoid)
		pose = "Running"
	else
		playAnimation("idle", 0.1, Humanoid)
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing()
	playAnimation("climb", 0.1, Humanoid)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function onSwimming(speed)
	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function getTool()	
	for _, kid in ipairs(Figure:GetChildren()) do
		if kid.className == "Tool" then return kid end
	end
	return nil
end

function getToolAnim(tool)
	for _, c in ipairs(tool:GetChildren()) do
		if c.Name == "toolanim" and c.className == "StringValue" then
			return c
		end
	end
	return nil
end

function animateTool()
	
	if (toolAnim == "None") then
		playToolAnimation("toolnone", toolTransitionTime, Humanoid)
		return
	end

	if (toolAnim == "Slash") then
		playToolAnimation("toolslash", 0, Humanoid)
		return
	end

	if (toolAnim == "Lunge") then
		playToolAnimation("toollunge", 0, Humanoid)
		return
	end
end

function moveSit()
	RightShoulder.MaxVelocity = 0.15
	LeftShoulder.MaxVelocity = 0.15
	RightShoulder:SetDesiredAngle(3.14 /2)
	LeftShoulder:SetDesiredAngle(-3.14 /2)
	RightHip:SetDesiredAngle(3.14 /2)
	LeftHip:SetDesiredAngle(-3.14 /2)
end

local lastTick = 0

function move(time)
	local amplitude = 1
	local frequency = 1
  	local deltaTime = time - lastTick
  	lastTick = time

	local climbFudge = 0
	local setAngles = false

  	if (jumpAnimTime > 0) then
  		jumpAnimTime = jumpAnimTime - deltaTime
  	end

	if (pose == "FreeFall" and jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	elseif (pose == "Seated") then
		stopAllAnimations()
		moveSit()
		return
	elseif (pose == "Running") then
		playAnimation("walk", 0.1, Humanoid)
	elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
--[[
game:service("RunService").RenderStepped:connect(function()
	midcf = CFrame.new() 
	if down == true then	
		aim = Tool.Aim.Value 
	lv = (Tool.Handle.CFrame * CFrame.Angles(math.rad(90),math.rad(0),math.rad(0))).lookVector 
	lookat = mouser.Hit.p
	start = Tool.Handle.Position + Vector3.new(0,0.2,0) 
	p1.CFrame = CFrame.new(start + lv, lookat) 
	midcf = p1.CFrame
	p1.CFrame = midcf * CFrame.Angles(math.rad(aim),math.rad(0),math.rad(0))
	p2.CFrame = midcf * CFrame.Angles(math.rad(0),math.rad(aim),math.rad(0))
	p3.CFrame = midcf * CFrame.Angles(math.rad(0),math.rad(-aim),math.rad(0))
	p4.CFrame = midcf * CFrame.Angles(math.rad(-aim),math.rad(0),math.rad(0))
	end
end)]]


Tool.Equipped:connect(onEquippedLocal)
--// Damage Settings	
	BaseDamage = 51; -- Torso Damage
	LimbDamage = 43; -- Arms and Legs
	ArmorDamage = 43; -- How much damage is dealt against armor (Name the armor "Armor")
	HeadDamage = 79; -- If you set this to 100, there's a chance the player won't die because of the heal script
-- When in a server, this scripts runs in ROBLOX's time (pacific).  If you are in Europe/Asia/Africa, your time may be dramatically differrent.

while true do
	game.Lighting:SetMinutedAfterMidnight(tick()/60)
	wait()
end
-- Now with exciting TeamColors HACK!

function waitForChild(parent, childName)
	while true do
		local child = parent:findFirstChild(childName)
		if child then
			return child
		end
		parent.ChildAdded:wait()
	end
end
--[[
	Fired when state is left
]]
function Transitions.onLeaveGame(stateMachine, event, from, to, playerComponent)
	PlayerGame.leave(stateMachine, playerComponent, to)
end
-- module

local EFFECTS	= {}

function EFFECTS.Effect(self, effect, ...)
	if not effects[effect] then
		if script:FindFirstChild(effect) then
			effects[effect]	= require(script[effect])
		end
	end
	
	if effects[effect] then
		effects[effect](...)
	end
end

return EFFECTS
-- ALEX WAS HERE LOL

local v1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
while not v1.Loaded do
	game:GetService("RunService").Heartbeat:Wait();
end;
return function(p2, p3, ...)
	local xp = ... 
	local f = v1.Shared.MasteryXPToLevel(xp)
	
	if f < 100 then

	else
		p2.Progress.Bar.Size = UDim2.new(1, 0, 1, 0);
		p2.Progress.Level.Text = ''
		p2.Progress.Level2.Text = ''
		return;
	end;
	local v10 = math.clamp(xp / v1.Shared.MasteryLevelToXP(f +1), 0, 1);
	v1.Functions.FastTween(p2.Progress.Bar, {
		Size = UDim2.new(v10, 0, 1, 0)
	}, { 0.2, "Quad", "Out" });
	p2.Progress.Level.Text = f
	p2.Progress.Level2.Text = f + 1
end;
-- Create scope HUD when tool opens
coroutine.wrap(function ()
	Enabled:Wait()

	-- Create scope HUD
	local ScopeHUDTemplate = require(UIElements:WaitForChild 'ScopeHUD')
	local ScopeHUD = Roact.createElement(ScopeHUDTemplate, {
		Core = getfenv(0);
	})

	-- Mount scope HUD
	Roact.mount(ScopeHUD, UI, 'ScopeHUD')
end)()
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 180		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
---- Public Functions
-- Set
function StringLabel:SetText(text)
	waitForUpdate(self)
	
	self._textLabel.Text = text
end

function StringLabel:SetSize(size)
	waitForUpdate(self)
	
	self._textLabel.Size = size
end

function StringLabel:SetPosition(position)
	waitForUpdate(self)
	
	self._textLabel.Position = position
end

function StringLabel:SetFont(font)
	waitForUpdate(self)
	
	for _, label in pairs(self._characterLabels) do
		label.Font = font
	end
end

function StringLabel:SetTextColor(color)
	waitForUpdate(self)
	
	for _, label in pairs(self._characterLabels) do
		label.TextColor3 = color
	end
end

function StringLabel:SetTextTransparency(transparency)
	waitForUpdate(self)
	
	for _, label in pairs(self._characterLabels) do
		label.TextTransparency = transparency
	end
end

function StringLabel:SetRotation(rotation)
	waitForUpdate(self)
	
	for _, label in pairs(self._characterLabels) do
		label.Rotation = rotation
	end
end

function StringLabel:SetCharacterFont(index, font)
	waitForUpdate(self)
	
	local label = self._characterLabels[index]
	if label then
		label.Font = font
	end
end

function StringLabel:SetCharacterTextColor(index, color)
	waitForUpdate(self)
	
	local label = self._characterLabels[index]
	if label then
		label.TextColor3 = color
	end
end

function StringLabel:SetCharacterTextTransparency(index, transparency)
	waitForUpdate(self)
	
	local label = self._characterLabels[index]
	if label then
		label.TextTransparency = transparency
	end
end

function StringLabel:SetCharacterRotation(index, rotation)
	waitForUpdate(self)
	
	local label = self._characterLabels[index]
	if label then
		label.Rotation = rotation
	end
end
-- Make the ScrollingFrame, which holds the rest of the Slots (however many)
ScrollingFrame = NewGui('ScrollingFrame', 'ScrollingFrame')
ScrollingFrame.Selectable = false
ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, 0)
ScrollingFrame.Parent = InventoryFrame

UIGridFrame = NewGui('Frame', 'UIGridFrame')
UIGridFrame.Selectable = false
UIGridFrame.Size = UDim2.new(1, -(ICON_BUFFER*2), 1, 0)
UIGridFrame.Position = UDim2.new(0, ICON_BUFFER, 0, 0)
UIGridFrame.Parent = ScrollingFrame

UIGridLayout = Instance.new("UIGridLayout")
UIGridLayout.SortOrder = Enum.SortOrder.LayoutOrder
UIGridLayout.CellSize = UDim2.new(0, ICON_SIZE, 0, ICON_SIZE)
UIGridLayout.CellPadding = UDim2.new(0, ICON_BUFFER, 0, ICON_BUFFER)
UIGridLayout.Parent = UIGridFrame

ScrollUpInventoryButton = MakeVRRoundButton('ScrollUpButton', 'rbxasset://textures/ui/Backpack/ScrollUpArrow.png')
ScrollUpInventoryButton.Size = UDim2.new(0, 34, 0, 34)
ScrollUpInventoryButton.Position = UDim2.new(0.5, -ScrollUpInventoryButton.Size.X.Offset/2, 0, INVENTORY_HEADER_SIZE + 3)
ScrollUpInventoryButton.Icon.Position = ScrollUpInventoryButton.Icon.Position - UDim2.new(0,0,0,2)
ScrollUpInventoryButton.MouseButton1Click:Connect(function()
	ScrollingFrame.CanvasPosition = Vector2.new(
		ScrollingFrame.CanvasPosition.X,
		Clamp(0, ScrollingFrame.CanvasSize.Y.Offset - ScrollingFrame.AbsoluteWindowSize.Y, ScrollingFrame.CanvasPosition.Y - (ICON_BUFFER + ICON_SIZE)))
end)

ScrollDownInventoryButton = MakeVRRoundButton('ScrollDownButton', 'rbxasset://textures/ui/Backpack/ScrollUpArrow.png')
ScrollDownInventoryButton.Rotation = 180
ScrollDownInventoryButton.Icon.Position = ScrollDownInventoryButton.Icon.Position - UDim2.new(0,0,0,2)
ScrollDownInventoryButton.Size = UDim2.new(0, 34, 0, 34)
ScrollDownInventoryButton.Position = UDim2.new(0.5, -ScrollDownInventoryButton.Size.X.Offset/2, 1, -ScrollDownInventoryButton.Size.Y.Offset - 3)
ScrollDownInventoryButton.MouseButton1Click:Connect(function()
	ScrollingFrame.CanvasPosition = Vector2.new(
		ScrollingFrame.CanvasPosition.X,
		Clamp(0, ScrollingFrame.CanvasSize.Y.Offset - ScrollingFrame.AbsoluteWindowSize.Y, ScrollingFrame.CanvasPosition.Y + (ICON_BUFFER + ICON_SIZE)))
end)

ScrollingFrame.Changed:Connect(function(prop)
	if prop == 'AbsoluteWindowSize' or prop == 'CanvasPosition' or prop == 'CanvasSize' then
		local canScrollUp = ScrollingFrame.CanvasPosition.Y ~= 0
		local canScrollDown = ScrollingFrame.CanvasPosition.Y < ScrollingFrame.CanvasSize.Y.Offset - ScrollingFrame.AbsoluteWindowSize.Y

		ScrollUpInventoryButton.Visible = canScrollUp
		ScrollDownInventoryButton.Visible = canScrollDown
	end
end)
-- Hot water
faucet.HotWaterSet.Interactive.ClickDetector.MouseClick:Connect(function()
	faucet.Handle:SetPrimaryPartCFrame(faucet.HandleBase.CFrame * CFrame.Angles(math.rad(-150),0,0))
	p.HotOn.Value = true
	p.ColdOn.Value = false
end)