Roblox/luau_corpus huggingface dataset:
--Creates a controller group.
function ControllerGroups:CreateControllerGroup()
	local ControllerGroup = {}
	local Frames = {}
	local Active = false
	local FirstFrame
	
	--Sets the group to be active.
	function ControllerGroup:SetActive(IsActive,IsPriority)
		if IsActive ~= Active then
			if IsActive then
				if IsPriority then
					table.insert(ActivePriorityControllerGroups,1,ControllerGroup)
				else
					table.insert(ActiveControllerGroups,1,ControllerGroup)
				end
			else
				for Id,Group in pairs(ActiveControllerGroups) do
					if Group == ControllerGroup then
						table.remove(ActiveControllerGroups,Id)
						break
					end
				end
				for Id,Group in pairs(ActivePriorityControllerGroups) do
					if Group == ControllerGroup then
						table.remove(ActivePriorityControllerGroups,Id)
						break
					end
				end
				
				UpdateActiveButton()
			end
			
			Active = IsActive
			UpdateActiveButton()
		end
	end
	
	--Set the first frame when the group is activated.
	function ControllerGroup:SetFirstFrame(Frame)
		if ControllerGroup:FrameInGroup(Frame) then
			FirstFrame = Frame
		else
			FirstFrame = nil
		end
	end
	
	--Returns if the frame is in the group.
	function ControllerGroup:FrameInGroup(Frame)
		for _,OtherFrame in pairs(Frames) do
			if Frame == OtherFrame then
				return true
			end
		end
		
		return false
	end
	
	--Adds a frame to the controller group.
	function ControllerGroup:AddFrame(Frame)
		if not ControllerGroup:FrameInGroup(Frame) then
			table.insert(Frames,Frame)
			
			if Active then UpdateActiveButton() end
		end
	end
	
	--Removes a frame from the controller.
	function ControllerGroup:RemoveFrame(Frame)
		for Id,OtherFrame in pairs(Frames) do
			if Frame == OtherFrame then
				table.remove(Frames,Id)
				
				if Active then UpdateActiveButton() end
				return
			end
		end
	end
	
	--Clears all frames in the controller group.
	function ControllerGroup:ClearFrames()
		Frames = {}
		if Active then UpdateActiveButton() end
	end
	
	--Returns if the group is active.
	function ControllerGroup:IsActive()
		return GetActiveGroup() == ControllerGroup
	end
	
	--Returns all the frames in the group.
	function ControllerGroup:GetFrames()
		return Frames
	end
	
	--Returns the first frame in teh group.
	function ControllerGroup:GetFirstFrame()
		return ((FirstFrame and ControllerGroup:FrameInGroup(FirstFrame)) and FirstFrame) or Frames[1]
	end
	
	return ControllerGroup
end
----------------------------------------------------------------------------------------------------
-------------------=[ PROJETIL ]=-------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,Distance = 10000
	,BDrop = .25
	,BSpeed = 2000

	,SuppressMaxDistance = 25	--- Studs
	,SuppressTime = 10			--- Seconds

	,BulletWhiz = true
	,BWEmitter = 25
	,BWMaxDistance = 200
	
	,BulletFlare = false
	,BulletFlareColor = Color3.fromRGB(255,255,255)

	,Tracer = true
	,TracerColor = Color3.fromRGB(255,255,255)
	,TracerLightEmission = 1
	,TracerLightInfluence = 0
	,TracerLifeTime = .2
	,TracerWidth = .1
	,RandomTracer = false
	,TracerEveryXShots = 5
	,TracerChance = 100
	
	,BulletLight = false
	,BulletLightBrightness = 1
	,BulletLightColor = Color3.fromRGB(255,255,255)
	,BulletLightRange = 10

	,ExplosiveHit = false
	,ExPressure = 500
	,ExpRadius = 25
	,DestroyJointRadiusPercent = 0	--- Between 0 & 1
	,ExplosionDamage = 100

	,LauncherDamage = 100
	,LauncherRadius = 25
	,LauncherPressure = 500
	,LauncherDestroyJointRadiusPercent = 0
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --


