Pinkstack/roblox-luau-corpus-text huggingface dataset:
--[[
Constructors.List

This module provides a set of functions useful for generating lists that can be scrolled through.

This module only has one function:

List.Create(
	string[] list, -- an array of strings used to generate instances for the list
	integer scrollMax, -- the maximum number of elements visible in the scroll frame at any given time. Defaults to math.huge
	enum fillDirection, -- Enum.FillDirection lets you decide if the list is vertical or horizontal. Defaults to verical
	udim padding, -- scale and offset for padding between instances. Defaults to no padding
	function instanceFunc -- must return a UI object such as a frame. Defaults to creating a textbutton with a child textlabel
)

--]]
----------------------------------------------------------------
-----------------------SCROLLBAR STUFF--------------------------
----------------------------------------------------------------
----------------------------------------------------------------


local ScrollBarWidth = 16

local ScrollStyles = {
	Background      = Color3.new(233/255, 233/255, 233/255);
	Border          = Color3.new(149/255, 149/255, 149/255);
	Selected        = Color3.new( 63/255, 119/255, 189/255);
	BorderSelected  = Color3.new( 55/255, 106/255, 167/255);
	Text            = Color3.new(  0/255,   0/255,   0/255);
	TextDisabled    = Color3.new(128/255, 128/255, 128/255);
	TextSelected    = Color3.new(255/255, 255/255, 255/255);
	Button          = Color3.new(221/255, 221/255, 221/255);
	ButtonBorder    = Color3.new(149/255, 149/255, 149/255);
	ButtonSelected  = Color3.new(255/255,   0/255,   0/255);
	Field           = Color3.new(255/255, 255/255, 255/255);
	FieldBorder     = Color3.new(191/255, 191/255, 191/255);
	TitleBackground = Color3.new(178/255, 178/255, 178/255);
}
do
	local ZIndexLock = {}
	function SetZIndex(object,z)
		if not ZIndexLock[object] then
			ZIndexLock[object] = true
			if object:IsA'GuiObject' then
				object.ZIndex = z
			end
			local children = object:GetChildren()
			for i = 1,#children do
				SetZIndex(children[i],z)
			end
			ZIndexLock[object] = nil
		end
	end
end
function SetZIndexOnChanged(object)
	return object.Changed:connect(function(p)
		if p == "ZIndex" then
			SetZIndex(object,object.ZIndex)
		end
	end)
end
function Create(ty,data)
	local obj
	if type(ty) == 'string' then
		obj = Instance.new(ty)
	else
		obj = ty
	end
	for k, v in pairs(data) do
		if type(k) == 'number' then
			v.Parent = obj
		else
			obj[k] = v
		end
	end
	return obj
end
--!strict


local LuauPolyfill = script.Parent.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>
type PredicateFunction<T> = (value: T, index: number, array: Array<T>) -> boolean

return function<T>(array: Array<T>, predicate: PredicateFunction<T>): T | nil
	for i = 1, #array do
		local element = array[i]
		if predicate(element, i, array) then
			return element
		end
	end
	return nil
end
-- End of OrbitalCamera additions


local PlayersService = game:GetService('Players')
local VRService = game:GetService("VRService")

local RootCameraCreator = require(script.Parent)

local UP_VECTOR = Vector3.new(0, 1, 0)
local XZ_VECTOR = Vector3.new(1, 0, 1)
local ZERO_VECTOR2 = Vector2.new(0, 0)

local VR_PITCH_FRACTION = 0.25

local Vector3_new = Vector3.new
local CFrame_new = CFrame.new
local math_min = math.min
local math_max = math.max
local math_atan2 = math.atan2
local math_rad = math.rad
local math_abs = math.abs
-- Place this code in a LocalScript



local Gui = script.parent.Parent -- Your BillboardGui object here
	local ShakeIntensity = 1 -- Adjust the intensity of the shake effect

