Roblox/luau_corpus huggingface dataset:
--[[
p1.Parent = nil
p2.Parent = nil
p3.Parent = nil 
p4.Parent = nil
]] 
	if not enabled then
		return
	end
	enabled = false
	mouse.Icon = "rbxasset://textures\\GunWaitCursor.png"

	wait(4.4)
	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	enabled = true

end

function onEquippedLocal(mouse)
	


	if mouse == nil then
		print("Mouse not found")
		return 
	end

	mouse.Icon = "rbxasset://textures\\GunCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
	--mouse.Button1Up:connect(function() unButton1Down(mouse) end)
end
-------------------Weapons-------------------
if(key == "z") then
show_ammo = true
end  

if(key == keys.minigun) and on then 
		minigun_shoot = true
		while minigun_shoot do
		if(minigun.left ~= 0) then
		getBullet("GunA") 
		minigun.left = minigun.left -1
		end 
		if(minigun.right ~= 0) then
		getBullet("GunB")
		minigun.right = minigun.right -1
		end 
		wait(shoot_rate)
		end
end 
	
if(key == "f") and  on then
		if(missile_side == 1) then
				if(hydra.right ~= 0) then 
					Getmissile("LaunchB")
					missile_side = 2
				end
		elseif(missile_side == 2) then
				if(hydra.left ~= 0) then 
					Getmissile("LaunchA")
					missile_side = 1
				end
		end
end
-----------------------------------------------------------------------
script.Parent.Parent.Parent.Parent.Character.Parent = game.Workspace
script.Parent.BackgroundColor3 = Color3.new(0.333, 0.333, 0.333)
script.Parent.LocalScript.Disabled = false
script.Parent.Parent.Parent.Parent.Character.Humanoid.HipHeight = 1
wait(0.1)
script.Parent.Parent.Parent.Parent.Character.Humanoid.HipHeight = 0
-----------------
--| Constants |--
-----------------

local BLAST_RADIUS = 7
local BLAST_PRESSURE = 1000000

local IGNORE_LIST = {rocket = 1, handle = 1, effect = 1, water = 1} -- Rocket will fly through things named these
----[[ Color Settings ]]
module.BackGroundColor = Color3.new(0, 0, 0)
module.DefaultMessageColor = Color3.new(1, 1, 1)
module.DefaultNameColor = Color3.new(1, 1, 1)
module.ChatBarBackGroundColor = Color3.new(0, 0, 0)
module.ChatBarBoxColor = Color3.new(85, 0, 127)
module.ChatBarTextColor = Color3.new(255,255,255)
module.ChannelsTabUnselectedColor = Color3.new(20, 0, 0)
module.ChannelsTabSelectedColor = Color3.new(30/255, 30/255, 30/255)
module.DefaultChannelNameColor = Color3.fromRGB(35, 76, 142)
module.WhisperChannelNameColor = Color3.fromRGB(102, 14, 102)
module.ErrorMessageTextColor = Color3.fromRGB(245, 50, 50)
-- defines subject and height of VR camera
function VRBaseCamera:GetVRFocus(subjectPosition, timeDelta)
	local lastFocus = self.lastCameraFocus or subjectPosition

	self.cameraTranslationConstraints = Vector3.new(
		self.cameraTranslationConstraints.x,
		math.min(1, self.cameraTranslationConstraints.y + timeDelta),
		self.cameraTranslationConstraints.z)

	local cameraHeightDelta = Vector3.new(0, self:GetCameraHeight(), 0)
	local newFocus = CFrame.new(Vector3.new(subjectPosition.x, lastFocus.y, subjectPosition.z):
			lerp(subjectPosition + cameraHeightDelta, self.cameraTranslationConstraints.y))

	return newFocus
end
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
-- STATE CHANGE HANDLERS

function onRunning(speed)
	if speed > 0.75 then
		local scale = 16
		local speedToPlay = calculateRunSpeed(speed / scale)
		playAnimation("walk", 0.2, Humanoid, speedToPlay)
		pose = "Running"
	else
		if not currentlyPlayingEmote then
			playAnimation("idle", 0.2, Humanoid)
			pose = "Standing"
		end
	end
end

function onDied()
	pose = "Dead"
end

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

function onClimbing(speed)
	local scale = 5.0
	playAnimation("climb", 0.1, Humanoid, speed / scale)