while true do
	wait()
	if Lift:WaitForChild("Direction").Value == 1 then
		This.Display.ARW1.UP.BrickColor = BrickColor.new(ActiveCol)
		This.Display.ARW1.UP.Material = "Neon"
		This.Display.ARW1.MID.BrickColor = BrickColor.new(ActiveCol)
		This.Display.ARW1.MID.Material = "Neon"
		This.Display.ARW1.DOWN.BrickColor = BrickColor.new(InactiveCol)
		This.Display.ARW1.DOWN.Material = "SmoothPlastic"
	elseif Lift:WaitForChild("Direction").Value == -1 then
		This.Display.ARW1.UP.BrickColor = BrickColor.new(InactiveCol)
		This.Display.ARW1.UP.Material = "SmoothPlastic"
		This.Display.ARW1.MID.BrickColor = BrickColor.new(ActiveCol)
		This.Display.ARW1.MID.Material = "Neon"
		This.Display.ARW1.DOWN.BrickColor = BrickColor.new(ActiveCol)
		This.Display.ARW1.DOWN.Material = "Neon"
	else
		This.Display.ARW1.UP.BrickColor = BrickColor.new(InactiveCol)
		This.Display.ARW1.UP.Material = "SmoothPlastic"
		This.Display.ARW1.MID.BrickColor = BrickColor.new(InactiveCol)
		This.Display.ARW1.MID.Material = "SmoothPlastic"
		This.Display.ARW1.DOWN.BrickColor = BrickColor.new(InactiveCol)
		This.Display.ARW1.DOWN.Material = "SmoothPlastic"
	end
end
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder
	
]]--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
return function(p1)
	local v1 = nil;
	v1 = 0;
	for v2 = 1, string.len(p1) do
		v1 = v1 + string.byte(string.sub(p1, v2, v2));
	end;
	return v1
end;
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 135		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 800		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 8000		--		Use sliders to manipulate values
	Tune.Redline		= 9000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 6100
	Tune.PeakSharpness	= 3.8
	Tune.CurveMult		= 0.07
	
	--Incline Compensation
	Tune.InclineComp	= 1.5		-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 450		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 150		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 0			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response, lower = more stable RPM)
--If we can't find it, add it in
if (TeleEffect == nil) then
	TeleEffect = script.Parent.TeleporterEffect:clone()
	TeleEffect.Disabled = false
	TeleEffect.Parent = StarterPlayer.StarterPlayerScripts
end
-- BrailleGen 3D BETA

Align = true

This = script.Parent
Btn = This.Parent
Characters = require(script.Characters)

function ChangeFloor(SF)
	if Align == true then
		if string.len(SF) == 1 then
			SetLabel(1,SF,0.045)	
			SetLabel(2,"NIL",0)
			SetLabel(3,"NIL",0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 2 then
			SetLabel(1,SF:sub(1,1),0.03)	
			SetLabel(2,SF:sub(2,2),0.03)
			SetLabel(3,"NIL",0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 3 then
			SetLabel(1,SF:sub(1,1),0.015)	
			SetLabel(2,SF:sub(2,2),0.015)
			SetLabel(3,SF:sub(3,3),0.015)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 4 then
			SetLabel(1,SF:sub(1,1),0)	
			SetLabel(2,SF:sub(2,2),0)
			SetLabel(3,SF:sub(3,3),0)
			SetLabel(4,SF:sub(4,4),0)
		end
	else
		if string.len(SF) == 1 then
			SetLabel(1,SF,0)	
			SetLabel(2,"NIL",0)
			SetLabel(3,"NIL",0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 2 then
			SetLabel(1,SF:sub(1,1),0)	
			SetLabel(2,SF:sub(2,2),0)
			SetLabel(3,"NIL",0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 3 then
			SetLabel(1,SF:sub(1,1),0)	
			SetLabel(2,SF:sub(2,2),0)
			SetLabel(3,SF:sub(3,3),0)
			SetLabel(4,"NIL",0)
		elseif string.len(SF) == 4 then
			SetLabel(1,SF:sub(1,1),0)	
			SetLabel(2,SF:sub(2,2),0)
			SetLabel(3,SF:sub(3,3),0)
			SetLabel(4,SF:sub(4,4),0)
		end
	end
end


function SetLabel(ID,CHAR,OFFSET)
	if This:FindFirstChild("BR"..ID) and Characters[CHAR] ~= nil then
		for i,l in pairs(Characters[CHAR]) do 
			This["BR"..ID].Mesh.MeshId = "rbxassetid://"..l
		end
		if CHAR == "A" or CHAR == "1" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET-0.006, 0, -0.014)
		elseif CHAR == "B" or CHAR == "2" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET-0.006, 0, -0.006)
		elseif CHAR == "C" or CHAR == "3" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, -0.014)
		elseif CHAR == "D" or CHAR == "4" or CHAR == "E" or CHAR == "5" or CHAR == "F" or CHAR == "6" or CHAR == "G" or CHAR == "7" or CHAR == "H" or CHAR == "8" or CHAR == "I" or CHAR == "9" or CHAR == "J" or CHAR == "0" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, -0.006)
		elseif CHAR == "K" or CHAR == "L" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET-0.006, 0, 0)
		elseif CHAR == "." or CHAR == "+" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, 0.006)
		elseif CHAR == "-" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, 0.014)
		elseif CHAR == ";" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, 0.006)
		elseif CHAR == "*" then
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET+0.006, 0, 0)
		else
			This["BR"..ID].Mesh.Offset = Vector3.new(OFFSET, 0, 0)
		end
	end
