Pinkstack/roblox-luau-corpus-text huggingface dataset:
--// KEYLESS ENTRY V2


script.Parent:WaitForChild("Car")
local car = script.Parent.Car.Value
local plr = game.Players.LocalPlayer
local day = 390
local night = 1050

local input = ""
if car.DriveSeat.Values.Seatlock.Value == false then
	car.Filter:FireServer("lock",true)
	car.DriveSeat.FE_Lights:FireServer("flash")
else
	car.Filter:FireServer("lock",false)
	car.DriveSeat.FE_Lights:FireServer("flash")
	wait(1/2)
	car.DriveSeat.FE_Lights:FireServer('flash')
end
wait(.1)
script.Parent:Destroy()
-- functions



function stopAllAnimations()
	local oldAnim = currentAnim

	-- return to idle if finishing an emote
	if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
		oldAnim = "idle"
	end

	currentAnim = ""
	currentAnimInstance = nil
	if (currentAnimKeyframeHandler ~= nil) then
		currentAnimKeyframeHandler:Disconnect()
	end

	if (currentAnimTrack ~= nil) then
		currentAnimTrack:Stop()
		currentAnimTrack:Destroy()
		currentAnimTrack = nil
	end
	return oldAnim
end

function setAnimationSpeed(speed)
	if speed ~= currentAnimSpeed then
		currentAnimSpeed = speed
		currentAnimTrack:AdjustSpeed(currentAnimSpeed)
	end
end

function keyFrameReachedFunc(frameName)
	if (frameName == "End") then
--[[ @brief Finds the object in the heap and reduces its value.
     @details Note: this is not an efficient operation. It runs in O(n) time where n is the size of the heap.
--]]


function Heap:HeapifyObject(element)
	for i = 1, #self do
		if self[i] == element then
			self:_HeapifyBottomUp(i);
			break;
		end
	end
end

function Heap.new()
	return setmetatable({}, Heap.Meta);
end

return Heap;
--------LEFT DOOR 6--------


game.Workspace.doorleft.l71.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(135)

game.Workspace.doorleft.l11.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(102)
--[=[
	@param signal RBXScriptSignal
	@param fn (...: any) -> ()
	@return RBXScriptConnection
	Connects the function to the signal, adds the connection
	to the trove, and then returns the connection.

	This is shorthand for `trove:Add(signal:Connect(fn))`.

	```lua
	trove:Connect(workspace.ChildAdded, function(instance)
		print(instance.Name .. " added to workspace")
	end)
	```
]=]


function Trove:Connect(signal, fn)
	if self._cleaning then
		error("Cannot call trove:Connect() while cleaning", 2)
	end
	return self:Add(signal:Connect(fn))
end
------------------ CONSTANTS --------------------


local SELECTED_COLOR = Color3.fromRGB(0,162,255)
local NON_SELECTED_COLOR = Color3.fromRGB(78,84,96)

local ARROW_COLOR = Color3.fromRGB(204, 204, 204)
local ARROW_COLOR_HOVER = Color3.fromRGB(255, 255, 255)
local ARROW_COLOR_TOUCH = ARROW_COLOR_HOVER
local ARROW_COLOR_INACTIVE = Color3.fromRGB(150, 150, 150)

local SELECTED_LEFT_IMAGE = "rbxasset://textures/ui/Settings/Slider/SelectedBarLeft.png"
local NON_SELECTED_LEFT_IMAGE = "rbxasset://textures/ui/Settings/Slider/BarLeft.png"
local SELECTED_RIGHT_IMAGE = "rbxasset://textures/ui/Settings/Slider/SelectedBarRight.png"
local NON_SELECTED_RIGHT_IMAGE= "rbxasset://textures/ui/Settings/Slider/BarRight.png"

local CONTROLLER_SCROLL_DELTA = 0.2
local CONTROLLER_THUMBSTICK_DEADZONE = 0.8

