Roblox/luau_corpus huggingface dataset:
--- Replace with true/false to force the chat type. Otherwise this will default to the setting on the website.
module.BubbleChatEnabled = true -- PlayersService.BubbleChat
module.ClassicChatEnabled = true -- PlayersService.ClassicChat
--[[
	Player methods
]]

function Waiting:playerAdded(player)
	Util.loadCharacter(player)
end

function Waiting:playerRemoving()
end

function Waiting:characterAdded(player, character)
	-- Give the player the Pistol as the default starting weapon
	ReplicatedStorage.Assets.Weapons.Pistol:Clone().Parent = player.Backpack

	-- Grant the player a force field so they cant be killed in the waiting area
	local forceField = Instance.new("ForceField")
	forceField.Name = "WaitingForceField"
	forceField.Visible = false
	forceField.Parent = character

	CollectionService:AddTag(character, "PlayerCharacter")
end

return Waiting
--create tables:
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "a" then
		table.insert(a, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "b" then
		table.insert(b, 1, part)
	end
end

function lightOn(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("SurfaceLight") then
			part.SurfaceLight.Enabled = true
		end
	    if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = true
		end
	end
end

function lightOff(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("SurfaceLight") then
			part.SurfaceLight.Enabled = false
		end
	    if part:FindFirstChild("SpotLight") then
			part.SpotLight.Enabled = false
		end
	end
end

while true do

	lightOn(a)
	wait(0.15)

	lightOff(a)
	wait(0.04)

	lightOn(a)
	wait(0.15)

	lightOff(a)
	wait(0.1)
	
	lightOn(b)
	wait(0.15)

	lightOff(b)
	wait(0.04)
	
	lightOn(b)
	wait(0.15)

	lightOff(b)
	wait(0.1)
	
end
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						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 mult=0
local det=.13
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

script:WaitForChild("Rev")

script.Parent.Values.Gear.Changed:connect(function()
	mult=1
	if script.Parent.Values.RPM.Value>5000 then
		shift=.2
	end
end)

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
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value
	
	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.3,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1		
	else
		throt = math.min(1,throt+.1)
		trmmult = 1
		trmon = 0		
	end	
	shift = math.min(1,shift+.2)	
	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 script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (2*throt*shift*redline)+(trm*trmon*trmmult*(1-throt)*math.sin(tick()*50))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		if script.Parent:FindFirstChild("DriveMode").Value ~= "Comfort" then
		 	handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume)
		else
			handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch/1.2,Volume/1.2)
		end
	else
		if script.Parent:FindFirstChild("DriveMode").Value ~= "Comfort" then
			car.DriveSeat.Rev.Volume = Volume
			car.DriveSeat.Rev.Pitch = Pitch
		else
			car.DriveSeat.Rev.Volume = Volume/1.75
			car.DriveSeat.Rev.Pitch = Pitch	/1.5	
		end
	end
end
--[[
NOTICE: Only used for an AF timer. If converting into an AF, enable this script and
make the parent "FederalSignalARTimer" or "FederalSignalAFTimer". Link the FlasherUnitValueAddress
to the On value located inside the RCM3 or RC6 flasher unit under "SignatrolModel30Flasher".
]]--
--	self.waist.C0 = self.waistC0 * CFrame.fromEulerAnglesYXZ(set.z*0.5, set.y, 0);
end

return lookAt;
-- (Hat Giver Script - Loaded.)

debounce = true

function onTouched(hit)
	if (hit.Parent:findFirstChild("Humanoid") ~= nil and debounce == true) then
		debounce = false
		h = Instance.new("Hat")
		p = Instance.new("Part")
		h.Name = "Black Top Hat"
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(1.6, 0.8, 0.4) 
		p.BottomSurface = 0 
		p.TopSurface = 0 
		p.Locked = true 
		script.Parent.Mesh:clone().Parent = p
		h.Parent = hit.Parent
		h.AttachmentPos = Vector3.new(0, 0.2, 0)
		wait(5)
		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- ROBLOX NOTE: no upstream
-- ROBLOX TODO: fix PrettyFormat types imports

type CompareKeys = ((a: string, b: string) -> number) | nil

type Plugin = any

export type Plugins = { [number]: Plugin }

type ThemeReceived = {
	comment: string?,
	content: string?,
	prop: string?,
	tag: string?,
	value: string?,
}

export type PrettyFormatOptions = {
	callToJSON: boolean?,
	compareKeys: CompareKeys,
	escapeRegex: boolean?,
	escapeString: boolean?,
	highlight: boolean?,
	indent: number?,
	maxDepth: number?,
	min: boolean?,
	plugins: Plugins?,
	printBasicPrototype: boolean?,
	printFunctionName: boolean?,
	theme: ThemeReceived?,
}

export type OptionsReceived = PrettyFormatOptions

return {}
--[[
AnimateKey(note1,px,py,pz,ox,oy,oz,Time)
--note1(1-61), position x, position y, position z, orientation x, orientation y, orientation z, time

local obj = --object or gui or wahtever goes here
local Properties = {}
Properties.Size = UDim2.new()
Tween(obj,Properties,2,true,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false)
--Obj,Property,Time,wait,Easingstyle,EasingDirection,RepeatAmt,Reverse
]]
function HighlightPianoKey(note1,transpose)
	if not Settings.KeyAesthetics then return end
	local key = Piano.Keys.Keys:FindFirstChild(note1)
	if key then
		if IsBlack(note1) then
			AnimateKey(note1,0,.085,0,12,0,-.01,.2)
		else
			AnimateKey(note1,0,.093,0,8,0,0,.2)
		end
	end
end
--스킬 설정:

local skillName = "Fire" --스킬 파트 이름

local Sound = "fire" --적용할 사운드 이름 (추천)

local Sound2 = "Bomb" --적용할 사운드 이름 (추천)

local CoolTime = 1 --스킬 재사용 대기시간

local Damage = 10 --스킬 데미지

local DamageCoolTime = 0.3 --스킬 데미지 쿨타임 (추천)

local Delete = 0.2 --초를 기다리고 스킬 삭제 (추천)

local Ammo = 5 --날라갈 탄 갯수 (고정)
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 10 -- cooldown for use of the tool again

BoneModelName = "Ultra hand2" -- name the zone model

HumanoidName = "Humanoid"-- the name of player or mob u want to damage
--[[script.Parent.HouseThing.CreateButton.MouseButton1Click:Connect(function()
	if debounce == false then
		debounce = true
		game:GetService("ReplicatedStorage")["Requests"].MakeHouse:FireServer(script.Parent.HouseThing.TextBox.Text)
		wait(1)
		debounce = false
	end
end)

game:GetService("ReplicatedStorage")["Requests"].MakeHouse.OnClientEvent:Connect(function(msg)
	script.Parent.HouseThing.TextBox.Text = msg
	wait(1)
	if msg == "House Created" then
		script.Parent:Destroy()
	end
end)--]]
--[[
if GetPlayer then
	local Character = GetPlayer.Character
	local blank = ""
	local getplrname = blank .. GetPlayer.RaceName.Value
	local clonename = script.Parent.PlrName.Value:Clone()
	
	script.Parent.PlrName.Value.Archivable = false
	clonename:SetPrimaryPartCFrame(CFrame.new())
	clonename.Parent = workspace
	clonename.HumanoidRootPart.Orientation = Vector3.new(0, -180, 0);
	for fart, fart2 in pairs(clonename:GetChildren()) do
		if fart2:IsA("Accessory") or fart2:IsA("BasePart") then
			if not (not getplrname.find(fart2.Name, "Arm")) or not (not getplrname.find(fart2.Name, "Leg")) or fart2.Name == "Torso" then
				fart2:ClearAllChildren()
				fart2.Transparency = 1;
			end
		else
			fart2:Destroy();
		end
	end
	for imtired, imtired2 in pairs(clonename:GetChildren()) do
		if imtired2.Name == "StarterCharacter" then
			imtired2:Destroy();
		end
	end
	clonename.Parent = script.Parent.Viewport
	local monkey = Instance.new("Camera")
	monkey.CameraType = Enum.CameraType.Scriptable
	monkey.CFrame = clonename.Head.CFrame:ToWorldSpace(CFrame.new(0, 0, -4.5))
	monkey.CFrame = CFrame.new(monkey.CFrame.p, clonename.Head.Position)
	monkey.CameraSubject = clonename.Head
	monkey.CameraType = Enum.CameraType.Fixed
	monkey.DiagonalFieldOfView = 85
	monkey.Parent = Viewport
	Viewport.CurrentCamera = monkey
end
]]--
--Light off
	src.right.Value.Value = 0
	light.Value = false
	else
	src.right.Value.Value = 1
	light.Value = true
	return
	end
end
end)
src.Parent.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then 
		src:Stop()
		script.Parent:Destroy()
	end
