Pinkstack/roblox-luau-corpus-text huggingface dataset:
--I M P O R T A N T--
------------------------------------------------------------------------
--Don't change any of this unless you know what you are doing.
--This script is the blur affect but also the exit button script.
------------------------------------------------------------------------



local blur = game.Lighting.Blur
local frame = script.Parent
local close = script.Parent:WaitForChild("CloseButton")

if 
	frame.Visible == true
then
	blur.Enabled = true
end

close.MouseButton1Click:Connect(function()
	frame.Visible = false
	blur.Enabled = true
end)
--// Recoil Settings	


	gunrecoil = -0.6; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.28; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.5; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.27; -- How much the camera flicks when aiming
	
	CamShake = 9; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 7; -- THIS IS ALSO NEW!!!!
	
	Kickback = 0.8; -- Upward gun rotation when not aiming
	AimKickback = 0.5; -- Upward gun rotation when aiming
-- NTG1D & Sallomy



local VehicleSeat = script.Parent
 
VehicleSeat.Changed:connect(function(prop)
    if prop == "Occupant" then
        local humanoid = VehicleSeat.Occupant
        if humanoid then
            local player = game:GetService("Players"):GetPlayerFromCharacter(humanoid.Parent)
            if player then
                VehicleSeat:SetNetworkOwner(player)
            end
        else
            VehicleSeat:SetNetworkOwner(nil)
        end
    end
end)
--[[[for i,v in pairs(game.ReplicatedStorage.Assets.WorldIDs:GetChildren()) do
	local Frame = script.Frame:Clone()
	
	Frame.TextLabel.Text = v.Name
	
	Frame.Parent = script.Parent.ScrollingFrame
	Frame.TP.MouseButton1Click:Connect(function()
		print("Teleporting to ",Frame.TextLabel.Text)
		game:GetService("TeleportService"):Teleport(v.Value)
	end)
end]]
--for i,v in pairs(game:GetService("CollectionService"):GetTagged("AdminTeleport")) do


for i,v in pairs(game.ReplicatedStorage.Events.Debug.AdminTeleportSpawns:InvokeServer()) do
	local Frame = script.Frame:Clone()
	
	Frame.TextLabel.Text = v
	
	Frame.Parent = script.Parent.ScrollingFrame
	Frame.TP.MouseButton1Click:Connect(function()
		--game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = v.CFrame *  CFrame.new(0,3,0)
		game.ReplicatedStorage.Events.Debug.Teleport:FireServer(v)
	end)
end
-- YellowTide's Easing Functions


local function Spring(t, b, c, d)
	t = t / d
	return (1 + (-2.72 ^ (-6.9 * t) * cos(-20.1061929829746759423869661986827850341796875 * t))) * c + b
end

local function SoftSpring(t, b, c, d)
	t = t / d
	return (1 + (-2.72 ^ (-7.5 * t) * cos(-10.05309649148733797119348309934139251708984375 * t))) * c + b
end
-- unlocked


	["Blue"] = {color = Color3.fromRGB(85, 170, 255), locked = true},
	["Grey"] = {color = Color3.fromRGB(120, 120, 120), locked = true},
	["Moss"] = {color = Color3.fromRGB(85, 85, 0), locked = true},
	["Pink"] = {color = Color3.fromRGB(255, 170, 255), locked = true},
	["Red"] = {color = Color3.fromRGB(112, 30, 30), locked = true},	
	["Pure White"] = {color = Color3.fromRGB(255,255,255), locked = true},	
},

} -- end of module

return module
--!strict
--[=[
  @function every
  @within Dictionary

  @param dictionary {[K]: V} -- The dictionary to check.
  @param predicate (value: V, key: K, dictionary: {[K]: V}) -> any -- The predicate to use to check the dictionary.
  @return boolean -- Whether every item in the dictionary passes the predicate.

  Checks whether every item in the dictionary passes the predicate.

  ```lua
  local dictionary = { hello = "world", goodbye = "world" }

  local value = Every(dictionary, function(value, key)
    return value == "world"
  end) -- true

  local value = Every(dictionary, function(value, key)
    return value == "hello"
  end) -- false
  ```
]=]


