Roblox/luau_corpus huggingface dataset:
--[[
	Returns the string associated with the current mode and viewing state of the MerchBooth.

	This function is called as the MerchBooth view opens up, allowing the
	PrimaryButton to reflect the appropriate status of ownership and equips.

	See related function `getButtonModeAsync`.
]]

local MerchBooth = script:FindFirstAncestor("MerchBooth")

local enums = require(MerchBooth.enums)
local separateThousands = require(script.Parent.separateThousands)

local function getTextFromMode(mode, price: number?): string
	if mode == enums.PrimaryButtonModes.Loading then
		return ""
	elseif mode == enums.PrimaryButtonModes.Purchase and price then
		if price == 0 then
			return "FREE"
		elseif price < 0 then
			return "NOT FOR SALE"
		else
			return separateThousands(price)
		end
	elseif mode == enums.PrimaryButtonModes.Owned then
		return "Owned"
	elseif mode == enums.PrimaryButtonModes.CanEquip then
		return "Equip Item"
	elseif mode == enums.PrimaryButtonModes.Equipped then
		return "Item Equipped"
	end
	return ""
end

return getTextFromMode
--[[
for _,i in pairs(light) do
	i.BrickColor = offcolor
	i.Material = Enum.Material.material
end
--]]

InputService.InputBegan:connect(DealWithInput)
InputService.InputChanged:connect(DealWithInput)
InputService.InputEnded:connect(DealWithInput)


function findbricks(search,query,tab)
for _,i in pairs(search:GetChildren()) do
if i.Name == query then table.insert(tab,i) end findbricks(i,query,tab)
end
end

findbricks(seat.Parent,"Li",fli)
findbricks(seat.Parent,"Ri",fri)
findbricks(seat.Parent,"RLi",rli)
findbricks(seat.Parent,"RRi",rri)
findbricks(seat.Parent.Parent,"HLL",hll)
findbricks(seat.Parent.Parent,"HLH",hlh)
findbricks(seat.Parent,"BL",bl)
findbricks(seat.Parent,"RRL",rrl)
findbricks(seat.Parent,"RevL",rl)

for _,i in pairs(fli) do
	i.BrickColor = indicatorOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,i in pairs(fri) do
	i.BrickColor = indicatorOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,i in pairs(rli) do
	i.BrickColor = indicatorOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,i in pairs(rri) do
	i.BrickColor = indicatorOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,i in pairs(hll) do
	i.BrickColor = headlightOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,i in pairs(hlh) do
	i.BrickColor = headlightOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,i in pairs(rrl) do
	i.BrickColor = rearrunOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,i in pairs(bl) do
	i.BrickColor = brakelightOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,i in pairs(rl) do
	i.BrickColor = reverseOff
	i.Material = Enum.Material.SmoothPlastic
end
for _,a in pairs(sl) do
	for _,i in pairs(a) do
		i.Enabled = false
	end
end
script.Parent.Parent.StockUI.Right.TurnSignals.Left.ImageTransparency = 0.7
script.Parent.Parent.StockUI.Right.TurnSignals.Right.ImageTransparency = 0.7
script.Parent.Parent.StockUI.Right.WarningLights.LoBeam.ImageTransparency = 0.7
script.Parent.Parent.StockUI.Right.WarningLights.HiBeam.ImageTransparency = 0.7
--[[Weight and CG]]
	Tune.Weight			= 3500		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		10		,
	 --[[Height]]		5.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
-- The timespan that the anticheat will account for. Lower values
-- means potential cheats will be stopped sooner, but also means
-- lower tolerance for network jitter.
config.TimeSpan = 1

return config
-- ROBLOX deviation: using FileSystemService instead of fs
local getFileSystemService = require(CurrentModule.getFileSystemService)
local typesModule = require(Packages.JestTypes)
type Config_Path = typesModule.Config_Path