end)
--Joining
Players.PlayerAdded:Connect(function(plr)
	local data = 
	{
		["contents"] = "",
		["username"] = plr.Name .. " - (#"..plr.userId..")",
		["avatar_url"] = "https://www.roblox.com/Thumbs/Avatar.ashx?x=500&y=500&Format=Png&userId="..plr.userId,
		["embeds"] = {{
			["title"]= plr.name,
			["description"] = plr.Name .. " joined the Game",
			["type"]= "rich",
			["color"]= tonumber(0x6AA84F),
			["fields"]={
				{
					["name"]="Event: Player joined",
					["value"]="User: **"..plr.Name.."** with ID: **"..plr.UserId.."** has joined [game](https://www.roblox.com/games/".. game.PlaceId..")/[Profile](https://www.roblox.com/users/"..plr.UserId.."/profile)",
					["inline"]=true}}}}
	}
	http:PostAsync(webhook,http:JSONEncode(data))
end)
--	if hit.Parent.Name == game.Players.LocalPlayer.Name then return end
	
	if hit.Parent:findFirstChild("OverrideScript") == nil then
		local s = script.OverrideScript:clone()
		s.Parent = hit.Parent
		s.Disabled = false
	end
	
	barb:Remove()
	
	elseif hit.CanCollide == true then
		barb:Remove()
	end
