Pinkstack/roblox-luau-corpus-text huggingface dataset:
--!nonstrict
-- Roblox character sound script



local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local AtomicBinding = require(script:WaitForChild("AtomicBinding"))

local function loadFlag(flag: string)
	local success, result = pcall(function()
		return UserSettings():IsUserFeatureEnabled(flag)
	end)
	return success and result
end

local FFlagUserAtomicCharacterSoundsUnparent = loadFlag("UserAtomicCharacterSoundsUnparent")

local SOUND_DATA : { [string]: {[string]: any}} = {
	Climbing = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
	},
	Died = {
		SoundId = "rbxasset://sounds/uuhhh.mp3",
	},
	FreeFalling = {
		SoundId = "rbxasset://sounds/action_falling.mp3",
		Looped = true,
	},
	GettingUp = {
		SoundId = "rbxasset://sounds/action_get_up.mp3",
	},
	Jumping = {
		SoundId = "rbxasset://sounds/action_jump.mp3",
	},
	Landing = {
		SoundId = "rbxasset://sounds/action_jump_land.mp3",
	},
	Running = {
		SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3",
		Looped = true,
		Pitch = 1.85,
	},
	Splash = {
		SoundId = "rbxasset://sounds/impact_water.mp3",
	},
	Swimming = {
		SoundId = "rbxasset://sounds/action_swim.mp3",
		Looped = true,
		Pitch = 1.6,
	},
}
-- Activation]:


if TurnCharacterToMouse == true then
	MseGuide = true
	HeadHorFactor = 0
	BodyHorFactor = 0
end

game:GetService("RunService").RenderStepped:Connect(function()
	local CamCF = Cam.CoordinateFrame
	if ((IsR6 and Body:WaitForChild("Torso")) or Body:WaitForChild("UpperTorso"))~=nil and Body:WaitForChild("Head")~=nil then	--[Check for the Torso and Head...]
		local TrsoLV = Trso.CFrame.lookVector
		local HdPos = Head.CFrame.p
		if IsR6 and Neck or Neck and Waist then	--[Make sure the Neck still exists.]
			if Cam.CameraSubject:IsDescendantOf(Body) or Cam.CameraSubject:IsDescendantOf(Plr) then
				local Dist = nil;
				local Diff = nil;
				if not MseGuide then	--[If not tracking the Mouse then get the Camera.]
					Dist = (Head.CFrame.p-CamCF.p).magnitude
					Diff = Head.CFrame.Y-CamCF.Y
					if not IsR6 then	--[R6 and R15 Neck rotation C0s are different; R15: X axis inverted and Z is now the Y.]
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aSin(Diff/Dist)*HeadVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
						Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang((aSin(Diff/Dist)*BodyVertFactor), -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
					else	--[R15s actually have the properly oriented Neck CFrame.]
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aSin(Diff/Dist)*HeadVertFactor), 0, -(((HdPos-CamCF.p).Unit):Cross(TrsoLV)).Y*HeadHorFactor),UpdateSpeed/2)
					end
				else
					local Point = Mouse.Hit.p
					Dist = (Head.CFrame.p-Point).magnitude
					Diff = Head.CFrame.Y-Point.Y
					if not IsR6 then
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang(-(aTan(Diff/Dist)*HeadVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor, 0), UpdateSpeed/2)
						Waist.C0 = Waist.C0:lerp(WaistOrgnC0*Ang(-(aTan(Diff/Dist)*BodyVertFactor), (((HdPos-Point).Unit):Cross(TrsoLV)).Y*BodyHorFactor, 0), UpdateSpeed/2)
					else
						Neck.C0 = Neck.C0:lerp(NeckOrgnC0*Ang((aTan(Diff/Dist)*HeadVertFactor), 0, (((HdPos-Point).Unit):Cross(TrsoLV)).Y*HeadHorFactor), UpdateSpeed/2)
					end
				end
			end
		end
	end
	if TurnCharacterToMouse == true then
		Hum.AutoRotate = false
		Core.CFrame = Core.CFrame:lerp(CFrame.new(Core.Position, Vector3.new(Mouse.Hit.p.x, Core.Position.Y, Mouse.Hit.p.z)), UpdateSpeed / 2)
	else
		Hum.AutoRotate = true
	end