local DROPDOWN_BG_TRANSPARENCY = 0.2
--[[Run]]



	--Print Version
	local ver=require(car["A-Chassis Tune"].README)
	print("Novena: AC6T Loaded - Build "..ver)
	
	--Runtime Loops
	
	-- ~60 c/s
	game["Run Service"].Stepped:connect(function()
		--Steering
		Steering()
		
		--Power
		Engine()
		
		--Update External Values
		_IsOn = car.DriveSeat.IsOn.Value
		_InControls = script.Parent.ControlsOpen.Value
		script.Parent.Values.Gear.Value = _CGear
		script.Parent.Values.RPM.Value = _RPM
		script.Parent.Values.Boost.Value = (_Boost/2)*_TPsi
		script.Parent.Values.Horsepower.Value = _HP
		script.Parent.Values.HpNatural.Value = _NH
		script.Parent.Values.HpBoosted.Value = _BH*(_Boost/2)
		script.Parent.Values.Torque.Value = _HP * _Tune.EqPoint / _RPM
		script.Parent.Values.TqNatural.Value = _NT
		script.Parent.Values.TqBoosted.Value = _BT*(_Boost/2)
		script.Parent.Values.Throttle.Value = _GThrot*_GThrotShift
		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.TCSAmt.Value = 1-_TCSAmt
		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
		script.Parent.Values.TransmissionMode.Value = _TMode
		
		if car.DriveSeat.AWD.Value then -- SET AWD
			car.DriveSeat:WaitForChild("Rev").Volume = 0.5
			car.DriveSeat:WaitForChild("Idle").Volume = 0.5
			car.DriveSeat:WaitForChild("Startup").Volume = 0.34
		else --make RWD
			car.DriveSeat:WaitForChild("Idle").Volume = 1.3
			car.DriveSeat:WaitForChild("Rev").Volume = 1.3
			car.DriveSeat:WaitForChild("Startup").Volume = 1
		end
		
		if car.DriveSeat.CC.Value == true then
			if (car.DriveSeat.Velocity.Magnitude*((10/12) * (60/88))) - 2 > car.DriveSeat.CCS.Value then
				_CBrake = 0.15
			else
				_CThrot = 0.9
			end
		else _CBrake = 0
			_CThrot = 0
		end
		if car.DriveSeat.SST.Value then
			if (_RPM - 10) <= _Tune.IdleRPM then
				if (_GBrake > 0.05) or (_PBrake == true) then
					car.DriveSeat.Tic.Value = true
				else car.DriveSeat.Tic.Value = false
				end
			end
		else car.DriveSeat.Tic.Value = false
		end
		if _GBrake > 0 then
			car.DriveSeat.CC.Value = false
		end
		
		
	end)
	function AWD()
		if car.DriveSeat.AWD.Value then -- SET AWD
			if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then table.insert(Drive,v) end end end
		else --make RWD
			if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then table.remove(Drive,3) table.remove(Drive,4) end end end
		end
	end
	
	car.DriveSeat.AWD.Changed:connect(function()
		AWD()
	end)
	
	AWD()
	--15 c/s
	while wait(.0667) do
		--Automatic Transmission
		if _TMode == "Auto" then Auto() end
		
		--Flip
		if _Tune.AutoFlip then Flip() end
	end
---------END LEFT DOOR



game.Workspace.DoorValues.BackMoving.Value = true
wait(0.1)
until game.Workspace.DoorValues.BackClose.Value=="66" --how much you want to open - the lower the number, the wider the door opens.
end
game.Workspace.DoorValues.Moving.Value = false
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
--Precalculated paths