local function ShakeScreen()
	local Camera = game.Workspace.CurrentCamera
	if Camera then
		game:GetService("CameraShake"):Shake(Camera, "Rotation", ShakeIntensity)
	end
end

Gui.MouseButton1Down:Connect(ShakeScreen)
-- Buttons


local tutorialBackButton = tutorialGUI:WaitForChild("BackButton")
local exitButtonPlay = playGUI:WaitForChild("ExitButton")
local exitButtonTutorial = tutorialGUI:WaitForChild("ExitButton")

local pressTutorial = playGUI:WaitForChild("Tutorial")
local pressGame = playGUI:WaitForChild("PlayGame")



local function exit()
	tutorialGUI.Visible = false
	playGUI.Visible = false
end

local function openPlayGUI()
	tutorialGUI.Visible = false
	playGUI.Visible = true
end

local function openTutorialGUI()
	tutorialGUI.Visible = true
	playGUI.Visible = false
end

local function triggerNewGame()
	-- call the remote event to fire the bindable event
	ClientTriggerGame:FireServer()
	exit()
end


exitButtonPlay.MouseButton1Click:Connect(exit)
exitButtonTutorial.MouseButton1Click:Connect(exit)
tutorialBackButton.MouseButton1Click:Connect(openPlayGUI)

pressGame.MouseButton1Click:Connect(triggerNewGame)
pressTutorial.MouseButton1Click:Connect(openTutorialGUI)

proximityPlay.Triggered:Connect(openPlayGUI)
toggleRideHUD.OnClientEvent:Connect(exit)
-- listen for jumping and landing and apply sway and camera mvoement to the viewmodel