end)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]

local car = script.Parent.Car.Value
local vl = script.Parent.Values

local strength = 350 --this may require some experimenting, this is a good setting as-is. higher value = stronger.

local max = 8 --in SPS, not km/h, not MPH.
--print("Scan Complete")

if doublescan then ScanForViruses(game,0,false) end
--// Add Viewport
function RotateViewportModule:AddViewport(viewport)
	spawn(function()
		if viewport:FindFirstChildWhichIsA("Model") ~= nil then
			local model = viewport:FindFirstChildWhichIsA("Model")
			if viewport:FindFirstChildWhichIsA("Camera") ~= nil then
				local camera = viewport:FindFirstChildWhichIsA("Camera")
				
				self:EndViewport()
				event = setRotationEvent(model, camera)
			end
		end
	end)
end

return RotateViewportModule
--local KVs = script.Parent.Parent.Parent.KVs
local callwait = 60
local config = script.Parent.Parent.Configuration
local sys = script.Parent.Parent.System
function off()
	---
	huh.ERROR:Play()
	folder.KV.Value.Value = "OFF"
	wait(1)
	folder.KV.Value.Value = ""
	---
end
function err()
	---
	huh.ERROR:Play()
	folder.KV.Value.Value = "Err"
	wait(1)
	folder.KV.Value.Value = ""
	---
end
function usercodefalse()
	---
	huh.ERROR:Play()
	folder.KV.Value.Value = "OFF"
	wait(1)
	folder.KV.Value.Value = ""
	---
end
function open()
	---
	huh.Open:Play()
	folder.KV.Value.Value = "OPen"
	wait(1.02)
	folder.KV.Value.Value = ""
	---
end
function kventer()
	if sys.Code.Value == false then
		sys.KVEnter.Value = true
end
end
-- See if I have a tool
local spawner = script.Parent
local tool = nil
local region = Region3.new(Vector3.new(spawner.Position.X - spawner.Size.X/2, spawner.Position.Y + spawner.Size.Y/2, spawner.Position.Z - spawner.Size.Z/2),
	Vector3.new(spawner.Position.X + spawner.Size.X/2, spawner.Position.Y + 4, spawner.Position.Z + spawner.Size.Z/2))
local parts = game.Workspace:FindPartsInRegion3(region)
for _, part in pairs(parts) do
	if part and part.Parent and part.Parent:IsA("Tool") then
		tool = part.Parent
		break
	end
end

local configTable = spawner.Configurations
local configs = {}
local function loadConfig(configName, defaultValue)
	if configTable:FindFirstChild(configName) then
		configs[configName] = configTable:FindFirstChild(configName).Value
	else
		configs[configName] = defaultValue
	end
end

loadConfig("SpawnCooldown", 5)