local function createDirectory(path: Config_Path): ()
	local FileSystemService = getFileSystemService()

	local ok, result, hasReturned = pcall(function()
		-- ROBLOX deviation: using FileSystemService instead of fs
		FileSystemService:CreateDirectories(path)
	end)
	if not ok then
		local e = result
		-- ROBLOX deviation START: additional error handling for AccessDenied case
		if e:find("Error%(13%): Access Denied%. Path is outside of sandbox%.") then
			error(
				"Provided path is invalid: you likely need to provide a different argument to --fs.readwrite.\n"
					.. "You may need to pass in `--fs.readwrite=$PWD`"
			)
		end
		-- ROBLOX deviation END

		-- ROBLOX FIXME: investigate how to catch directory exists error
		if e.code ~= "EEXIST" then
			error(e)
		end
	end
	if hasReturned then
		return result
	end
end
exports.default = createDirectory
return exports
--CHANGE THE NAME, COPY ALL BELOW, AND PAST INTO COMMAND BAR

local TycoonName = "Batman Tycoon"

if game.Workspace:FindFirstChild(TycoonName) then
	local s = nil
	local bTycoon = game.Workspace:FindFirstChild(TycoonName)
	local zTycoon = game.Workspace:FindFirstChild("Zednov's Tycoon Kit")
	local new_Collector = zTycoon['READ ME'].Script:Clone()
	local Gate = zTycoon.Tycoons:GetChildren()[1].Entrance['Touch to claim!'].GateControl:Clone()
	if zTycoon then
		for i,v in pairs(zTycoon.Tycoons:GetChildren()) do --Wipe current tycoon 'demo'
			if v then
				s = v.PurchaseHandler:Clone()
				v:Destroy()
			end
		end
		-- Now make it compatiable
		if s ~= nil then
			for i,v in pairs(bTycoon.Tycoons:GetChildren()) do
				local New_Tycoon = v:Clone()
				New_Tycoon:FindFirstChild('PurchaseHandler'):Destroy()
				s:Clone().Parent = New_Tycoon
				local Team_C = Instance.new('BrickColorValue',New_Tycoon)
				Team_C.Value = BrickColor.new(tostring(v.Name))
				Team_C.Name = "TeamColor"
				New_Tycoon.Name = v.TeamName.Value
				New_Tycoon.Cash.Name = "CurrencyToCollect"
				New_Tycoon.Parent = zTycoon.Tycoons
				New_Tycoon.TeamName:Destroy()
				v:Destroy()
				New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0').NameUpdater:Destroy()
				local n = new_Collector:Clone()
				n.Parent = New_Tycoon.Essentials:FindFirstChild('Cash to collect: $0')
				n.Disabled = false
				New_Tycoon.Gate['Touch to claim ownership!'].GateControl:Destroy()
				local g = Gate:Clone()
				g.Parent = New_Tycoon.Gate['Touch to claim ownership!']
			end
		else
			error("Please don't tamper with script names or this won't work!")
		end
	else
		error("Please don't change the name of our tycoon kit or it won't work!")
	end
	bTycoon:Destroy()
	Gate:Destroy()
	new_Collector:Destroy()
	print('Transfer complete! :)')
else
	error("Check if you spelt the kit's name wrong!")