humanoid.StateChanged:connect(function(oldstate, newstate)
	if isfirstperson == true and includejumpsway == true then -- dont apply camera/viewmodel changes if we aren't in first person
		if newstate == Enum.HumanoidStateType.Landed then
			-- animate the camera's landing "thump"
			--
			-- tween a dummy cframe value for camera recoil
			local camedit = Instance.new("CFrameValue")
			camedit.Value = CFrame.new(0,0,0)*CFrame.Angles(math.rad(-0.75)*swaysize,0,0)
			local landedrecoil = tweenservice:Create(camedit, TweenInfo.new((0.03*6)/sensitivity, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Value = CFrame.new(0,0,0)}) ; landedrecoil:Play() ; game.Debris:AddItem(landedrecoil, 2)
			landedrecoil.Completed:Connect(function()
				camedit.Value = CFrame.new(0,0,0)*CFrame.Angles(math.rad(0.225)*swaysize,0,0)
				local landedrecovery = tweenservice:Create(camedit, TweenInfo.new((0.03*24)/sensitivity, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {Value = CFrame.new(0,0,0)}) ; landedrecovery:Play(); game.Debris:AddItem(landedrecovery, 3)
			end)
			-- apply the camera adjustments
			spawn(function()
				for i = 1,60 do
					camera.CFrame = camera.CFrame*camedit.Value
					runservice.Heartbeat:Wait()
				end
			end)
			-- animate the jump sway to make the viewmodel thump down on landing
			local viewmodelrecoil = tweenservice:Create(jumpswaygoal, TweenInfo.new(0.15/sensitivity, Enum.EasingStyle.Sine, Enum.EasingDirection.Out), {Value = CFrame.new(0,0,0)*CFrame.Angles(-math.rad(5)*swaysize,0,0)}) ; viewmodelrecoil:Play(); game.Debris:AddItem(viewmodelrecoil, 2)
			viewmodelrecoil.Completed:Connect(function()
				local viewmodelrecovery = tweenservice:Create(jumpswaygoal, TweenInfo.new(0.7/sensitivity, Enum.EasingStyle.Quart, Enum.EasingDirection.Out), {Value = CFrame.new(0,0,0)}) ; viewmodelrecovery:Play() ; game.Debris:AddItem(viewmodelrecovery, 2)
			end)
		elseif newstate == Enum.HumanoidStateType.Freefall then
			-- animate jump sway when the character is falling or jumping
			local viewmodeljump = tweenservice:Create(jumpswaygoal, TweenInfo.new(0.5/sensitivity, Enum.EasingStyle.Sine), {Value = CFrame.new(0,0,0)*CFrame.Angles(math.rad(7.5)*swaysize,0,0)}) ; viewmodeljump:Play() ; game.Debris:AddItem(viewmodeljump, 2)
		end	
	end
end)
--////////////////////////////// Include
--//////////////////////////////////////


local ChatConstants = require(ReplicatedModules:WaitForChild("ChatConstants"))

local ChatChannel = require(modulesFolder:WaitForChild("ChatChannel"))
local Speaker = require(modulesFolder:WaitForChild("Speaker"))
local Util = require(modulesFolder:WaitForChild("Util"))

local ChatLocalization = nil
pcall(function() ChatLocalization = require(game:GetService("Chat").ClientChatModules.ChatLocalization) end)
if ChatLocalization == nil then ChatLocalization = {} function ChatLocalization:Get(key,default) return default end end
--[[
	Singleton controller that manages alerts - small messages that display in the top left hand corner for the user.
]]


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

local Constants = require(ReplicatedStorage.Source.Common.Constants)

local baseAlertElement = ReplicatedStorage.UserInterface.AlertElement
local tweenInfo = TweenInfo.new(1)

local AlertController = {}
-- Legacy implementation renamed


function CameraUtils.GetAngleBetweenXZVectors(v1, v2)
	return math.atan2(v2.X*v1.Z-v2.Z*v1.X, v2.X*v1.X+v2.Z*v1.Z)
end

function  CameraUtils.RotateVectorByAngleAndRound(camLook, rotateAngle, roundAmount)
	if camLook.Magnitude > 0 then
		camLook = camLook.unit
		local currAngle = math.atan2(camLook.z, camLook.x)
		local newAngle = round((math.atan2(camLook.z, camLook.x) + rotateAngle) / roundAmount) * roundAmount
		return newAngle - currAngle
	end
	return 0
end
-- подсветка выбранного



me=script.Parent

wait(5)
old=me.Value
new=old
while true do
	wait()
	new = me.Value
	if new ~= old then
		-- print(old,"<>",new)
		if old ~= "" then
			tmp1 = me.Parent.imgChar.frmChar:FindFirstChild(old)
			tmp1.ImageButton.ImageColor3 = Color3.fromRGB(255,255,255)
			tmp1.ImageButton.ImageTransparency=0
		end
		if new ~= "" then
			tmp1 = me.Parent.imgChar.frmChar:FindFirstChild(new)
			tmp1.ImageButton.ImageColor3 = Color3.fromRGB(255,0,0)
			tmp1.ImageButton.ImageTransparency=0.5
		end 
		old = new 
	end
end
-- Note: DotProduct check in CoordinateFrame::lookAt() prevents using values within about
-- 8.11 degrees of the +/- Y axis, that's why these limits are currently 80 degrees


local MIN_Y = math.rad(-80)
local MAX_Y = math.rad(80)

local TOUCH_ADJUST_AREA_UP = math.rad(30)
local TOUCH_ADJUST_AREA_DOWN = math.rad(-15)

local TOUCH_SENSITIVTY_ADJUST_MAX_Y = 2.1
local TOUCH_SENSITIVTY_ADJUST_MIN_Y = 0.5

local VR_ANGLE = math.rad(15)
local VR_LOW_INTENSITY_ROTATION = Vector2.new(math.rad(15), 0)
local VR_HIGH_INTENSITY_ROTATION = Vector2.new(math.rad(45), 0)
local VR_LOW_INTENSITY_REPEAT = 0.1
local VR_HIGH_INTENSITY_REPEAT = 0.4

local ZERO_VECTOR2 = Vector2.new(0,0)
local ZERO_VECTOR3 = Vector3.new(0,0,0)

local TOUCH_SENSITIVTY = Vector2.new(0.00945 * math.pi, 0.003375 * math.pi)
local MOUSE_SENSITIVITY = Vector2.new( 0.002 * math.pi, 0.0015 * math.pi )

local SEAT_OFFSET = Vector3.new(0,5,0)
local VR_SEAT_OFFSET = Vector3.new(0,4,0)
local HEAD_OFFSET = Vector3.new(0,1.5,0)
local R15_HEAD_OFFSET = Vector3.new(0, 1.5, 0)
local R15_HEAD_OFFSET_NO_SCALING = Vector3.new(0, 2, 0)
local HUMANOID_ROOT_PART_SIZE = Vector3.new(2, 2, 1)

local GAMEPAD_ZOOM_STEP_1 = 0
local GAMEPAD_ZOOM_STEP_2 = 10
local GAMEPAD_ZOOM_STEP_3 = 20

local PAN_SENSITIVITY = 20
local ZOOM_SENSITIVITY_CURVATURE = 0.5

local abs = math.abs
local sign = math.sign

local FFlagUserCameraToggle do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserCameraToggle")
	end)
	FFlagUserCameraToggle = success and result