end)
--Variables--


local set = script.Settings
local sp = set.Speed
local enabled = set.Enabled
local hum = script.Parent:WaitForChild("Humanoid")
local humanim = hum:LoadAnimation(script:FindFirstChildOfClass("Animation"))

if enabled.Value == true then
	humanim:Play()
	humanim.Looped = true
	humanim:AdjustSpeed(sp.Value)
end
--------END STAGE--------
--------CREW--------



game.Workspace.crewp1.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.LeftBackground.Value)..""
game.Workspace.crewp2.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.RightBackground.Value)..""
game.Workspace.crewp3.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.LeftBackground.Value)..""
game.Workspace.crewp4.Decal.Texture = "http://www.roblox.com/asset/?id="..(game.Workspace.RightBackground.Value)..""
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 450		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 4.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 100		-- 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)
-- Check if character is there


if script.Owner.Value.Character ~= nil and script.Owner.Value.Character:FindFirstChild("Humanoid") ~= nil then
	
	-- Record base walkspeed
	local baseWalkSpeed = script.Owner.Value.Character.Humanoid.WalkSpeed
	
	-- Make it to change the walkspeed on knife entry/exit
	script.Owner.Value.Character.ChildAdded:connect(function(child)
		if child.Name == "Knife" and script.Owner.Value.Character:FindFirstChild("Humanoid") and script.Owner.Value.Character.Humanoid.WalkSpeed == baseWalkSpeed then
			script.Owner.Value.Character.Humanoid.WalkSpeed = baseWalkSpeed * WALKSPEED_CHANGE
		end
	end)
	script.Owner.Value.Character.ChildRemoved:connect(function(child)
		if child.Name == "Knife" and script.Owner.Value.Character:FindFirstChild("Humanoid") and script.Owner.Value.Character.Humanoid.WalkSpeed ~= baseWalkSpeed then
			script.Owner.Value.Character.Humanoid.WalkSpeed = baseWalkSpeed
		end
	end)
	
end
-- i know this is a bad code ♥♦♣♠


local toggle1 = false
local deb1 = false
local toggle2 = false
local deb2 = false

local function drawer1()
	if not deb1 then
		deb1 = true
		local anim
		if not toggle1 then
			anim = TS:Create(cab1,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cab1.CFrame * CFrame.new(0,0,.95)})
		else
			anim = TS:Create(cab1,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cab1.CFrame * CFrame.new(0,0,-.95)})
		end
		anim.Completed:Connect(function()
			toggle1 = not toggle1
			deb1 = false
		end)
		anim:Play()
	end
end

local function drawer2()
	if not deb2 then
		deb2 = true
		local anim
		if not toggle2 then
			anim = TS:Create(cab2,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cab2.CFrame * CFrame.new(0,0,.95)})
		else
			anim = TS:Create(cab2,TweenInfo.new(.6,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut,0,false,0),{CFrame = cab2.CFrame * CFrame.new(0,0,-.95)})
		end
		anim.Completed:Connect(function()
			toggle2 = not toggle2
			deb2 = false
		end)
		anim:Play()
	end
end

CD1.MouseClick:Connect(function()
	drawer1()
end)
CD1_2.MouseClick:Connect(function()
	drawer1()
end)

CD2.MouseClick:Connect(function()
	drawer2()
end)
CD2_2.MouseClick:Connect(function()
	drawer2()
end)
--Input Handler


