Pinkstack/roblox-luau-corpus-text huggingface dataset:
--local equalizingForce = 236 / 1.2 -- amount of force required to levitate a mass


local equalizingForce = 180 / 1.2 -- amount of force required to levitate a mass
local gravity = 1.05 -- things float at > 1

local height = nil
local maxRise =  10

function onTouched(part)

	local h = part.Parent:FindFirstChild("Humanoid")
	if h ~= nil then
		upAndAway = true
		Tool.Handle.Anchored = false
	end

end

function onEquipped()

	--Tool.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=25498565"
	upAndAway = true
	upAndAwayForce.Parent = Tool.Handle
	Tool.GripPos = Vector3.new(0,-1.75,0)
	Tool.GripForward = Vector3.new(0,1,0)
	Tool.GripRight = Vector3.new(0,0,-1)
	Tool.GripUp = Vector3.new(0,2,0)
	height = Tool.Parent.HumanoidRootPart.Position.y
	local lift = recursiveGetLift(Tool.Parent)
	float(lift)
end

function onUnequipped()

	upAndAway = false
	Tool.GripForward = Vector3.new(1,0,0)
	Tool.GripRight = Vector3.new(0,0,1)
	Tool.GripUp = Vector3.new(0,1,0)
	Tool.Handle.Mesh.Scale = Vector3.new(0.02, 0.02, 0.02)

end

Tool.Unequipped:connect(onUnequipped)
Tool.Equipped:connect(onEquipped)
Tool.Handle.Touched:connect(onTouched)

function recursiveGetLift(node)
	local m = 0
	local c = node:GetChildren()
	if (node:FindFirstChild("Head") ~= nil) then head = node:FindFirstChild("Head") end -- nasty hack to detect when your parts get blown off

	for i=1,#c do
		if c[i].className == "Part" then	
			if (head ~= nil and (c[i].Position - head.Position).magnitude < 10) then -- GROSS
				if c[i].Name == "Handle" then
					m = m + (c[i]:GetMass() * equalizingForce * 1) -- hack that makes hats weightless, so different hats don't change your jump height
				else
					m = m + (c[i]:GetMass() * equalizingForce * gravity)
				end
			end
		end
		m = m + recursiveGetLift(c[i])
	end
	return m
end

function updateBalloonSize()

	local range = (height + maxRise) - Tool.Handle.Position.y

	print(range)
	
	if range > 100 then
		Tool.Handle.Mesh.Scale = Vector3.new(0.03, 0.03, 0.03)
	elseif range < 100 and range > 50 then
		Tool.Handle.Mesh.Scale = Vector3.new(0.025, 0.025, 0.025)
	elseif range < 50 then
		Tool.Handle.Mesh.Scale = Vector3.new(0.02, 0.02, 0.02)
	end

end


function float(lift)

	while upAndAway do

		upAndAwayForce.force = Vector3.new(0,lift * 0.98,0)
		upAndAwayForce.Parent = Tool.Handle
		wait(3)

		upAndAwayForce.force = Vector3.new(0,lift * 0.92,0)
		wait(2)

		if Tool.Handle.Position.y > height + maxRise then
			upAndAway = false
			Tool.Handle.Pop:Play()
			Tool.GripPos = Vector3.new(0,-0.4,0)
			--Tool.Handle.Mesh.MeshId = "http://www.roblox.com/asset/?id=26725510"
			upAndAwayForce.Parent = nil
		end

		updateBalloonSize()

	end
end
--local Screen = carSeat.Parent.AudioPlayerScreen.SurfaceGui <-- soon


local Song = script.Parent.AudioPlayerGui.Song
local Audio = carSeat.Audio

vol = 1

function changeSong()
	
	local effect = carSeat.Audio.EqualizerSoundEffect
	if effect.HighGain == 5 then
		effect.HighGain = -80
		effect.MidGain = -25
		onOff.Text = "IN"
	else
		effect.HighGain = 5
		effect.MidGain = 7
		onOff.Text = "OUT"
	end
	
end