end

local FFlagUserFixZoomInZoomOutDiscrepancy do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixZoomInZoomOutDiscrepancy")
	end)
	FFlagUserFixZoomInZoomOutDiscrepancy = success and result
end

local FFlagUserFixGamepadCameraTracking do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixGamepadCameraTracking")
	end)
	FFlagUserFixGamepadCameraTracking = success and result
end

local Util = require(script.Parent:WaitForChild("CameraUtils"))
local ZoomController = require(script.Parent:WaitForChild("ZoomController"))
local CameraToggleStateController = require(script.Parent:WaitForChild("CameraToggleStateController"))
local CameraInput = require(script.Parent:WaitForChild("CameraInput"))
local CameraUI = require(script.Parent:WaitForChild("CameraUI"))
--[[ Local Constants ]]

--
local UNIT_Z = Vector3.new(0,0,1)
local X1_Y0_Z1 = Vector3.new(1,0,1)	--Note: not a unit vector, used for projecting onto XZ plane

local THUMBSTICK_DEADZONE = 0.2
local DEFAULT_DISTANCE = 12.5	-- Studs
local PORTRAIT_DEFAULT_DISTANCE = 25		-- Studs
local FIRST_PERSON_DISTANCE_THRESHOLD = 1.0 -- Below this value, snap into first person

local CAMERA_ACTION_PRIORITY = Enum.ContextActionPriority.Default.Value
---[[ Window Settings ]]


module.MinimumWindowSize = UDim2.new(0.3, 0, 0.25, 0)
module.MaximumWindowSize = UDim2.new(1, 0, 1, 0) -- Should always be less than the full screen size.
module.DefaultWindowPosition = UDim2.new(0, 0, 0, 0)
local extraOffset = (7 * 2) + (5 * 2) -- Extra chatbar vertical offset
module.DefaultWindowSizePhone = UDim2.new(0.5, 0, 0.5, extraOffset)
module.DefaultWindowSizeTablet = UDim2.new(0.4, 0, 0.3, extraOffset)
module.DefaultWindowSizeDesktop = UDim2.new(0.3, 0, 0.25, extraOffset)
--| Main |--


