Roblox/luau_corpus huggingface dataset:
----------------------------------------------------------------------
--------------------[ IGNORE MODEL HANDLING ]-------------------------
----------------------------------------------------------------------

wait(math.random(0, 20) / 40) --This is to prevent more than one ignoreModel from being created

if _G.ignoreCode then --If the ignoreCode already exists, then the script creates the ignoreModel
	--[[
		The purpose of this is so that every gun in a game that uses this gun kit will share one ignoreModel. That way,
		bullet trails, bullet holes, and other fake arms will be ignored by the gun which makes the bullets more likely to
		hit a character part
	--]]
	if (not game.Workspace:FindFirstChild("ignoreModel_".._G.ignoreCode)) then
		local ignoreModel = Instance.new("Model")
		ignoreModel.Name = "ignoreModel_".._G.ignoreCode
		ignoreModel.Parent = game.Workspace
		
		local grenadeFolder = Instance.new("Model")
		grenadeFolder.Name = "grenadeFolder"
		grenadeFolder.Parent = ignoreModel
	
		spawn(function()
			while true do
				ignoreModel.Parent = game.Workspace
				grenadeFolder.Parent = ignoreModel
				wait(1 / 20)
			end
		end)
	end
	
	script.Parent:WaitForChild("clientMain"):WaitForChild("ignoreCode").Value = _G.ignoreCode
else
	--[[
		If there isn't already an ignoreCode, then this creates one. The purpose of it being random is so that if there is
		an ignoreModel for something else in the game, the script won't end up placing the ignored objects in that ignoreModel
	--]]
	_G.ignoreCode = math.random(1, 1e4)
	
	if (not game.Workspace:FindFirstChild("ignoreModel_".._G.ignoreCode)) then
		local ignoreModel = Instance.new("Model")
		ignoreModel.Name = "ignoreModel_".._G.ignoreCode
		ignoreModel.Parent = game.Workspace
		
		local grenadeFolder = Instance.new("Model")
		grenadeFolder.Name = "grenadeFolder"
		grenadeFolder.Parent = ignoreModel
	
		spawn(function()
			while true do
				ignoreModel.Parent = game.Workspace
				grenadeFolder.Parent = ignoreModel
				wait(1 / 20)
			end
		end)
	end
	
	script.Parent:WaitForChild("clientMain"):WaitForChild("ignoreCode").Value = _G.ignoreCode
end

spawn(function()
	--[[
		This function deletes any Player Folders that were left in the ignoreModel because the player left the game without
		deselecting the Gun first
	--]]
	repeat wait() until _G.ignoreCode
	local ignoreModel = game.Workspace:WaitForChild("ignoreModel_".._G.ignoreCode)
	while true do
		for _, gunIgnore in pairs(ignoreModel:GetChildren()) do
			if gunIgnore.Name ~= "grenadeFolder" then
				if (not game.Players:FindFirstChild(gunIgnore.Name:sub(11))) then
					gunIgnore:Destroy()
				end
			end
		end
		wait(1 / 20)
	end
end)
-- Torso
		character:FindFirstChild("Humanoid").CameraOffset = Vector3.new(0,0,-1)
	end
end)
--// Presets
Storage.Presets:FireServer(seat.Parent.Parent.Settings, seat)
-- Function called when a player character joins the game
local function onCharacterAdded(character)
	-- Put all of the current parts of the model into the player collision group
	setCollisionGroupRecursive(character, playerGroup)
	
	-- Put any part that gets added to the character later into the collision group
	character.DescendantAdded:Connect(function(descendant)
		if descendant:IsA("BasePart") then
			PhysicsService:SetPartCollisionGroup(descendant, playerGroup)
		end
	end)
end
--[=[
	@return ClientComm
	Constructs a ClientComm object.

	If `usePromise` is set to `true`, then `GetFunction` will generate a function that returns a Promise
	that resolves with the server response. If set to `false`, the function will act like a normal
	call to a RemoteFunction and yield until the function responds.

	```lua
	local clientComm = ClientComm.new(game:GetService("ReplicatedStorage"), true)

	-- If using a unique namespace with ServerComm, include it as second argument:
	local clientComm = ClientComm.new(game:GetService("ReplicatedStorage"), true, "MyNamespace")
	```
]=]
function ClientComm.new(parent: Instance, usePromise: boolean, namespace: string?)
	assert(not Util.IsServer, "ClientComm must be constructed from the client")
	assert(typeof(parent) == "Instance", "Parent must be of type Instance")
	local ns = Util.DefaultCommFolderName
	if namespace then
		ns = namespace
	end
	local folder: Instance? = parent:WaitForChild(ns, Util.WaitForChildTimeout)
	assert(folder ~= nil, "Could not find namespace for ClientComm in parent: " .. ns)
	local self = setmetatable({}, ClientComm)
	self._instancesFolder = folder
	self._usePromise = usePromise
	return self
