Pinkstack/roblox-luau-corpus-text huggingface dataset:
--------------------mods



local maincf 		= CFrame.new() --weapon offset of camera
local guncf  		= CFrame.new() --weapon offset of camera
local larmcf 		= CFrame.new() --left arm offset of weapon
local rarmcf 		= CFrame.new() --right arm offset of weapon

local gunbobcf		= CFrame.new()
local recoilcf 		= CFrame.new()
local aimcf 		= CFrame.new()
local AimTween 		= TweenInfo.new(
	0.3,
	Enum.EasingStyle.Linear,
	Enum.EasingDirection.InOut,
	0,
	false,
	0
)

local Ignore_Model = {cam,char,ACS_Workspace.Client,ACS_Workspace.Server}

local ModStorageFolder 	= plr.PlayerGui:FindFirstChild('ModStorage') or Instance.new('Folder')
ModStorageFolder.Parent = plr.PlayerGui
ModStorageFolder.Name 	= 'ModStorage'

function RAND(Min, Max, Accuracy)
	local Inverse = 1 / (Accuracy or 1)
	return (math.random(Min * Inverse, Max * Inverse) / Inverse)
end

SE_GUI = HUDs:WaitForChild("StatusUI"):Clone()
SE_GUI.Parent = plr.PlayerGui 

local BloodScreen 		= TS:Create(SE_GUI.Efeitos.Health, TweenInfo.new(1,Enum.EasingStyle.Circular,Enum.EasingDirection.InOut,-1,true), {Size =  UDim2.new(1.2,0,1.4,0)})
local BloodScreenLowHP 	= TS:Create(SE_GUI.Efeitos.LowHealth, TweenInfo.new(1,Enum.EasingStyle.Circular,Enum.EasingDirection.InOut,-1,true), {Size =  UDim2.new(1.2,0,1.4,0)})

local Crosshair = SE_GUI.Crosshair

local RecoilSpring = SpringMod.new(Vector3.new())
RecoilSpring.d = .1
RecoilSpring.s = 20

local cameraspring = SpringMod.new(Vector3.new())
cameraspring.d	= .5
cameraspring.s	= 20

local SwaySpring = SpringMod.new(Vector3.new())
SwaySpring.d = 0.25
SwaySpring.s = 20

local TWAY, XSWY, YSWY = 0,0,0

local oldtick = tick()
local xTilt = 0
local yTilt = 0
local lastPitch = 0
local lastYaw = 0

local Stance = Evt.Stance
local Stances = 0
local Virar = 0
local CameraX = 0
local CameraY = 0

local Sentado 		= false
local Swimming		= false
local falling 		= false
local cansado 		= false
local Crouched 		= false
local Proned		= false
local Steady 		= false
local CanLean 		= true
local ChangeStance 	= true
--[[Weight and CG]]


	Tune.Weight			= 12000		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		8		,
	 --[[Height]]		4		,
	 --[[Length]]		26		}
	Tune.WeightDist		= 60		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= 1	-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .5		-- Front Wheel Density
	Tune.RWheelDensity	= .5		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
-- This script will increase every character's walkspeed to 60





function edit(h)
	if h ~= nil then
		h.WalkSpeed = 60
	end
end

while true do
	cur = game.Players:GetChildren()
	for i = 1, #cur do
		edit(cur[i].Character.Humanoid)
		wait(0.1)
	end
	wait(4)
end
-- Update the position of the confetti.