function playSong()
	
	local id = player.PlayerGui.AudioPlayer.AudioPlayerGui.TextBox.Text
	Audio:Stop()
	Audio.SoundId = "http://www.roblox.com/asset/?id="..id
	Audio:Play()
	--Screen.Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name
	Song.Text = game:GetService("MarketplaceService"):GetProductInfo(id).Name
	--Screen.ID.Text = id

end

function stopSong()
	
	Audio:Stop()
	
end

function volUp()

	if vol + 0.1 <= 5 then
		vol = vol + 0.1
		Audio.Volume = vol	
		player.PlayerGui.AudioPlayer.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%"
		--Screen.Vol.Text = tostring(vol*100) .. "%"
	end
	
end

function volDown()
		
	if vol - 0.1 >= 0 then
		vol = vol - 0.1
		Audio.Volume = vol
		player.PlayerGui.AudioPlayer.AudioPlayerGui.Vol.Text = tostring(vol*100) .. "%"
		--Screen.Vol.Text = tostring(vol*100) .. "%"
	end
	
end

ChangeButton.MouseButton1Click:connect(function()
	
	changeSong()
	
end)

VolUpButton.MouseButton1Click:connect(function()
	
	volUp()
	
end)

VolDownButton.MouseButton1Click:connect(function()
	
	volDown()
	
end)

PlayButton.MouseButton1Click:connect(function()
	
	playSong()
	
end)

PauseButton.MouseButton1Click:connect(function()
	
	stopSong()
	
end)
--[[Transmission]]


	Tune.TransModes		= {"Semi", "Auto"}												--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 3.97			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.42		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.75		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.10		,
		--[[ 3 ]]		1.40		,
		--[[ 4 ]]		1.00		,
		--[[ 5 ]]		0.71		,
		--[[ 6 ]]		0.61			,
		--[[ 7 ]]		0.51		,
	}
	Tune.FDMult			= 1			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--LIGHTING FUNCTIONS



script.Parent.OnServerEvent:connect(function(pl,n) if lt~=1 then pr = true else pr=false end lt=n
	if n == 0 then
		UpdateLt(1,white)
		UpdatePt(false,white)
		StopMt(pr)
	elseif (n == 1 or n == 2) then
		RefMt.DesiredAngle = RefMt.CurrentAngle%math.rad(360)
		RefMt.CurrentAngle = RefMt.CurrentAngle%math.rad(360)
		UpdateLt(.25,red)
		UpdatePt(true,red)
		UpdateMt(0,math.rad(225),4)
		wait(.75)
		repeat
			UpdateMt(0,math.rad(135),0)
			wait(.5)
			if lt~=1 and lt~=2 then break end
			UpdateMt(0,math.rad(225),0)
			wait(.5)
		until (lt~=1 and lt~= 2)
	elseif n == 3 then
		wait(.5)
		UpdateLt(.25,red)
		UpdatePt(true,red)
		UpdateMt(0,9e9,1)
	end
end)
--!nonstrict


local Players = game:GetService("Players")
local TweenService = game:GetService("TweenService")

local LocalPlayer = Players.LocalPlayer
if not LocalPlayer then
	Players:GetPropertyChangedSignal("LocalPlayer"):Wait()
	LocalPlayer = Players.LocalPlayer
end

local function waitForChildOfClass(parent: Instance, class: string)
	local child = parent:FindFirstChildOfClass(class)
	while not child or child.ClassName ~= class do
		child = parent.ChildAdded:Wait()
	end
	return child
end

local PlayerGui = waitForChildOfClass(LocalPlayer, "PlayerGui")

local TOAST_OPEN_SIZE = UDim2.new(0, 326, 0, 58)
local TOAST_CLOSED_SIZE = UDim2.new(0, 80, 0, 58)
local TOAST_BACKGROUND_COLOR = Color3.fromRGB(32, 32, 32)
local TOAST_BACKGROUND_TRANS = 0.4
local TOAST_FOREGROUND_COLOR = Color3.fromRGB(200, 200, 200)
local TOAST_FOREGROUND_TRANS = 0
--SETTINGS


local TITLE1 = "Close Door"
local TITLE2 = "Open Door"
local IsOpen = false


