Roblox/luau_corpus huggingface dataset:
--[[ Gamepad Support ]]--
local THUMBSTICK_DEADZONE = 0.2
local r3ButtonDown = false
local l3ButtonDown = false
local currentZoomSpeed = 1 -- Multiplier, so 1 == no zooming

local function clamp(value, minValue, maxValue)
	if maxValue < minValue then
		maxValue = minValue
	end
	return math.clamp(value, minValue, maxValue)
end

local function IsFinite(num)
	return num == num and num ~= 1/0 and num ~= -1/0
end

local function IsFiniteVector3(vec3)
	return IsFinite(vec3.x) and IsFinite(vec3.y) and IsFinite(vec3.z)
end
----------------------------------------------------------------------------------------------------
--------------------=[ OUTROS ]=--------------------------------------------------------------------
----------------------------------------------------------------------------------------------------
	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = true
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = true
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = false					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = true					--- You can check the magazine
	,ArcadeMode = false					--- You can see the bullets left in magazine
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 1.25
	,GunFOVReduction = 5

	,BoltExtend = Vector3.new(0, 0, 0.225)
	,SlideExtend = Vector3.new(0, 0, 0.225)
--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)
-- t: a runtime typechecker for Roblox

local t = {}

function t.type(typeName)
	return function(value)
		local valueType = type(value)
		if valueType == typeName then
			return true
		else
			return false
		end
	end
end

function t.typeof(typeName)
	return function(value)
		local valueType = typeof(value)
		if valueType == typeName then
			return true
		else
			return false
		end
	end
end
--[[
	Main RenderStep Update. The camera controller and occlusion module both have opportunities
	to set and modify (respectively) the CFrame and Focus before it is set once on CurrentCamera.
	The camera and occlusion modules should only return CFrames, not set the CFrame property of
	CurrentCamera directly.
--]]
function CameraModule:Update(dt)
	if self.activeCameraController then
		self.activeCameraController:UpdateMouseBehavior()

		local newCameraCFrame, newCameraFocus = self.activeCameraController:Update(dt)
		if not FFlagUserFlagEnableNewVRSystem then
			self.activeCameraController:ApplyVRTransform()
		end
		if self.activeOcclusionModule then
			newCameraCFrame, newCameraFocus = self.activeOcclusionModule:Update(dt, newCameraCFrame, newCameraFocus)
		end

		-- Here is where the new CFrame and Focus are set for this render frame
		game.Workspace.CurrentCamera.CFrame = newCameraCFrame
		game.Workspace.CurrentCamera.Focus = newCameraFocus

		-- Update to character local transparency as needed based on camera-to-subject distance
		if self.activeTransparencyController then
			self.activeTransparencyController:Update()
		end

		if CameraInput.getInputEnabled() then
			CameraInput.resetInputForFrameEnd()
		end
	end
end
--[=[
	Like [GetRemoteEvent] but in promise form.

	@function PromiseGetRemoteEvent
	@within PromiseGetRemoteEvent
	@param name string
	@return Promise<RemoteEvent>
]=]
if not RunService:IsRunning() then
	-- Handle testing
	return function(name)
		return Promise.resolved(GetRemoteEvent(name))
	end
elseif RunService:IsServer() then
	return function(name)
		return Promise.resolved(GetRemoteEvent(name))
	end
else -- RunService:IsClient()
	return function(name)
		assert(type(name) == "string", "Bad name")

		local storage = ReplicatedStorage:FindFirstChild(ResourceConstants.REMOTE_EVENT_STORAGE_NAME)
		if storage then
			local obj = storage:FindFirstChild(name)
			if obj then
				return Promise.resolved(obj)
			end
		end

		return Promise.spawn(function(resolve, _)
			resolve(GetRemoteEvent(name))
		end)
	end