local function every<K, V>(
	dictionary: { [K]: V },
	predicate: (value: V, key: K, dictionary: { [K]: V }) -> any
): boolean
	for key, value in pairs(dictionary) do
		if not predicate(value, key, dictionary) then
			return false
		end
	end

	return true
end

return every
-------- OMG HAX



r = game:service("RunService")


local damage = 9


local slash_damage = 16


sword = script.Parent.Handle
Tool = script.Parent


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = 1


local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "http://www.roblox.com/asset/?id=14721229"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1


function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			end
		end


	end
end


function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end


function swordUp()
	Tool.GripForward = Vector3.new(-1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end



Tool.Enabled = true

function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	

	attack()

	wait(1)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
--- FUNCTIONS ---



Projectile = function(Character, MousePosition)
	-- turn to cursor

	local Projectile = ServerStorage.Models.ManaBolt:Clone()
	Projectile.Parent = workspace.Debris
	Projectile.CFrame = Character["Mana Missile Staff"].Top.CFrame
	game.Debris:AddItem(Projectile, 10)

	local ProjectileVelocity = Instance.new("BodyVelocity")
	ProjectileVelocity.P = math.huge
	-- Shoot towards victim humanoidrootpart
	ProjectileVelocity.Velocity = (MousePosition - Projectile.CFrame.Position).unit * 100
	ProjectileVelocity.Parent = Projectile

	local Connection
	Connection = Projectile.Hitbox.Touched:Connect(function(Hit)
		local HitCharacter = Hit.Parent
		if not HitCharacter then return end
		if HitCharacter:FindFirstChild("Humanoid") and HitCharacter ~= Character and HitCharacter.Parent == workspace.Enemies then

			Connection:Disconnect()
			HitCharacter.Humanoid:TakeDamage(25)

			Projectile.Hit:Play()
			Projectile.Bolt:Destroy()
			Projectile.ParticleEmitter:Destroy()
			Projectile.Anchored = true
			task.wait(1)
			Projectile:Destroy()

		elseif Hit.Anchored == true then

			Connection:Disconnect()

			Projectile.Hit:Play()
			Projectile.Bolt:Destroy()
			Projectile.ParticleEmitter:Destroy()
			Projectile.Anchored = true
			task.wait(1)
			Projectile:Destroy()

		end
	end)
end
--		print("Loading anims " .. name)


		table.insert(animTable[name].connections, config.ChildAdded:Connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:Connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				table.insert(animTable[name].connections, childPart.Changed:Connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject == nil) then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
	--			print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
--------LEFT DOOR --------



game.Workspace.doorleft.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!


local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.FootballBall-- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
--Change sound id to the id you want to play




debounce = false

script.Parent.Touched:connect(function(hit)
if not debounce then
debounce = true
if(hit.Parent:FindFirstChild("Humanoid")~=nil)then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
local sound = script.Parent.Sound:Clone()
sound.Parent = player.PlayerGui
sound:Play()
wait(60)--change to how long before the sound plays again after retouching it
end
debounce = false
end
end)
-- Captions


DEFAULT_FORCED_GROUP_VALUES["caption"] = 1

function Icon:setCaption(text)
	assert(typeof(text) == "string" or text == nil, "Expected string, got "..typeof(text))
	self.captionText = text
	self.instances.captionLabel.Text = text
	self.instances.captionContainer.Parent = (text and activeItems) or self.instances.iconContainer
	self:_updateIconSize(nil, self:getIconState())
	local captionMaid = Maid.new()
	self._maid.captionMaid = captionMaid
	captionMaid:give(self.hoverStarted:Connect(function()
		if not self.isSelected then
			self:displayCaption(true)
		end
	end))
	captionMaid:give(self.hoverEnded:Connect(function()
		self:displayCaption(false)
	end))
	captionMaid:give(self.selected:Connect(function()
		if self.hovering then
			self:displayCaption(false)
		end
	end))
	local iconContainer = self.instances.iconContainer
	captionMaid:give(iconContainer:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
		if self.hovering then
			self:displayCaption()
		end
	end))
	captionMaid:give(iconContainer:GetPropertyChangedSignal("AbsolutePosition"):Connect(function()
		if self.hovering then
			self:displayCaption()
		end
	end))
	self:displayCaption(self.hovering)
	return self
end

function Icon:displayCaption(bool)
	if userInputService.TouchEnabled and not self._draggingFinger then return end
	local yOffset = 8
	
	-- Determine caption position
	if self._draggingFinger then
		yOffset = yOffset + THUMB_OFFSET
	end
	local iconContainer = self.instances.iconContainer
	local captionContainer = self.instances.captionContainer
	local newPos = UDim2.new(0, iconContainer.AbsolutePosition.X+iconContainer.AbsoluteSize.X/2-captionContainer.AbsoluteSize.X/2, 0, iconContainer.AbsolutePosition.Y+(iconContainer.AbsoluteSize.Y*2)+yOffset)
	captionContainer.Position = newPos

	-- Determine caption visibility
	local isVisible = self.captionVisible or false
	if typeof(bool) == "boolean" then
		isVisible = bool
	end
	self.captionVisible = isVisible

	-- Change transparency of relavent caption instances
	local captionFadeInfo = self:get("captionFadeInfo")
	for _, settingName in pairs(self._groupSettings.caption) do
		local settingDetail = self._settingsDictionary[settingName]
		settingDetail.useForcedGroupValue = not isVisible
		self:_update(settingName)
	end
end
--use this to determine if you want this human to be harmed or not, returns boolean



function boom()
	wait(2)
	Used = true
	Object.Anchored = true
	Object.CanCollide = false
	Object.Sparks.Enabled = false
	Object.Orientation = Vector3.new(0,0,0)
	Object.Transparency = 1
	Object.Fuse:Stop()
	Object.Explode:Play()
	Object.Dist1:Play()
	Object.Dist2:Play()
	Object.Explosion:Emit(100)
	Object.Smoke1:Emit(150)
	Object.Smoke2:Emit(50)
	Object.Smoke3:Emit(50)
	Object.Debris:Emit(200)
	Object.Debris2:Emit(900)
	Object.Debris3:Emit(900)
	Explode()
end

boom()
--print(Speed)


Velocidade = Speed
TS:Create(Main.Status.Barra.Stamina, TweenInfo.new(.25), {Size =  UDim2.new(Speed/(ServerConfig.RunWalkSpeed * StancesPasta.Mobility.Value),0,0.75,0)} ):Play()
end)