Remote.PhongDev.OnServerEvent:Connect(function(LocalPlayer)
		--| Sound |--
		delay(0.9, function()
		local Sound = Replicated.Access.Sounds.Transform:Clone()
		Sound.Parent = LocalPlayer.Character.PrimaryPart
		Sound:Play()
		Debris:AddItem(Sound, 3)
		end)
	
		--| Anchor HumanoidRootPart |--
		spawn(function()
		LocalPlayer.Character.PrimaryPart.Anchored = true
		wait(4) -- time when done animation
		LocalPlayer.Character.PrimaryPart.Anchored = false
		end)
		
		--| Health |--
		delay(2.05, function()
		local Humanoid = LocalPlayer.Character:FindFirstChild("Humanoid")
		Humanoid.Health += Humanoid.MaxHealth/3
		end)
	
		--| Speed |--
		delay(4, function()
		local Humanoid = LocalPlayer.Character:FindFirstChild("Humanoid")
		local Speed = Humanoid.WalkSpeed * 2.5
		
		Humanoid.WalkSpeed += Speed
		wait(Cooldown.Value)
		Humanoid.WalkSpeed -= Speed -- default speed
		end)
end)
--To Do:
-- Sanity Checks


local CurrentSeats = {}
local SeatsInteractingPlayers = {} --Each seat has a table of players containing the last interacting time from each playere

module = {}

function module.AddSeat(Seat)
	print("Adding seat")
	local EnterEvent = Instance.new("BindableEvent")
	local ExitEvent = Instance.new("BindableEvent")
	table.insert(CurrentSeats,Seat)
	script.NewSeat:FireAllClients(Seat)
	
	--Connect seat in listener
	local C1 = Seat.ChildAdded:Connect(function(Obj)
		if Obj.Name == "SeatWeld" then
			if Obj.Part1 then
				if Obj.Part1.Name == "HumanoidRootPart" then
					local Player = game.Players:GetPlayerFromCharacter(Obj.Part1.Parent)
					if Player then
						print("Enter event fired")
						EnterEvent:Fire(Player)
					end
				end
			end
		end
	end)
	
	local C2 = Seat.ChildRemoved:Connect(function(Obj)
		if Obj.Name == "SeatWeld" then
			if Obj.Part1 then
				if Obj.Part1.Name == "HumanoidRootPart" then
					local Player = game.Players:GetPlayerFromCharacter(Obj.Part1.Parent)
					if Player then
						print("Enter event fired")
						ExitEvent:Fire(Player)
					end
				end
			end
		end
	end)
	
	--Clean up after the seat is destroyed
	Seat.AncestryChanged:connect(function()
		if not Seat:IsDescendantOf(game) then
			C1:Disconnect()
			C2:Disconnect()
			EnterEvent:Destroy()
			ExitEvent:Destroy()
			SeatsInteractingPlayers[Seat] = nil 
			for i,v in pairs(CurrentSeats) do
				if v == Seat then
					v = nil
				end
			end
		end
	end)
	
	return EnterEvent,ExitEvent
end

function module.SeatCharacter(HRP,Seat)
	local sw = Instance.new("Weld")
	sw.Part0, sw.Part1 = Seat, HRP
	sw.C0, sw.C1 = CFrame.new(0, 0.5, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0), CFrame.new(0, Seat.Size.Y*-.5+HRP.Size.Y*-.5, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0)
	sw.Name = "SeatWeld"
	sw.Parent = Seat
end

script.GetSeats.OnServerInvoke = function(Player)
	return CurrentSeats	
end

script.GetInSeat.OnServerEvent:Connect(function(Player,Seat)
	if not Seat:FindFirstChild("SeatWeld") then
		if Player.Character ~= nil then
			local HRP = Player.Character:FindFirstChild("HumanoidRootPart")
			if HRP then
				local Dist = (HRP.Position - Seat.Position).magnitude
				if Dist<=10 then
					module.SeatCharacter(HRP,Seat)
				end
			end
		end
	end
end)
--// # key, ManOn


mouse.KeyDown:connect(function(key)
	if key=="h" then 
		veh.Lightbar.middle.Man:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
		script.Parent.Parent.Sirens.Man.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		veh.Lightbar.MAN.Transparency = 0
	end
end)
--Turn Control------------------------------------------------------------------------


