Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- int rd_int_basic(string src, int s, int e, int d)
-- @src - Source binary string
-- @s - Start index of a little endian integer
-- @e - End index of the integer
-- @d - Direction of the loop


local function rd_int_basic(src, s, e, d)
	local num = 0

	-- if bb[l] > 127 then -- signed negative
	-- 	num = num - 256 ^ l
	-- 	bb[l] = bb[l] - 128
	-- end

	for i = s, e, d do
		local mul = 256 ^ math.abs(i - s)

		num = num + mul * string.byte(src, i, i)
	end

	return num
end
--
--All Welding Related Utility functions should be put here
--


WeldUtil = {}


do


	function WeldUtil.WeldBetween(a, b)
		local weld = Instance.new("Weld")
		weld.Part0 = a
		weld.Part1 = b
		weld.C0 = CFrame.new()
		weld.C1 = b.CFrame:inverse() * a.CFrame

		weld.Parent = a
		return weld
	end
	
	function WeldUtil:PermaWeld(weld)
		local OriginalParent = weld.Parent
		weld.Changed:connect(function()
			Delay(0,function() weld.Parent = OriginalParent end)
		end)
	end

end

local InternalEvent =
{
	Listeners = nil,
}
do
	UTIL.MakeClass(InternalEvent)
	function InternalEvent:Connect(func)
		if not self.Listeners then self.Listeners = {} end
		table.insert(self.Listeners,func)
	end
	function InternalEvent:Fire(...)
		if not self.Listeners then return end
		local args = {...}
		for _,i in ipairs(self.Listeners) do
			Spawn(function() i(unpack(args)) end)
		end
	end
end
-- << COMMANDS >>


local module = {
	
	-----------------------------------
	{
	Name = "loadmap";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {};
	Function = function(speaker, args)
		
	end;
	UnFunction = function(speaker, args)
		
	end;
	--
	};
	
	
	
	
	-----------------------------------
	{
	Name = "";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {};
	--[[
	ClientCommand = true;
	FireAllClients = true;
	BlockWhenPunished = true;
	PreFunction = function(speaker, args)
		
	end;
	Function = function(speaker, args)
		wait(1)
	end;
	--]]
	--
	};
	
	
	
	
	-----------------------------------
	
};



return module
--// F key, Horn


mouse.KeyDown:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0
	end
end)
---Changing lights


while wait(LightsSpeed) do
	Car.Chassis2.L1.Color = Color3.fromRGB(13, 105, 172)
	Car.Chassis2.L2.Color = Color3.fromRGB(255, 89, 89)
	wait(LightsSpeed)
	Car.Chassis2.L2.Color = Color3.fromRGB(13, 105, 172)
	Car.Chassis2.L1.Color = Color3.fromRGB(255, 89, 89)	
end
-- Remove the fly when it flew too far from the center.



local Fly = script.Parent
local Model = script.Parent.Parent
local Range = Model.Configuration.FlyRange

while true do
	wait(5)
	if (Fly.Position - Model.Center.CenterPart.Position).magnitude > Range.Value then 
		Fly.GlowScript.Disabled = true
		Fly.MoveScript.Disabled = true
		Fly:destroy()
		break
	end
end
--[[INSTALL PROCESS]]--
-- Place the brick in the body group, where your radiator would be, and place the "Temperature" GUI in the plugin folder!
-- This plugin is Filtering Enabled compatible





local car = script.Parent.Car.Value
local radiator = car.Body.Smoke
local mouse = game.Players.LocalPlayer:GetMouse()
local handler = car.EngineOverheat
local FE = workspace.FilteringEnabled

car.DriveSeat:WaitForChild("Celsius")
car.DriveSeat:WaitForChild("Blown")
--[=[
	Constructs a new service.

	:::caution
	Services must be created _before_ calling `Knit.Start()`.
	:::
	```lua
	-- Create a service
	local MyService = Knit.CreateService {
		Name = "MyService",
		Client = {},
	}

	-- Expose a ToAllCaps remote function to the clients
	function MyService.Client:ToAllCaps(player, msg)
		return msg:upper()
	end

	-- Knit will call KnitStart after all services have been initialized
	function MyService:KnitStart()
		print("MyService started")
	end

	-- Knit will call KnitInit when Knit is first started
	function MyService:KnitInit()
		print("MyService initialize")
	end
	```
]=]