end
--Misc
Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
Tune.RevDecay		= 75		-- RPM decay when clutch is off
Tune.RevBounce		= 500		-- RPM kickback from redline
Tune.IdleThrottle	= 3			-- Percent throttle at idle
Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
-- Requires
local Database = require(ReplicatedStorage.Common.Database)
local APIEquipment = require(ReplicatedStorage.Common.APIEquipment)
--[[
	Remove the range from the list starting from the index.
]]
local function removeRange(list, startIndex, endIndex)
	assert(startIndex <= endIndex, "startIndex must be less than or equal to endIndex")

	local new = {}
	local index = 1

	for i = 1, math.min(#list, startIndex - 1) do
		new[index] = list[i]
		index = index + 1
	end

	for i = endIndex + 1, #list do
		new[index] = list[i]
		index = index + 1
	end

	return new
end

return removeRange
---------------------------------------------------

This = script.Parent
Elevator = This.Parent.Parent.Parent.Parent.Parent
Characters = require(script.Characters)
CustomLabel = require(Elevator.CustomLabel)

CustomText = CustomLabel["CUSTOMFLOORLABEL"]

This.Parent.Parent.Parent.Parent.Parent:WaitForChild("Floor").Changed:connect(function(floor)
	--custom indicator code--
	ChangeFloor(tostring(floor))
end)

function ChangeFloor(SF)
	if CustomText[tonumber(SF)] then
		SF = CustomText[tonumber(SF)]
	end		
	SetDisplay(2,(string.len(SF) == 2 and SF:sub(1,1) or "NIL"))
	SetDisplay(3,(string.len(SF) == 2 and SF:sub(2,2) or SF))	
end



function SetDisplay(ID,CHAR)
	if This.Display:FindFirstChild("Matrix"..ID) and Characters[CHAR] ~= nil then
		for i,l in pairs(Characters[CHAR]) do 
			for r=1,5 do	
				This.Display["Matrix"..ID]["Row"..i]["D"..r].Visible = (l:sub(r,r) == "1" and true or false)
			end
		end
	end
end

for M = 1, Displays do
	for R = 1, 7 do
		for D = 1, 5 do
			This.Display["Matrix"..M]["Row"..R]["D"..D].BackgroundColor3 = DisplayColor
		end
	end
end
--// Recoil Settings	
	gunrecoil = -0.5; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.5; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.5; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.13; -- How much the camera flicks when aiming
	
	CamShake = 0.5; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 0.5; -- THIS IS ALSO NEW!!!!
	
	Kickback = 1; -- Upward gun rotation when not aiming
	AimKickback = 0.5; -- Upward gun rotation when aiming
--local
function module.locaL(part,cf)
	local thing = part
	thing.CFrame = cf
	thing.Parent = game.Workspace.World.Visuals
	
	return thing
end

module.weld = function(data)

	local part = data.part
	local base = data.basepart
	local tim = data.tim or nil
	local name = data.name or "Weld"
	part.Anchored = false
	--base.Anchored = false

	local Weld = Instance.new("Weld")
	Weld.Name = name
	Weld.Part0 = base
	Weld.C0 = base.CFrame:inverse()
	Weld.Part1 = part
	Weld.C1 = part.CFrame:inverse()
	Weld.Parent = part

	if tim then
		game.Debris:AddItem(Weld, tim)
	end
end
-- Camera math utility library
local CameraUtils = require(script:WaitForChild("CameraUtils"))
-------------------------------------------------------
-- изменение размера контескта под рамку
local context = me.frmContext
context.Size = UDim2.new(0,me.AbsoluteSize.X-29,0,me.AbsoluteSize.Y-29)
-- Function to update the loading time
local function UpdateLoadingTime(remainingTime)
	loadingBar.Text = tostring(remainingTime) .. "s"
end
--Precalculated paths
local t,f,n=true,false,{}
local r={
[58]={{72,71,61,59,41,30,56,58},t},
[49]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{72,71,61,59,41,30,56,58,20,19},t},
[59]={{72,71,61,59},t},
[63]={{72,71,61,59,41,30,56,58,23,62,63},t},
[34]={{72,71,61,59,41,39,35,34},t},
[21]={{72,71,61,59,41,30,56,58,20,21},t},
[48]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{72,71,61,59,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{72,71,61,59,41,39,35,34,32,31},t},
[56]={{72,71,61,59,41,30,56},t},
[29]={{72,71,61,59,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45},t},
[57]={{72,71,61,59,41,30,56,57},t},
[36]={{72,71,61,59,41,39,35,37,36},t},
[25]={{72,71,61,59,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{72,71},t},
[20]={{72,71,61,59,41,30,56,58,20},t},
[60]={{72,71,61,60},t},
[8]={n,f},
[4]={n,f},
[75]={{72,76,73,75},t},
[22]={{72,71,61,59,41,30,56,58,20,21,22},t},
[74]={{72,76,73,74},t},
[62]={{72,71,61,59,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{72,71,61,59,41,39,35,37},t},
[2]={n,f},
[35]={{72,71,61,59,41,39,35},t},
[53]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{72,76,73},t},
[72]={{72},t},
[33]={{72,71,61,59,41,39,35,37,36,33},t},
[69]={{72,71,61,69},t},
[65]={{72,71,61,59,41,30,56,58,20,19,66,64,65},t},
[26]={{72,71,61,59,41,39,35,34,32,31,29,28,27,26},t},
[68]={{72,71,61,59,41,30,56,58,20,19,66,64,67,68},t},
[76]={{72,76},t},
[50]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{72,71,61,59,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{72,71,61,59,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{72,71,61,59,41,30,56,58,23},t},
[44]={{72,71,61,59,41,39,35,34,32,31,29,28,44},t},
[39]={{72,71,61,59,41,39},t},
[32]={{72,71,61,59,41,39,35,34,32},t},
[3]={n,f},
[30]={{72,71,61,59,41,30},t},
[51]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{72,71,61,59,41,30,56,58,20,19,66,64,67},t},
[61]={{72,71,61},t},
[55]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{72,71,61,59,41,39,40,38,42},t},
[40]={{72,71,61,59,41,39,40},t},
[52]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{72,71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{72,71,61,59,41},t},
[17]={n,f},
[38]={{72,71,61,59,41,39,40,38},t},
[28]={{72,71,61,59,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{72,71,61,59,41,30,56,58,20,19,66,64},t},
}
return r
--cam.FieldOfView=math.random(68,72)
task.wait()
end
--[[**
	ensures Roblox RaycastResult type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.RaycastResult = t.typeof("RaycastResult")
--//Controller//--
Trigger.MouseClick:Connect(function(Player)
	if not Settings.OnCD then
		local Backpack = Player.Backpack
		local StarterGear = Player.StarterGear
		
		for _, Tool in pairs(Backpack:GetChildren()) do
			if Tool then
				Tool:Destroy()
			end
		end
		
		for _, Tool in pairs(StarterGear:GetChildren()) do
			if Tool then
				Tool:Destroy()
			end
		end
		
		local Tool = Tools:FindFirstChild(Gun.Name):Clone()
		Tool:Clone().Parent = Backpack
		Tool:Clone().Parent = StarterGear
	end
end)
--[=[
	Constructs a new Maid object

	```lua
	local maid = Maid.new()
	```

	@return Maid
]=]
function Maid.new()
	return setmetatable({
		_tasks = {}
	}, Maid)
end
-------------------------
while true do
	R.BrickColor = BrickColor.new("CGA brown")
	wait(0.3)
    R.BrickColor = BrickColor.new("Really black")
	wait(0.3)
end
-- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

math.randomseed(tick())

function configureAnimationSet(name, fileList)
	if (animTable[name] ~= nil) then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0	
	animTable[name].connections = {}

	local allowCustomAnimations = true
	local AllowDisableCustomAnimsUserFlag = true

	local success, msg = pcall(function()
		AllowDisableCustomAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserAllowDisableCustomAnims")
	end)

	if (AllowDisableCustomAnimsUserFlag) then
		local ps = game:GetService("StarterPlayer"):FindFirstChild("PlayerSettings")
		if (ps ~= nil) then
			allowCustomAnimations = not require(ps).UseDefaultAnimations
		end
	end

	-- check for config values
	local config = script:FindFirstChild(name)
	if (allowCustomAnimations and config ~= nil) then
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject == nil) then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if (animTable[name].count <= 0) then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
-- Use entrance-easing when adding elements to the view such as a modal or toaster appearing, or moving in response to users’ input, such as dropdown opening or toggle. An element quickly appears and slows down to a stop.
local EntranceProductive = Bezier(0, 0, 0.38, 0.9)
local EntranceExpressive = Bezier(0, 0, 0.3, 1)
-- Roblox character sound script

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

local SOUND_DATA = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
	},
	Died = {
		SoundId = "rbxasset://sounds/uuhhh.mp3",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "",
		Looped = true,
		Pitch = 1.85,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}

 -- wait for the first of the passed signals to fire
local function waitForFirst(...)
	local shunt = Instance.new("BindableEvent")
	local slots = {...}

	local function fire(...)
		for i = 1, #slots do
			slots[i]:Disconnect()
		end

		return shunt:Fire(...)
	end

	for i = 1, #slots do
		slots[i] = slots[i]:Connect(fire)
	end

	return shunt.Event:Wait()
end
--// Recoil Settings	
	gunrecoil = -0.2; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.2; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.2; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.2; -- How much the camera flicks when aiming
	
	CamShake = 2; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 2; -- THIS IS ALSO NEW!!!!
	
	Kickback = 0.10; -- Upward gun rotation when not aiming
	AimKickback = 0.9; -- Upward gun rotation when aiming
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 1400
	Tune.IdleRPM		= 600
	Tune.PeakRPM		= 7000
	Tune.Redline		= 8100
	Tune.EqPoint		= 7000
	Tune.PeakSharpness	= 9.4
	Tune.CurveMult		= 0
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 450		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--Give player when join
game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
	local equipped = player:WaitForChild("BackpackShop").Equipped
		if equipped.Value ~= "" then
			local a = game.ServerStorage.Backpacks[equipped.Value]:Clone()
			a.Name = "Backpack"
			a.Parent = character
		else
			wait(2)
			local a = game.ServerStorage.Backpacks[equipped.Value]:Clone()
			a.Name = "Backpack"
			a.Parent = character
		end
-- Helper functions

function angleBetweenPoints(p0, p1)
	local p = p0 - p1
	return -math.atan2(p.z, p.x)
end

function getCameraAngle(camera)
	local cf, f = camera.CoordinateFrame, camera.Focus
	return angleBetweenPoints(cf.p, f.p)
end
-- ROBLOX deviation: alias for internal React$ flow types
export type React_Node =
	nil
	| boolean
	| number
	| string
	| React_Element<any>
	-- ROBLOX TODO: only include this once it's more specific than `any`
	-- | React_Portal
	| Array<React_Node?>
	-- ROBLOX TODO Luau: this more closely matches the upstream Iterable<>, hypothetically the UNIQUE_TAG field makes it so we don't unify with other tables and squad field resolution
	| { [string]: React_Node?, UNIQUE_TAG: any? }

export type React_Element<ElementType> = {
	type: ElementType,
	props: React_ElementProps<ElementType>?,
	key: React_Key | nil,
	ref: any,
}

export type React_PureComponent<Props, State = nil> = React_Component<Props, State>
--// Dump log on disconnect
local isStudio = game:GetService("RunService"):IsStudio()
game:GetService("NetworkClient").ChildRemoved:Connect(function(p)
	if not isStudio then
		warn("~! PLAYER DISCONNECTED/KICKED! DUMPING ADONIS CLIENT LOG!")
		dumplog()
	end
end)

local unique = {}
local origEnv = getfenv()
setfenv(1, setmetatable({}, { __metatable = unique }))
--!strict
local function defaultFilter(...: any)
	return true
end

local function onSpawned<U>(parent: Instance, callback: (child: U) -> (), filter: ((child: Instance) -> boolean)?)
	local filterer = (filter or defaultFilter) :: (Instance) -> boolean
	
	for _, child in parent:GetChildren() :: { any } do
		if filterer(child) then
			task.spawn(callback, child)
		end
	end
	
	local signal = parent.ChildAdded:Connect(function(child: any)
		if filterer(child) then
			callback(child)
		end
	end)
	
	return function()
		signal:Disconnect()
	end
end

return onSpawned
--[[Drivetrain]]	
Tune.Config			= "FWD"		--"FWD" , "RWD" , "AWD"
------------------------------------------------------------------------
-- parse function declaration body
-- * used in simpleexp(), localfunc(), funcstat()
------------------------------------------------------------------------
function luaY:body(ls, e, needself, line)
  -- body ->  '(' parlist ')' chunk END
  local new_fs = {}  -- FuncState
        new_fs.upvalues = {}
        new_fs.actvar = {}
  self:open_func(ls, new_fs)
  new_fs.f.lineDefined = line
  self:checknext(ls, "(")
  if needself then
    self:new_localvarliteral(ls, "self", 0)
    self:adjustlocalvars(ls, 1)
  end
  self:parlist(ls)
  self:checknext(ls, ")")
  self:chunk(ls)
  new_fs.f.lastlinedefined = ls.linenumber
  self:check_match(ls, "TK_END", "TK_FUNCTION", line)
  self:close_func(ls)
  self:pushclosure(ls, new_fs, e)
end
--		end
	end
end)
keyset.Event:wait()
script.Parent.Key.Transparency=0
_G.Tween(script.Parent.Key,{CFrame=script.Parent.KeyC.CFrame},1,"Sine","In"):Play()
wait(1.2)
script.Parent.Key.ClickDetector.MaxActivationDistance=10
script.Parent.KeyBase.ClickDetector.MaxActivationDistance=0
script.Parent.Key.ClickDetector.MouseClick:Wait()
_G.Tween(script.Parent.Key,{CFrame=script.Parent.KeyO.CFrame},0.3,"Quad"):Play()
_G.Tween(script.Parent.KeyHole,{CFrame=script.Parent.KeyHoleO.CFrame},0.3,"Quad"):Play()
script.Parent.KeyBase.Key:Play()
wait(0.5)
local Value = Instance.new("CFrameValue")
Value.Value=script.Parent.CoverC.CFrame
Value.Changed:connect(function()
	script.Parent.Cover:SetPrimaryPartCFrame(Value.Value)
end)
_G.Tween(Value,{Value=script.Parent.CoverO.CFrame},0.8,"Bounce","Out"):Play()
wait(1)
script.Parent.Indicator.Color=Color3.new(0,1,0)
script.Parent.Button.ClickDetector.MouseClick:Wait()
script.Parent.Indicator.Color=Color3.new(1,0,0)
script.Parent.Button.Sound:Play()
_G.Tween(script.Parent.Button.Mesh,{Offset=Vector3.new(0.15,0,0)},0.2,"Quad","InOut",true):Play()
_G.Tween(Value,{Value=script.Parent.CoverC.CFrame},2,"Quad"):Play()
workspace.UPCCoreSystemUNYv4yvw3789n5yw7ay.ReactorStartup.Disabled=false
wait(2.5)
script.Parent.Key.ClickDetector.MaxActivationDistance=0
_G.Tween(script.Parent.Key,{CFrame=script.Parent.KeyC.CFrame},0.3,"Quad"):Play()
_G.Tween(script.Parent.KeyHole,{CFrame=script.Parent.KeyHoleC.CFrame},0.3,"Quad"):Play()
script.Parent.KeyBase.Key:Play()
wait(0.5)
_G.Tween(script.Parent.Key,{CFrame=script.Parent.KeyC.CFrame*CFrame.new(0,0.5,0)},1,"Sine"):Play()
wait(1)
script.Parent.Key.Transparency=1
--[[Controls]]