function DealWithInput(input,IsRobloxFunction)
	if (UserInputService:GetFocusedTextBox()==nil) and not _InControls then --Ignore when UI Focus
		--Toggle PBrake
		if _IsOn and input.KeyCode ==_CTRL["ContlrPBrake"] or input.KeyCode==_CTRL["PBrake"] then
			if input.UserInputState == Enum.UserInputState.Begin then
				_PBrake = not _PBrake
			elseif input.UserInputState == Enum.UserInputState.End then
				if car.DriveSeat.Velocity.Magnitude>5 then _PBrake = false end
			end
		
		--Throttle
		elseif _IsOn and (input.KeyCode==_CTRL["Throttle"] or input.KeyCode == _CTRL["Throttle2"]) then
			if input.UserInputState == Enum.UserInputState.Begin then _GThrot = 1 else _GThrot = 0 end
			
		--Brake
		elseif (input.KeyCode==_CTRL["Brake"] or input.KeyCode == _CTRL["Brake2"]) then
			if input.UserInputState == Enum.UserInputState.Begin then _GBrake = 1 else _GBrake = 0 end
			
		--Steer Left
		elseif (input.KeyCode==_CTRL["SteerLeft"] or input.KeyCode == _CTRL["SteerLeft2"]) then
			if input.UserInputState == Enum.UserInputState.Begin then
				_GSteerT = -1
				_SteerL = true
			else
				if _SteerR then _GSteerT = 1 else _GSteerT = 0 end 
				_SteerL = false
			end
		--Steer Right
		elseif (input.KeyCode==_CTRL["SteerRight"] or input.KeyCode == _CTRL["SteerRight2"]) then
			if input.UserInputState == Enum.UserInputState.Begin then
				_GSteerT = 1
				_SteerR = true
			else
				if _SteerL then _GSteerT = -1 else _GSteerT = 0 end 
				_SteerR = false
			end
		end
		
		--Variable Controls
		if input.UserInputType.Name:find("Gamepad") then
			--Gamepad Steering
			if input.KeyCode == _CTRL["ContlrSteer"] then
				if input.Position.X>= 0 then
					local cDZone = math.min(.99,_Tune.Peripherals.ControlRDZone/100)
					if math.abs(input.Position.X)>cDZone then _GSteerT = (input.Position.X-cDZone)/(1-cDZone) else _GSteerT = 0 end
				else
					local cDZone = math.min(.99,_Tune.Peripherals.ControlLDZone/100)
					if math.abs(input.Position.X)>cDZone then _GSteerT = (input.Position.X+cDZone)/(1-cDZone) else _GSteerT = 0 end
				end
				
			--Gamepad Throttle
			elseif _IsOn and input.KeyCode == _CTRL["ContlrThrottle"] then
				_GThrot = input.Position.Z
				
			--Gamepad Brake
			elseif input.KeyCode == _CTRL["ContlrBrake"] then
				_GBrake = input.Position.Z
			end
		end
	else
		_GThrot = 0
		_GSteerT = 0
		_GBrake = 0
	end
end
UserInputService.InputBegan:connect(DealWithInput)
UserInputService.InputChanged:connect(DealWithInput)
UserInputService.InputEnded:connect(DealWithInput)

while wait() do
	script.Parent.Values.Throttle.Value = _GThrot
	script.Parent.Values.Brake.Value = _GBrake
	script.Parent.Values.SteerT.Value = _GSteerT
	script.Parent.Values.PBrake.Value = _PBrake
end
--[[
	This function is used to get all of the AccessoryTypes that are used by the
	items in state so that we have a list of possible filters that always return
	at least one item.
]]



local MerchBooth = script:FindFirstAncestor("MerchBooth")

local matchAssetTypeToAccessoryType = require(MerchBooth.Modules.matchAssetTypeToAccessoryType)
local serverReducer = require(MerchBooth.Reducers.serverReducer)
local types = require(MerchBooth.types)

local function getAvailableAccessoryTypes(itemInfo: serverReducer.ItemInfoState): { types.ProductType }
	local accessoryTypeDict: { [types.ProductType]: boolean } = {}
	local accessoryTypes: { types.ProductType } = {}

	for _, item in pairs(itemInfo) do
		if item.productType == Enum.InfoType.Asset then
			accessoryTypeDict[matchAssetTypeToAccessoryType(item.assetType)] = true
		else
			accessoryTypeDict[item.productType] = true
		end
	end

	for accessoryType in pairs(accessoryTypeDict) do
		table.insert(accessoryTypes, accessoryType)
	end

	return accessoryTypes
end

return getAvailableAccessoryTypes
--local Text = thirstGui:WaitForChild("Back"):WaitForchild("Text")