end
-- Requires - Module Functions
ServerSceneFramework.LoadCharacterRemoteEventModule = require(script.LoadCharacterRemoteEventModule)
ServerSceneFramework.LoadSceneModule = require(script.LoadSceneModule)
ServerSceneFramework.FinishedLoadingClientModule = require(script.FinishedLoadingClientModule)
ServerSceneFramework.LoadSceneFromListEventModule = require(script.LoadSceneFromListEventModule)
ServerSceneFramework.GetCurrentSceneEnvironmentModule = require(script.GetCurrentSceneEnvironmentModule)
ServerSceneFramework.IsLoadingSceneModule = require(script.IsLoadingSceneModule)
ServerSceneFramework.LoadSceneServerModule = require(script.LoadSceneServerModule)
ServerSceneFramework.OnPlayerAddedModule = require(script.OnPlayerAddedModule)
ServerSceneFramework.CheckFolderForLoadedScenesModule = require(script.CheckFolderForLoadedScenesModule)
ServerSceneFramework.FindClientFolderModule = require(script.FindClientFolderModule)
ServerSceneFramework.FindServerFolderModule = require(script.FindServerFolderModule)
ServerSceneFramework.InitModule = require(script.InitModule)

local Orchestra = script.Parent
--[[
	Fired when Spectating is entered, throwing out a player state update, as well as transitioning the player state
]]
function Transitions.onEnterSpectating(stateMachine, event, from, to, playerComponent)
	Logger.trace(playerComponent.player.Name, " state change: ", from, " -> ", to)
	playerComponent:updateStatus("currentState", to)
	PlayerSpectating.enter(stateMachine, playerComponent)
end
-- Basic Settings

AdminCredit=false;				-- Enables the credit GUI for that appears in the bottom right
AutoClean=false;				-- Enables automatic cleaning of hats & tools in the Workspace
AutoCleanDelay=60;				-- The delay between each AutoClean routine
CommandBar=true;				-- Enables the Command Bar | GLOBAL KEYBIND: \
FunCommands=true;				-- Enables fun yet unnecessary commands
FreeAdmin=false;				-- Set to 1-5 to grant admin powers to all, otherwise set to false
PublicLogs=false;				-- Allows all users to see the command & chat logs
Prefix=':';						-- Character to begin a command
								--[[
	Admin Powers
	
0			Player
1			VIP					Can use nonabusive commands only on self
2			Moderator			Can kick, mute, & use most commands
3			Administrator		Can ban, crash, & set Moderators/VIP
4			SuperAdmin			Can grant permanent powers, & shutdown the game
5			Owner				Can set SuperAdmins, & use all the commands
6			Game Creator		Can set owners & use all the commands

	Group & VIP Admin
	
		You can set multiple Groups & Ranks to grant users admin powers:
		
GroupAdmin={
[12345]={[254]=4,[253]=3};
[GROUPID]={[RANK]=ADMINPOWER}
};

		You can set multiple Assets to grant users admin powers:
		
VIPAdmin={
[12345]=3;
[54321]=4;
[ITEMID]=ADMINPOWER;
};								]]

GroupAdmin={

};

VIPAdmin={

};
--[[
	Fired when state is left
]]
function Transitions.onLeaveWarmup(stateMachine, event, from, to, playerComponent)
	PlayerWarmup.leave(stateMachine, playerComponent)
end
--[[
Adorns a 3D model to a frame.
Returns a Model3D object.
--]]
function Module3DRotating:Attach3D(Frame,Model)
	--Create the base 3D item.
	local Model3D = Module3D:Attach3D(Frame,Model)
	local BaseEnd = Model3D.End
	local Ended = false
	
	--Set the default field of view and depth multiplier.
	Model3D.Camera.FieldOfView = 10
	Model3D:SetDepthMultiplier(1.2)
	
	--Set the ZIndex.
	Model3D.AdornFrame.ZIndex = Frame.ZIndex
	local ZIndexEvent = Frame:GetPropertyChangedSignal("ZIndex"):Connect(function()
		Model3D.AdornFrame.ZIndex = Frame.ZIndex
	end)
	
	--Set up the rotation.
	local UpwardRotation = CFrame.Angles(-ROTATION_UP,0,0)
	spawn(function()
		while not Ended do
			Model3D:SetCFrame(CFrame.Angles(0,(tick() * ROTATION_SPEED_MULTIPLIER) % (math.pi * 2),0) * UpwardRotation)
			RunService.Stepped:Wait()
		end
	end)
	Model3D:SetCFrame(CFrame.Angles(0,(tick() * ROTATION_SPEED_MULTIPLIER) % (math.pi * 2),0) * UpwardRotation)
	
	--[[
	Destroys the frame and unparents the model.
	--]]
	function Model3D:End()
		if not Ended then
			Ended = true
			ZIndexEvent:Disconnect()
			
			BaseEnd(self)
		end
	end
	
	--Return the 3D item.
	return Model3D