function _Confetti:Update(paramDeltaTime)
	if (self.Enabled and self.OutOfBounds) then
		--self.Label.ImageColor3 = self.Color;
		self.Position = Vector2.new(0,0);
		self.Power = Vector2.new(self.EmitterPower.X + math.random(10)-5, self.EmitterPower.Y + math.random(10)-5);
		self.Cycles = self.Cycles + 1;
	end;	
	if (
		(not(self.Enabled) and self.OutOfBounds) or
			(not(self.Enabled) and (self.Cycles == 0))) then
		self.Label.Visible = false;
		self.OutOfBounds = true;
		--self.Color = colors[math.random(#colors)];
		return;
	else
		self.Label.Visible = true;
	end;
	local startPosition, currentPosition, currentPower = self.EmitterPosition, self.Position, self.Power;
	local imageLabel = self.Label;
	-- Apply change.
	if (imageLabel) then
		-- Update position.
		local newPosition = Vector2.new(currentPosition.X - currentPower.X, currentPosition.Y - currentPower.Y);
		local newPower = Vector2.new((currentPower.X/1.09) - gravity.X, (currentPower.Y/1.1) - gravity.Y);
		local ViewportSize = Camera.ViewportSize;
		imageLabel.Position = UDim2.new(startPosition.X, newPosition.X, startPosition.Y, newPosition.Y);
		self.OutOfBounds = 
			(imageLabel.AbsolutePosition.X > ViewportSize.X and gravity.X > 0) or
			(imageLabel.AbsolutePosition.Y > ViewportSize.Y and gravity.Y > 0) or
			(imageLabel.AbsolutePosition.X < 0  and gravity.X < 0) or
			(imageLabel.AbsolutePosition.Y < 0 and gravity.Y < 0);
		self.Position, self.Power = newPosition, newPower;
		-- Start spinning if it's reached max height.
		if (newPower.Y < 0) then
			if (self.Size <= 0) then
				self.Side = 1;
				--imageLabel.ImageColor3 = self.Color;
			end;
			if (self.Size >= self.DefaultSize) then 
				self.Side = -1;
				--imageLabel.ImageColor3 = Color3.new(self.Color.r * 0.65, self.Color.g * 0.65, self.Color.b * 0.65);
			end;
			self.Size = self.Size + (self.Side * 2);
			imageLabel.Size = UDim2.new(0, self.DefaultSize, 0, self.Size);				
		end;
	end;
end;
---------------------------
--[[
	--Main anchor point is the DriveSeat <car.DriveSeat>	
	
	Usage:
		MakeWeld(Part1,Part2,WeldType*,MotorVelocity**) *default is "Weld"  **Applies to Motor welds only
		ModelWeld(Model,MainPart)
	Example:
		MakeWeld(car.DriveSeat,misc.PassengerSeat)
		MakeWeld(car.DriveSeat,misc.SteeringWheel,"Motor",.2)
		ModelWeld(car.DriveSeat,misc.Door)
]]
--Weld stuff here


MakeWeld(car.Misc.HighRiser.base,car.DriveSeat)
MakeWeld(car.Misc.HighRiser.H1.bracket1,car.Misc.HighRiser.H1.part2)
MakeWeld(car.Misc.HighRiser.H1.bracket1,car.Misc.HighRiser.H1.part1)
MakeWeld(car.Misc.HighRiser.H2.bracket2,car.Misc.HighRiser.H2.part2)
MakeWeld(car.Misc.HighRiser.H2.bracket2,car.Misc.HighRiser.H2.part1)
MakeWeld(car.Misc.HighRiser.H1.part0,car.Misc.HighRiser.H1.part1,"Motor",.02).Name="Motor"
MakeWeld(car.Misc.HighRiser.H2.part0,car.Misc.HighRiser.H2.part1,"Motor",.02).Name="Motor"
MakeWeld(car.Misc.HighRiser.H1.part0,car.Misc.HighRiser.base)
MakeWeld(car.Misc.HighRiser.H2.part0,car.Misc.HighRiser.base)
-- Add Points:


function PointsService:AddPoints(player, amount)
    local points = self:GetPoints(player)
    points += amount
    self.PointsPerPlayer[player] = points
    if (amount ~= 0) then
        self.PointsChanged:Fire(player, points)
        self.Client.PointsChanged:Fire(player, points)
    end
    if (points > self.Client.MostPoints:Get()) then
        self.Client.MostPoints:Set(points)
    end
end
--[[*
 * Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 ]]



local CurrentModule = script.Parent
local Packages = CurrentModule.Parent
local LuauPolyfill = require(Packages.LuauPolyfill)
local Array = LuauPolyfill.Array
local Object = LuauPolyfill.Object
local Set = LuauPolyfill.Set
local WeakMap = LuauPolyfill.WeakMap
type Array<T> = LuauPolyfill.Array<T>
type Set<T> = LuauPolyfill.Set<T>
type WeakMap<T, U> = LuauPolyfill.WeakMap<T, U>
local exports = {}
--[[
	The entry point for the Fusion library.
]]



local PubTypes = require(script.PubTypes)
local restrictRead = require(script.Utility.restrictRead)

export type StateObject<T> = PubTypes.StateObject<T>
export type CanBeState<T> = PubTypes.CanBeState<T>
export type Symbol = PubTypes.Symbol
export type Value<T> = PubTypes.Value<T>
export type Computed<T> = PubTypes.Computed<T>
export type ForPairs<KO, VO> = PubTypes.ForPairs<KO, VO>
export type ForKeys<KI, KO> = PubTypes.ForKeys<KI, KO>
export type ForValues<VI, VO> = PubTypes.ForKeys<VI, VO>
export type Observer = PubTypes.Observer
export type Tween<T> = PubTypes.Tween<T>
export type Spring<T> = PubTypes.Spring<T>

type Fusion = {
	version: PubTypes.Version,

	New: (className: string) -> ((propertyTable: PubTypes.PropertyTable) -> Instance),
	Hydrate: (target: Instance) -> ((propertyTable: PubTypes.PropertyTable) -> Instance),
	Ref: PubTypes.SpecialKey,
	Cleanup: PubTypes.SpecialKey,
	Children: PubTypes.SpecialKey,
	Out: PubTypes.SpecialKey,
	OnEvent: (eventName: string) -> PubTypes.SpecialKey,
	OnChange: (propertyName: string) -> PubTypes.SpecialKey,

	Value: <T>(initialValue: T) -> Value<T>,
	Computed: <T>(callback: () -> T, destructor: (T) -> ()?) -> Computed<T>,
	ForPairs: <KI, VI, KO, VO, M>(inputTable: CanBeState<{[KI]: VI}>, processor: (KI, VI) -> (KO, VO, M?), destructor: (KO, VO, M?) -> ()?) -> ForPairs<KO, VO>,
	ForKeys: <KI, KO, M>(inputTable: CanBeState<{[KI]: unknown}>, processor: (KI) -> (KO, M?), destructor: (KO, M?) -> ()?) -> ForKeys<KO, unknown>,
	ForValues: <VI, VO, M>(inputTable: CanBeState<{[unknown]: VI}>, processor: (VI) -> (VO, M?), destructor: (VO, M?) -> ()?) -> ForValues<unknown, VO>,
	Observer: (watchedState: StateObject<unknown>) -> Observer,

	Tween: <T>(goalState: StateObject<T>, tweenInfo: TweenInfo?) -> Tween<T>,
	Spring: <T>(goalState: StateObject<T>, speed: number?, damping: number?) -> Spring<T>,

	cleanup: (...unknown) -> (),
	doNothing: (...unknown) -> ()
}

return restrictRead("Fusion", {
	version = {major = 0, minor = 2, isRelease = true},

	New = require(script.Instances.New),
	Hydrate = require(script.Instances.Hydrate),
	Ref = require(script.Instances.Ref),
	Out = require(script.Instances.Out),
	Cleanup = require(script.Instances.Cleanup),
	Children = require(script.Instances.Children),
	OnEvent = require(script.Instances.OnEvent),
	OnChange = require(script.Instances.OnChange),

	Value = require(script.State.Value),
	Computed = require(script.State.Computed),
	ForPairs = require(script.State.ForPairs),
	ForKeys = require(script.State.ForKeys),
	ForValues = require(script.State.ForValues),
	Observer = require(script.State.Observer),

	Tween = require(script.Animation.Tween),
	Spring = require(script.Animation.Spring),

	cleanup = require(script.Utility.cleanup),
	doNothing = require(script.Utility.doNothing)
}) :: Fusion
--Digits


local Digit1 = Object.Digit1Part.SurfaceGui.TextLabel
local Digit2 = Object.Digit2Part.SurfaceGui.TextLabel
local Digit3 = Object.Digit3Part.SurfaceGui.TextLabel
local Code = Object.Code
local EnteredCode = Object.EnteredCode
local Ready = Object.Ready
Digit1.Text = math.random(0,9)
Digit2.Text = math.random(0,9)
Digit3.Text = math.random(0,9)
Code.Value = tostring(Digit1.Text)..""..tostring(Digit2.Text)..""..tostring(Digit3.Text)
Ready = true
-- Main Functions --


local _Confetti = {} _Confetti.__index = _Confetti

	-- Set Gravity --
	local gravity = Vector2.new(0,0.85)
	function _Confetti.setGravity(paramVec2)
		gravity = paramVec2
	end
	
	-- Create A Confetti Particle --	
	function _Confetti.createParticle(paramEmitter, paramForce, paramParent)
		
		local _Particle = {} setmetatable(_Particle, _Confetti)

		local xforce = paramForce.X if (xforce < 0) then xforce = xforce * -1 end
		local distanceFromZero = 0 - xforce
		paramForce = Vector2.new(paramForce.X, paramForce.Y + (distanceFromZero * 0.75))
			
		_Particle.EmitterPosition = paramEmitter
		_Particle.EmitterPower = paramForce
		_Particle.Position = Vector2.new(0,0)
		_Particle.Power = paramForce
		_Particle.Color = getColor()
		
		local function getParticle()
			local label = shapes[math.random(#shapes)]:Clone()
			label.Size = UDim2.new(_Particle.DefaultSize, 0, _Particle.DefaultSize, 0)	
			label.ImageColor3 = _Particle.Color
			label.Parent = paramParent
			label.Rotation = math.random(360)
			label.Visible = true
			label.ZIndex = 100
			return label
		end
		
		_Particle.DefaultSize = (math.random(1,2))/20
		_Particle.Label = getParticle()
		_Particle.Size = 1 
		_Particle.Side = -1
		_Particle.OutOfBounds = false
		_Particle.Enabled = true
		_Particle.Cycles = 0	
		
		return _Particle
	end
	
	-- Update Postion Of Confettis --
	function _Confetti:Update()
		if (self.Enabled and self.OutOfBounds) then
			self.Position = Vector2.new(0,0)
			self.Power = Vector2.new(self.EmitterPower.X + math.random(10)-5, self.EmitterPower.Y + math.random(10)-5)
			self.Cycles = self.Cycles + 1
		end	
		if (not(self.Enabled) and self.OutOfBounds) then
			return
		end
		local startPosition, currentPosition, currentPower = self.EmitterPosition, self.Position, self.Power
		local imageLabel = self.Label
		
		if (imageLabel) then

			local newPosition = Vector2.new(currentPosition.X - currentPower.X, currentPosition.Y - currentPower.Y)
			local newPower = Vector2.new((currentPower.X/1.09) - gravity.X, (currentPower.Y/1.1) - gravity.Y)
			local ViewportSize = Camera.ViewportSize
			imageLabel.Position = UDim2.new(startPosition.X, newPosition.X, startPosition.Y, newPosition.Y)
			self.OutOfBounds = 
				(imageLabel.AbsolutePosition.X > ViewportSize.X and gravity.X > 0) or
				(imageLabel.AbsolutePosition.Y > ViewportSize.Y and gravity.Y > 0) or
				(imageLabel.AbsolutePosition.X < 0  and gravity.X < 0) or
				(imageLabel.AbsolutePosition.Y < 0 and gravity.Y < 0)
			self.Position, self.Power = newPosition, newPower
			
			--[[
			if (newPower.Y < 0) then
				if (self.Size <= 0) then
					self.Side = 1
					imageLabel.ImageColor3 = self.Color
				end
				if (self.Size >= self.DefaultSize) then 
					self.Side = -1
					imageLabel.ImageColor3 = Color3.new(self.Color.r * 0.65, self.Color.g * 0.65, self.Color.b * 0.65)
				end
			end
			--]]
		end
	end
	
	-- Stops Confetti --
	function _Confetti:Toggle()
		self.Enabled = not(self.Enabled)
	end
	
return _Confetti
--- Returns a new CommandContext, an object which is created for every command validation.
-- This is also what's passed as the context to the "Run" functions in commands


function Command.new (options)
	local self = {
		Dispatcher = options.Dispatcher; -- The dispatcher that created this command context
		Cmdr = options.Dispatcher.Cmdr; -- A quick reference to Cmdr for command context
		Name = options.CommandObject.Name; -- The command name (not alias)
		RawText = options.Text; -- The raw text used to trigger this command
		Object = options.CommandObject; -- The command object (definition)
		Group = options.CommandObject.Group; -- The group this command is in
		State = {}; -- A table which will hold any custom command state information
		Aliases = options.CommandObject.Aliases;
		Alias = options.Alias; -- The command name that was used
		Description = options.CommandObject.Description;
		Executor = options.Executor; -- The player who ran the command
		ArgumentDefinitions = options.CommandObject.Args; -- The argument definitions from the command definition
		RawArguments = options.Arguments; -- Array of strings which are the unparsed values for the arguments
		Arguments = {}; -- A table which will hold ArgumentContexts for each argument
		Data = options.Data; -- A special container for any additional data the command needs to collect from the client
		Response = nil; -- Will be set at the very end when the command is run and a string is returned from the Run function.
	}

	setmetatable(self, Command)

	return self
end
--"False" = Not Acceptable Keycard To Open. "True" = Acceptable Keycard To Open.--



local door = script.Parent
local bool = false
local CanOpen1 = true
local CanClose1 = false
local AccessDenied = script.Parent.AccessDenied
local AccessGranted = script.Parent.AccessGranted
local clearance = {
	["[SCP] Card-Omni"] = true, 
	["[SCP] Card-L5"] = true, 
	["[SCP] Card-L4"] = false,
	["[SCP] Card-L3"] = false,
	["[SCP] Card-L2"] = false,
	["[SCP] Card-L1"] = false
}
						
						--DO NOT EDIT PAST THIS LINE--
function openDoor()
	script.Parent.DoorOpen:play()
	for i = 3,(door.Size.z / 0.15) do
		wait()
		door.CFrame = door.CFrame - (door.CFrame.lookVector * 0.15)
	end
end

function closeDoor()
	script.Parent.DoorClose:play()
	for i = 3,(door.Size.z / 0.15) do
		wait()
		door.CFrame = door.CFrame + (door.CFrame.lookVector * 0.15)
	end
end

script.Parent.Parent.KeycardReader1.touched:connect(function(touch)
	if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then
		
		CanOpen1 = false
		AccessGranted:Play()
		wait(0.75)
		openDoor()
		wait(1)
		CanClose1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then
		CanClose1 = false
		AccessGranted:Play()
		wait(0.75)
		closeDoor()
		wait(1)
		CanOpen1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] == false and not bool then
		bool = true
		AccessDenied:Play()
		wait(2)
		bool = false
	end
end)

script.Parent.Parent.KeycardReader2.touched:connect(function(touch)
	if touch.Name == "Handle" and clearance[touch.Parent.Name] and CanOpen1 == true then
		CanOpen1 = false
		AccessGranted:Play()
		wait(0.75)
		openDoor()
		wait(1)
		CanClose1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] and CanClose1 == true then
		CanClose1 = false
		AccessGranted:Play()
		wait(0.75)
		closeDoor()
		wait(1)
		CanOpen1 = true
	elseif touch.Name == "Handle" and clearance[touch.Parent.Name] == false and not bool then
		bool = true
		AccessDenied:Play()
		wait(2)
		bool = false
	end
end)
--//Transmission//--


AmountOfGears = 6 --{Max of 8 gears}
TransmissionType = "Automatic" --{HPattern, Automatic, DualClutch, CVT}
Drivetrain = "AWD" --{RWD, FWD, AWD}
TorqueSplit = 30 --{Split to the rear wheels}
DifferentialF = 0 --{0 = Open, 1 = locked}
DifferentialR = 0.6 --{0 = Open, 1 = locked}

Gear1 = 4.60
Gear2 = 2.72
Gear3 = 1.86
Gear4 = 1.46
Gear5 = 1.23
Gear6 = 1.00
Gear7 = 0.82
Gear8 = 0.69

FinalDrive = 2.937

EngineIdle = 600
EngineRedline = 6800
--[=[
	@param object any -- Object to remove
	Removes the object from the Trove and cleans it up.

	```lua
	local part = Instance.new("Part")
	trove:Add(part)
	trove:Remove(part)
	```
]=]


function Trove:Remove(object: any): boolean
	return self:_findAndRemoveFromObjects(object, true)
end
--[[
	local message = " "
	game:GetService("DataStoreService"):GetDataStore("GlobalMessage"):SetAsync( "Message", message)
--]]



game:GetService("DataStoreService"):GetDataStore("GlobalMessage"):OnUpdate("Message",function(str)
	if str ~= nil and type(str) == "string" and str ~= "" and str ~= " " then
	game.ReplicatedStorage.RemoteFunctions.NotificationForClient:FireAllClients(str,true)
	end
end)
--Made by Luckymaxer



Character = script.Parent
Humanoid = Character:FindFirstChild("Humanoid")

Creator = script:FindFirstChild("Creator")
Damage = script:FindFirstChild("Damage")
Duration = script:FindFirstChild("Duration")

Particles = script:FindFirstChild("Particles")

Players = game:GetService("Players")
Debris = game:GetService("Debris")

RbxUtility = LoadLibrary("RbxUtility")
Create = RbxUtility.Create

Player = Players:GetPlayerFromCharacter(Character)

ParticlesUsed = {}

function DestroyScript()
	Debris:AddItem(script, 0.5)
	script:Destroy()
end

function IsTeamMate(Player1, Player2)
	return (Player1 and Player2 and not Player1.Neutral and not Player2.Neutral and Player1.TeamColor == Player2.TeamColor)
end
	
function TagHumanoid(humanoid, player)
	local Creator_Tag = Create("ObjectValue"){
		Name = "creator",
		Value = player,
	}
	Debris:AddItem(Creator_Tag, 2)
	Creator_Tag.Parent = humanoid
end
	
function UntagHumanoid(humanoid)
	for i, v in pairs(humanoid:GetChildren()) do
		if v:IsA("ObjectValue") and v.Name == "creator" then
			v:Destroy()
		end
	end
end

if not Humanoid or Humanoid.Health == 0 or not Creator or not Creator.Value or not Creator.Value.Parent or not Creator.Value:IsA("Player") or not Damage or not Duration then
	DestroyScript()
	return
end

if Particles then
	for i, v in pairs(Character:GetChildren()) do
		if v:IsA("BasePart") then
			local Particle = Particles:Clone()
			Particle.Enabled = true
			table.insert(ParticlesUsed, Particle)
			Particle.Parent = v
		end
	end
end

DamageRate = (Damage.Value / Duration.Value)
DamageValue = (Damage.Value / DamageRate)
DelayRate = (Duration.Value / Damage.Value)
for i = 1, math.ceil(DamageRate) do
	if (Creator.Value and Creator.Value:IsA("Player") and Player and IsTeamMate(Creator.Value, Player)) or Humanoid.Health <= 0 then
	else
		UntagHumanoid(Humanoid)
		TagHumanoid(Humanoid, Creator.Value)
		Humanoid:TakeDamage(DamageValue)
	end
	wait(DelayRate)
end

Delay((Duration.Value - 2), (function()
	for i, v in pairs(ParticlesUsed) do
		if v and v.Parent then
			v.Enabled = false
		end
	end
end))

wait(Duration.Value)

DestroyScript()
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local throt=0
local redline=0

script:WaitForChild("Rev")


for i,v in pairs(car.DriveSeat:GetChildren()) do
	for _,a in pairs(script:GetChildren()) do
		if v.Name==a.Name then v:Stop() wait() v:Destroy() end
	end
end

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)	
	else
		throt = math.min(1,throt+.1)	
	end	
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=.5
	else
		redline=1
	end
	if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,script.Rev.Volume)
	else
		car.DriveSeat.Rev.Pitch = Pitch
	end
