Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- for debuging animations dont delete


wait()
local rake = script.Parent.Parent
if rake:FindFirstChild("DebugAnimateSource") and rake:FindFirstChild("AnimateSource") then
    if script.Debug.Value == true then
        rake.DebugAnimateSource.Disabled = false
        rake.AnimateSource:Destroy()
    else
        rake.DebugAnimateSource:Destroy()
        rake.AnimateSource.Disabled = false
    end
    script:Destroy()
else
    script:Destroy()
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 FFlagUserDontAdjustSensitvityForPortrait do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserDontAdjustSensitvityForPortrait")
	end)
	FFlagUserDontAdjustSensitvityForPortrait = success and result
end

local FFlagUserFixZoomInZoomOutDiscrepancy do
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled("UserFixZoomInZoomOutDiscrepancy")
	end)
	FFlagUserFixZoomInZoomOutDiscrepancy = 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"))
--Variables


wait()
local NPC = script.Parent
local Humanoid = NPC:FindFirstChildOfClass("Humanoid")
Humanoid.BreakJointsOnDeath = false
local Anim = script.Animation
local DeathAnimation = Humanoid:LoadAnimation(Anim)
local newNPC = NPC:Clone()
local TweenService = game:GetService("TweenService")
--[[
	Assert that our expectation value is not nil
]]


function Expectation:ok()
	local result = (self.value ~= nil) == self.successCondition

	local message = formatMessage(self.successCondition,
		("Expected value %q to be non-nil"):format(
			tostring(self.value)
		),
		("Expected value %q to be nil"):format(
			tostring(self.value)
		)
	)

	assertLevel(result, message, 3)
	self:_resetModifiers()

	return self
end
-- Do not edit these values, they are not the developer-set limits, they are limits
-- to the values the camera system equations can correctly handle


local MIN_ALLOWED_ELEVATION_DEG = -80
local MAX_ALLOWED_ELEVATION_DEG = 80

local externalProperties = {}
externalProperties["InitialDistance"] 	= 25
externalProperties["MinDistance"] 		= 10
externalProperties["MaxDistance"] 		= 100
externalProperties["InitialElevation"] 	= 35
externalProperties["MinElevation"] 		= 35
externalProperties["MaxElevation"] 		= 35
externalProperties["ReferenceAzimuth"] 	= -45	-- Angle around the Y axis where the camera starts. -45 offsets the camera in the -X and +Z directions equally
externalProperties["CWAzimuthTravel"] 	= 90	-- How many degrees the camera is allowed to rotate from the reference position, CW as seen from above
externalProperties["CCWAzimuthTravel"] 	= 90	-- How many degrees the camera is allowed to rotate from the reference position, CCW as seen from above
externalProperties["UseAzimuthLimits"] 	= false -- Full rotation around Y axis available by default

local refAzimuthRad
local curAzimuthRad
local minAzimuthAbsoluteRad
local maxAzimuthAbsoluteRad
local useAzimuthLimits
local curElevationRad
local minElevationRad
local maxElevationRad
local curDistance
local minDistance
local maxDistance

local UNIT_Z = Vector3.new(0,0,1)
local TAU = 2 * math.pi