click.Triggered:Connect(function()
	if IsOpen == false then
		IsOpen = true
		click.ActionText = TITLE1
		open_mus:Play()
		base2.Window.Transparency = 0.6
		base2.Visual.Transparency = 0
		base1.Window.Transparency = 1
		base1.Visual.Transparency = 1
		base2.CanCollide = true
		base1.CanCollide = false
	else
		IsOpen = false
		click.ActionText = TITLE2
		close_mus:Play()
		base2.Window.Transparency = 1
		base2.Visual.Transparency = 1
		base1.Window.Transparency = 0.6
		base1.Visual.Transparency = 0
		base2.CanCollide = false
		base1.CanCollide = true
	end
end)
-- Note: Overrides base class GetIsJumping with get-and-clear behavior to do a single jump
-- rather than sustained jumping. This is only to preserve the current behavior through the refactor.


function DynamicThumbstick:GetIsJumping()
	local wasJumping = self.isJumping
	self.isJumping = false
	return wasJumping
end

function DynamicThumbstick:EnableAutoJump(enable)
	local humanoid = Players.LocalPlayer.Character and Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid")
	if humanoid then
		if enable then
			self.shouldRevertAutoJumpOnDisable = (humanoid.AutoJumpEnabled == false) and (Players.LocalPlayer.DevTouchMovementMode == Enum.DevTouchMovementMode.UserChoice)
			humanoid.AutoJumpEnabled = true
		elseif self.shouldRevertAutoJumpOnDisable then
			humanoid.AutoJumpEnabled = false
		end
	end
end

function DynamicThumbstick:Enable(enable, uiParentFrame)
	if enable == nil then return false end			-- If nil, return false (invalid argument)
	enable = enable and true or false				-- Force anything non-nil to boolean before comparison
	if self.enabled == enable then return true end	-- If no state change, return true indicating already in requested state

	if enable then
		-- Enable
		if not self.thumbstickFrame then
			self:Create(uiParentFrame)
		end

		self:BindContextActions()

		if Players.LocalPlayer.Character then
			self:OnCharacterAdded(Players.LocalPlayer.Character)
		else
			Players.LocalPlayer.CharacterAdded:Connect(function(char)
				self:OnCharacterAdded(char)
			end)
		end
	else
		ContextActionService:UnbindAction(DYNAMIC_THUMBSTICK_ACTION_NAME)
		-- Disable
		self:OnInputEnded() -- Cleanup
	end

	self.enabled = enable
	self.thumbstickFrame.Visible = enable
end

function DynamicThumbstick:OnCharacterAdded(char)

	for _, child in ipairs(char:GetChildren()) do
		if child:IsA("Tool") then
			self.toolEquipped = child
		end
	end

	char.ChildAdded:Connect(function(child)
		if child:IsA("Tool") then
			self.toolEquipped = child
		elseif child:IsA("Humanoid") then
			self:EnableAutoJump(true)
		end

	end)
	char.ChildRemoved:Connect(function(child)
		if child == self.toolEquipped then
			self.toolEquipped = nil
		end
	end)

	self.humanoid = char:FindFirstChildOfClass("Humanoid")
	if self.humanoid then
		self:EnableAutoJump(true)
	end
end
--Event