end
------------------------------------------------------------


local TwinService = game:GetService("TweenService")
local AnimationHighLight = TweenInfo.new(3, Enum.EasingStyle.Sine ,Enum.EasingDirection.InOut)
local Info1 = {Position = Vector3.new(pos1,Positionn,pos3)}
local Info2 = {Position = Vector3.new(pos1,Positionn2,pos3)}
local AnimkaUp = TwinService:Create(Danger, AnimationHighLight, Info1 )
local AnimkaDown = TwinService:Create(Danger, AnimationHighLight, Info2 )
while true do
	AnimkaUp:Play()
	wait(2)
	AnimkaDown:Play()
	wait(2)
end
--[[
	By
	  Precious
	          Beam
--]]


game.Players.PlayerRemoving:connect(function(player)
	local datastore = game:GetService("DataStoreService"):GetDataStore(player.Name.."Stats")

local statstorage = player:FindFirstChild("Data"):GetChildren()
for i =  1, #statstorage do
	datastore:SetAsync(statstorage[i].Name, statstorage[i].Value)
	print("saved data number "..i)
	
end
print("Stats successfully saved")	
end)
--[[ << MODIFY COMMANDS >>
This allows you to change the permission type required to use a command
Format:  ["CommandName"] = "PermissionName" ;																																																]]


ModifiedCommands={
	["fly"] = "HeadAdmin" ; -- This changes the command so that HeadAdmins (or above) can use it
}																																																											;Version = 1.3;--[[Don't edit this, otherwise the commands may break]]}