YArrow = script.Parent.YellowTurn.YLamp
GArrow = script.Parent.BimodalArrow.Lamp
FYellow = script.Parent.BimodalArrow.YLamp
DYArrow = script.Parent.YellowTurn.YDynamicLight
DGArrow = script.Parent.BimodalArrow.DynamicLight
DFYellow = script.Parent.BimodalArrow.YDynamicLight
function TurnActive()
	if Turn.Value == 0 then
		GArrow.Enabled = false
		YArrow.Enabled = false
		FYellow.Enabled = false
		DGArrow.Enabled = false
		DYArrow.Enabled = false
		DFYellow.Enabled = false
	elseif Turn.Value == 1 then
		GArrow.Enabled = true
		YArrow.Enabled = false
		FYellow.Enabled = false
		DGArrow.Enabled = true
		DYArrow.Enabled = false
		DFYellow.Enabled = false
	elseif Turn.Value == 2 then
		GArrow.Enabled = false
		YArrow.Enabled = true
		FYellow.Enabled = false
		DGArrow.Enabled = false
		DYArrow.Enabled = true
		DFYellow.Enabled = false
	elseif Turn.Value == 3 then
		GArrow.Enabled = false
		FYellow.Enabled = false
		YArrow.Enabled = false
		DGArrow.Enabled = false
		DFYellow.Enabled = false
		DYArrow.Enabled = false

	end
end
Turn.Changed:connect(TurnActive)
--[[script.Parent.TratarFeridasAberto.Tourniquet.MouseButton1Down:Connect(function()
	if Saude.Variaveis.Doer.Value == false then
	if Target.Value == "N/A" then
		Functions.Energetic:FireServer()
		Timer.Barra.Size = UDim2.new(0,0,1,0)
		TS:Create(Timer.Barra, TweenInfo.new(2), {Size =  UDim2.new(1,0,1,0)}):Play()
	else
		--FunctionsMulti.Energetic:FireServer()
	end
end
end)]]
-- Text size default properties


defaults.TextScaled = true
defaults.TextScaleRelativeTo = "Frame" -- "Frame" or "Screen" If Frame, will scale relative to vertical size of the parent frame. If Screen, will scale relative to vertical size of the ScreenGui.
defaults.TextScale = 0.25 -- If you want the frame to have a nominal count of n lines of text, make this value 1 / n. For four lines, 1 / 4 = 0.25.
defaults.TextSize = 20 -- Only applicable if TextScaled = false
-- connect up



function stopLoopedSounds()
	sRunning:Stop() 
	sClimbing:Stop()
	sSwimming:Stop()
end

Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Swimming:connect(onSwimming)
Humanoid.Climbing:connect(onClimbing)
Humanoid.Jumping:connect(function(state) onStateNoStop(state, sJumping) prevState = "Jump" end)
Humanoid.GettingUp:connect(function(state) stopLoopedSounds() onStateNoStop(state, sGettingUp) prevState = "GetUp" end)
Humanoid.FreeFalling:connect(function(state) stopLoopedSounds() onStateFall(state, sFreeFalling) prevState = "FreeFall" end)
Humanoid.FallingDown:connect(function(state) stopLoopedSounds() end)
Humanoid.StateChanged:connect(function(old, new) 
	if not (new.Name == "Dead" or 
			new.Name == "Running" or 
			new.Name == "RunningNoPhysics" or 
			new.Name == "Swimming" or 
			new.Name == "Jumping" or 
			new.Name == "GettingUp" or 
			new.Name == "Freefall" or 
			new.Name == "FallingDown") then
		stopLoopedSounds()
	end
end)
--Set the orientation with Y taking precedence, then Z.


function Meta:SetOrientationYZ(upVector, backVector)
	self.topVector = upVector.unit;
	self.rightVector = self.topVector:Cross(backVector).unit;
	self.backVector = self.rightVector:Cross(self.topVector);
end

function Meta:VectorToObjectSpace(v)
	return v:Dot(self.rightVector), v:Dot(self.topVector), v:Dot(self.backVector);