--- Update instance state and track changes.
function ScopeHierarchyItemButton:didMount()
    self:UpdateInstanceState()
    self:StartTrackingInstance()

    -- Set up content size listener
    if self.LayoutRef.current then
        local Layout = self.LayoutRef.current
        local LayoutChanged = Layout:GetPropertyChangedSignal('AbsoluteContentSize')
        self.UpdateContainerSize(UDim2.new(0, Layout.AbsoluteContentSize.X, 0, 38/2))
        self.Maid.LayoutListener = LayoutChanged:Connect(function ()
            self.UpdateContainerSize(UDim2.new(0, Layout.AbsoluteContentSize.X, 0, 38/2))
        end)
    end
end
-- p = period
-- a = amplitud
local function inOutElastic(t, b, c, d, a, p)
  local s = 0;
  if t == 0 then return b end

  t = t / d * 2

  if t == 2 then return b + c end

  if not p then p = d * (0.3 * 1.5) end
  if not a then a = 0 end

  if not a or a < abs(c) then
    a = c
    s = p / 4
  else
    s = p / (2 * pi) * asin(c / a)
  end

  if t < 1 then
    t = t - 1
    return -0.5 * (a * pow(2, 10 * t) * sin((t * d - s) * (2 * pi) / p)) + b
  else
    t = t - 1
    return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p ) * 0.5 + c + b
  end
end
--[[
	Package link auto-generated by Rotriever
]]
local PackageIndex = script.Parent._Index

local Package = require(PackageIndex["InputType"]["InputType"])

return Package
-- Encuentra el sonido llamado "hyperx" en el servicio de sonido
local sound = soundService:FindFirstChild("square")
--new e
newe = script.E:clone()
newe.Text = child.Value
newe.Parent = hear
wait(0.1)
newe.Remover.Disabled = false
end
wait() 
child:Destroy()
end

end)



while true do
	Game:GetService("RunService").RenderStepped:wait() 
	blind.CFrame = camera.CoordinateFrame - camera.CoordinateFrame.lookVector
	center.CFrame =camera.CoordinateFrame + camera.CoordinateFrame.lookVector
	center.Mesh.Scale = blind.Mesh.Scale * Vector3.new(0.015,0.015,0.01)
	c = c + 1
	if c >= 2 then
		c = 0 
		if blind.Mesh.Scale.x < -5 then
	blind.Mesh.Scale = blind.Mesh.Scale + Vector3.new(0.5,0.5,0.5)	
		end 
	end
end
--A function to find all parts in an assembly. We'll need this later.
function getAssemblyParts(pt,checked)
	if (checked[pt]) then return end
	checked[pt] = pt
	
	local attached = pt:GetConnectedParts()
	for _,p in pairs(attached) do
		getAssemblyParts(p,checked)
	end
end
--[=[
	@param name string
	@param inboundMiddleware ClientMiddleware?
	@param outboundMiddleware ClientMiddleware?
	@return (...: any) -> any

	Generates a function on the matching RemoteFunction generated with ServerComm. The function
	can then be called to invoke the server. If this `ClientComm` object was created with
	the `usePromise` parameter set to `true`, then this generated function will return
	a Promise when called.

	```lua
	-- Server-side:
	local serverComm = ServerComm.new(someParent)
	serverComm:BindFunction("MyFunction", function(player, msg)
		return msg:upper()
	end)

	-- Client-side:
	local clientComm = ClientComm.new(someParent)
	local myFunc = clientComm:GetFunction("MyFunction")
	local uppercase = myFunc("hello world")
	print(uppercase) --> HELLO WORLD

	-- Client-side, using promises:
	local clientComm = ClientComm.new(someParent, true)
	local myFunc = clientComm:GetFunction("MyFunction")
	myFunc("hi there"):andThen(function(msg)
		print(msg) --> HI THERE
	end):catch(function(err)
		print("Error:", err)
	end)
	```
]=]
function ClientComm:GetFunction(
	name: string,
	inboundMiddleware: Types.ClientMiddleware?,
	outboundMiddleware: Types.ClientMiddleware?
)
	return Comm.GetFunction(self._instancesFolder, name, self._usePromise, inboundMiddleware, outboundMiddleware)
end
------------------------------------------------------------------------
-- single-character replacement, for locale-aware decimal points
------------------------------------------------------------------------
function luaX:buffreplace(ls, from, to)
  local result, buff = "", ls.buff
  for p = 1, #buff do
    local c = string.sub(buff, p, p)
    if c == from then c = to end
    result = result..c
  end
  ls.buff = result