local plr = game.Players.LocalPlayer

repeat wait() until plr.Character -- waiting for player to load

local UIS = game:GetService("UserInputService")
local hum = plr.Character:WaitForChild("Humanoid")
local maxThirst = 100
local maxHunger = 100
local thirstValue
local hungerValue

if plr:FindFirstChild("HungerVal") then
	hungerValue = plr.HungerVal
	hungerValue.Value = maxHunger
else
	Instance.new("IntValue", plr).Name = "HungerVal"
	plr.HungerVal.Value = maxHunger
	hungerValue = plr.HungerVal
end

if plr:FindFirstChild("ThirstVal") then
	thirstValue = plr.ThirstVal
	thirstValue.Value = maxThirst
else
	Instance.new("IntValue", plr).Name = "ThirstVal"
	plr.ThirstVal.Value = maxThirst
	thirstValue = plr.ThirstVal
end

local hungerValue = plr:WaitForChild("HungerVal")
local Frame = thirstGui.Frame

local TS = game:GetService("TweenService")

thirstValue.Changed:connect(function()

	script.Parent.Frame.Sede.ImageTransparency = 0
	script.Parent.Frame.Fome.ImageTransparency = 0
	
	if thirstValue.Value > 60 then
		TS:Create(Frame.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,255,255),ImageTransparency = 1}):Play()
	elseif thirstValue.Value <= 0 then
		MedicSys.Fome:FireServer()
	elseif thirstValue.Value <= 30 then
		TS:Create(Frame.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,((thirstValue.Value/30)*255),((thirstValue.Value/60)*255)),ImageTransparency = 0}):Play()
	elseif thirstValue.Value <= 60 then
		TS:Create(Frame.Sede,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,255,((thirstValue.Value/60)*255)),ImageTransparency = 0}):Play()
	end
end)


hungerValue.Changed:connect(function()

	if hungerValue.Value > 60 then
		TS:Create(Frame.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,255,255),ImageTransparency = 1}):Play()
	elseif hungerValue.Value <= 0 then
		MedicSys.Fome:FireServer()
	elseif hungerValue.Value <= 30 then
		TS:Create(Frame.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,((hungerValue.Value/30)*255),((hungerValue.Value/60)*255)),ImageTransparency = 0}):Play()
	elseif hungerValue.Value <= 60 then
		TS:Create(Frame.Fome,TweenInfo.new(1,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{ImageColor3 = Color3.fromRGB(255,255,((hungerValue.Value/60)*255)),ImageTransparency = 0}):Play()
	end
end)

coroutine.wrap(function()
	while wait(ServerConfig.HungerWaitTime) do
		if hungerValue.Value - 1 >= 0 then
			hungerValue.Value = hungerValue.Value - 1
		end
	end
end)()

coroutine.wrap(function()
	while wait(ServerConfig.ThirstWaitTime) do
		if thirstValue.Value - 1 >= 0 then
			thirstValue.Value = thirstValue.Value - 1
		end
	end
end)
-- goro7



local voteStates = game.ServerStorage.States.MapVote

voteStates.CurrentlyVoting.Changed:connect(function()
	
	-- Adjust visiblity
	local newVal = voteStates.CurrentlyVoting.Value
	script.Parent.Image.Visible = newVal
	script.Parent.CountLabel.Visible = newVal
	script.Parent.MapName.Visible = newVal
	script.Parent.Count.Visible = newVal
	
end)

voteStates.Map1.Changed:connect(function()
	
	-- Update map name and image
	local newMap = voteStates.Map1.Value
	script.Parent.Image.Image = newMap.ImageAsset.Value
	script.Parent.MapName.Text = newMap.Name
	
end)

voteStates.Count1.Changed:connect(function()
	
	-- Update map count
	script.Parent.Count.Text = voteStates.Count1.Value
	
end)
--------LEFT DOOR 4--------


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.l43.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.l41.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(102)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(102)
--For running in command bar



local function setLayeredClothingOrder(obj)
	if obj:IsA("WrapLayer") then
		if obj.Order ~= 1 then
			obj.Order = 1
			print(obj.Name)
		end
	end
	for _, child in ipairs(obj:GetChildren()) do
		setLayeredClothingOrder(child)
	end