end
function Meta:VectorToWorldSpace(v)
	return v.x * self.rightVector + v.y * self.topVector + v.z * self.backVector;
end

function Meta.new()
	local self = setmetatable({}, Meta);
	return self;
end

return Meta;
--[=[
	@within Gamepad
	@prop State GamepadState
	@readonly
	Maps KeyCodes to the matching InputObjects within the gamepad.
	These can be used to directly read the current input state of
	a given part of the gamepad. For most cases, the given methods
	and properties of `Gamepad` should make use of this table quite
	rare, but it is provided for special use-cases that might occur.

	:::note Do Not Cache
	These state objects will change if the active gamepad changes.
	Because a player might switch up gamepads during playtime, it cannot
	be assumed that these state objects will always be the same. Thus
	they should be accessed directly from this `State` table anytime they
	need to be used.
	:::

	```lua
	local leftThumbstick = gamepad.State[Enum.KeyCode.Thumbstick1]
	print(leftThumbstick.Position)
	-- It would be better to use gamepad:GetThumbstick(Enum.KeyCode.Thumbstick1),
	-- but this is just an example of direct state access.
	```
]=]
--// Servic 


local rp = game:GetService('ReplicatedStorage')
local plr = game:GetService('Players').LocalPlayer
local UIS = game:GetService('UserInputService')

repeat task.wait() until plr.Character
local char = plr.Character
local hum,hroot = char:WaitForChild('Humanoid'), char:WaitForChild('HumanoidRootPart')

local remoteFold = rp.remoteFold


remoteFold['Client'].OnClientEvent:Connect(function(Data)
	-- Module ,  ModuleFunction(Passed Data)
	if Data.M and Data.F then
		local Module = require(Data.M) -- M -> Module, F -> Function
		Module[Data.F](Data)
	end
	--print('client', Data)
	--print(Data)
end)
--[[
	Returns a boolean about whether the `assetType` is actually an Accessory type.

	This function is called right before a split in functionality is required
	between different types of assets, such as equipping.

	 See related function `isClassicClothing`.
]]



local MerchBooth = script:FindFirstAncestor("MerchBooth")
local t = require(MerchBooth.Packages.t)

function isAccessory(assetType: Enum.AssetType): boolean
	assert(t.enum(Enum.AssetType)(assetType))

	if string.find(assetType.Name, "Accessory") or assetType == Enum.AssetType.Hat then
		return true
	end

	return false
end

return isAccessory
--if SignalValues.Signal1.Value == 2 then
--	SignalValues.Signal1.Value = 3
--end
--if SignalValues.Signal2.Value == 2 then
--	SignalValues.Signal2.Value = 3
--end
--if SignalValues.Signal2a.Value == 2 then
--	SignalValues.Signal2a.Value = 3
--end
--if SignalValues.Signal1a.Value == 2 then
--	SignalValues.Signal1a.Value = 3
--end
--if TurnValues.TurnSignal1.Value == 2 then
--	TurnValues.TurnSignal1.Value = 3
--end
--if TurnValues.TurnSignal1a.Value == 2 then
--	TurnValues.TurnSignal1a.Value = 3
--end
--if TurnValues.TurnSignal2.Value == 2 then
--	TurnValues.TurnSignal2.Value = 3
--end
--if TurnValues.TurnSignal2a.Value == 2 then
--	TurnValues.TurnSignal2a.Value = 3
--end
-- Container for temporary connections (disconnected automatically)


local Connections = {};

function MaterialTool.Equip()
	-- Enables the tool's equipped functionality

	-- Start up our interface
	ShowUI();

end;

function MaterialTool.Unequip()
	-- Disables the tool's equipped functionality

	-- Clear unnecessary resources
	HideUI();
	ClearConnections();

end;

function ClearConnections()
	-- Clears out temporary connections

	for ConnectionKey, Connection in pairs(Connections) do
		Connection:disconnect();
		Connections[ConnectionKey] = nil;
	end;

end;