end


ChangeFloor("$"..Btn.Name)

script:Destroy()
-- FUNCTIONS --
Tool.Equipped:Connect(function()
	Character = Tool.Parent
equiped = true
Player.PlayerGui:FindFirstChild("Fists").Enabled = true

	Character.Humanoid.Running:Connect(function(speed)

		if speed == 0 and Equipped.Value == true then -- Walking
			equippedIdle:Play()

		else -- Idle
			equippedIdle:Stop()

		end
	end)
	HRP = Character:WaitForChild("HumanoidRootPart")
	Humanoid = Character:WaitForChild("Humanoid")

	
	
	
	attackRemote:FireServer("Equip")
	attackRemote:FireServer("Unblock")
	val.Value = false

end)

Tool.Unequipped:Connect(function()
	Player.PlayerGui:FindFirstChild("Fists").Enabled = false
	equiped = false
	equippedIdle:Stop()
	attackRemote:FireServer("Unequip")

	attackRemote:FireServer("Unblock")
	val.Value = false	

end)

UIS.InputBegan:Connect(function(Input, isTyping)
	if isTyping then return end

	if Player.Character:FindFirstChild("PBSTUN") then return end
	if Player.Character:FindFirstChild("Running").Value == true then return end
	if Input.UserInputType == Enum.UserInputType.MouseButton1 then
		if not Humanoid then return end
		if Humanoid.Health > 0 then
			local Disabled = Character:FindFirstChild("Disabled")
			if not Disabled then
				
				if UIS:IsKeyDown(Enum.KeyCode.Space) then
					attackRemote:FireServer("Attack", true)
				else
					attackRemote:FireServer("Attack", false)
				end
		
				coroutine.wrap(function()
					local noJumpValue = Instance.new("BoolValue")
					noJumpValue.Name = "noJump"
					noJumpValue.Parent = Character
					game.Debris:AddItem(noJumpValue, 1.4)
				end)()
			end
		end
	
	elseif Input.KeyCode == Enum.KeyCode.F then
		if deb == true then return end
		if not Humanoid then return end
		if Humanoid.Health > 0 then
			local Disabled = Character:FindFirstChild("Disabled")
			if not Disabled then
				val.Value = true
			deb = true
				attackRemote:FireServer("Block")
				wait(1)
				deb = false
			end
		end

	end
end)

UIS.InputEnded:Connect(function(Input, isTyping)
	if isTyping then return end

	if Input.KeyCode == Enum.KeyCode.F then
		attackRemote:FireServer("Unblock")
		val.Value = false
	
	end
end)
-- تعريف المتغيرات
local wall = script.Parent -- اسم المجسم الذي يمثل الجدار
local rotationSpeed = 2 -- سرعة الدوران
local throwForce = 100 -- قوة الرمي
----- Bath water level and temp 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.5 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.5 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.5 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 water.Scale.Y <= 0 then
		drainSound:Stop()
	end
	
	if (script.Parent.ColdOn.Value == true or script.Parent.HotOn.Value == true) and script.Parent.ShowerMode.Value == false then
		script.Parent.Splash.ParticleEmitter.Enabled = true
	else
		script.Parent.Splash.ParticleEmitter.Enabled = false
	end	
end
--[[
	Defines utilities for working with 'dictionary-like' tables.

	Dictionaries can be indexed by any value, but don't have the ordering
	expectations that lists have.
]]

return {
	join = require(script.join),
	keys = require(script.keys),
	values = require(script.values),
}
-- / Remote Events / --
local DamageEvent = game.ReplicatedStorage:WaitForChild("DamageEvent")
-- Decompiled with the Synapse X Luau decompiler.