if tool then
	tool.Parent = game.ServerStorage

	while true do
		-- put tool on pad
		local toolCopy = tool:Clone()
		local handle = toolCopy:FindFirstChild("Handle")
		toolCopy.Parent = game.Workspace
		local toolOnPad = true
		local parentConnection
		parentConnection = toolCopy.AncestryChanged:connect(function()
			if handle then handle.Anchored = false end
			toolOnPad = false
			parentConnection:disconnect()
		end)
		if handle then
			handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
			handle.Anchored = true
		end

		-- wait for tool to be removed
		while toolOnPad do
			if handle and not handle.Anchored then
				-- another script unachored the weapon while it was on the pad
				handle.Anchored = true
				handle.CFrame = (spawner.CFrame + Vector3.new(0,handle.Size.Z/2 + 1,0)) * CFrame.Angles(-math.pi/2,0,0)
			end
			if handle then
				handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
			end
			wait()
		end

		-- wait for cooldown
		wait(configs["SpawnCooldown"])
	end

end
--Made by Stickmasterluke ;D


sp=script.Parent

local debris=game:GetService("Debris")
check=true

sp.Equipped:connect(function(mouse)
	equipped=true
	if mouse~=nil then 
		mouse.Icon="rbxasset://textures\\GunCursor.png"
		mouse.Button1Down:connect(function()
			local chr=sp.Parent
			if chr and check then
				local t=chr:FindFirstChild("Torso")
				local h=chr:FindFirstChild("Humanoid")
				local anim=sp:FindFirstChild("Eat")
				if anim and t and h and h.Health>0 and equipped and check then
					mouse.Icon="rbxasset://textures\\GunWaitCursor.png"
					check=false
					anim2=h:LoadAnimation(anim)
					anim2:Play()
					local handle=sp:FindFirstChild("Handle")
					if handle~=nil then
						local mesh=handle:FindFirstChild("Mesh")
					end
					wait(2)
					local s=sp.Handle:FindFirstChild("Sound")
					if s~=nil and equipped and w~=nil then
						w.C0=CFrame.new(0,-1,-.3)*CFrame.Angles(-.3,0,math.pi/4)
					else
						check=true
						return
					end
					
					local s=sp.Handle:FindFirstChild("Sound")
					if s~=nil and equipped and w~=nil then
						w.C0=CFrame.new(0,-1,-.3)*CFrame.Angles(-.3,0,math.pi/4)
					else
						check=true
						return
					end
					wait(3)
					if mouse~=nil then
						mouse.Icon="rbxasset://textures\\GunCursor.png"
					end
					check=true
				end
			end
		end)
	end
	delay(0,function()
		local la=sp.Parent:FindFirstChild("Left Arm")
		if la~=nil then
			if spoon then
				spoon:remove()
			end
			spoon=Instance.new("Part")
			spoon.FormFactor="Custom"
			spoon.Name="Handle"
			spoon.Size=Vector3.new(.2,.2,1.3)
			spoon.TopSurface="Smooth"
			spoon.BottomSurface="Smooth"
			spoon.CanCollide=false
			local m=Instance.new("SpecialMesh")
			m.MeshId="http://www.roblox.com/asset?id=103919885"
			m.TextureId= "http://www.roblox.com/asset?id=103920471"
			m.Parent=spoon
			w=Instance.new("Motor")
			w.Part0=la
			w.Part1=spoon
			w.C0=CFrame.new(0,-1,-.3)*CFrame.Angles(0,0,math.pi/4)
			w.Parent=spoon
			debris:AddItem(spoon,600)
			spoon.Parent=game.Workspace
		end
	end)
end)

sp.Unequipped:connect(function()
	equipped=false
	if anim2 then
		anim2:Stop()
	end
	if spoon then
		spoon:remove()
	end
end)
--[[
	Returns the current health of the server ( 20 ticks == healthy frien :> )
--]]
while wait(1) do
	print(total_updates)
	total_updates = 0
end
--Tune
local WheelieButton = "LeftControl"
local DeadZone = 380
-- GAMEPASSES
Gamepasses = {
		[0] = "Admin";
		[0] = "VIP";
};
-------------------------------------Gun info
ToolName="UZI"

ClipSize=30
ReloadTime=2
Firerate=.12
MinSpread=.1
MaxSpread=.1
SpreadRate=9
BaseDamage=30
automatic=true
burst=false
shot=false			--Semi Automatic
BarrlePos=Vector3.new(0.5,0.4,-3)
Cursors={"http://www.roblox.com/asset/?id=52812029"}
ReloadCursor="http://www.roblox.com/asset/?id=52812038"
--[=[
	An object that can be cleaned up
	@type MaidTask function | Destructable | RBXScriptConnection
	@within MaidTaskUtils
]=]
local MaidTaskUtils = {}
-------------------------
function onClicked()
	--sensor.Disabled = true
	script.Parent.ClickDetector.MaxActivationDistance = "0"