local changedSignalConnections = {}
--[[Transmission]]


	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[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			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.53		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.04		,
		--[[ 3 ]]		1.38		,
		--[[ 4 ]]		1.03		,
		--[[ 5 ]]		0.81		,
		--[[ 6 ]]		0.64		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--// [[ INTRO PLAY HOVER ]] \\--


IntroGui.ButtonFrame.PlayButton.MouseEnter:Connect(function()
	IntroGui.ButtonFrame.PlayButton.GreenDot.Visible = true
end)
IntroGui.ButtonFrame.PlayButton.MouseLeave:Connect(function()
	IntroGui.ButtonFrame.PlayButton.GreenDot.Visible = false
end)
--[[Susupension]]


	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 400		-- Spring Dampening
	Tune.FSusStiffness	= 17000		-- Spring Force
	Tune.FSusLength		= 1.9		-- Resting Suspension length (in studs)
	Tune.FSusMaxExt		= .15		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= .05		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 75		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 6			-- Wishbone Length
	Tune.FWsBoneAngle	= 3			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 400		-- Spring Dampening
	Tune.RSusStiffness	= 17000		-- Spring Force
	Tune.RSusLength		= 2.1		-- Resting Suspension length (in studs)
	Tune.RSusMaxExt		= .15		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= .05		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
	
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 2			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bronze"		-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 8				-- Suspension Coil Count
	Tune.WsColor		= "White"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--[[Drivetrain]]

	
	Tune.Config			= "RWD"		--"FWD" , "RWD" , "AWD"
	Tune.TorqueVector	= 0.5			--AWD ONLY, "-1" has a 100% front bias, "0" has a 50:50 bias, and "1" has a 100% rear bias. Can be any number between that range.
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 50		-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 80		-- 1 - 100%
	Tune.RDiffLockThres	= 20		-- 0 - 100%
	Tune.CDiffSlipThres	= 50		-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 50		-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= true		-- Implements TCS
	Tune.TCSThreshold	= 20		-- Slip speed allowed before TCS starts working (in SPS)
	Tune.TCSGradient	= 20		-- Slip speed gradient between 0 to max reduction (in SPS)
	Tune.TCSLimit		= 10		-- Minimum amount of torque at max reduction (in percent)
-- Roact


local new = Roact.createElement
local Frame = require(UI:WaitForChild 'Frame')
local ImageLabel = require(UI:WaitForChild 'ImageLabel')
local ImageButton = require(UI:WaitForChild 'ImageButton')
local TextLabel = require(UI:WaitForChild 'TextLabel')
local ItemList = require(script:WaitForChild 'ItemList')
--// bolekinds



local plr = script.Parent.Parent.Parent.Parent.Parent.Parent.Parent

script.Parent.MouseButton1Click:Connect(function()
	if plr.YouCash.Value >= 110 and game.ServerStorage.ServerData.contract.Value == false then
		script.Parent.Parent.Parent.Ching:Play()
		plr.YouCash.Value -= 110
		game.ServerStorage.ServerData.contract.Value = true
	end
end)
--////////////////////////////// Methods
--//////////////////////////////////////


local methods = {}
methods.__index = methods

function ReturnToObjectPoolRecursive(instance, objectPool)
	local children = instance:GetChildren()
	for i = 1, #children do
		ReturnToObjectPoolRecursive(children[i], objectPool)
	end
	instance.Parent = nil
	objectPool:ReturnInstance(instance)
end

function GetMessageCreators()
	local typeToFunction = {}
	local creators = messageCreatorModules:GetChildren()
	for i = 1, #creators do
		if creators[i]:IsA("ModuleScript") then
			if creators[i].Name ~= "Util" then
				local creator = require(creators[i])
				typeToFunction[creator[messageCreatorUtil.KEY_MESSAGE_TYPE]] = creator[messageCreatorUtil.KEY_CREATOR_FUNCTION]
			end
		end
	end
	return typeToFunction
end

function methods:WrapIntoMessageObject(messageData, createdMessageObject)
	local BaseFrame = createdMessageObject[messageCreatorUtil.KEY_BASE_FRAME]
	local BaseMessage = nil
	if messageCreatorUtil.KEY_BASE_MESSAGE then
		BaseMessage = createdMessageObject[messageCreatorUtil.KEY_BASE_MESSAGE]
	end
	local UpdateTextFunction = createdMessageObject[messageCreatorUtil.KEY_UPDATE_TEXT_FUNC]
	local GetHeightFunction = createdMessageObject[messageCreatorUtil.KEY_GET_HEIGHT]
	local FadeInFunction = createdMessageObject[messageCreatorUtil.KEY_FADE_IN]
	local FadeOutFunction = createdMessageObject[messageCreatorUtil.KEY_FADE_OUT]
	local UpdateAnimFunction = createdMessageObject[messageCreatorUtil.KEY_UPDATE_ANIMATION]

	local obj = {}

	obj.ID = messageData.ID
	obj.BaseFrame = BaseFrame
	obj.BaseMessage = BaseMessage
	obj.UpdateTextFunction = UpdateTextFunction or function() warn("NO MESSAGE RESIZE FUNCTION") end
	obj.GetHeightFunction = GetHeightFunction
	obj.FadeInFunction = FadeInFunction
	obj.FadeOutFunction = FadeOutFunction
	obj.UpdateAnimFunction = UpdateAnimFunction
	obj.ObjectPool = self.ObjectPool
	obj.Destroyed = false

	function obj:Destroy()
		ReturnToObjectPoolRecursive(self.BaseFrame, self.ObjectPool)
		self.Destroyed = true
	end

	return obj
end

function methods:CreateMessageLabel(messageData, currentChannelName)
	local messageType = messageData.MessageType
	if self.MessageCreators[messageType] then
		local createdMessageObject = self.MessageCreators[messageType](messageData, currentChannelName)
		if createdMessageObject then
			return self:WrapIntoMessageObject(messageData, createdMessageObject)
		end
	elseif self.DefaultCreatorType then
		local createdMessageObject = self.MessageCreators[self.DefaultCreatorType](messageData, currentChannelName)
		if createdMessageObject then
			return self:WrapIntoMessageObject(messageData, createdMessageObject)
		end
	else
		error("No message creator available for message type: " ..messageType)
	end
end
--[=[
	Clones a brio, such that it may be killed without affecting the original
	brio.

	@param brio Brio<T>
	@return Brio<T>
]=]


function BrioUtils.clone(brio)
	assert(brio, "Bad brio")

	if brio:IsDead() then
		return Brio.DEAD
	end

	local newBrio = Brio.new(brio:GetValue())

	newBrio:ToMaid():GiveTask(brio:GetDiedSignal():Connect(function()
		newBrio:Kill()
	end))

	return newBrio
end
-- ================================================================================
-- LOCAL FUNCTIONS
-- ================================================================================


local function getCheckpointFromPart(part)
	for _, checkpoint in pairs(checkpoints) do
		if checkpoint.CollisionBody == part then
			return checkpoint
		end
	end
	return nil
end -- getCheckpointFromPart()

local function hasPlayerFinishedLap(player, lap)
	for _, checkpoint in pairs(checkpoints) do
		if checkpoint:PlayerLapPassed(player, lap) ~= lap then
			return false
		end
	end
	return true
end -- hasPlayerFinishedLap()

local function addRacer(player)
	racers[player] = Racer.new()
end -- addRacer()

local function checkAllFinished()
	for _, racer in pairs(racers) do
		if not racer:HasFinishedLap(numLaps) then
			return false
		end
	end
	return true
end -- checkAllFinished()
-- Functions --



local function playSoundLocal(sId,sParent)
	local sound = Instance.new("Sound",sParent)
	sound.SoundId = "rbxassetid://"..sId
	sound:Play()
	sound:Destroy()
end

local function onClicked(player)
	playSoundLocal(152206246,player)	-- Declaring the sound ID and Parent
	
	local foundShirt = player.Character:FindFirstChild("Shirt") -- Tries to find Shirt
	if not foundShirt then -- if there is no shirt
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	else if foundShirt then -- if there is a shirt
		player.Character.Shirt:remove()
		local newShirt = Instance.new("Shirt",player.Character)
		newShirt.Name = "Shirt"
	end
	end
	
	
	
	
	local foundPants = player.Character:FindFirstChild("Pants") -- Tries to find Pants
	if not foundPants then -- if there are no pants
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	else if foundPants then -- if there are pants
		player.Character.Pants:remove()
		local newPants = Instance.new("Pants",player.Character)
		newPants.Name = "Pants"
	end
	end
	
	player.Character.Shirt.ShirtTemplate = shirtId
	player.Character.Pants.PantsTemplate = pantsId
	end




local function onHoverEnter(player)
	cPart.BrickColor = BrickColor.White()
end



local function onHoverLeave(player)
	cPart.BrickColor = BrickColor.Gray()
end
--[[[Default Controls]]


	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 3			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 3			,	-- Controller steering R-deadzone (0 - 100%)
	}
		
	Tune.KickdownWindow = .25 --Time (seconds) in which you must double click throttle key 
	Tune.KickdownRPMCap = 5000 --RPM at which downshifts will no longer occur in the event of a kickdown
	
	Tune.LaunchBuildup = 2500 --RPM in which launch control will build up to
	
	
	--Control Mapping
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= Enum.KeyCode.T					,
		ToggleABS				= Enum.KeyCode.Y					,
		ToggleTransMode			= Enum.KeyCode.M					,
		
		
		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,
		
		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,
		
		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.LeftShift			,
		
		--Handbrake
		PBrake					= Enum.KeyCode.P					,
		
	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,
		
	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
		ContlrToggleTCS			= Enum.KeyCode.ButtonA			    ,
		ContlrToggleABS			= Enum.KeyCode.ButtonA		     	,
	}