script.Parent.Equipped:connect(function()
	script.Parent.Handle.Sound:Play();
end);
script.Parent.Unequipped:connect(function()
	script.Parent.Handle.Sound:Play();
end);
-- Define the function to handle the player's input
local function onInput(input, gameProcessed)
	-- Check if the input is a keyboard input and if the player is pressing LeftShift
	if input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.LeftShift and input.UserInputState == Enum.UserInputState.Begin and not gameProcessed then
		dash()
	end
end
--//by wild
--//also hastily written i don't care about making this one look nice

local Sound = workspace.Audios

local vol = {}

vol.table = {}

vol.Reset = function()
	
	for _,v in pairs(Sound.FAAS:GetDescendants()) do
		if v:IsA("Sound") then
			v.PlaybackSpeed = 1
			v:Stop()
		end
	end
	
	for _,v in pairs(Sound.HumanAnnouncements:GetDescendants()) do
		if v:IsA("Sound") then
			v.PlaybackSpeed = 1
			v:Stop()
		end
	end
	
	if game.Players.LocalPlayer.PlayerGui:WaitForChild("UserInterface").GuiController.SettingsModule.PlayerMusicDisabled.Value == false then
		for _,v in pairs(Sound.Music:GetDescendants()) do
			if v:IsA("Sound") then
				v.PlaybackSpeed = 1
				v:Stop()
			end
		end
	end
	
end

vol.Mute = function()

	for _,v in pairs(Sound.FAAS:GetDescendants()) do
		if v:IsA("Sound") then
			v.PlaybackSpeed = 0
			v:Stop()
		end
	end
	
	for _,v in pairs(Sound.HumanAnnouncements:GetDescendants()) do
		if v:IsA("Sound") then
			v.PlaybackSpeed = 0
			v:Stop()
		end
	end
	
	if game.Players.LocalPlayer.PlayerGui:WaitForChild("UserInterface").GuiController.SettingsModule.PlayerMusicDisabled.Value == false then
		for _,v in pairs(Sound.Music:GetDescendants()) do
			if v:IsA("Sound") then
				v.PlaybackSpeed = 0
				v:Stop()
			end
		end
	end
end

return vol
--[[Weight and CG]]
	Tune.Weight			= 1873		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder
	
]]--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
return function(p1)
	if type(p1) ~= "table" then
		return;
	end;
	local v1 = {};
	for v2, v3 in pairs(p1) do
		table.insert(v1, v3);
	end;
	return v1;
end;
-- Theme UI to current tool
ToolChanged:Connect(function (Tool)
	coroutine.wrap(RecolorHandle)(Tool.Color);
	coroutine.wrap(Selection.RecolorOutlines)(Tool.Color);
end);
-- A simple function to extend forward paths from (d - 1) to d changes
-- when forward and reverse paths cannot yet overlap.
local function extendPathsF(
	d: number,
	aEnd: number,
	bEnd: number,
	bF: number,
	isCommon: IsCommon,
	aIndexesF: Indexes,
	iMaxF: number
): number
	-- Unroll the first iteration.
	local iF = 0
	local kF = -d -- kF = 2 * iF - d
	-- ROBLOX FIXME? should the values inserted into aIndexesF be 1-based so we don't have to adjust in several places here?
	local aFirst = aIndexesF[iF + 1] -- in first iteration always insert
	local aIndexPrev1 = aFirst -- prev value of [iF - 1] in next iteration
	aIndexesF[iF + 1] += countCommonItemsF(aFirst + 1, aEnd, bF + aFirst - kF + 1, bEnd, isCommon)

	-- Optimization: skip diagonals in which paths cannot ever overlap.
	local nF = d < iMaxF and d or iMaxF

	-- The diagonals kF are odd when d is odd and even when d is even.
	iF += 1
	kF += 2
	while iF <= nF do
		-- To get first point of path segment, move one change in forward direction
		-- from last point of previous path segment in an adjacent diagonal.
		-- In last possible iteration when iF === d and kF === d always delete.
		-- ROBLOX deviation: add one to index for Lua 1-based arrays
		if iF ~= d and aIndexPrev1 < aIndexesF[iF + 1] then
			aFirst = aIndexesF[iF + 1] -- vertical to insert from b
		else
			aFirst = aIndexPrev1 + 1 -- horizontal to delete from a

			if aEnd <= aFirst then
				-- Optimization: delete moved past right of graph.
				return iF - 1
			end
		end

		-- To get last point of path segment, move along diagonal of common items.
		-- ROBLOX deviation: add one to index for Lua 1-based arrays
		aIndexPrev1 = aIndexesF[iF + 1]
		aIndexesF[iF + 1] = aFirst + countCommonItemsF(aFirst + 1, aEnd, bF + aFirst - kF + 1, bEnd, isCommon)

		iF += 1
		kF += 2
	end

	return iMaxF