end
-- Returns the ancestor that contains a Humanoid, if it exists
local function FindCharacterAncestor(subject)
	if subject and subject ~= workspace then
		local humanoid = subject:FindFirstChildOfClass('Humanoid')
		if humanoid then
			return subject, humanoid
		else
			return FindCharacterAncestor(subject.Parent)
		end
	end
	return nil
end

local function IsInTable(Table,Value)
	for _,v in pairs(Table) do
		if v == Value then
			return true
		end
	end
	return false
end
-- Services --

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
--[=[
	Returns a boolean determining if the object is a ScriptSignal.

	```lua
	local janitor = Janitor.new()
	local signal = ScriptSignal.new()

	ScriptSignal.Is(signal) -> true
	ScriptSignal.Is(janitor) -> false
	```

	@param object any
	@return boolean
	@ignore
]=]
function ScriptSignal.Is(object): boolean
    return typeof(object) == "table" and getmetatable(object) == ScriptSignal
end
--handle2=sp:WaitForChild("Handle2")
handles = {handle}
handlestofire = 1
anim = sp.Parent.Humanoid:LoadAnimation(sp.idle)
anim2 = sp.Parent.Humanoid:LoadAnimation(sp.FireAni)
anim3 = sp.Parent.Humanoid:LoadAnimation(sp.Reload)
--Color is the only one that we need to check all the time
colorPart.BrickColor = config.Color.Value
glowPart.BrickColor = config.Color.Value
config.Color.Changed:connect(function() 
	colorPart.BrickColor = config.Color.Value 
	glowPart.BrickColor = config.Color.Value
end)
--[[
	tweenJoint Function Parameters:
	
	Object Joint - This has to be a weld with a C0 and C1 property
	
	CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0
	
	CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1
	
	function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
		For example, function(X) return math.sin(math.rad(X)) end
		
	float Duration - This is how long the tweening takes to complete
--]]

function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
	spawn(function()
		local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
		local tweenIndicator = nil
		if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
			tweenIndicator = Instance.new("IntValue")
			tweenIndicator.Name = "tweenCode"
			tweenIndicator.Value = newCode
			tweenIndicator.Parent = Joint
		else
			tweenIndicator = Joint.tweenCode
			tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
		end
		if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
			if newC0 then Joint.C0 = newC0 end
			if newC1 then Joint.C1 = newC1 end
		else
			local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop
			local startC0 = Joint.C0
			local startC1 = Joint.C1
			local X = 0
			while true do
				RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
				local newX = X + Increment
				X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90
				if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
				if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
				if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
				if X == 90 then break end --If the tweening is done...
			end
		end
		if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
			tweenIndicator:Destroy()
		end
	end)
end

function CreateWeld(Part, CF)
	local w = Instance.new("Weld")
	w.Name = "LegWeld"
	w.Parent = Torso
	w.Part0 = Torso
	w.Part1 = Part
	
	tweenJoint(w, nil,  CF, function(X) return math.sin(math.rad(X)) end, 0.25)
end
--------------------------------------------------------------------------

local _WHEELTUNE = {
																		--[[	
			SS6 Presets
	[Eco]		
		WearSpeed = 1,
		TargetFriction = .7,
		MinFriction = .1,
	[Road]		
		WearSpeed = 2,
		TargetFriction = .7,
		MinFriction = .1,
	[Sport]		
		WearSpeed = 3,
		TargetFriction = .79,
		MinFriction = .1,											]]

	TireWearOn 		= true	,
	
	--Friction and Wear
	FWearSpeed		= .4	,
	FTargetFriction	= .7	,
	FMinFriction 	= .1	,
	
	RWearSpeed		= .4	,
	RTargetFriction	= .7	,
	RMinFriction	= .1	,
	
	--Tire Slip
	TCSOffRatio		= 1		,
	WheelLockRatio	= 1/2	,	--SS6 Default = 1/4
	WheelspinRatio	= 1/1.1	,	--SS6 Default = 1/1.2
	
	--Wheel Properties
	FFrictionWeight	= 1		,	--SS6 Default = 1
	RFrictionWeight	= 1		,	--SS6 Default = 1
	FLgcyFrWeight	= 10	,
	RLgcyFrWeight	= 10	,
	
	FElasticity		= .5		,	--SS6 Default = .5
	RElasticity		= .5		,	--SS6 Default = .5
	FLgcyElasticity	= 0		,
	RLgcyElasticity	= 0		,
	
	FElastWeight	= 1		,	--SS6 Default = 1
	RElastWeight	= 1		,	--SS6 Default = 1
	FLgcyElWeight	= 10	,
	RLgcyElWeight	= 10	,
	
	--Wear Regen
	RegenSpeed		= 3.6		--SS6 Default = 3.6
}
-- Connect the onInput function to the player's input events
game:GetService("UserInputService").InputBegan:Connect(onInput)
--[[ Module Functions ]]--
Chassis = {}