end

return Module3DRotating
--[[Drivetrain]]	
	Tune.Config			= "RWD"		--"FWD" , "RWD" , "AWD"
	
	--Differential Settings	
	Tune.FDiffSlipThres	= 50		-- 1 - 100%				(Max threshold of applying full lock determined by deviation from avg speed)
	Tune.FDiffLockThres	= 0			-- 0 - 100%				(0 - Bias toward slower wheel, 100 - Bias toward faster wheel)
	Tune.RDiffSlipThres	= 100		-- 1 - 100%
	Tune.RDiffLockThres	= 0			-- 0 - 100%
	Tune.CDiffSlipThres	= 1			-- 1 - 100%				[AWD Only]
	Tune.CDiffLockThres	= 0			-- 0 - 100%				[AWD Only]
	
	--Traction Control Settings
	Tune.TCSEnabled		= false		-- 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)
-- Don't mess with anything in the script. The constants and variables are all mixed together

local Type = 1		-- Manipulated by GUI	(0 = 12 hr, 1 = 24 hr)
local Sec = true	-- Manipulated by GUI

local year = 1970
local month = 1
local day = 1
local Date = "January 1, 1970"

local hour = 0
local min = 0
local sec = 0
local tag = "AM"
local Time = "12:00 AM"

function getDate()
	local months = {
-- Make variables for player, character, and camera
local player = game.Players.LocalPlayer
while not player.Character do wait() end
local character = player.Character
local camera = game.Workspace.CurrentCamera
--FUNCTIONS

local function getJointBetween(part0, part1)
	for _, obj in pairs(part1:GetChildren()) do
		if obj:IsA("Motor6D") and obj.Part0 == part0 then
			return obj
		end
	end
	for _, obj in pairs(part0:GetChildren()) do
		if obj:IsA("Motor6D") and obj.Part1 == part1 then
			return obj
		end
	end
end

function UpdatePositions()
	
	local targetKF = keyframeList[KFNumber]
	
	local function RecursivelyUpdatePositions(parentPose, poseObject)
		if parentPose then
			local FoundParent = rig:FindFirstChild(parentPose.Name, true)
			local FoundPoseObject = rig:FindFirstChild(poseObject.Name, true)
			if FoundParent and FoundPoseObject then
				local joint = getJointBetween(FoundParent, FoundPoseObject)
				if joint then
					
					--A keyframe Joint was found, proceed with schedulation
					lastPositions[joint] = joint.Transform
					desiredPositions[joint] = poseObject.CFrame
					--
					
				end
			end
		end
		
		for _, subPose in pairs(poseObject:GetSubPoses()) do
			RecursivelyUpdatePositions(poseObject, subPose)
		end
		
	end
	
	timeNeeded = targetKF.Time
	
	for _, poseObj in pairs(targetKF:GetPoses()) do
		RecursivelyUpdatePositions(nil, poseObj)
	end
	
end

function ResetJoints()
	for i, v in pairs(basePositions) do
		i.Transform = CFrame.new()
	end
end
--[[
	Utility function to log a Fusion-specific error.
]]

local Package = script.Parent.Parent
local Types = require(Package.Types)
local messages = require(Package.Logging.messages)

local function logError(messageID: string, errObj: Types.Error?, ...)
	local formatString: string

	if messages[messageID] ~= nil then
		formatString = messages[messageID]
	else
		messageID = "unknownMessage"
		formatString = messages[messageID]
	end

	local errorString
	if errObj == nil then
		errorString = string.format("[Fusion] " .. formatString .. "\n(ID: " .. messageID .. ")", ...)
	else
		formatString = formatString:gsub("ERROR_MESSAGE", errObj.message)
		errorString = string.format("[Fusion] " .. formatString .. "\n(ID: " .. messageID .. ")\n---- Stack trace ----\n" .. errObj.trace, ...)
	end

	error(errorString:gsub("\n", "\n    "), 0)
end

return logError
--//Setup//--
local Holder = script.Parent

local DamageEvent = game.ReplicatedStorage:WaitForChild("DamageEvent")

local Display = Holder.DisplayBar
local Status = Holder.Status

local Settings = {
	
}
--// Holstering
	HolsteringEnabled = false;
	HolsterPos = CFrame.new(0.340751064, 0.1, 0.616261482, -4.10752676e-08, -0.342020065, 0.939692616, -1.49501727e-08, 0.939692557, 0.342020094, -0.99999994, 0, -4.37113847e-08);
--- Returns Maid[key] if not part of Maid metatable
-- @return Maid[key] value
function Maid:__index(index)
	if (Maid[index]) then
		return Maid[index]
	else
		return self._tasks[index]
	end
end
---[[ Font Settings ]]
module.DefaultFont = Enum.Font.Cartoon
module.ChatBarFont = Enum.Font.Cartoon
-- Remote Events
	--Client -> Server
	local RE_replicateProjectile = remoteEvents.Client.ReplicateProjectile
	local RE_tempSaveProfile = remoteEvents.Client.ForceSaveTemp

	--Server -> Client
--[[
	Returns a snapshot of this component given the current props and state. Must
	be overridden by consumers of Roact and should be a pure function with
	regards to props and state.

	TODO (#199): Accept props and state as arguments.
]]
function Component:render()
	local internalData = self[InternalData]

	local message = componentMissingRenderMessage:format(tostring(internalData.componentClass))

	error(message, 0)
end
--bullet data
local settingsfolder = tool:WaitForChild("settings")
local bchambered = settingsfolder:WaitForChild("bchambered")
local binmag = settingsfolder:WaitForChild("inmag")
local gunspeed = settingsfolder:WaitForChild("speed")
local magleft = settingsfolder:WaitForChild("magleft")
local bspeed = settingsfolder:WaitForChild("bspeed")
local maxpen = settingsfolder:WaitForChild("maxwpenetration")
local maxmagcap = settingsfolder:WaitForChild("maxmagcapacity")
local bulletholetime = 10
local shellflytime = 0.5
local shellfallspeed = 80
----------------------------------------------------------------------
--------------------[ TRAIL HANDLING ]--------------------------------
----------------------------------------------------------------------

local createTrail = script:WaitForChild("createTrail")
createTrail.OnServerEvent:connect(function(_, Origin, P, gunIgnore, S)
	local Trail = Instance.new("Part")
	Trail.BrickColor = S.trailSettings.Color
	Trail.Transparency = S.trailSettings.Transparency
	Trail.Anchored = true
	Trail.CanCollide = false
	Trail.Size = V3(1, 1, 1)
	local Mesh = Instance.new("CylinderMesh")
	Mesh.Offset = V3(0, -(P - Origin).magnitude / 2, 0)
	Mesh.Scale = V3(S.trailSettings.Thickness, (P - Origin).magnitude, S.trailSettings.Thickness)
	Mesh.Parent = Trail
	Trail.Parent = gunIgnore
	Trail.CFrame = CF(Origin, P) * CFANG(RAD(90), 0, 0)
	delay(S.trailSettings.visibleTime, function()
		if S.trailSettings.disappearTime > 0 then
			local t0 = tick()
			while true do
				local Alpha = math.min((tick() - t0) / S.trailSettings.disappearTime, 1)
				Trail.Transparency = numLerp(S.trailSettings.Transparency, 1, Alpha)
				if Alpha == 1 then break end
				wait()
			end
			Trail:Destroy()
		else
			Trail:Destroy()
		end
	end)
end)
--[[Shutdown]]

	car.DriveSeat.ChildRemoved:connect(function(child) if child.Name=="SeatWeld" and child:IsA("Weld") then script.Parent:Destroy() end end)
--vars
local weldbholestoanchoredparts = false --when you repeatedly weld new stuff to lets say a base it will start bouncing people up
local headrotationx = 0
local adsing = false
local sprinte = false
local savedws
local headoffset = Instance.new("Weld", handle)
headoffset.Name = "headoffsetholder"
headoffset.C0 = CFrame.new()
local movehead = true
local rayignore = {}
--[[[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		     	,
	}
--[[Susupension]]
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .42		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .42		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .42		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 4			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- 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	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 9000		-- Spring Force
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .42		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .42		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .42		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 4			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- 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		= "Really black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
--[[Transmission]]
	Tune.TransModes		= {"Auto", "Semi"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 4.06			-- 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.40		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.00		,
		--[[ 3 ]]		1.31		,
		--[[ 4 ]]		1.00		,
		--[[ 5 ]]		0.78		,
		--[[ 6 ]]		0.56		,
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- setup emote chat hook
game.Players.LocalPlayer.Chatted:connect(function(msg)
	local emote = ""
	if msg == "/e dance" then
		emote = dances[math.random(1, #dances)]
	elseif (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end
	
	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, 0.1, Humanoid)
	end

end)
--------------------------------------------------------------------------------

while true do
	while Humanoid.Health < Humanoid.MaxHealth do
		local dt = wait(REGEN_STEP)
		local dh = dt*REGEN_RATE*Humanoid.MaxHealth
		
		if Humanoid.Health > 0 then --Forked from production to make sure the humanoid is alive.
			Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
		end
	end
	Humanoid.HealthChanged:Wait()
end