ClickDetector.MouseClick:Connect(function()
	if ClickReady.Value == true then
		ClickReady.Value = false
		ButtonClick:Play()
		Button.Size = Size1
		Button.Material = Material1
		DigitNumber.Value = DigitNumber.Value + 1
		if DigitNumber.Value > Max then
			DigitNumber.Value = Min
		end
		NumberGUI.Text = DigitNumber.Value
		EnteredCode.Value = tostring(Digit1.Value)..""..tostring(Digit2.Value)..""..tostring(Digit3.Value)
		wait(.5)
		Button.Size = Size0
		Button.Material = Material0
		wait(.25)
		ClickReady.Value = true
	end
end)
--!strict
--[=[
  @function values
  @within Dictionary

  @param dictionary {[K]: V} -- The dictionary to get the values from.
  @return {V} -- The values in the dictionary.

  Gets the values in the given dictionary.

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

  local values = Values(dictionary) -- { "roblox", "world" }
  ```
]=]


local function values<K, V>(dictionary: { [K]: V }): { V }
	local result = {}

	for _, value in pairs(dictionary) do
		table.insert(result, value)
	end

	return result
end

return values
--local Music = game.Workspace.Music


local GrabSFX = game.Workspace.GrabSFX

script.Parent.Touched:Connect(function(hit)
	if hit then
		--Music.Volume = 0
		GrabSFX:Play()
		--hit.Parent.PlayerScript.Disabled = true
		hit.Parent.Humanoid.WalkSpeed = 0
		hit.Parent.Humanoid.JumpPower = 0
		local AnimationTracks = hit.Parent.Humanoid:GetPlayingAnimationTracks()
		for i, track in pairs (AnimationTracks) do
			track:Stop()
		end
		local StarAnim = hit.Parent.Humanoid:LoadAnimation(hit.Parent.StarGet)
		StarAnim:Play()
		script.Parent.Parent = game.ReplicatedStorage
	end
end)

Popup = script.Parent.TrophyGrab
Ready = true
function onTouch(hit)
	local h = hit.Parent:FindFirstChild("Humanoid")
	if h ~= nil and Ready == true then
		Ready = false
		local plyr = game.Players:FindFirstChild(h.Parent.Name) 
		local c = Popup:clone()
		c.Script.Disabled = false
		c.Parent = plyr.PlayerGui
	end
end

script.Parent.Touched:connect(onTouch)
-- events



UserInputService.InputBegan:connect(function(inputObject, processed)
	local action	= ActionFromInputObject(inputObject)
	
	if action then
		actionBegan:Fire(action, processed)
	end
end)

UserInputService.InputEnded:connect(function(inputObject, processed)
	local action	= ActionFromInputObject(inputObject)
	
	if action then
		actionEnded:Fire(action, processed)
	end
end)
-- Now with exciting TeamColors HACK!
--[[script.Parent:WaitForChild("Torso")
script.Parent:WaitForChild("HumanoidRootPart")
script.Parent:WaitForChild("Right Leg")
script.Parent:WaitForChild("Left Leg")
script.Parent:WaitForChild("Left Arm")
script.Parent:WaitForChild("Right Arm")
script.Parent:WaitForChild("Head")

local sp = script.Parent
local torso = script.Parent.Torso


local nName = "Neck"
local n = Instance.new("Motor6D")
n.Name = nName
n.Part0 = torso
n.Part1 = sp["Head"]
n.C0 = script[nName].C0
n.C1 = script[nName].C1
n.MaxVelocity = 0.1
local nOld = torso:FindFirstChild(nName)
n.Parent = torso
if nOld ~= nil then nOld:Destroy() end


local jName = "RootJoint"
local j = Instance.new("Motor6D")
j.Name = jName
j.Part0 = sp.HumanoidRootPart
j.Part1 = sp["Torso"]
j.C0 = script[jName].C0
j.C1 = script[jName].C1
j.MaxVelocity = 0.1
local jOld = sp.HumanoidRootPart:FindFirstChild(jName)
j.Parent = sp.HumanoidRootPart
if jOld ~= nil then jOld:Destroy() end


local rsName = "Right Shoulder"
local rs = Instance.new("Motor6D")
rs.Name = rsName
rs.Part0 = torso
rs.Part1 = sp["Right Arm"]
rs.C0 = script[rsName].C0
rs.C1 = script[rsName].C1
rs.MaxVelocity = 0.1
local rsOld = torso:FindFirstChild(rsName)
rs.Parent = torso
if rsOld ~= nil then rsOld:Destroy() end


local lsName = "Left Shoulder"
local ls = Instance.new("Motor6D")
ls.Name = lsName
ls.Part0 = torso
ls.Part1 = sp["Left Arm"]
ls.C0 = script[lsName].C0
ls.C1 = script[lsName].C1
ls.MaxVelocity = 0.1
local lsOld = torso:FindFirstChild(lsName)
ls.Parent = torso
if lsOld ~= nil then lsOld:Destroy() end

local rhName = "Right Hip"
local rh = Instance.new("Motor6D")
rh.Name = rhName
rh.Part0 = torso
rh.Part1 = sp["Right Leg"]
rh.C0 = script[rhName].C0
rh.C1 = script[rhName].C1
rh.MaxVelocity = 0.1
local rhOld = torso:FindFirstChild(rhName)
rh.Parent = torso
if rhOld ~= nil then rhOld:Destroy() end
RightHip = rh

local lhName = "Left Hip"
local lh = Instance.new("Motor6D")
lh.Name = lhName
lh.Part0 = torso
lh.Part1 = sp["Left Leg"]
lh.C0 = script[lhName].C0
lh.C1 = script[lhName].C1
lh.MaxVelocity = 0.1
local lhOld = torso:FindFirstChild(lhName)
lh.Parent = torso
if lhOld ~= nil then lhOld:Destroy() end
local LeftHip = lh

script.Parent.Head:MakeJoints()

]]




function waitForChild(parent, childName)
	while true do
		local child = parent:findFirstChild(childName)
		if child then
			return child
		end
		parent.ChildAdded:wait()
	end
end
---[[ Message Settings ]]


module.MaximumMessageLength = 400
module.DisallowedWhiteSpace = {"\n", "\r", "\t", "\v", "\f"}
module.ClickOnPlayerNameToWhisper = true
module.ClickOnChannelNameToSetMainChannel = true
module.BubbleChatMessageTypes = {ChatConstants.MessageTypeDefault, ChatConstants.MessageTypeWhisper}
--[[

	enumList = EnumList.new(name: string, enums: string[])

	enumList:Is(item)


	Example:

		direction = EnumList.new("Direction", {"Up", "Down", "Left", "Right"})
		leftDir = direction.Left
		print("IsDirection", direction:Is(leftDir))

--]]




type EnumNames = {string}

local Symbol = require(script.Parent.Symbol)

local EnumList = {}


function EnumList.new(name: string, enums: EnumNames)
	local scope = Symbol.new(name, nil)
	local enumItems: {[string]: Symbol.Symbol} = {}
	for _,enumName in ipairs(enums) do
		enumItems[enumName] = Symbol.new(enumName, scope)
	end
	local self = setmetatable({
		_scope = scope;
	}, {
		__index = function(_t, k)
			if enumItems[k] then
				return enumItems[k]
			elseif EnumList[k] then
				return EnumList[k]
			else
				error("Unknown " .. name .. ": " .. tostring(k), 2)
			end
		end;
		__newindex = function()
			error("Cannot add new " .. name, 2)
		end;
	})
	return self
end


function EnumList:Is(obj: any): boolean
	return Symbol.IsInScope(obj, self._scope)
end


export type EnumList = typeof(EnumList.new("", {""}))


return EnumList
--[[ Constants ]]

--
local ZERO_VECTOR3 = Vector3.new(0,0,0)
local TOUCH_CONTROLS_SHEET = "rbxasset://textures/ui/Input/TouchControlsSheetV2.png"

local MIDDLE_TRANSPARENCIES = {
	1 - 0.89,
	1 - 0.70,
	1 - 0.60,
	1 - 0.50,
	1 - 0.40,
	1 - 0.30,
	1 - 0.25
}
local NUM_MIDDLE_IMAGES = #MIDDLE_TRANSPARENCIES

local FADE_IN_OUT_BACKGROUND = true
local FADE_IN_OUT_MAX_ALPHA = 0.35

local FADE_IN_OUT_HALF_DURATION_DEFAULT = 0.3
local FADE_IN_OUT_BALANCE_DEFAULT = 0.5
local ThumbstickFadeTweenInfo = TweenInfo.new(0.15, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut)

local Players = game:GetService("Players")
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local TweenService = game:GetService("TweenService")
-- Helper functions


local function loadAnimation(controller, animationId)
	animation.AnimationId = "rbxassetid://" .. animationId
	return controller:LoadAnimation(animation)
end

local function isolateAndDampenYAngle(targetCFrame, proportionMultiplier)
	proportionMultiplier = proportionMultiplier or 1
	local _, y = targetCFrame:ToEulerAnglesXYZ()
	
	return CFrame.new(targetCFrame.Position) * CFrame.Angles(
		0,
		y * proportionMultiplier,
		0
	)
end

local function makeNPCLookAt(lookAtPosition)
    -- If the streaming is enabled then NPC might be streamed out which in that case this function should return immediately.
	if not npcModel:IsDescendantOf(workspace) then
		return
	end
	
	if not lookAtPosition then
		return
	end
	local differenceVector = lookAtPosition - npcModel.PrimaryPart.Position
	local targetCFrame = rotationOffset * CFrame.new(Vector3.new(), differenceVector.Unit) or rotationOffset
	
	-- Let the waving animation move the body
	if not waveAnimationTrack.IsPlaying then
		NPC.Root.Transform = isolateAndDampenYAngle(targetCFrame, TwistProportions.Root)
		NPC.Waist.Transform = isolateAndDampenYAngle(targetCFrame, TwistProportions.Waist)
	end
	NPC.Neck.Transform = isolateAndDampenYAngle(targetCFrame, waveAnimationTrack.IsPlaying and TwistProportions.Full or TwistProportions.Neck)
	
	return differenceVector.Magnitude
end
--Classes


export type SubtitleWindow = {
    Visible: boolean,
    new: () -> (SubtitleWindow),
    SubtitleEntries: {SubtitleEntry},
    RowAdornFrame: Frame,
    UpdateSize: (SubtitleWindow) -> (),
    ShowSubtitle: (SubtitleWindow, Message: string, Duration: number, ReferenceSound: Sound?) -> (),
}

export type SubtitleEntry = {
    new: (Message: string, Window: SubtitleWindow) -> (SubtitleWindow),
    UpdatePosition: (SubtitleEntry) -> (),
    AddMultiple: (SubtitleEntry) -> (),
    RemoveMultiple: (SubtitleEntry) -> (),
    AddReferenceSound: (SubtitleEntry, ReferenceSound: Sound) -> (),
    RemoveReferenceSound: (SubtitleEntry, ReferenceSound: Sound) -> (),
    Destroy: (SubtitleEntry) -> (),
}



return {}
----- sink plug handler -----



plug.Interactive.ClickDetector.MouseClick:Connect(function()
	if plugged.Value == false then
		plugged.Value = true
		plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0, -0.08, 0)
		plug.Interactive.CFrame = plug.Interactive.CFrame * CFrame.new(0, 0.14, 0)
		plug.Shaft.CFrame = plug.Shaft.CFrame * CFrame.new(0, 0.14, 0)
		script.Parent.Plug.Plug.Open.Playing = false
		script.Parent.Plug.Plug.Draining.Playing = false
	else
		plugged.Value = false
		plug.Plug.CFrame = plug.Plug.CFrame * CFrame.new(0, 0.08, 0)
		plug.Interactive.CFrame = plug.Interactive.CFrame * CFrame.new(0, -0.14, 0)
		plug.Shaft.CFrame = plug.Shaft.CFrame * CFrame.new(0, -0.14, 0)
		script.Parent.Plug.Plug.Open.Playing = true
		script.Parent.Plug.Plug.Draining.Playing = true
		wait(10)
		script.Parent.Plug.Plug.Open.Playing = false
		script.Parent.Plug.Plug.Draining.Playing = false
	end
end)
-- connect events


Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)
Humanoid.PlatformStanding:connect(onPlatformStanding)
Humanoid.Swimming:connect(onSwimming)
local runService = game:GetService("RunService");
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"
while wait(0)do
    local _,time=wait(0)
    move(time)
end

function onTouched(hit)
    local player = game.Players:GetPlayerFromCharacter(hit.Parent)
    if player then
        game:GetService("TeleportService"):Teleport(4641921091,player)  --replace the numbers with your place id
    end
end


script.Parent.Torso.Touched:connect(onTouched)
--		Button.Size = Size1
--		Button.Material = Material1


		DigitNumber.Value = DigitNumber.Value + 1
		if DigitNumber.Value > Max then
			DigitNumber.Value = Min
		end
		NumberGUI.Text = DigitNumber.Value
		EnteredCode.Value = tostring(Digit1.Value)..""..tostring(Digit2.Value)..""..tostring(Digit3.Value)
		wait(.5)