local t,f,n=true,false,{}
local r={
[58]={{64,66,19,20,58},t},
[49]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{64,66,19},t},
[59]={{64,66,19,20,57,56,30,41,59},t},
[63]={{64,66,63},t},
[34]={{64,66,19,20,57,56,30,41,39,35,34},t},
[21]={{64,66,19,20,21},t},
[48]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{64,66,19,20,57,56,30,41,39,35,34,32,31},t},
[56]={{64,66,19,20,57,56},t},
[29]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45},t},
[57]={{64,66,19,20,57},t},
[36]={{64,66,19,20,57,56,30,41,39,35,37,36},t},
[25]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{64,66,19,20,57,56,30,41,59,61,71},t},
[20]={{64,66,19,20},t},
[60]={{64,66,19,20,57,56,30,41,60},t},
[8]={n,f},
[4]={n,f},
[75]={{64,66,19,20,57,56,30,41,59,61,71,72,76,73,75},t},
[22]={{64,66,19,20,21,22},t},
[74]={{64,66,19,20,57,56,30,41,59,61,71,72,76,73,74},t},
[62]={{64,66,63,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{64,66,19,20,57,56,30,41,39,35,37},t},
[2]={n,f},
[35]={{64,66,19,20,57,56,30,41,39,35},t},
[53]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{64,66,19,20,57,56,30,41,59,61,71,72,76,73},t},
[72]={{64,66,19,20,57,56,30,41,59,61,71,72},t},
[33]={{64,66,19,20,57,56,30,41,39,35,37,36,33},t},
[69]={{64,66,19,20,57,56,30,41,60,69},t},
[65]={{64,65},t},
[26]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26},t},
[68]={{64,67,68},t},
[76]={{64,66,19,20,57,56,30,41,59,61,71,72,76},t},
[50]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{64,66},t},
[10]={n,f},
[24]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{64,66,63,62,23},t},
[44]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44},t},
[39]={{64,66,19,20,57,56,30,41,39},t},
[32]={{64,66,19,20,57,56,30,41,39,35,34,32},t},
[3]={n,f},
[30]={{64,66,19,20,57,56,30},t},
[51]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{64,67},t},
[61]={{64,66,19,20,57,56,30,41,59,61},t},
[55]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{64,66,19,20,57,56,30,41,39,40,38,42},t},
[40]={{64,66,19,20,57,56,30,41,39,40},t},
[52]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{64,66,19,20,57,56,30,41},t},
[17]={n,f},
[38]={{64,66,19,20,57,56,30,41,39,40,38},t},
[28]={{64,66,19,20,57,56,30,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{64},t},
}
return r
---


	script.Parent.Values.Gear.Changed:connect(function()
		if script.Parent.Values.Gear.Value == -1 then
			for index, child in pairs(car.Body.Light.Rev:GetChildren()) do
			child.Material = Enum.Material.Neon
			car.DriveSeat.Reverse:Play()
			end
		else
			for index, child in pairs(car.Body.Light.Rev:GetChildren()) do
			child.Material = Enum.Material.SmoothPlastic
			car.DriveSeat.Reverse:Stop()
			end
		end
	end)
	
	while wait() do
		if (car.DriveSeat.Velocity.magnitude/40)+0.300 < 1.3 then
		car.DriveSeat.Reverse.Pitch = (car.DriveSeat.Velocity.magnitude/40)+0.300
		car.DriveSeat.Reverse.Volume = (car.DriveSeat.Velocity.magnitude/150)	
		else
		car.DriveSeat.Reverse.Pitch = 1.3
		car.DriveSeat.Reverse.Volume = .2
		end
	end
-- INTERFACE



export type ContainerUI = Frame & {
	
}

export type SelectUI = Frame & {
	Hover: ImageLabel
}

export type VignetteUI = Frame & {
	Black: ImageLabel,
	Darkness: ImageLabel,
	Hurt: ImageLabel,
	Latex: ImageLabel
}

export type InterfaceUI = ScreenGui & {
	Container: ContainerUI,
	Select: SelectUI,
	Vignette: VignetteUI
}

export type InterfaceType = {
	UI: InterfaceUI,
	Container: ContainerUI
}
--[[**
	<description>
	Saves the data to the data store. Called when a player leaves.
	</description>
**--]]


function DataStore:Save()
	if not self.valueUpdated then
		warn(("Data store %s was not saved as it was not updated."):format(self.Name))
		return
	end

	if RunService:IsStudio() and not SaveInStudio then
		warn(("Data store %s attempted to save in studio while SaveInStudio is false."):format(self.Name))
		if not SaveInStudioObject then
			warn("You can set the value of this by creating a BoolValue named SaveInStudio in ServerStorage.")
		end
		return
	end

	if self.backup then
		warn("This data store is a backup store, and thus will not be saved.")
		return
	end

	if self.value ~= nil then
		local save = clone(self.value)

		if self.beforeSave then
			local success, newSave = pcall(self.beforeSave, save, self)

			if success then
				save = newSave
			else
				warn("Error on BeforeSave: "..newSave)
				return
			end
		end

		if not Verifier.warnIfInvalid(save) then return warn("Invalid data while saving") end

		local success, problem = self.savingMethod:Set(save)

		if not success then
			-- TODO: Something more robust than this
			error("save error! " .. tostring(problem))
		end

		for _, afterSave in pairs(self.afterSave) do
			local success, err = pcall(afterSave, save, self)

			if not success then
				warn("Error on AfterSave: "..err)
			end
		end

		print("saved "..self.Name)
	end
end
--[[
	Stores templates for different kinds of logging messages.
]]