function KnitServer.CreateService(serviceDef: ServiceDef): Service
	assert(type(serviceDef) == "table", `Service must be a table; got {type(serviceDef)}`)
	assert(type(serviceDef.Name) == "string", `Service.Name must be a string; got {type(serviceDef.Name)}`)
	assert(#serviceDef.Name > 0, "Service.Name must be a non-empty string")
	assert(not DoesServiceExist(serviceDef.Name), `Service "{serviceDef.Name}" already exists`)
	local service = serviceDef
	service.KnitComm = ServerComm.new(knitRepServiceFolder, serviceDef.Name)
	if type(service.Client) ~= "table" then
		service.Client = { Server = service }
	else
		if service.Client.Server ~= service then
			service.Client.Server = service
		end
	end
	services[service.Name] = service
	return service
end
-- This check exists to prevent an infinite respawning bug



function Respawn()
	wait(RESPAWN_DELAY) -- ya
	
	CurrentFigure:Destroy()
	CurrentFigure = Figure:Clone()
	CurrentFigure:MakeJoints()
	CurrentFigure.Parent = Model
	-- Destroy the current dummy, clone the extra, put it together, and put it inside of Model
	
	CurrentFigure.Humanoid.Died:connect(onDied)
	-- Connect the Died event on the new dummies Humanoid, it will fire the Died() function below when it dies
end
function onRemoved(Object)
	if Object == CurrentFigure and CanSpawn then
		Respawn()
	end
	-- Check if the object that was removed was the current dummy
	-- and if it is able to spawn a new one, if so, spawn a new one.
end
function onDied()
	if CanSpawn then
		CanSpawn = false
		Respawn()
		CanSpawn = true
	end
	-- Fire Respawn() function if CanSpawn is true and
	-- set CanSpawn to false while the function is running.
end

CurrentFigure.Humanoid.Died:connect(onDied)
--	print("Punch Swing")


	self.animation.states["Punch"].swing()
	
	self.collisionDetect.CFrame = Punch.character.PrimaryPart.CFrame * CFrame.new(0, 0, (-self.collisionDetect.Size.Z / 2)+1)
	self.collisionDetect.Parent = Punch.character -- change this to a folder

	local touchedParts = self.collisionDetect:GetTouchingParts()
	
	self.collisionDetect.Parent = nil
	
	local curated = {}
	for  _,Part in next, touchedParts  do
		if not(Part:IsDescendantOf(self.character) or Part ==  workspace.Terrain) then
			curated[#curated + 1] = Part
		end
	end
	
	if #curated >= 1 then
		Rep.Relay.SwingTool:FireServer(curated)
	end
	
	curated = {}
end

function Punch:input(inputName,inputState,inputObject)
	if inputName == "Action" then
		if inputState == Enum.UserInputState.Begin then
			self.holding = true
			if (Rep.Constants.RelativeTime.Value - _G.SD[player.UserId].Data.tempData.lastAction) > 0.25 then
				_G.SD[player.UserId].Data.tempData.lastAction = Rep.Constants.RelativeTime.Value
				swing(self)
			end
		elseif inputState == Enum.UserInputState.End then
			self.holding = false
		end
	end
end

function Punch:step(dt)
	if self.holding then
		if (Rep.Constants.RelativeTime.Value - _G.SD[player.UserId].Data.tempData.lastAction) > 0.3 then -- 0.3 to make holding slightly slower
			_G.SD[player.UserId].Data.tempData.lastAction = Rep.Constants.RelativeTime.Value
			swing(self)
		end
	end
end

return Punch
--Dont edit anything unless if you know what you are doing.



local button = script.Parent
local pageLayout = script.Parent.Parent.Parent.Parent.Pages.UIPageLayout

local function leftClick()
	pageLayout:JumpTo(script.Parent.Parent.Parent.Parent.Pages.Shop)
	script.Parent.Parent.Bottom.BackgroundTransparency = 0
	script.Parent.Parent.Sfx:Play()
	script.Parent.Parent.Parent.Home.Bottom.BackgroundTransparency = 1
	script.Parent.Parent.Parent.Settings.Bottom.BackgroundTransparency = 1
	script.Parent.Parent.Parent.Credits.Bottom.BackgroundTransparency = 1
end

button.MouseButton1Click:Connect(leftClick)
-- find player's head pos



	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)

	local head = vCharacter:findFirstChild("Head")
	if head == nil then return end

	local dir = mouse_pos - head.Position
	dir = computeDirection(dir)

	local launch = head.Position + 5 * dir

	local delta = mouse_pos - launch
	
	local dy = delta.y
	
	local new_delta = Vector3.new(delta.x, 0, delta.z)
	delta = new_delta

	local dx = delta.magnitude
	local unit_delta = delta.unit
	
	-- acceleration due to gravity in RBX units
	local g = (-9.81 * 20)

	local theta = computeLaunchAngle( dx, dy, g)

	local vy = math.sin(theta)
	local xz = math.cos(theta)
	local vx = unit_delta.x * xz
	local vz = unit_delta.z * xz
	

	local missile = Pellet:clone()
        

	m = Tool.Handle.Mesh:clone()
	m.Parent = missile
	m.Scale = Vector3.new(5,5,5)


	missile.Position = launch
	missile.Velocity = Vector3.new(vx,vy,vz) * VELOCITY

	missile.PelletScript.Disabled = false

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vCharacter
	creator_tag.Name = "creator"
	creator_tag.Parent = missile
	
	missile.Parent = game.Workspace

end


function computeLaunchAngle(dx,dy,grav)
	-- arcane
	-- http://en.wikipedia.org/wiki/Trajectory_of_a_projectile
	
	local g = math.abs(grav)
	local inRoot = (VELOCITY*VELOCITY*VELOCITY*VELOCITY) - (g * ((g*dx*dx) + (2*dy*VELOCITY*VELOCITY)))
	if inRoot <= 0 then
		return .25 * math.pi
	end
	local root = math.sqrt(inRoot)
	local inATan1 = ((VELOCITY*VELOCITY) + root) / (g*dx)

	local inATan2 = ((VELOCITY*VELOCITY) - root) / (g*dx)
	local answer1 = math.atan(inATan1)
	local answer2 = math.atan(inATan2)
	if answer1 < answer2 then return answer1 end
	return answer2
end

function computeDirection(vec)
	local lenSquared = vec.magnitude * vec.magnitude
	local invSqrt = 1 / math.sqrt(lenSquared)
	return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt)