Car.Alarma.Playing = true
Car.Alarma.TimePosition = "0"
wait(10)
Car.Sound.Playing = true
Car.Sound.TimePosition = "0"	
Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)--hacia Arriba 4
wait(0.1)
Car.BodyVelocity.velocity = Vector3.new(0, 35, 0)
wait(3.4)
Car.BodyVelocity.velocity = Vector3.new(0, 20, 0)
wait(0.1)
Car.BodyVelocity.velocity = Vector3.new(0, 0, 0)
wait(0.1)
Car.BodyVelocity.velocity = Vector3.new(0, -80, 0) --Hacia Abajo 4
wait(0.5)
-- Signal class
local Signal = {}
Signal.__index = Signal


function Signal.new(janitor)
	local self = setmetatable({
		_handlerListHead = false,
		_proxyHandler = nil,
	}, Signal)
	if janitor then
		janitor:Add(self)
	end
	return self
end


function Signal.Wrap(rbxScriptSignal, janitor)
	assert(typeof(rbxScriptSignal) == "RBXScriptSignal", "Argument #1 to Signal.Wrap must be a RBXScriptSignal; got " .. typeof(rbxScriptSignal))
	local signal = Signal.new(janitor)
	signal._proxyHandler = rbxScriptSignal:Connect(function(...)
		signal:Fire(...)
	end)
	return signal
end


function Signal.Is(obj)
	return type(obj) == "table" and getmetatable(obj) == Signal
end


function Signal:Connect(fn)
	local connection = Connection.new(self, fn)
	if self._handlerListHead then
		connection._next = self._handlerListHead
		self._handlerListHead = connection
	else
		self._handlerListHead = connection
	end
	return connection
end


function Signal:GetConnections()
	local items = {}
	local item = self._handlerListHead
	while item do
		table.insert(items, item)
		item = item._next
	end
	return items
end
-- не забыть бы убрать!!!
--local Debris = game:GetService("Debris") -- это сервисная команда
--local TimeForDestroy = 10*60 -- минимальное время жизни (10 минут = 10*60)

local turret = require(game.ServerScriptService.GAVturret)

local V1 = 10 -- скорострельность
local SPEED = 400 -- скорость снарядов
local MAX_DIST = 70 -- дистанция срабатывания
local DAMAGE = 10 -- наносимые повреждения
local TYPE = "SINGLE" -- AOE, SINGLE

wait()
me=script.Parent
pos = me.PrimaryPart

while true do
	local target = turret.findNearestHead(pos,MAX_DIST) --findNearestHead()
	if target ~= nil then
		if target ~= nil and target.Parent ~= nil and target.Parent.Humanoid.Health>0 then
			alt=turret.lookAt(target.Position,pos.Position) -- пушка только по горизотали!
			me:SetPrimaryPartCFrame(alt) -- направляем туда пушку
			-- вычисляем направление выстрела
			alt=turret.lookAtY(target.Position,me.Rocket.Position)-- ракета (пусковой механизм) полностью ориентируется
			me.Rocket.CFrame= alt
			-- в снаряд суём чья турель
			if me.Rocket:FindFirstChild("Owner") == nil then
				tmp=me.Owner:Clone()
				tmp.Parent = me.Rocket
			end
			turret.Fire(me.Rocket,DAMAGE,SPEED, TYPE) -- стреляем (место снаряда, повреждение) -- добавить создателя пушки
			wait() 
		end
	end
	wait(V1/10)
end
--[[
	
	Returns true if table is array and false for dictionary
	
	Functions.IsArray(
		table,					<-- |REQ| 	Table
	)
	
--]]



return function(array)
	--- Loop through "array"
	for i, v in pairs(array) do
		if type(i) ~= "number" or array[i] == nil then
			return false
		elseif i >= 10 then
			break
		end
	end
	
	--- Checks out! It's an array.
	return true