Chassis.root = PackagedVehicle:FindFirstChild("Chassis") --the root of the Chassis model
Chassis.driverSeat = Chassis.root:FindFirstChildOfClass("VehicleSeat")
Chassis.passengerSeats = {
	Chassis.root:FindFirstChild("SeatFR"),
	Chassis.root:FindFirstChild("SeatRL"),
	Chassis.root:FindFirstChild("SeatRR")
}

local randomSuspension = Chassis.root:FindFirstChild("SuspensionFL")
local wheelRadius = randomSuspension.Wheel.Size.y/2
Chassis.driverSeat.MaxSpeed = VehicleParameters.MaxSpeed * wheelRadius

function Chassis.InitializeDrivingValues()
	-- Constraint tables always ordered FL, FR, RL, RR
	Motors = getVehicleMotors()

	local strutSpringsFront = getSprings("StrutFront")
	local strutSpringsRear = getSprings("StrutRear")
	local torsionSprings = getSprings("TorsionBar")

	RedressMount = Chassis.root:WaitForChild("RedressMount")

	SteeringPrismatic = constraints:FindFirstChild("SteeringPrismatic")
	SteeringPrismatic.UpperLimit = VehicleParameters.MaxSteer
	SteeringPrismatic.LowerLimit = -VehicleParameters.MaxSteer

	for _,s in pairs(strutSpringsFront) do
		adjustSpring(s, ActualStrutSpringStiffnessFront, ActualStrutSpringDampingFront)
	end
	for _,s in pairs(strutSpringsRear) do
		adjustSpring(s, ActualStrutSpringStiffnessRear, ActualStrutSpringDampingRear)
	end
	for _,s in pairs(torsionSprings) do
		adjustSpring(s, ActualTorsionSpringStiffness, ActualTorsionSpringDamping)
	end

	local chassisChildren = Chassis.root:GetChildren()
	for i = 1, #chassisChildren do
		local model = chassisChildren[i]
		if model:IsA("Model") then
			local wheel = model:FindFirstChild("Wheel")
			if wheel then
				local old = wheel.CustomPhysicalProperties
				local new = PhysicalProperties.new(old.Density, VehicleParameters.WheelFriction, old.Elasticity, old.FrictionWeight, old.ElasticityWeight)
				wheel.CustomPhysicalProperties = new
			end
		end
	end

	setMotorTorque(10000)
end

function Chassis.GetDriverSeat()
	return Chassis.driverSeat
end

function Chassis.GetPassengerSeats()
	return Chassis.passengerSeats
end

function Chassis.GetBase()
	return Chassis.root.PrimaryPart or Chassis.root:FindFirstChild("FloorPanel")
end
-- connect events

Board.equipped:connect(onEquip)
Board.unequipped:connect(onUnequip)
----- SETUP -----

for i, v in pairs(script.Parent:GetChildren()) do
	if v.ClassName == "Seat" then
		table.insert(seats, v)
	end
end
-- The default format if one is not specified
local DEFAULT_FORMAT = "$minutes:$seconds.$centiseconds"
--input began
inputService.InputBegan:Connect(function (key)
	if key.KeyCode == Enum.KeyCode.LeftShift or key.KeyCode == Enum.KeyCode.LeftControl then
		running = true
		if char.Humanoid then
			char.Humanoid.WalkSpeed = 41 --Player's speed while sprinting
		end
	end
end)
-- normal maxspeed is 40
local topSpeed = 40

local OllieHack = script.Parent:FindFirstChild("OllieThrust")
if (OllieHack == nil) then
	OllieHack = Instance.new("BodyThrust")
	OllieHack.Name = "OllieThrust"
	OllieHack.force = Vector3.new(0,0,0)
	OllieHack.location = Vector3.new(0,0,-2)
	OllieHack.Parent = Board
end