end




Tool.Enabled = true
function onActivated()
	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end
if loaded==true then
	loaded=false
	local targetPos = humanoid.TargetPoint

	fire(targetPos)
	wait(.2)
	Tool.Enabled = true
elseif loaded==false then
Tool.Parent.Torso["Right Shoulder"].MaxVelocity = 0.6
Tool.Parent.Torso["Right Shoulder"].DesiredAngle = -3.6
	wait(.1)
Tool.Handle.Transparency=0
wait(.1)
	loaded=true
	end
	Tool.Enabled = true
end

script.Parent.Activated:connect(onActivated)
-- Compiled with roblox-ts v2.0.4


local TS = _G[script]
local Div = TS.import(script, script, "elements", "Div").default
local Button = TS.import(script, script, "elements", "Button").default
local Text = TS.import(script, script, "elements", "Text").default
local Input = TS.import(script, script, "elements", "Input").default
return {
	Div = Div,
	Button = Button,
	Text = Text,
	Input = Input,
}
-- strictly used for ServerSceneFramework test file due to conflict when replacing Init with a magic mock


SeekPermissions.timesInitiated = 0

SeekPermissions.Init = function()
	SeekPermissions.SetSeekPermissionsEvent.Event:Connect(SeekPermissions.SetSeekingPermissions)

	SeekPermissions.Players.PlayerRemoving:Connect(function(Player)
		if SeekPermissions.PlayersWithPermission[Player] then
			SeekPermissions.PlayersWithPermission[Player] = nil
		end
	end)

	SeekPermissions.Players.PlayerAdded:Connect(function(Player)
		-- Not sure if we need this conditional here
		if SeekPermissions.Players:FindFirstChild(Player.Name) then
			SeekPermissions.CheckAndApplySeekPermissions(Player)
		end
	end)

	SeekPermissions.timesInitiated += 1
end

return SeekPermissions
--[=[
	Extends the value onto the emitted brio
	@since 3.6.0
	@param ... T
	@return (source: Observable<Brio<U>>) -> Observable<Brio<U | T>>
]=]