--[=[
	Similar to [Promise.andThen](#andThen), except the return value is the same as the value passed to the handler. In other words, you can insert a `:tap` into a Promise chain without affecting the value that downstream Promises receive.

	```lua
		getTheValue()
		:tap(print)
		:andThen(function(theValue)
			print("Got", theValue, "even though print returns nil!")
		end)
	```

	If you return a Promise from the tap handler callback, its value will be discarded but `tap` will still wait until it resolves before passing the original value through.

	@param tapHandler (...: any) -> ...any
	@return Promise<...any>
]=]


function Promise.prototype:tap(tapHandler)
	assert(isCallable(tapHandler), string.format(ERROR_NON_FUNCTION, "Promise:tap"))
	return self:_andThen(debug.traceback(nil, 2), function(...)
		local callbackReturn = tapHandler(...)

		if Promise.is(callbackReturn) then
			local length, values = pack(...)
			return callbackReturn:andThen(function()
				return unpack(values, 1, length)
			end)
		end

		return ...
	end)
end
--[[~-Fixico-~]]

--
print("Fixico's Scripts")
local isOn = true

function on()
 isOn = true
 script.Parent.Transparency = 0 
 script.Parent.CanCollide = true
end

function off()
 isOn = false
 script.Parent.Transparency = .5 
 script.Parent.CanCollide = false 
end

function onClicked()
 
 if isOn == true then off() else on() end

end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

on()
--	v.Changed:Connect(function(prop)
--		v2[prop] = v[prop]
--	end)


end
	script.Parent.CurrentCamera = cam
	cam.CFrame = workspace.NPCS:WaitForChild("NPC").HumanoidRootPart.CFrame * CFrame.new(0,3,-4) *  CFrame.Angles(math.rad(30),math.rad(180),0)
end)
-- Auto saving and issue queue managing:


RunService.Heartbeat:Connect(function()
	-- 1) Auto saving: --
	local auto_save_list_length = #AutoSaveList
	if auto_save_list_length > 0 then
		local auto_save_index_speed = SETTINGS.AutoSaveProfiles / auto_save_list_length
		local os_clock = os.clock()
		while os_clock - LastAutoSave > auto_save_index_speed do
			LastAutoSave = LastAutoSave + auto_save_index_speed
			local profile = AutoSaveList[AutoSaveIndex]
			if os_clock - profile._load_timestamp < SETTINGS.AutoSaveProfiles then
				-- This profile is freshly loaded - auto-saving immediately after loading will cause a warning in the log:
				profile = nil
				for _ = 1, auto_save_list_length - 1 do
					-- Move auto save index to the right:
					AutoSaveIndex = AutoSaveIndex + 1
					if AutoSaveIndex > auto_save_list_length then
						AutoSaveIndex = 1
					end
					profile = AutoSaveList[AutoSaveIndex]
					if os_clock - profile._load_timestamp >= SETTINGS.AutoSaveProfiles then
						break
					else
						profile = nil
					end
				end
			end
			-- Move auto save index to the right:
			AutoSaveIndex = AutoSaveIndex + 1
			if AutoSaveIndex > auto_save_list_length then
				AutoSaveIndex = 1
			end
			-- Perform save call:
			if profile ~= nil then
				coroutine.wrap(SaveProfileAsync)(profile) -- Auto save profile in new thread
			end
		end
	end
	-- 2) Issue queue: --
	-- Critical state handling:
	if ProfileService.CriticalState == false then
		if #IssueQueue >= SETTINGS.IssueCountForCriticalState then
			ProfileService.CriticalState = true
			ProfileService.CriticalStateSignal:Fire(true)
			CriticalStateStart = os.clock()
			warn("[ProfileService]: Entered critical state")
		end
	else
		if #IssueQueue >= SETTINGS.IssueCountForCriticalState then
			CriticalStateStart = os.clock()
		elseif os.clock() - CriticalStateStart > SETTINGS.CriticalStateLast then
			ProfileService.CriticalState = false
			ProfileService.CriticalStateSignal:Fire(false)
			warn("[ProfileService]: Critical state ended")
		end
	end
	-- Issue queue:
	while true do
		local issue_time = IssueQueue[1]
		if issue_time == nil then
			break
		elseif os.clock() - issue_time > SETTINGS.IssueLast then
			table.remove(IssueQueue, 1)
		else
			break
		end
	end