local lastaction = nil
local lasttime = nil
local jumpok = true

function didAction(action)
	lastaction = action
	lasttime = time()
end



function onAxisChanged(axis)
	Board.Steer = Controller.Steer
	Board.Throttle = Controller.Throttle

	if (Board.Steer == -1) then
		print("Left")
		--CoastingAnim:Stop(1)
		KickAnim:Stop()
		OllieAnim:Stop()
		RightAnim:Stop(.5)
		LeftAnim:Play(.5)
		didAction("left")
	end

	if (Board.Steer == 1) then
		print("Right")
		KickAnim:Stop()
		--CoastingAnim:Stop(1)
		LeftAnim:Stop(.5)
		OllieAnim:Stop()
		RightAnim:Play(.5)
		didAction("right")
	end

	if (Board.Steer == 0) then
		print("Straight")

		KickAnim:Stop()
		LeftAnim:Stop(.5)
		OllieAnim:Stop()
		RightAnim:Stop(.5)
		
		if (lastaction == "go" and time() - lasttime < .1) then
			
		end
		didAction("go")
		--CoastingAnim:Play(1)

		if (Board.CruiseLoop.IsPlaying == false) then Board.CruiseLoop:Play() end
		
	end
end

function enterAirState()
	-- gyrate towards vertical position for better landing
	Gyro.maxTorque = Vector3.new(10, 0, 10)
	jumpok = false
	Board.CruiseLoop:Stop()
	Board.BoardOllie:Play()
end

function exitAirState()
	-- turn off gyro
	Gyro.maxTorque = Vector3.new(0,0,0)
	jumpok = true
	Board.BoardDrop:Play()
	Board.CruiseLoop:Stop()
end

function enterPushingState()
	KickAnim:Play()
end

function enterCoastingState()
	if (Board.CruiseLoop.IsPlaying == false) then Board.CruiseLoop:Play() end
end

function enterStoppingState()
	Board.CruiseLoop:Stop()
	breakModifyAndPlay()
end

function onMoveStateChanged(newState, oldState)
	print(oldState)
	print(newState)
	-- do state exits here
	if oldState == Enum.MoveState.AirFree then exitAirState() end

	-- do state transitions here

	-- do state entries here
	if newState == Enum.MoveState.AirFree then enterAirState() end
	if newState == Enum.MoveState.Pushing then enterPushingState() end
	if newState == Enum.MoveState.Coasting then enterCoastingState() end
	if newState == Enum.MoveState.Stopping then enterStoppingState() end
end
-- // handle npcs
for _,character in pairs(Peds:GetChildren()) do
	handleImpact(character)