function RxBrioUtils.extend(...)
	local args = table.pack(...)

	return Rx.map(function(brio)
		assert(Brio.isBrio(brio), "Bad brio")

		return BrioUtils.extend(brio, table.unpack(args, 1, args.n))
	end)
end
--[=[
	Set a handler that will be called only if the Promise resolves or is cancelled. This method is similar to `finally`, except it doesn't catch rejections.

	:::caution
	`done` should be reserved specifically when you want to perform some operation after the Promise is finished (like `finally`), but you don't want to consume rejections (like in <a href="/roblox-lua-promise/lib/Examples.html#cancellable-animation-sequence">this example</a>). You should use `andThen` instead if you only care about the Resolved case.
	:::

	:::warning
	Like `finally`, if the Promise is cancelled, any Promises chained off of it with `andThen` won't run. Only Promises chained with `done` and `finally` will run in the case of cancellation.
	:::

	Returns a new promise chained from this promise.

	@param doneHandler (status: Status) -> ...any
	@return Promise<...any>
]=]


function Promise.prototype:done(finallyHandler)
	assert(
		finallyHandler == nil or type(finallyHandler) == "function",
		string.format(ERROR_NON_FUNCTION, "Promise:done")
	)
	return self:_finally(debug.traceback(nil, 2), finallyHandler, true)
end
-- Script thanks to the roblox wiki :D




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

local playerCollisionGroupName = "Players"
PhysicsService:CreateCollisionGroup(playerCollisionGroupName)
PhysicsService:CollisionGroupSetCollidable(playerCollisionGroupName, playerCollisionGroupName, false)

local previousCollisionGroups = {}

local function setCollisionGroup(object)
	if object:IsA("BasePart") then
		previousCollisionGroups[object] = object.CollisionGroupId
		PhysicsService:SetPartCollisionGroup(object, playerCollisionGroupName)
	end
end

local function setCollisionGroupRecursive(object)
	setCollisionGroup(object)

	for _, child in ipairs(object:GetChildren()) do
		setCollisionGroupRecursive(child)
	end
end

local function resetCollisionGroup(object)
	local previousCollisionGroupId = previousCollisionGroups[object]
	if not previousCollisionGroupId then return end 

	local previousCollisionGroupName = PhysicsService:GetCollisionGroupName(previousCollisionGroupId)
	if not previousCollisionGroupName then return end

	PhysicsService:SetPartCollisionGroup(object, previousCollisionGroupName)
	previousCollisionGroups[object] = nil
end

local function onCharacterAdded(character)
	setCollisionGroupRecursive(character)

	character.DescendantAdded:Connect(setCollisionGroup)
	character.DescendantRemoving:Connect(resetCollisionGroup)
end

local function onPlayerAdded(player)
	player.CharacterAdded:Connect(onCharacterAdded)
end

Players.PlayerAdded:Connect(onPlayerAdded)
--[[Run]]



	--Print Version
	local ver=require(car["A-Chassis Tune"].README)
	print("//INSPARE: AC6 Loaded - Build "..ver)
	
	--Runtime Loops
	
	-- ~60 c/s
	game["Run Service"].Stepped:connect(function()
		--Steering
		Steering()
		
		--RPM
		RPM()
		
		--Update External Values
		_IsOn = script.Parent.IsOn.Value
		_InControls = script.Parent.ControlsOpen.Value
		script.Parent.Values.Gear.Value = _CGear
		script.Parent.Values.RPM.Value = _RPM
		script.Parent.Values.Horsepower.Value = _HP
		script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM
		script.Parent.Values.TransmissionMode.Value = _TMode
		script.Parent.Values.Throttle.Value = _GThrot
		script.Parent.Values.Brake.Value = _GBrake
		script.Parent.Values.SteerC.Value = _GSteerC*(1-math.min(car.DriveSeat.Velocity.Magnitude/_Tune.SteerDecay,1-(_Tune.MinSteer/100)))
		script.Parent.Values.SteerT.Value = _GSteerT
		script.Parent.Values.PBrake.Value = _PBrake
		script.Parent.Values.TCS.Value = _TCS
		script.Parent.Values.TCSActive.Value = _TCSActive
		script.Parent.Values.ABS.Value = _ABS
		script.Parent.Values.ABSActive.Value = _ABSActive
		script.Parent.Values.MouseSteerOn.Value = _MSteer
		script.Parent.Values.Velocity.Value = car.DriveSeat.Velocity
	end)
	
	-- ~15 c/s
	while wait(.0667) do
		--Power
		Engine()
		
		--Flip
		if _Tune.AutoFlip then Flip() end
	end