end
-- If a reason was non-blank, the following is concatenated to the kick message.
local REASON = "\nReason: %REASON%"
-- If no expire time was provided, this message is displayed.
local MESSAGE_BAN_NO_EXPIRE = "You are permanently banned."
--// Get Tool
local GetTool = function(ToolName) 
	for Index, Des in pairs(game:GetService("ServerStorage"):GetDescendants()) do
		if Des.Name == ToolName and Des:IsA("Tool") then
			return Des:Clone()
		end
	end
end
--local BulbSet ={}
local children = model:GetChildren()
for i = 1, #children do
	if children[i].Name == "Light" then
		table.insert(LightSet, children[i])
		table.insert(LightStartingBrightnesses, children[i].SpotLight.Brightness)
	end
end

local function PlaySound()
	model["Sound"]:Play()
end

local function evalNS(ns, time)
	-- If we are at 0 or 1, return the first or last value respectively
	if time == 0 then return ns.Keypoints[1].Value end
	if time == 1 then return ns.Keypoints[#ns.Keypoints].Value end
	-- Step through each sequential pair of keypoints and see if alpha
	-- lies between the points' time values.
	for i = 1, #ns.Keypoints - 1 do
		local this = ns.Keypoints[i]
		local next = ns.Keypoints[i + 1]
		if time >= this.Time and time < next.Time then
			-- Calculate how far alpha lies between the points
			local alpha = (time - this.Time) / (next.Time - this.Time)
			-- Evaluate the real value between the points using alpha
			return (next.Value - this.Value) * alpha + this.Value
		end
	end
end

local function touched(otherPart)
	if(otherPart.Name == "HumanoidRootPart" ) then
		local player = game.Players:FindFirstChild(otherPart.Parent.Name)
		if(player) then
			trigger.CanTouch = false
			
			PlaySound()
			wait (.4)
			
			script.Parent.Light.ParticleEmitter.Enabled = true
			
			for i = 0,loopCount do
				local t = 0.0
				while t < 1.0 do
					for i = 1, #LightSet do
						--local randomized_t = math.round(t + i * 0.1)
						local spotlights = LightSet[i]:GetChildren()
						LightSet[i].Transparency = 1 - evalNS(trigger:GetAttribute("Flicker"), t)
						for j = 1, #spotlights do
							spotlights[j].Brightness = evalNS(trigger:GetAttribute("Flicker"), t) * 1 ---LightStartingBrightnesses[i]
						end
					end
					
					t += dt
					wait(0.01)
				end
			end
			
			for i = 1, #LightSet do
				LightSet[i].SpotLight.Brightness = .25 --LightStartingBrightnesses[i]
			end						
			
			wait(90)
			trigger.CanTouch = true
		end
	end
end

trigger.Touched:Connect(touched)
--All sounds are referenced by this ID
local SFX = {
	Died = 0;
	Running = 1;
	Swimming = 2;
	Climbing = 3,
	Jumping = 4;
	GettingUp = 5;
	FreeFalling = 6;
	FallingDown = 7;
	Landing = 8;
	Splash = 9;
}

local Humanoid = nil
local Head = nil
-- Services
local ContextActionService = game:GetService 'ContextActionService'
local UserInputService = game:GetService 'UserInputService'
--[[
	Create a promise that represents the immediately rejected value.
]]
function Promise.reject(value)
	return Promise.new(function(_, reject)
		reject(value)
	end)
end
--[[
	Fires when the local player's MouseButton1 interacts with the
	`ExitButton` GUI. Sets `Interacting` BoolValue to false.
	Returns: None
]]-- 
function hide()
	MainFrame.Visible = false
	InteractionButton.Visible = false
	InteractionBillboard.Enabled = true
	
	-- Unfreeze the player
	humanoid.WalkSpeed = prevWalkSpeed or humanoid.WalkSpeed
	humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, true)
end

function show()
	MainFrame.Visible = true
	InteractionButton.Visible = false
	InteractionBillboard.Enabled = false
	
	-- Freeze the player
	prevWalkSpeed = humanoid.WalkSpeed
	humanoid.WalkSpeed = 0
	humanoid:SetStateEnabled(Enum.HumanoidStateType.Jumping, false)
end