end)
--print(script.Parent.F1.Position)


wait(timer)
script.Parent.F2:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F3:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F4:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F5:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F6:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F7:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F8:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F9:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F99:TweenSize(UDim2.new(15, 0,0.1, 0))
for i = respawntime, 0, -1 do
	wait(1)
	if i == 0 then
		script.Parent.F1:TweenSize(UDim2.new(0, 0,0.1, 0))  wait(timer2)
		script.Parent.F2:TweenSize(UDim2.new(0, 0,0.1, 0))  wait(timer2)
		script.Parent.F3:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F4:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F5:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F6:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F7:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F8:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F9:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F99:TweenSize(UDim2.new(0, 0,0.1, 0)) wait(timer2)
		wait()
	end
end
wait(1)
script.Parent.Parent:Destroy()
--MISC
-- FUNCTIONS
---- smallestAxis()
----- Gets the smallest axis of the Part using
-----  nested math.min's.
---- largestAxis()
----- Gets the largest axis of the Part using
-----  nested math.max's.
---- modulusWait(i, interval)
----- If the modulus (remainder) of interval
-----  after i is 0, then the function wait()s
----- This is used in removing parts, placing
-----  stars, and placing connecting lines for
-----  simultaneously performance and effect.
-- Bot Open



MainDoor.Touched:Connect(function(hit)
	if Door.OpenClosed.Value == "Closed" and DoorReady.Value == "true" then
		if hit.Parent:FindFirstChild("Bot")then
			hit.Parent.HumanoidRootPart.Anchored = true
			BotOpenSound:Play()
			Door.OpenClosed.Value = "Open"
			DoorReady.Value = "false"
			wait(1)
			hit.Parent.HumanoidRootPart.Anchored = false
			OpenSound:Play()
			OpenTween:Play()	
		else
		end
	end
end)
--


end
else
print("sh")
end
else
print("arms")
end
end
function Key(key)
if key then
key = string.lower(key)
if (key=="n") then
if on == 1 then
on = 0
elseif on == 0 then
on = 1
end
Crouch(on)
end
end
end
function Equip(mouse)
mouse.KeyDown:connect(Key)
end
script.Parent.Equipped:connect(Equip)