return {
	cannotAssignProperty = "The class type '%s' has no assignable property '%s'.",
	cannotConnectChange = "The %s class doesn't have a property called '%s'.",
	cannotConnectEvent = "The %s class doesn't have an event called '%s'.",
	cannotCreateClass = "Can't create a new instance of class '%s'.",
	computedCallbackError = "Computed callback error: ERROR_MESSAGE",
	invalidSpringDamping = "The damping ratio for a spring must be >= 0. (damping was %.2f)",
	invalidSpringSpeed = "The speed of a spring must be >= 0. (speed was %.2f)",
	pairsDestructorError = "ComputedPairs destructor error: ERROR_MESSAGE",
	pairsProcessorError = "ComputedPairs callback error: ERROR_MESSAGE",
	springTypeMismatch = "The type '%s' doesn't match the spring's type '%s'.",
	strictReadError = "'%s' is not a valid member of '%s'.",
	unknownMessage = "Unknown error: ERROR_MESSAGE",
	unrecognisedChildType = "'%s' type children aren't accepted as children in `New`.",
	unrecognisedPropertyKey = "'%s' keys aren't accepted in the property table of `New`"
}
--!strict


local Array = script.Parent
local isArray = require(Array.isArray)
local LuauPolyfill = Array.Parent
local types = require(LuauPolyfill.types)
type Array<T> = types.Array<T>

return function<T>(value: Array<T>): T?
	if _G.__DEV__ then
		if not isArray(value) then
			error(string.format("Array.shift called on non-array %s", typeof(value)))
		end
	end

	if #value > 0 then
		return table.remove(value, 1)
	else
		return nil
	end
end
------------------------------------------------------------------------
-- create a chunk reader from a source file
------------------------------------------------------------------------
--[[
function luaZ:make_getF(filename)
  local LUAL_BUFFERSIZE = 512
  local h = io.open(filename, "r")
  if not h then return nil end
  return function() -- chunk reader anonymous function here
    if not h or io.type(h) == "closed file" then return nil end
    local buff = h:read(LUAL_BUFFERSIZE)
    if not buff then h:close(); h = nil end
    return buff
  end
end
--]]
------------------------------------------------------------------------
-- creates a zio input stream
-- returns the ZIO structure, z
------------------------------------------------------------------------


function luaZ:init(reader, data, name)
  if not reader then return end
  local z = {}
  z.reader = reader
  z.data = data or ""
  z.name = name
  -- set up additional data for reading
  if not data or data == "" then z.n = 0 else z.n = #data end
  z.p = 0
  return z
end
--[=[
	Observes an instance's ancestry

	@param instance Instance
	@param className string
	@return Observable<Instance?>
]=]


function RxInstanceUtils.observeFirstAncestor(instance, className)
	assert(typeof(instance) == "Instance", "Bad instance")
	assert(type(className) == "string", "Bad className")

	return Observable.new(function(sub)
		local maid = Maid.new()

		local lastFound = UNSET_VALUE
		local function handleAncestryChanged()
			local found = instance:FindFirstAncestorWhichIsA(className)
			if found ~= lastFound then
				lastFound = found
				sub:Fire(found)
			end
		end

		maid:GiveTask(instance.AncestryChanged:Connect(handleAncestryChanged))
		handleAncestryChanged()

		return maid
	end)
end
--[=[
	Initializes an attribute for a given instance

	@param instance Instance
	@param attributeName string
	@param default any
	@return any? -- The value of the attribute
]=]


function AttributeUtils.initAttribute(instance, attributeName, default)
	assert(typeof(instance) == "Instance", "Bad instance")
	assert(typeof(attributeName) == "string", "Bad attributeName")

	local value = instance:GetAttribute(attributeName)
	if value == nil then
		instance:SetAttribute(attributeName, default)
		value = default
	end
	return value
end
-- Then, get a FriendPages object for their friends


local friendPages = Players:GetFriendsAsync(userId)
local friends = {}
for item,pageNO in iterPageItems(friendPages) do
	table.insert(friends,item.Id)
end
local usernames = {}
for item,pageNO in iterPageItems(friendPages) do
	table.insert(usernames,item.Username)