local _CTRL = _Tune.Controls
local Controls = Instance.new("Folder",script.Parent)
Controls.Name = "Controls"
for i,v in pairs(_CTRL) do
	local a=Instance.new("StringValue",Controls)
	a.Name=i
	a.Value=v.Name
	a.Changed:connect(function()
		if i=="MouseThrottle" or i=="MouseBrake" then
			if a.Value == "MouseButton1" or a.Value == "MouseButton2" then 
				_CTRL[i]=Enum.UserInputType[a.Value] 
			else 
				_CTRL[i]=Enum.KeyCode[a.Value] 
			end
		else
			_CTRL[i]=Enum.KeyCode[a.Value]
		end
	end)
end
--[[
for a,b in pairs(game.ServerScriptService.MainModule.Server.Morphs:GetDescendants()) do
	if b:IsA("Decal") and b.Name ~= "face" and b.Parent.Name == "Head" then
		print("CHANGED: ".. b.Name.." | "..b.Parent.Parent.Name)
		b.Name = "face"
	end
end
--]]

local bundleCache = {} -- cache HumanoidDescriptions retrieved from bundles to reduce API calls
function module:ApplyBundle(humanoid, bundleId)
	local HumanoidDescription = bundleCache[bundleId]
	if not HumanoidDescription then
		local success, bundleDetails = pcall(function() return main.assetService:GetBundleDetailsAsync(bundleId) end)
		if success and bundleDetails then
			for _, item in next, bundleDetails.Items do
				if item.Type == "UserOutfit" then
					success, HumanoidDescription = pcall(function() return main.players:GetHumanoidDescriptionFromOutfitId(item.Id) end)
					bundleCache[bundleId] = HumanoidDescription
					break
				end
			end
		end
	end
	if not HumanoidDescription then return end
	local newDescription = humanoid:GetAppliedDescription()
	local defaultDescription = Instance.new("HumanoidDescription")
	for _, property in next, {"BackAccessory", "BodyTypeScale", "ClimbAnimation", "DepthScale", "Face", "FaceAccessory", "FallAnimation", "FrontAccessory", "GraphicTShirt", "HairAccessory", "HatAccessory", "Head", "HeadColor", "HeadScale", "HeightScale", "IdleAnimation", "JumpAnimation", "LeftArm", "LeftArmColor", "LeftLeg", "LeftLegColor", "NeckAccessory", "Pants", "ProportionScale", "RightArm", "RightArmColor", "RightLeg", "RightLegColor", "RunAnimation", "Shirt", "ShouldersAccessory", "SwimAnimation", "Torso", "TorsoColor", "WaistAccessory", "WalkAnimation", "WidthScale"} do
		if HumanoidDescription[property] ~= defaultDescription[property] then -- property is not the default value
			newDescription[property] = HumanoidDescription[property]
		end
	end
	humanoid:ApplyDescription(newDescription)
end




return module