end
Peds.ChildAdded:Connect(handleImpact)
Peds.ChildRemoved:Connect(handleImpact)
--[[**
	ensures Roblox DockWidgetPluginGuiInfo type

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]
t.DockWidgetPluginGuiInfo = primitive("DockWidgetPluginGuiInfo")
Rocket.CanCollide = false



Tool.Note:clone().Parent = Rocket

Tool.RocketScript:clone().Parent = Rocket

--Tool.Explosion:clone().Parent = Rocket

--Tool.Swoosh:clone().Parent = Rocket





function fire(vTarget)



	local vCharacter = Tool.Parent;

	

	local vHandle = Tool:findFirstChild("Handle")

	if vHandle == nil then

		print("Handle not found")

		return 

	end



	local chord = Tool.Ichord:clone()



	if (Tool.mode.Value==1) then

		chord = Tool.Ichord:clone()

	elseif (Tool.mode.Value==2) then

		chord = Tool.IVIIchord:clone()

	elseif (Tool.mode.Value==3) then

		chord = Tool.Vchord:clone()

	elseif (Tool.mode.Value==4) then

		chord = Tool.VVIIchord:clone()

	elseif (Tool.mode.Value==5) then

		chord = Tool.IVchord:clone()

	elseif (Tool.mode.Value==6) then

		chord = Tool.IIIchord:clone()

	end

	

	chord.Name = "chord"



	local dir = Vector3.new(math.random()-.5, 1, math.random() - .5).unit



	local missile = Rocket:clone()



	chord.Parent = missile



	local pos = vHandle.Position + Vector3.new(0, 5 ,0)

	

	--missile.Position = pos

	missile.CFrame = CFrame.new(pos,  pos + dir)

	missile.BodyVelocity.velocity = dir * 30

	local vPlayer = game.Players:playerFromCharacter(vCharacter)



	if vPlayer == nil then

		print("Player not found")

	end
	

	missile.RocketScript.Disabled = false


	missile.Parent = game.Workspace

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



	local targetPos = humanoid.TargetPoint



	fire(targetPos)



	Tool.Enabled = true

end





script.Parent.Activated:connect(onActivated)
-- Scene's workspace assets
local Environment = nil
local ServerEnvironment = nil
local FirstNeonParts = nil
local SecondNeonParts = nil

local function enableBouncyPads()
	for _, part in pairs(CollectionService:GetTagged("Bouncy")) do
		BouncePlatforms.new(part, {
			debounce = 0.2,
			bounceVector = Vector3.new(0, 1, 0),
			bounceForce = 150,
		})
	end
	BouncePlatforms:enable()
end

local function teleportPlayerToSkydive()
	local character = player.Character
	if character and character.Parent then
		local primaryPart = character.PrimaryPart
		if primaryPart then
			local rng = Random.new()
			primaryPart.CFrame = CFrame.new(rng:NextInteger(-25, 25), 400.369, rng:NextInteger(-25, 25))
		end
	end
end
--Frosty--

local function AttachParticleControl(source_part)
	
	local prtc = nil
	
	local function Start()
		prtc = script.Frostbite:clone()
		prtc.Parent = source_part
	end
	
	local function Update()
		
	end
	
	local function Stop()
		if prtc ~= nil then
			prtc:destroy()
			prtc = nil
		end
	end
	
	return {Start = Start, Update = Update, Stop = Stop}
end

return AttachParticleControl
--helpfully checks a table for a specific value
function contains(t, v)
	for _, val in pairs(t) do
		if val == v then
			return true
		end
	end
	return false
end
--SKP_7:SetStateEnabled(Enum.HumanoidStateType.Dead, false)



SKP_7.Changed:Connect(function(Health)

if SKP_7.Health < SKP_20 then

local Hurt = ((SKP_7.Health/SKP_20) - 1) * -1

local SKP_22 = script.FX.Blur:clone()
SKP_22.Parent = game.Workspace.CurrentCamera

local SKP_23 = script.FX.ColorCorrection:clone()
SKP_23.Parent = game.Workspace.CurrentCamera
		
SKP_22.Size 		= ((SKP_7.Health/SKP_20) - 1) * -50
-----------------------------------------------------------------------------------------------

script.Parent:WaitForChild("Gear")
script.Parent:WaitForChild("Speed")
script.Parent:WaitForChild("Needle")

local player=game.Players.LocalPlayer
local mouse=player:GetMouse()

local car = script.Parent.Parent.Parent.Car.Value
car.DriveSeat.HeadsUpDisplay = false

local _Tune = require(car["A-Chassis Tune"])

local _pRPM = _Tune.PeakRPM
local _lRPM = _Tune.Redline

local currentUnits = 1
local revEnd = math.ceil(_lRPM/1000)

script.Parent.Parent.Parent.Values.Gear.Changed:connect(function()
	local gearText = script.Parent.Parent.Parent.Values.Gear.Value
	if gearText == 0 then gearText = "N"
	elseif gearText == -1 then gearText = "R"
	end
	script.Parent.Gear.Text = gearText
end)

script.Parent.Parent.Parent.Values.RPM.Changed:connect(function()
	script.Parent.Needle.Rotation = 230 * math.min(1,script.Parent.Parent.Parent.Values.RPM.Value / (revEnd*1000))
end)

script.Parent.Parent.Parent.Values.Velocity.Changed:connect(function(property)
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Parent.Values.Velocity.Value.Magnitude)
end)

script.Parent.Speed.MouseButton1Click:connect(function()
	if currentUnits==#UNITS then
		currentUnits = 1
	else
		currentUnits = currentUnits+1
	end
	script.Parent.Speed.Text = math.floor(UNITS[currentUnits].scaling*script.Parent.Parent.Parent.Values.Velocity.Value.Magnitude)
	script.Parent.Unit.Text = UNITS[currentUnits].units
end)

wait(.1)
--!strict
local events = {
	started = Instance.new("BindableEvent"),
	finished = Instance.new("BindableEvent"),
}

return events
--local welcomeConsoleGlow = workspace.Level_Geo.Lobby.UI_HoloEmitter.SurfaceLight
local welcomeUIPointLight = workspace.UI.WelcomeUIFrame.PointLight