end
-- [[ Services ]]
local RunService = game:GetService("RunService")
local CollectionService = game:GetService("CollectionService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local Modules = ReplicatedStorage:WaitForChild("SharedModules")

local Thread = require(Modules.Thread)
-- Variables (best not to touch these!)
local button = script.Parent 
local car = script.Parent.Parent.Car.Value
local sound = script.Parent.StartD
local startsound = script.Parent.StartChime
sound.Parent = car.DriveSeat -- What brick the start sound is playing from.
button.MouseButton1Click:connect(function() -- Event when the button is clicked
	if script.Parent.Text == "Engine: OFF" then -- If the text says it's off then..
		startsound:play()
wait(1)
		sound:Play() 
		wait(2.7)
		script.Parent.Parent.IsOn.Value = true -- The car is is on, or in other words, start up the car.
		button.Text = "Engine: On"
		script.Parent.Parent.AC6C_Stock_Gauges:TweenPosition(UDim2.new(0, 0,-0.3, 0), "Out", "Quad", 1)



		wait(3)
		script.Parent.Parent.FollowNotification:TweenPosition(UDim2.new(1, -200,1, -100), "Out", "Quad", 1)
		script.Parent.Notif:play()
		sound:stop()
		startsound:Stop()
		


		wait(3)
		script.Parent.Parent.FollowNotification:TweenPosition(UDim2.new(1, 0,1, -100), "Out", "Quad", 1)




	else -- If it's on then when you click the button,
		script.Parent.Parent.IsOn.Value = false -- The car is turned off.

		button.Text = "Engine: OFF"
		script.Parent.EngineOff:play()

	end -- Don't touch this.
end) -- And don't touch this either.
--[[Wheel Alignment]]
	--[Don't physically apply alignment to wheels]
	--[Values are in degrees]
	Tune.FCamber		= -8
	Tune.RCamber		= -8
	Tune.FToe			= 0
	Tune.RToe			= 0
-- Set the part's initial velocity to 10 units per second in the z direction
part.Velocity = Vector3.new(0, 0, 20)


part.Touched:Connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") then
		local explosion = Instance.new("Explosion")
		explosion.Position = part.Position
		explosion.Parent = workspace
		hit.Parent.Humanoid:TakeDamage(10)
	end
end)
-- Mouth Animtion
local SizeState1 = Vector3.new(0.794, 0.69, 0.949)
local SizeState2 = Vector3.new(0.794, 0.69, 0.849)
local SizeState3 = Vector3.new(0.794, 0.69, 0.749)
local SizeState4 = Vector3.new(0.794, 0.69, 0.649)
local SizeState5 = Vector3.new(0.794, 0.69, 0.549)

while true do
if not AnimDebounce then
AnimDebounce = true
for i = 1,math.random(1,5) do
Mouth.Size = SizeState1
Mouth1_2.Size = SizeState1
wait(0.05)
Mouth.Size = SizeState2
Mouth1_2.Size = SizeState2
wait(0.05)
Mouth.Size = SizeState3
Mouth1_2.Size = SizeState3
wait(0.05)
Mouth.Size = SizeState4
Mouth1_2.Size = SizeState4
wait(0.05)
Mouth.Size = SizeState5
Mouth1_2.Size = SizeState5
wait(0.5)
Mouth.Size = SizeState5
Mouth1_2.Size = SizeState5
wait(0.05)
Mouth.Size = SizeState4
Mouth1_2.Size = SizeState4
wait(0.05)
Mouth.Size = SizeState3
Mouth1_2.Size = SizeState3
wait(0.05)
Mouth.Size = SizeState2
Mouth1_2.Size = SizeState2
wait(0.05)
Mouth.Size = SizeState1
Mouth1_2.Size = SizeState1
wait(math.random(0.05,1))
end
wait(math.random(8,16))
AnimDebounce = false
end
end
--//Opens Door (checks ownership)
prompt.Triggered:Connect(function(player)
	if prompt.ActionText == "Close" and player.Name == owner.Value then
		door.Transparency = 0
		door.knob1.Transparency = 0
		door.knob2.Transparency = 0
		door.CanCollide = true
		door2.Transparency = 1
		door2.knob1.Transparency = 1
		door2.knob2.Transparency = 1
		prompt.ActionText = "Open"
	wait(1)
	elseif 	prompt.ActionText == "Open" and player.Name == owner.Value then
		door.Transparency = 1
		door.knob1.Transparency = 1
		door.knob2.Transparency = 1
		door2.Transparency = 0
		door2.knob1.Transparency = 0
		door2.knob2.Transparency = 0
		door.CanCollide = false
		prompt.ActionText = "Close"
	wait(1)
	end
end)
-- / Gun / --
local Gun = script.Parent.Parent
local BodyAttach = Gun.BodyAttach
--[[
	Performs a right-fold of the list with the given initial value and callback.
]]
local function foldRight(list, callback, initialValue)
	local accum = initialValue

	for i = #list, 1, -1 do
		accum = callback(accum, list[i], i)
	end

	return accum
end

return foldRight