-- We need to add 2 to these values as a workaround to a documented engine bug


local TextService = game:GetService("TextService")
local function getTextHeight(text, fontSize, font, widthCap)
	return TextService:GetTextSize(text, fontSize, font, Vector2.new(widthCap, 10000)).Y + 2
end

local function getTextWidth(text, fontSize, font)
	return TextService:GetTextSize(text, fontSize, font, Vector2.new(10000, 10000)).X + 2
end

local FitTextLabel = Roact.PureComponent:extend("FitTextLabel")
FitTextLabel.Width = {
	FitToText = {},
}
FitTextLabel.defaultProps = {
	Font = Enum.Font.SourceSans,
	Text = "Label",
	TextSize = 12,
	TextWrapped = true,

	maximumWidth = math.huge,
}

function FitTextLabel:init()
	self.frameRef = Roact.createRef()

	self.onResize = function()
		if not self.frameRef.current then
			return
		end

		self.frameRef.current.Size = self:__getSize(self.frameRef.current)
	end
end

function FitTextLabel:render()
	return Roact.createElement("TextLabel", self:__getFilteredProps())
end

function FitTextLabel:didMount()
	self.onResize()
end

function FitTextLabel:didUpdate()
	self.onResize()
end

function FitTextLabel:__getFilteredProps()
	-- Will return a new prop map after removing
	-- Roact.Children and any defaultProps in an effort
	-- to only return safe Roblox Instance "TextLabel"
	-- properties that may be present.
	local filteredProps = {
		width = Cryo.None,
		maximumWidth = Cryo.None,
		Size = UDim2.new(self.props.width, UDim.new(0, 0)),
		[Roact.Ref] = self.frameRef,

		[Roact.Children] = Cryo.Dictionary.join(self.props[Roact.Children] or {}, {
			sizeConstraint = self.props.maximumWidth < math.huge and Roact.createElement("UISizeConstraint", {
				MaxSize = Vector2.new(self.props.maximumWidth, math.huge),
			})
		})
	}

	return Cryo.Dictionary.join(self.props, filteredProps)
end

function FitTextLabel:__getSize(rbx)
	local maximumWidth = self.props.maximumWidth
	local width = self.props.width
	if width == FitTextLabel.Width.FitToText then
		local textWidth = getTextWidth(self.props.Text, self.props.TextSize, self.props.Font)
		width = UDim.new(0, math.min(textWidth, maximumWidth))
	end

	local widthCap = math.max(maximumWidth < math.huge and maximumWidth or 0, rbx.AbsoluteSize.X)
	local textHeight = getTextHeight(
		self.props.Text,
		self.props.TextSize,
		self.props.Font,
		widthCap
	)

	return UDim2.new(width, UDim.new(0, textHeight))
end

return FitTextLabel
-- animação para o TextLabel


local function animateTextLabel()
	local tweenInfo = TweenInfo.new(0.5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out)
	local startingText = textLabel.Text
	local currentValue = tonumber(numValue.Value)
	local targetValue = currentValue
	local decimal = string.match(tostring(currentValue), "%.(%d+)")
	if decimal then
		targetValue = math.floor(currentValue)
	end
	for i = 1, 10^(#tostring(targetValue)-1) do
		local newValue = currentValue - (currentValue % i)
		if newValue == targetValue then
			textLabel.Text = commaSeparateNumber(tostring(newValue)) .. (decimal and "." .. decimal or "")
			break
		else
			textLabel.Text = commaSeparateNumber(tostring(newValue)) .. (decimal and "." .. decimal or "")
			wait(0.05)
		end
	end
	wait(0.5)
	textLabel.Text = startingText
end

updateTextLabel() -- atualiza o TextLabel ao iniciar o jogo
--[[
	   ___  _____
	  / _ |/ ___/	Avxnturador | Novena
	 / __ / /__			 LuaInt | Novena
	/_/ |_\___/   Build 6C, Version 1.4, Update 4
	
	Please install this chassis from scratch.
	More info can be found in the README.
	
	New values will have (Username) appended to the end of the description.
]]



local Tune = {}
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]