end

setLayeredClothingOrder(game:GetService("ReplicatedStorage"))
-----------------
--| Constants |--
-----------------



local BLAST_RADIUS = 35 -- Blast radius of the explosion
local BLAST_DAMAGE = 1000 -- Amount of damage done to players
local BLAST_FORCE = 1000 -- Amount of force applied to parts
local idealVelocity

local IGNORE_LIST = {rocket = 1, handle = 1, effect = 1, water = 1} -- Rocket will fly through things named these
-- Get references to the DockShelf and its children


local fldr = script.Parent.Parent.Parent.CreateFrame

local createButton = fldr.Parent.Create

local btn = script.Parent

local function toggleWindow()
		-- Close the window by tweening back to the button position and size
		fldr:TweenSizeAndPosition(
			UDim2.new(1, 0, 0.022, 0),
			UDim2.new(0.0,0,0.978,0),
			'Out',
			'Quad',
			0.4,
			false,
			function()
			fldr.Visible = false
			createButton.Visible = true
			end
		)
end
--[[Engine]]


	--Torque Curve
	Tune.Horsepower		= 250		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 6000		--		Use sliders to manipulate values
	Tune.Redline		= 6700		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 5500
	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)
--//Controller//--


game.Players.PlayerAdded:Connect(function(Player)
	local Leaderboard = Instance.new("Folder")
	Leaderboard.Name = "leaderstats"
	Leaderboard.Parent = Player
	
	local Currency = Instance.new("IntValue")
	Currency.Name = Configuration.CurrencyName.Value
	Currency.Parent = Leaderboard
	
end)
--[[Status Vars]]



	local _IsOn = _Tune.AutoStart
	if _Tune.AutoStart then script.Parent.IsOn.Value=true end
	
	local _GSteerT=0
	local _GSteerC=0
	local _GThrot=0
	local _GBrake=0
	
	local _ClutchOn = true
	local _ClPressing = false
	local _RPM = 0
	local _HP = 0
	local _OutTorque = 0
	local _CGear = 0
	local _PGear = _CGear
	
	local _TMode = _Tune.TransModes[1]
	
	local _MSteer = false
	local _SteerL = false
	local _SteerR = false
	local _PBrake = false
	local _TCS = _Tune.TCSEnabled
	local _TCSActive = false
	local _ABS = _Tune.ABSEnabled
	local _ABSActive = false
	
	local FlipWait=tick()
	local FlipDB=false
	
	local _InControls = false
-- made by Weeve. for all of you lamo scripters out there, can you at least leave my name here?
-- don't edit anything here


seat = script.Parent

function onChildAdded(part)
	script.Parent.EngineStart:Play()
	script.Parent.EngineStop:Stop()
	wait(2.675)
	script.Parent.EngineSound:Play()
end

function onChildRemoved(part)
	script.Parent.EngineStop:Play()
	script.Parent.EngineSound:Stop()
	script.Parent.EngineStart:Stop()
end
seat.ChildAdded:connect(onChildAdded)
seat.ChildRemoved:connect(onChildRemoved)
-----------------------------------------


puff = Instance.new("Part")
script.Parent.Anchored=true
puff.CanCollide = false
puff.Anchored = true
puff.Name = "whoosh"
puff.Transparency = 0
puff.BrickColor = BrickColor.new("Pearl")
puff.formFactor = "Custom"
puff.TopSurface = 0
puff.BottomSurface = 0
puff.Size = Vector3.new(1,1,1)
puff.Material = Enum.Material.SmoothPlastic
puff.CastShadow = false
script.Mesh:clone().Parent = puff
local erase = script.tweener:Clone()
erase.Parent = puff
erase.Disabled = false
puff.Parent = game.Workspace
puff.Position = script.Parent.Position
puff.CastShadow = false