end
--[[Transmission]]
	Tune.TransModes		= {"Auto", "Semi"}								--[[
	[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.4			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3			,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.5			,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2			,
		--[[ 3 ]]		1.4			,
		--[[ 4 ]]		1.1			,
		--[[ 5 ]]		0.83		,	
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[
	Novena Constraint Type: Motorcycle
			The Bike Chassis
	
	
					RikOne2 | Enjin
--]]
local bike = script.Parent.Bike.Value
local _Tune = require(bike["Tuner"])
local handler = bike:WaitForChild("AC6_Sound")

local on = 0
local mult=0
local det=0
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

local SetPitch = .1
local SetRev = 1.8

local vol = .7 --Set the volume for everything below

handler:FireServer("stopSound",bike.DriveSeat:WaitForChild("Rev"))
-- A fully qualified outfit is one that has both arms, both legs, and a torso.
local function isFullyQualifiedOutfit(assets)
	for _, assetTypeId in pairs(bodyPartAssetTypeIds) do
		if not assets[assetTypeId] then
			return false
		end
	end

	return true
end

return function(outfit)
	return function(store)
		local fullReset = outfit.isEditable or isFullyQualifiedOutfit(outfit.assets)

		-- Do a full reset on a user costume, or a preset fully qualified one. Otherwise swap the existing parts.
		store:dispatch(EquipOutfit(outfit.assets, fullReset))

		if true then
			local selectedItem = store:getState().AvatarExperience.AvatarScene.TryOn.SelectedItem.itemId
			if selectedItem then
				store:dispatch(ClearSelectedItem())
				store:dispatch(CloseAllItemDetails(store:getState().Navigation.history))
			end
		end

		if fullReset then
			-- Preset costumes should not replace body colors.
			if not FFlagAvatarEditorKeepYourColor or
				(FFlagAvatarEditorKeepYourColor and not AvatarEditorUtils.isPresetCostume(outfit)) then
				store:dispatch(SetBodyColors(outfit.bodyColors))
			end
			store:dispatch(SetAvatarScales(outfit.scales))
			store:dispatch(SetAvatarType(outfit.avatarType))
		end
	end
end
-- declarations

local sFallingDown = newSound("rbxasset://sounds/splat.wav")
local sGettingUp = newSound("rbxasset://sounds/action_get_up.mp3")
local sDied = newSound("")
local sFreeFalling = newSound("rbxasset://sounds/action_falling.mp3")
local sJumping = newSound("rbxasset://sounds/action_jump.mp3")
local sLanding = newSound("rbxasset://sounds/action_jump_land.mp3")
local sSplash = newSound("rbxasset://sounds/impact_water.mp3")
local sRunning = newSound("rbxasset://sounds/action_footsteps_plastic.mp3")
sRunning.Looped = true
local sSwimming = newSound("rbxasset://sounds/action_swim.mp3")
sSwimming.Looped = true
local sClimbing = newSound("rbxasset://sounds/action_footsteps_plastic.mp3")
sClimbing.Looped = true

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Humanoid")

local prevState = "None"
--[=[
	@return any
	Returns the top-level value held by the property. This will
	either be the initial value set, or the last value set
	with `Set()`.

	```lua
	remoteProperty:Set("Data")
	print(remoteProperty:Get()) --> "Data"
	```
]=]
function RemoteProperty:Get(): any
	return self._value
end
--[[Steering]]
	Tune.SteerInner		= 40		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 42		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .08		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .1		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 150		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 25		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 5000		-- Steering Force
	Tune.SteerP			= 100000	-- Steering Aggressiveness
-- NumberValue to store the user's preferred speed
local uiSpeedUser = script.uiSpeedUser
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 0.5 -- cooldown for use of the tool again

BoneModelName = "Fire rise" -- name the zone model

HumanoidName = "Humanoid"-- the name of player or mob u want to damage
---Simply process a completed message.
local COMPLETED_MESSAGE_PROCESSOR = 1

local module = {}
local methods = {}
methods.__index = methods

function methods:SendSystemMessageToSelf(message, channelObj, extraData)
	local messageData =
	{
		ID = -1,
		FromSpeaker = nil,
		SpeakerUserId = 0,
		OriginalChannel = channelObj.Name,
		IsFiltered = true,
		MessageLength = string.len(message),
		MessageLengthUtf8 = utf8.len(utf8.nfcnormalize(message)),
		Message = message,
		MessageType = ChatConstants.MessageTypeSystem,
		Time = os.time(),
		ExtraData = extraData,
	}

	channelObj:AddMessageToChannel(messageData)
end

function module.new()
	local obj = setmetatable({}, methods)

	obj.COMMAND_MODULES_VERSION = COMMAND_MODULES_VERSION

	obj.KEY_COMMAND_PROCESSOR_TYPE = KEY_COMMAND_PROCESSOR_TYPE
	obj.KEY_PROCESSOR_FUNCTION = KEY_PROCESSOR_FUNCTION

	obj.IN_PROGRESS_MESSAGE_PROCESSOR = IN_PROGRESS_MESSAGE_PROCESSOR
	obj.COMPLETED_MESSAGE_PROCESSOR = COMPLETED_MESSAGE_PROCESSOR

	return obj
end

return module.new()
--create tables:
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "a" then
		table.insert(a, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "b" then
		table.insert(b, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "c" then
		table.insert(c, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "d" then
		table.insert(d, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "e" then
		table.insert(e, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "f" then
		table.insert(f, 1, part)
	end
end

function on(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("SurfaceLight") then
			part.SurfaceLight.Enabled = true
		end
	    if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = true
			part.Material = "Neon"
		end
	end
end

function off(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("SurfaceLight") then
			part.SurfaceLight.Enabled = false
		end
	    if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = false
			part.Material = "SmoothPlastic"
		end
	end
end

function run() --mian

	off(a)--turns all lights off
	off(b)
	off(c)
	off(d)
	off(e)
	off(f)

	if pattern == "Flash" then
		repeat
			local w = 0.05
			off(c)
			off(d)
			on(a)
			off(b)
			off(e)
			on(f)
			wait(w)
			
			off(a)
			off(b)
			off(e)
			off(f)
			on(c)
			on(d)
			wait(w)
			
			off(a)
			on(b)
			on(e)
			off(f)
			off(c)
			off(d)
			wait(w)
		
		until pattern ~= "Flash"
		return
	end

	if pattern == "Left" then
		repeat
		local w = 0.15
		on(f)
		wait(w)
		on(e)
		wait(w)
		on(d)
		wait(w)
		on(c)
		wait(w)
		on(b)
		wait(w)
		on(a)
		wait(w)
		
		off(f)
		wait(w)
		off(e)
		wait(w)
		off(d)
		wait(w)
		off(c)
		wait(w)
		off(b)
		wait(w)
		off(a)
		wait(w)
		until pattern ~= "Left"
		return
	end
	
	if pattern == "Right" then
		repeat
		local w = 0.15
		on(a)
		wait(w)
		on(b)
		wait(w)
		on(c)
		wait(w)
		on(d)
		wait(w)
		on(e)
		wait(w)
		on(f)
		wait(w)
		
		off(a)
		wait(w)
		off(b)
		wait(w)
		off(c)
		wait(w)
		off(d)
		wait(w)
		off(e)
		wait(w)
		off(f)
		wait(w)
		until pattern ~= "Right"
		return
	end
	
	if pattern == "Split" then
		repeat
		local w = 0.2
		on(c)
		on(d)
		wait(w)
		on(b)
		on(e)
		wait(w)
		on(a)
		on(f)
		wait(w)
		
		off(c)
		off(d)
		wait(w)
		off(b)
		off(e)
		wait(w)
		off(a)
		off(f)
		wait(w)
		until pattern ~= "Split"
		return
	end
end--run end
-- Here be dragons
-- luacheck: ignore 212
local GuiService = game:GetService("GuiService")
local UserInputService = game:GetService("UserInputService")
local TextService = game:GetService("TextService")
local TextChatService = game:GetService("TextChatService")
local Players = game:GetService("Players")
local Player = Players.LocalPlayer

local WINDOW_MAX_HEIGHT = 300
local MOUSE_TOUCH_ENUM = { Enum.UserInputType.MouseButton1, Enum.UserInputType.MouseButton2, Enum.UserInputType.Touch }
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0

local handler = car.AC6_FE_Idle
handler:FireServer("newSound","Idle",car.DriveSeat,script.Idle.SoundId,0,script.Idle.Volume,true)
handler:FireServer("playSound","Idle")

handler:FireServer("updateSound","Idle",script.Idle.SoundId,0.5,0)	

while wait() do
	if car.DriveSeat.IsOn.Value then	
		if script.Parent.Values.RPM.Value <= 1100 then	
			if car.DriveSeat.DriveMode.Value == "Eco" then
				handler:FireServer('tween',"Idle",0)
			else
				handler:FireServer('tween',"Idle",0.5)										
			end
			--handler:FireServer('tween',"Rev",0)				
		else
			handler:FireServer('tween',"Idle",0)						
		end
	 else
		handler:FireServer('tween',"Idle",0)				
end
end
-- Set Pet Canvas Size --
module.SetCanvasSize = function(ScrollingFrame)
	local PADDING,SIZE,MaxCells = getSizes()
	local UIGridLayout = ScrollingFrame.UIGridLayout
	local AbsoluteSize = ScrollingFrame.AbsoluteSize

    local NewPadding = PADDING * AbsoluteSize
    NewPadding = UDim2.new(0, NewPadding .X, 0, NewPadding .Y)
    local NewSize = SIZE * AbsoluteSize
    NewSize = UDim2.new(0, NewSize.X, 0, NewSize.Y)

    UIGridLayout.CellPadding = NewPadding
    UIGridLayout.CellSize = NewSize

	local items = ScrollingFrame:GetChildren()
	local frameSizeY = ScrollingFrame.AbsoluteSize.Y
	local ySize = UIGridLayout.CellSize.Y.Offset
	local yPadding = UIGridLayout.CellPadding.Y.Offset
	UIGridLayout.FillDirectionMaxCells = MaxCells
	local rows = math.ceil((#items-1)/UIGridLayout.FillDirectionMaxCells)
	local pixels = rows*ySize + (rows-1)*yPadding
	ScrollingFrame.CanvasSize = UDim2.new(0, 0, 0, (pixels + 5))
end

function module:Int()
	game:GetService("Workspace").CurrentCamera:GetPropertyChangedSignal("ViewportSize"):Connect(function()
		delay(.5, function() module.SetCanvasSize(skillShopUI.Skills) end)
	end)
end

return module
--[=[
	Loops through every single element, and puts it through a callback. If any of the conditions return false, the function returns false.
	
	```lua
	local array = {1, 2, 3, 4, 5}
	local even = function(value) return value % 2 == 0 end
	local odd = function(value) return value % 2 ~= 0 end
	
	print(TableKit.Every(array, even)) -- Prints false
	print(TableKit.Every(array, odd)) -- Prints false
	```
	
	@within TableKit
	@param tbl table
	@param callback (value) -> boolean
	@return boolean
]=]
function TableKit.Every(tbl: { [unknown]: unknown }, callback: (unknown) -> boolean): (boolean, unknown?)
	for key, value in tbl do
		if not callback(value) then
			return false, key
		end
	end
	return true
end
-- declarations

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid = waitForChild(Figure, "Enemy")
Humanoid.Health=500
--[[
	Returns the offset since it depends on the face.
]]
function CameraModule:_getPointByFace(guiOffset, adornee, face)
	local pointsByFace = {
		[Enum.NormalId.Front] = Vector3.new(-guiOffset.X, -guiOffset.Y, adornee.Size.Z / 2),
		[Enum.NormalId.Back] = Vector3.new(guiOffset.X, -guiOffset.Y, -adornee.Size.Z / 2),
		[Enum.NormalId.Left] = Vector3.new(adornee.Size.X / 2, -guiOffset.Y, guiOffset.X),
		[Enum.NormalId.Right] = Vector3.new(-adornee.Size.X / 2, -guiOffset.Y, -guiOffset.X),
		[Enum.NormalId.Top] = Vector3.new(guiOffset.Y, -adornee.Size.Y / 2, -guiOffset.X),
		[Enum.NormalId.Bottom] = Vector3.new(-guiOffset.Y, adornee.Size.Y / 2, -guiOffset.X),
	}

	return pointsByFace[face]
end
-- Modules
local PriorityDeleteTypes = require(script.Parent.Parent.constants).PriorityDeleteTypes
----------------------------------
------------FUNCTIONS-------------
----------------------------------

function Receive(player, action, ...)
	local args = {...}
	if player == User and action == "play" then
		Connector:FireAllClients("play", User, args[1], Settings.SoundSource.Position, Settings.PianoSoundRange, Settings.PianoSounds, args[2], Settings.IsCustom)
		HighlightPianoKey((args[1] > 61 and 61) or (args[1] < 1 and 1) or args[1],args[3])
	elseif player == User and action == "abort" then
		Deactivate()
		if SeatWeld then
			SeatWeld:remove()
		end
	end
end

function Activate(player)
	Connector:FireClient(player, "activate", Settings.CameraCFrame, Settings.PianoSounds, true)
	User = player
	Piano.Wall.CanCollide = true
end

function Deactivate()
	if User and User.Parent then
		Piano.Wall.CanCollide = false
		Connector:FireClient(User, "deactivate")
		User.Character:SetPrimaryPartCFrame(Box.CFrame + Vector3.new(0, 5, 0))
	end
	
	User = nil
end
--------SETTINGS--------
local ITEM_NAME = "RocketLauncher"
local ITEM_PRICE = 10
local CURRENCY_NAME = "Cash"
--	
--	character.DescendantAdded:Connect(function(bodypart)
--		print("test")
--		if bodypart:IsA("BasePart") then
--			PhysicsService:SetPartCollisionGroup(bodypart, "Players")
--		end
--	end)
	-- Also set root part collission
	--[[local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
	PhysicsService:SetPartCollisionGroup(humanoidRootPart, "Players")
	
	local bodyparts = character:GetChildren()
	for i, bodypart in pairs(bodyparts) do
		if bodypart:IsA("BasePart") then
			PhysicsService:SetPartCollisionGroup(bodypart, "Players")
		end
	end]]
end
-- dayLength defines how long, in minutes, a day in your game is. Feel free to alter it.
local dayLength = 16

local cycleTime = dayLength*60
local minutesInADay = 24*60

local lighting = game:GetService("Lighting")

local startTime = tick() - (lighting:getMinutesAfterMidnight() / minutesInADay)*cycleTime
local endTime = startTime + cycleTime

local timeRatio = minutesInADay / cycleTime

if dayLength == 0 then
	dayLength = 1
end

repeat
	local currentTime = tick()
	
	if currentTime > endTime then
		startTime = endTime
		endTime = startTime + cycleTime
	end
	
	lighting:setMinutesAfterMidnight((currentTime - startTime)*timeRatio)
	wait(1/15)
until false
--[[**
	Determines if the passed object is a Janitor.
	@param [t:any] Object The object you are checking.
	@returns [t:boolean] Whether or not the object is a Janitor.
**--]]
function Janitor.Is(Object)
	return type(Object) == "table" and getmetatable(Object) == Janitor
end

Janitor.is = Janitor.Is
--!strict
local LocalPlayer: Player = game:GetService("Players").LocalPlayer
local Replicated = game:GetService("ReplicatedStorage")

local Character: Model = LocalPlayer.Character::Model
local Humanoid: Humanoid = Character:WaitForChild("Humanoid")::Humanoid

Humanoid.Jumping:Connect(function(active: boolean)
	if not active then
		return
	end
	
	Replicated.LocalEvents.ToggleFlipFlops:Fire()
end)
--// initialize team changing function //--
game.Players.LocalPlayer.Changed:connect(function()
	if checkTeam() == true then
		script.Parent.Parent.SpectateButton.Visible = true
	else
		script.Parent.Parent.SpectateButton.Visible = false
		resetGui()
	end
end)

if checkTeam() == true then
	script.Parent.Parent.SpectateButton.Visible = true
else
	script.Parent.Parent.SpectateButton.Visible = false
	resetGui()
end
--[[Weld functions]]

	local JS = game:GetService("JointsService")
	local PGS_ON = workspace:PGSIsEnabled()
	
	function MakeWeld(x,y,type,s) 
		if type==nil then type="Weld" end
		local W=Instance.new(type,x) 
		W.Part0=x W.Part1=y 
		W.C0=x.CFrame:inverse()*x.CFrame 
		W.C1=y.CFrame:inverse()*x.CFrame 
		if type=="Motor" and s~=nil then 
			W.MaxVelocity=s 
		end 
		return W	
	end
	
	function ModelWeld(a,b) 
	if a:IsA("BasePart") and 
		a.Parent.Name ~= ("RotLight") then 
			MakeWeld(b,a,"Weld")
			for i,v in pairs(a:GetChildren()) do 
				if v ~= nil and v:IsA("BasePart") then
					ModelWeld(v,b) 
				end
			end
		elseif a:IsA("Model") then 
			for i,v in pairs(a:GetChildren()) do 
				ModelWeld(v,b) 
			end 
		end 
	end
	
	function UnAnchor(a) 
		if a:IsA("BasePart") then a.Anchored=false  end for i,v in pairs(a:GetChildren()) do UnAnchor(v) end 
	end