local autoscaling	= false					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "KP/H"				,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 370				,
		spInc			= 40				, -- Increment between labelled notches
	},
	
	{
		units			= "KP/H"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 370				,
		spInc			= 40				, -- Increment between labelled notches
	},
	
	{
		units			= "KP/H"				,
		scaling			= (10/12) * 1.09728 , -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 370				,
		spInc			= 40				, -- Increment between labelled notches
	}
}
--[[Misc]]


	Tune.LoadDelay		= 1.0		-- Delay before initializing chassis (in seconds)
	Tune.AutoStart		= true		-- Set to false if using manual ignition plugin
	Tune.AutoFlip		= true		-- Set to false if using manual flip plugin
	Tune.AutoUpdate		= true		-- Automatically applies minor updates to the chassis if any are found.
									-- Will NOT apply major updates, but will notify you of any.
									-- Set to false to mute notifications, or if using modified Drive.
--print(GBCF(n.CFrame,v[1].p))


pcall(function() n.CFrame = GBCF(n.CFrame,v[1]:inverse().p)*(v[1]:inverse()-v[1]:inverse().p) end)
end
end
wait()
end
end
Finished = Finished+1
end)
end
repeat wait() until Finished >= AF
Close = false
Opened = false
------//High Ready Animations


self.RightHighReady = CFrame.new(-1, .45, -1.15) * CFrame.Angles(math.rad(-90), math.rad(0), math.rad(0));
self.LeftHighReady = CFrame.new(.75,.45,-1.15) * CFrame.Angles(math.rad(-90),math.rad(45),math.rad(0));

self.RightElbowHighReady = CFrame.new(0,-0.45,-0.45)  * CFrame.Angles(math.rad(-75), math.rad(0), math.rad(0));
self.LeftElbowHighReady = CFrame.new(0,-.4,-.4)  * CFrame.Angles(math.rad(-60), math.rad(30), math.rad(0));

self.RightWristHighReady = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
self.LeftWristHighReady = CFrame.new(0,0,0)  * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0));
--- Add a task to clean up
-- @usage
-- Maid[key] = (function)         Adds a task to perform
-- Maid[key] = (event connection) Manages an event connection
-- Maid[key] = (Maid)             Maids can act as an event connection, allowing a Maid to have other maids to clean up.
-- Maid[key] = (Object)           Maids can cleanup objects with a `Destroy` method
-- Maid[key] = nil                Removes a named task. If the task is an event, it is disconnected. If it is an object,
--                                it is destroyed.


function Maid:__newindex(index, newTask)
	if (Maid[index] ~= nil) then
		error(("'%s' is reserved"):format(tostring(index)), 2)
	end

	local tasks = self._tasks
	local oldTask = tasks[index]
	tasks[index] = newTask

	if (oldTask) then
		if (type(oldTask) == "function") then
			oldTask()
		elseif (typeof(oldTask) == "RBXScriptConnection") then
			oldTask:Disconnect()
		elseif (oldTask.Destroy) then
			oldTask:Destroy()
		elseif (Promise.Is(oldTask)) then
			oldTask:Cancel()
		end
	end
end
--// Recoil Settings	


	gunrecoil = -0.75; -- How much the gun recoils backwards when not aiming
	camrecoil = 0.26; -- How much the camera flicks when not aiming
	AimGunRecoil = -0.75; -- How much the gun recoils backwards when aiming
	AimCamRecoil = 0.23; -- How much the camera flicks when aiming
	
	CamShake = 8; -- THIS IS NEW!!!! CONTROLS CAMERA SHAKE WHEN FIRING
	AimCamShake = 6; -- THIS IS ALSO NEW!!!!
	
	Kickback = 10.2; -- Upward gun rotation when not aiming
	AimKickback = 9.11; -- Upward gun rotation when aiming
--		print(animName .. " " .. idx .. " [" .. origRoll .. "]")


		local anim = animTable[animName][idx].anim

		-- load it to the humanoid; get AnimationTrack
		currentAnimTrack = humanoid:LoadAnimation(anim)
		 
		-- play the animation
		if animName == "walk" then
			currentAnimTrack:Play(nil,nil,2)
		else
			currentAnimTrack:Play(transitionTime)
		end
		currentAnim = animName

		-- set up keyframe name triggers
		if (currentAnimKeyframeHandler ~= nil) then
			currentAnimKeyframeHandler:disconnect()
		end
		currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
	end
end