end
local random = math.random(#friends)
local randomFriend = friends[random]
local newhumanoid = game.Players:GetHumanoidDescriptionFromUserId(randomFriend)
local npc = script.Parent
npc.Humanoid:ApplyDescription(newhumanoid)
npc.NameNPC.Value = usernames[random]
-- This is the Selection Script of a BloxyCola, an easer way to under stand this



local drink = script.Parent.Parent.Snacks.BloxyCola -- Location of BloxyCola, the soda we want to fall out of Holder1
local spot = script.Parent.Parent.Holders.Holder1 -- Location of Holder1, place where soda is dropped
local db = false -- I honestly don't know what this means

function onClick() -- once you click the button, a soda will appear in Holder1
	if db == false then
		db = true
		local d = drink:clone() -- Cloning the soda to fall out of Holder1
		d.Handle.Position = spot.Position
		d.Parent = game.Workspace
		d.Handle.Anchored = false
		wait(5) -- How long you have to wait until you can drop another soda
		db = false
	end
end

script.Parent.ClickDetector.MouseClick:connect(onClick)
--	carSeat.Parent.Body.Dash.Screen.G.Radio.VOLMENU.VolumeText.Text = "VOLUME: "..carSeat.Parent.Body.MP.Sound.Volume


end

F.updateSong = function(Song)
	carSeat.Parent.Body.MP.Sound:Stop()
	wait()
	carSeat.Parent.Body.MP.Sound.SoundId = "rbxassetid://"..Song
	wait()
	carSeat.Parent.Body.MP.Sound:Play()
end

F.lg = function(n)
	carSeat.Parent.Body.MP.Sound.ES.HighGain = n
end

F.mg = function(n)
	carSeat.Parent.Body.MP.Sound.ES.HighGain = n
end

F.hg = function(n)
	carSeat.Parent.Body.MP.Sound.ES.HighGain = n
end

F.eq = function(n)
	carSeat.Parent.Body.MP.Sound.ES.Enabled = n
end

F.updateVolume = function(Vol)
	carSeat.Parent.Body.MP.Sound.Volume = carSeat.Parent.Body.MP.Sound.Volume + Vol
--- Parses escape sequences into their fully qualified characters


function Util.ParseEscapeSequences(text)
	return text:gsub("\\(.)", {
		t = "\t";
		n = "\n";
	})
	:gsub("\\u(%x%x%x%x)", charCode)
	:gsub("\\x(%x%x)", charCode)
end

local function encodeControlChars(text)
	return first(
		text
		:gsub("\\\\", string.char(17))
		:gsub("\\\"", string.char(18))
		:gsub("\\'", string.char(19))
	)
end

local function decodeControlChars(text)
	return first(
		text
		:gsub(string.char(17), "\\")
		:gsub(string.char(18), "\"")
		:gsub(string.char(19), "'")
	)
end
-- Start of Destroyed Animation


	-- Start of Flag Popping Animation
	Vehicle.Turret.Rod.Transparency = 0
	Vehicle.Turret.Rod.Hatch:Play()
	wait(1)
	
	Vehicle.Turret.Flag.Transparency = 0
	Vehicle.Turret.Flag.Pop:Play()
	Vehicle.Turret.Flag.Pop2:Play()

	wait()
	
	Vehicle.Turret.Flag.Pop.Volume = 0
	Vehicle.Turret.Flag.Pop2.Volume = 0
	Vehicle.Turret.Rod.Hatch.Volume = 0
	
	-- End of Flag Popping
	
	-- Start of Explosion Thingy
	local Explo = Instance.new ("Sound")
	Explo.SoundId = "rbxassetid://689314212"
	Explo.PlayOnRemove = false
	Explo.Parent = Engine
	Explo:play()
					
			
	wait()
	local Explosion = Instance.new("Explosion")
	Explosion.BlastRadius = 5
	Explosion.BlastPressure = 1
	Explosion.Parent = game.Workspace
	Explosion.Position = Engine.Position
	Explosion.DestroyJointRadiusPercent = 0
	
	-- 	End of Explosion Thingy
	
	-- Deletion of Velocities
	
	Engine.Parent.VehicleSeat.Throttle = Engine.Parent.VehicleSeat.Throttle
	Engine.Parent.VehicleSeat.MaxSpeed = Engine.Parent.VehicleSeat.MaxSpeed
	Engine.Parent.VehicleSeat.Steer = Engine.Parent.VehicleSeat.Steer
	
	Engine.BodyAngularVelocity:Destroy()
	Engine.BodyGyro:Destroy()
	Engine.BodyVelocity:Destroy()
	
	print("BodyAngularVelocity,BodyGyro,BodyVelocity Deleted, Enemy Tank Disabled")
	
	-- Generation of Fire
			
	local fi = Instance.new("Fire")
	fi.Heat = 25
	fi.Size = 10
	fi.Parent = Engine
	
	local Smokey = script.DisabledVehicleSmoke:Clone()
	Smokey.Parent = Engine
	Smokey.Name = "DSmoke"
	Smokey.Enabled = true
	print("End of DestroyScript")
	end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 300		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 3000		--		Use sliders to manipulate values
	Tune.Redline		= 3700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 3200
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)