TS:Create(script.Parent.Efeitos.Health, TweenInfo.new(1,Enum.EasingStyle.Circular,Enum.EasingDirection.InOut,-1,true), {Size =  UDim2.new(1.2,0,1.4,0)} ):Play()
Humanoid.Changed:Connect(function(Health)
	script.Parent.Efeitos.Health.ImageTransparency = ((Humanoid.Health - (Humanoid.MaxHealth/2))/(Humanoid.MaxHealth/2))
	--[[if Humanoid.Health <= (Humanoid.MaxHealth/2) then
		script.Parent.Efeitos.Health.BackgroundTransparency = ((Humanoid.Health)/(Humanoid.MaxHealth/2))
		script.Parent.Efeitos.Health.BackgroundColor3 = Color3.fromRGB((170 * (Humanoid.Health)/(Humanoid.MaxHealth/2)) , 0, 0)
		--script.Parent.Efeitos.Health.ImageColor3 = Color3.fromRGB((170 * (Humanoid.Health)/(Humanoid.MaxHealth/2)) , 0, 0)
	else
		--script.Parent.Efeitos.Health.ImageColor3 = Color3.fromRGB(170, 0, 0)
		script.Parent.Efeitos.Health.BackgroundTransparency = 1
		script.Parent.Efeitos.Health.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
	end]]
end)