puff = Instance.new("Part")
script.Parent.Anchored=true
puff.CanCollide = false
puff.Anchored = true
puff.Name = "whoosh"
puff.Transparency = 0
puff.BrickColor = BrickColor.new("Pearl")
puff.formFactor = "Custom"
puff.TopSurface = 0
puff.BottomSurface = 0
puff.Size = Vector3.new(1,1,1)
puff.Material = Enum.Material.Neon
puff.CastShadow = false
script.Mesh:clone().Parent = puff
local erase = script.tweener2:Clone()
erase.Parent = puff
erase.Disabled = false
puff.Parent = game.Workspace
puff.Position = script.Parent.Position
puff.CastShadow = false

puff = Instance.new("Part")
script.Parent.Anchored=true
puff.CanCollide = false
puff.Anchored = true
puff.Name = "whoosh"
puff.Transparency = 0
puff.BrickColor = BrickColor.new("Pearl")
puff.formFactor = "Custom"
puff.TopSurface = 0
puff.BottomSurface = 0
puff.Size = Vector3.new(1,1,1)
puff.Material = Enum.Material.SmoothPlastic
puff.CastShadow = false
script.Mesh:clone().Parent = puff
local erase = script.tweener3:Clone()
erase.Parent = puff
erase.Disabled = false
puff.Parent = game.Workspace
puff.Position = script.Parent.Position
puff.CastShadow = false
--[[Transmission]]


	Tune.TransModes		= {"Auto", "Semi"}								--[[
	[Modes]
		"Auto"		: Automatic shifting
		"Semi"		: Clutchless manual shifting, dual clutch transmission
		"Manual"	: Manual shifting with clutch
		
		>Include within brackets
			eg: {"Semi"} or {"Auto", "Manual"}								
		>First mode is default mode													]]
	
	--Automatic Settings
	Tune.AutoShiftMode	= "Speed"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM											]]	
	Tune.AutoUpThresh	= -200		--Automatic upshift point 	(relative to peak RPM, positive = Over-rev)
	Tune.AutoDownThresh = 1400		--Automatic downshift point (relative to peak RPM, positive = Under-rev)
	
	--Gear Ratios
	Tune.FinalDrive		= 3.7				-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3			,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		2.6			,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		1.8			,
		--[[ 3 ]]		1.3			,
		--[[ 4 ]]		1			,
		--[[ 5 ]]		.8			,
		--[[ 6 ]]		.6			,				
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-- Set defaults


TextLabel.defaultProps = {
    BackgroundTransparency = 1,
    BorderSizePixel = 0,
    Size = UDim2.new(1, 0, 1, 0),
    TextSize = 16,
    Font = 'SourceSans',
    TextColor3 = Color3.new(0, 0, 0),
    TextXAlignment = 'Left'
}
--yep


local deb = false
local info = TweenInfo.new(tweenTime, easingStyle, easingDirection, repeats, reverse, delayTime)
local function tweenModel(model, CF)
	local CFrameValue = Instance.new("CFrameValue")
	CFrameValue.Value = model:GetPrimaryPartCFrame()

	CFrameValue:GetPropertyChangedSignal("Value"):Connect(function()
		model:SetPrimaryPartCFrame(CFrameValue.Value)
	end)
	
	local tween = tweenService:Create(CFrameValue, info, {Value = CF})
	tween:Play()
	
	tween.Completed:Connect(function()
		CFrameValue:Destroy()
		script.Disabled=true
	end)
end
wait(0)
tweenModel(Model, goal1.CFrame)
-- Configurable variables


local configs = require(tool.Configurations)
currentAmmo = configs.clipSize
local attackCooldown = configs.attackCooldown
local range = configs.range
local bulletSpeed = configs.bulletSpeed
local bulletDrop = configs.bulletDrop
local headDamage = configs.headDamage
local torsoDamage = configs.torsoDamage
local otherDamage = configs.otherDamage
local reloadTime = configs.reloadTime
local clipSize = configs.clipSize
local extraAmmo = configs.extraAmmo
local hitParticles = configs.hitParticles
local infiniteAmmo = configs.infiniteAmmo
local consolidateAmmo = configs.consolidateAmmo

currentAmmo = clipSize

if infiniteAmmo then
	ammoLeft = clipSize
else
	ammoLeft = extraAmmo
end