Ferido.Changed:Connect(function(Valor)
--//seats


local hd = Instance.new("Motor", script.Parent.Parent.Misc.HD.SS)
hd.MaxVelocity = 0.03
hd.Part0 = script.Parent.HD
hd.Part1 = hd.Parent

local wl = Instance.new("Motor", script.Parent.Parent.Misc.FL.Window.SS) --windows
local wr = Instance.new("Motor", script.Parent.Parent.Misc.FR.Window.SS)

wl.MaxVelocity = 0.007
wl.Part0 = script.Parent.Parent.Misc.FL.Door.WD
wl.Part1 = wl.Parent

wr.MaxVelocity = 0.007
wr.Part0 = script.Parent.Parent.Misc.FR.Door.WD
wr.Part1 = wr.Parent
--[=[
	Promises attribute value fits predicate

	@param instance Instance
	@param attributeName string
	@param predicate function | nil
	@param cancelToken CancelToken
	@return Promise<any>
]=]


function AttributeUtils.promiseAttribute(instance, attributeName, predicate, cancelToken)
	assert(typeof(instance) == "Instance", "Bad instance")
	assert(type(attributeName) == "string", "Bad attributeName")
	assert(CancelToken.isCancelToken(cancelToken) or cancelToken == nil, "Bad cancelToken")

	predicate = predicate or DEFAULT_PREDICATE

	do
		local attributeValue = instance:GetAttribute(attributeName)
		if predicate(attributeValue) then
			return Promise.resolved(attributeValue)
		end
	end

	local promise = Promise.new()
	local maid = Maid.new()
	maid:GiveTask(promise)

	if cancelToken then
		maid:GiveTask(cancelToken.Cancelled:Connect(function()
			promise:Reject()
		end))
	end

	maid:GiveTask(instance:GetAttributeChangedSignal(attributeName):Connect(function()
		local attributeValue = instance:GetAttribute(attributeName)
		if predicate(attributeValue) then
			promise:Resolve(attributeValue)
		end
	end))

	promise:Finally(function()
		maid:DoCleaning()
	end)

	return promise
end
--[=[
	@within TableUtil
	@function Values
	@param tbl table
	@return table

	Returns an array with all the values in the table.

	```lua
	local t = {A = 10, B = 20, C = 30}
	local values = TableUtil.Values(t)
	print(values) --> {10, 20, 30}
	```

	:::caution Ordering
	The ordering of the values is never guaranteed. If order is imperative, call
	`table.sort` on the resulting `values` array.
	```lua
	local values = TableUtil.Values(t)
	table.sort(values)
	```
]=]


local function Values(tbl: Table): Table
	local values = table.create(#tbl)
	for _, v in pairs(tbl) do
		table.insert(values, v)
	end
	return values
end
-- Variables


local ts = game:GetService('TweenService')
local cas = game:GetService('ContextActionService')

local cam = workspace.CurrentCamera

local humanoid = script.Parent:WaitForChild("Humanoid",3)

local sprintAnim = humanoid:LoadAnimation(script:WaitForChild("SprintAnim"))

local isSprinting, ifSprintAnimPlaying = false, false

local FOVIn = ts:Create(
	cam,
	TweenInfo.new(.5),
	{FieldOfView = 100}
)

local FOVOut = ts:Create(
	cam,
	TweenInfo.new(.5),
	{FieldOfView = 70}
)
--// Handling Settings		


	Firerate = 60 / 1000; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--		print("Wha " .. pose)


		amplitude = 0.1
		frequency = 1
		setAngles = true
	end

	if (setAngles) then
		local desiredAngle = amplitude * math.sin(time * frequency)

		RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
		LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
		RightHip:SetDesiredAngle(-desiredAngle)
		LeftHip:SetDesiredAngle(-desiredAngle)
	end

	-- Tool Animation handling
	local tool = getTool()
	if tool then

		local animStringValueObject = getToolAnim(tool)

		if animStringValueObject then
			toolAnim = animStringValueObject.Value
			-- 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"
		toolAnimTime = 0
	end
end
-- Animation 


CEs.AnimateT.OnClientEvent:connect(function(Part,NCF,Time,O)
	if Part:IsDescendantOf(plr.Character) then return end
	
	if O then
		TweenService:Create(Part,TweenInfo.new(Time),O):Play()	
	else
		TweenService:Create(Part,TweenInfo.new(Time),{C1=NCF}):Play()
	end
end)

CEs.AnimateFE.OnClientEvent:connect(function(w,Time,Ans,NAngle,NRotation,Rchr,HigV)
	if Rchr == plr.Character then return end
	
	TweenService:Create(Rchr.Torso.Neck,TweenInfo.new(Time),{C0=OriginalC0*CFrame.Angles(Ans,NAngle,NRotation)}):Play()
	
	TweenService:Create(Rchr.Torso.Mweld1,TweenInfo.new(Time),
		{C1=w[1]*CFrame.new(0,HigV,0)}):Play()
	
	TweenService:Create(Rchr.Torso.Mweld2,TweenInfo.new(Time),
		{C1=w[2]*CFrame.new(0,HigV,0)}):Play()
	
	if w[3] then -- Check if there is an extra weld
		TweenService:Create(Rchr["Right Arm"].Mweld3,TweenInfo.new(Time),
		    {C1=w[3]*CFrame.new(0,HigV,0)}):Play()	
	end
				
	TweenService:Create(Rchr.HumanoidRootPart.Mtweld,TweenInfo.new(Time),
		{C1=w[4]*CFrame.new(0,HigV,0)}):Play()
end)





function checktoolsupdatemouse()
	local char = game.Players.LocalPlayer.Character
	for i,v in pairs(char:GetChildren()) do
		if v:IsA("Tool") then
			gui.FakeC.Visible = true
			game:GetService("UserInputService").MouseIconEnabled = false
			return
		end
	end
	
	gui.FakeC.Visible = false
	game:GetService("UserInputService").MouseIconEnabled = true
end

game.Players.LocalPlayer.Character.ChildAdded:Connect(checktoolsupdatemouse)
game.Players.LocalPlayer.Character.ChildRemoved:Connect(checktoolsupdatemouse)

checktoolsupdatemouse()
----- water handler -----



while true do
	if script.Parent.HotOn.Value == true and script.Parent.ColdOn.Value == true and script.Parent.Plugged.Value == true and water.Scale.Y <= 2 then -- if BOTH ON and PLUGGED		
		water.Scale = water.Scale + Vector3.new(0,0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		hotWater = hotWater + 1
		coldWater = coldWater + 1
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == true and water.Scale.Y <= 2 then -- if ON and PLUGGED
		water.Scale = water.Scale + Vector3.new(0,0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		if script.Parent.HotOn.Value == true then
			hotWater = hotWater + 1
		else
			coldWater = coldWater + 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == true or script.Parent.ColdOn.Value == true) and script.Parent.Plugged.Value == false and water.Scale.Y <= 2 then -- if ON and NOT PLUGGED
		if script.Parent.HotOn.Value == true then
			coldWater = coldWater - 1			
		else
			hotWater = hotWater - 1
		end
		drainSound:Stop()
	elseif (script.Parent.HotOn.Value == false and script.Parent.ColdOn.Value == false) and script.Parent.Plugged.Value == false and water.Scale.Y > 0 then -- if NOT ON and NOT PLUGGED
		water.Scale = water.Scale + Vector3.new(0,-0.01,0)
		water.Offset = Vector3.new(0,water.Scale.Y/2,0)
		coldWater = coldWater - 1
		hotWater = hotWater - 1
		drainSound:Play()
	end
	
	if coldWater < 1 then
		coldWater = 1
	end
	if hotWater < 1 then
		hotWater = 1
	end
	
	waterTemp = hotWater/coldWater	
	
	if waterTemp > 1 then
		water.Parent.SteamEmitter.Enabled = true
	else
		water.Parent.SteamEmitter.Enabled = false
	end
	wait(0.1)
	
	
	if script.Parent.ColdOn.Value == true or script.Parent.HotOn.Value == true then
		script.Parent.Splash.ParticleEmitter.Enabled = true
	else
		script.Parent.Splash.ParticleEmitter.Enabled = false
	end	
	
	if water.Scale.Y <= 0 then
		drainSound:Stop()
	end
end
--======================================--
--===============Weld Part1(WP1)===============--
--======================================--


w1.Part1 = bin.Armslot
w2.Part1 = bin.Sphere
w3.Part1 = bin.ThumbJoint
w4.Part1 = bin.ThumbTip
w5.Part1 = bin.IndexJoint
w6.Part1 = bin.IndexTip
w7.Part1 = bin.CenterJoint
w8.Part1 = bin.CenterTip
w9.Part1 = bin.RingJoint
w10.Part1 = bin.RingTip
w11.Part1 = bin.PinkieJoint
w12.Part1 = bin.PinkieTip
--	


	script.Parent.Handle3.Hinge1.Transparency = 1
	script.Parent.Handle3.Interactive1.Transparency = 1
	script.Parent.Handle3.Part1.Transparency = 1
	wait(0.06)
	script.Parent.Handle1.Hinge1.Transparency = 0
	script.Parent.Handle1.Interactive1.Transparency = 0
	script.Parent.Handle1.Part1.Transparency = 0