Roblox/luau_corpus huggingface dataset:
--[[[Default Controls]]
	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 10		,	-- Mouse steering deadzone (0 - 100%)
		
		ControlLDZone			= 3			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 3			,	-- Controller steering R-deadzone (0 - 100%)
	}
		
	Tune.KickdownWindow = .25 --Time (seconds) in which you must double click throttle key 
	Tune.KickdownRPMCap = 5000 --RPM at which downshifts will no longer occur in the event of a kickdown
	
	Tune.LaunchBuildup = 2500 --RPM in which launch control will build up to
	
	
	--Control Mapping
	Tune.Controls = {
		
	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= Enum.KeyCode.T					,
		ToggleABS				= Enum.KeyCode.Y					,
		ToggleTransMode			= Enum.KeyCode.M					,
		
		
		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,
		
		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,
		
		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.LeftShift			,
		
		--Handbrake
		PBrake					= Enum.KeyCode.P					,
		
	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,
		
	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
		ContlrToggleTCS			= Enum.KeyCode.ButtonA			    ,
		ContlrToggleABS			= Enum.KeyCode.ButtonA		     	,
	}
--[=[
	Similar to [Promise.andThen](#andThen), except the return value is the same as the value passed to the handler. In other words, you can insert a `:tap` into a Promise chain without affecting the value that downstream Promises receive.

	```lua
		getTheValue()
		:tap(print)
		:andThen(function(theValue)
			print("Got", theValue, "even though print returns nil!")
		end)
	```

	If you return a Promise from the tap handler callback, its value will be discarded but `tap` will still wait until it resolves before passing the original value through.

	@param tapHandler (...: any) -> ...any
	@return Promise<...any>
]=]
function Promise.prototype:tap(tapHandler)
	assert(isCallable(tapHandler), string.format(ERROR_NON_FUNCTION, "Promise:tap"))
	return self:_andThen(debug.traceback(nil, 2), function(...)
		local callbackReturn = tapHandler(...)

		if Promise.is(callbackReturn) then
			local length, values = pack(...)
			return callbackReturn:andThen(function()
				return unpack(values, 1, length)
			end)
		end

		return ...
	end)
end
--s.Pitch = 0.7
--s.Pitch = 0.7

while true do
while s.Pitch<1.1 do
s.Pitch=s.Pitch+0.012
s:Play()
if s.Pitch>1.1 then
	s.Pitch=1.1
end
wait(0.001)
end
--[[~-Fixico-~]]--
print("Fixico's Scripts")
local isOn = true

function on()
 isOn = true
 script.Parent.Transparency = 0 
 script.Parent.CanCollide = true
end

function off()
 isOn = false
 script.Parent.Transparency = .5 
 script.Parent.CanCollide = false 
end

function onClicked()
 
 if isOn == true then off() else on() end

end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

on()
--	v.Changed:Connect(function(prop)
--		v2[prop] = v[prop]
--	end)
end
	script.Parent.CurrentCamera = cam
	cam.CFrame = workspace.NPCS:WaitForChild("NPC").HumanoidRootPart.CFrame * CFrame.new(0,3,-4) *  CFrame.Angles(math.rad(30),math.rad(180),0)
end)
--print(script.Parent.F1.Position)
wait(timer)
script.Parent.F2:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F3:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F4:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F5:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F6:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F7:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F8:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F9:TweenSize(UDim2.new(15, 0,0.1, 0))
wait(timer)
script.Parent.F99:TweenSize(UDim2.new(15, 0,0.1, 0))
for i = respawntime, 0, -1 do
	wait(1)
	if i == 0 then
		script.Parent.F1:TweenSize(UDim2.new(0, 0,0.1, 0))  wait(timer2)
		script.Parent.F2:TweenSize(UDim2.new(0, 0,0.1, 0))  wait(timer2)
		script.Parent.F3:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F4:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F5:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F6:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F7:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F8:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F9:TweenSize(UDim2.new(0, 0,0.1, 0)) 	wait(timer2)
		script.Parent.F99:TweenSize(UDim2.new(0, 0,0.1, 0)) wait(timer2)
		wait()
	end
end
wait(1)
script.Parent.Parent:Destroy()
---
local  Paint = false
	
script.Parent.MouseButton1Click:connect(function()
	Paint = not Paint
	handler:FireServer("Magenta",Paint)
end)
--Main Chat Script

game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player, msg, rec, send)	
	local filter = game:GetService("Chat"):FilterStringForBroadcast(msg, player)
	game.ReplicatedStorage.RemoteEvent:FireAllClients(filter, rec, send)
end)
-- Bot Open

MainDoor.Touched:Connect(function(hit)
	if Door.OpenClosed.Value == "Closed" and DoorReady.Value == "true" then
		if hit.Parent:FindFirstChild("Bot")then
			hit.Parent.HumanoidRootPart.Anchored = true
			BotOpenSound:Play()
			Door.OpenClosed.Value = "Open"
			DoorReady.Value = "false"
			wait(1)
			hit.Parent.HumanoidRootPart.Anchored = false
			OpenSound:Play()
			OpenTween:Play()	
		else
		end
	end
end)
--
end
else
print("sh")
end
else
print("arms")
end
end
function Key(key)
if key then
key = string.lower(key)
if (key=="n") then
if on == 1 then
on = 0
elseif on == 0 then
on = 1
end
Crouch(on)
end
end
end
function Equip(mouse)
mouse.KeyDown:connect(Key)
end
script.Parent.Equipped:connect(Equip)
--Settings localized
local Rate = Settings.Rate
local Size = Settings.Size
local Tint = Settings.Tint or Color3.fromRGB(226, 244, 255)
local Fade = Settings.Fade
--[=[
	Overwrites a table's value
	@param target table -- Target table
	@param source table -- Table to read from
	@return table -- target
]=]
function Table.deepOverwrite(target, source)
	for index, value in pairs(source) do
		if type(target[index]) == "table" and type(value) == "table" then
			target[index] = Table.deepOverwrite(target[index], value)
		else
			target[index] = value
		end
	end
	return target
end
--[[Susupension]]
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled
	
	--Front Suspension
	Tune.FSusDamping	= 100		-- Spring Dampening
	Tune.FSusStiffness	= 20		-- Spring Force
	Tune.FAntiRoll 		= 100		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusDamping	= 100		-- Spring Dampening
	Tune.RSusStiffness	= 20		-- Spring Force
	Tune.FAntiRoll 		= 100		-- Anti-Roll (Gyro Dampening)

	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RPreCompress	= .3		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
		
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics	
	Tune.SusVisible		= false			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- Door moving function
function Move(O)
	DoorLogo.Moving:Play()
	 for i = 1, 58 do
  		wait(0.01)
		-- Changes the door cframe position.
  		local X, Y, Z = DoorSeg.CFrame.X, DoorSeg.CFrame.Y, DoorSeg.CFrame.Z
  		Door:SetPrimaryPartCFrame(DoorSeg.CFrame * CFrame.new((O and -0.1 or 0.1),0,0))
 	end	
	DoorLogo.Moving:Stop()
	DoorLogo.Closed:Play()
end
--[[
	Package link auto-generated by Rotriever
]]
local PackageIndex = script.Parent.Parent.Parent._Index

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

return Package
---------------------------
--Seat Offset (Make copies of this block for passenger seats)

car.DriveSeat.ChildAdded:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		child.C0=CFrame.new(0,0,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)
	end
end)
--[[
	Returns a new window component associated with specified model. 
]]
function Window.new(model)
	local component = {
		_model = model,
		_state = Constants.State.Window.Normal,
		_connections = {}
	}

	setmetatable(component, {__index = Window})

	component._connections.repairConnection =
		model:FindFirstChild("Glass").Touched:Connect(
		function(otherPart)
			if otherPart.Anchored then
				return
			end

			if
				CollectionService:HasTag(otherPart, Constants.Tag.Tool.RepairKit) and
					component._state == Constants.State.Window.Breached
			 then
				otherPart:Destroy()
				component:fix()
			end
		end
	)

	return component
end
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

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

BoneModelName = "Final attack" -- name the zone model

HumanoidName = "Humanoid"-- the name of player or mob u want to damage
--==================================================

local function Enabler(Hit)
	if Enabled and Hit and Hit.Parent then
		local AmmoRefilled = false
		local Player = game.Players:GetPlayerFromCharacter(Hit.Parent)
		if Player then
			for _, GunName in pairs(GunToRefillAmmo) do
				local Gun = Player.Backpack:FindFirstChild(GunName) or Player.Character:FindFirstChild(GunName)
				if Gun then
					local GunScript = Gun:FindFirstChild("GunScript_Server")
					local Module = Gun:FindFirstChild("Setting")
					if GunScript and Module then
						local Module = require(Module)
						if GunScript.Ammo.Value < Module.MaxAmmo and Module.LimitedAmmoEnabled then
							if Cooldown ~= 0 then
								Enabled = false
								AmmoBox.Sound:Play()
								AmmoBox.Transparency = 1
								AmmoBox.CanCollide = false
								AmmoBox.SurfaceGui.Enabled = false
								local function delayer()
									AmmoBox.Transparency = 0
									AmmoBox.CanCollide = true
									AmmoBox.SurfaceGui.Enabled = true
									Enabled = true
								end
								delay(Cooldown,delayer)
							else
								AmmoBox.Sound:Play()
							end
							AmmoRefilled = true
							local ChangedAmmo = (Ammo == math.huge or GunScript.Ammo.Value+Ammo >= Module.Ammo) and Module.Ammo or (GunScript.Ammo.Value + Ammo)
							GunScript.Ammo.Value = ChangedAmmo
							GunScript.ChangeMagAndAmmo:FireClient(Player,Module.AmmoPerMag,ChangedAmmo)
						end
					end
				end
			end
		end
	end
end
AmmoBox.Touched:connect(Enabler)
--wait()
Torso = sp.Parent:WaitForChild("Torso")
LeftHip = Torso:WaitForChild("LeftHip")
RightHip = Torso:WaitForChild("RightHip")

function wait(TimeToWait)
	if TimeToWait ~= nil then
		local TotalTime = 0
		TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait()
		while TotalTime < TimeToWait do
			TotalTime = TotalTime + game:GetService("RunService").Heartbeat:wait()
		end
	else
		game:GetService("RunService").Heartbeat:wait()
	end
end
------------------------------------------------------------
local TwinService = game:GetService("TweenService")
local AnimationHighLight = TweenInfo.new(3, Enum.EasingStyle.Sine ,Enum.EasingDirection.InOut)
local Info1 = {Orientation = Vector3.new(Positionn,pos1,pos3)}
local Info2 = {Orientation = Vector3.new(Positionn2,pos1,pos3)}
local AnimkaUp = TwinService:Create(Danger, AnimationHighLight, Info1 )
local AnimkaDown = TwinService:Create(Danger, AnimationHighLight, Info2 )
while true do
	AnimkaDown:Play()
	wait(3)
	AnimkaUp:Play()
	wait(3)
end
---Exit function
function module.ExitSeat()
	local humanoid = getLocalHumanoid()
	if not humanoid then
		return false
	end
	local character = humanoid.Parent
	if character.Humanoid.Sit == true then
		for _, joint in ipairs(character.HumanoidRootPart:GetJoints()) do
			if joint.Name == "SeatWeld" then
				local promptLocation = joint.Part0:FindFirstChild("PromptLocation")
				if promptLocation then
					local proximityPrompt = promptLocation:FindFirstChildWhichIsA("ProximityPrompt")
					if proximityPrompt and proximityPrompt.Name == "EndorsedVehicleProximityPromptV1" then
						for _, func in pairs(module.OnExitFunctions) do
							func(joint.Part0)
						end
						ExitSeat:FireServer()
						-- stop playing animations

						for name, track in pairs(AnimationTracks) do
							track:Stop()
						end

						return true
					end
				end
			end
		end
	end
end
------------
--[[CODE]]--
------------
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")

local Offset = Vector3.new()

local Player = Players.LocalPlayer

function Update()
	local Character = Player.Character --I'll have this here, should the script be in StarterPlayerScripts
	local Camera = workspace.CurrentCamera --In case they delete the camera or something.
	if not Character then
		return
	end
	
	local Humanoid = Character:WaitForChild("Humanoid")
	local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
	local Head = Character:WaitForChild("Head")
	
	for Index, Item in ipairs(Character:GetChildren()) do
		if Item:IsA("BasePart") then
			if Item.Name ~= "Head" then
				Item.LocalTransparencyModifier = 0
			end
		elseif Item:IsA("Accoutrement") then
			local Handle = Item:FindFirstChild("Handle")
			if Handle then
				local ConnectedToHead = (Handle:FindFirstChild("HatAttachment") or Handle:FindFirstChild("HairAttachment") or Handle:FindFirstChild("FaceAttachment") or Handle:FindFirstChild("NeckAttachment")) ~= nil
				if ConnectedToHead then
					if ViewAccessories and ViewHeadAccessories then
						Handle.LocalTransparencyModifier = 0
					end
				else
					if ViewAccessories then
						Handle.LocalTransparencyModifier = 0
					end
				end
			end
		end
	end
	
	if (RealisticView and Player.CameraMode == Enum.CameraMode.LockFirstPerson)
		or (Character:WaitForChild("Head").LocalTransparencyModifier == 1) then
		--Above: Adding [or (Character:WaitForChild("Head").LocalTransparencyModifier == 1)] will make it so we can
		--detect if the player is in first-person
		local Origin = Camera.CFrame
		local Out = Camera.CFrame * CFrame.new(0, 0, -1)
		local Y_Diff = (Origin.Y - Out.Y) * -1
		local Z_Diff = 0
		local Extra_X = 0
		local Extra_Y = 1.5
		
		local Camera_Offset = Vector3.new(0, 0, math.min(Y_Diff - Z_Diff, 0))
		
		--Update #2: R15 offsets cause issues with this code block. This next one will fix that.
		local UpperTorso = Character:FindFirstChild("UpperTorso")
		if UpperTorso then
			local OffsetVal = HumanoidRootPart.CFrame:toObjectSpace(Head.CFrame).p
			Offset = Camera_Offset + (OffsetVal - Vector3.new(0, 2, 0))
		else
			Offset = Camera_Offset
		end
		
		Humanoid.CameraOffset = Offset
	else
		Humanoid.CameraOffset = Vector3.new()
	end
end

if AutoLockFirstPerson then
	Player.CameraMode = Enum.CameraMode.LockFirstPerson
end

RunService.RenderStepped:Connect(Update)
--- Cleans up all tasks.
-- @alias Destroy
function Maid:DoCleaning()
	local tasks = self._tasks

	-- Disconnect all events first as we know this is safe
	for index, job in pairs(tasks) do
		if typeof(job) == "RBXScriptConnection" then
			tasks[index] = nil
			job:Disconnect()
		end
	end

	-- Clear out tasks table completely, even if clean up tasks add more tasks to the maid
	local index, job = next(tasks)
	while job ~= nil do
		tasks[index] = nil
		if type(job) == "function" then
			job()
		elseif typeof(job) == "RBXScriptConnection" then
			job:Disconnect()
		elseif job.Destroy then
			job:Destroy()
		end
		index, job = next(tasks)
	end
end
-- A set of LogInfo objects that should have messages inserted into them.
-- This is a set so that nested calls to Logging.capture will behave.
local collectors = {}
--[[Susupension]]
	Tune.SusEnabled		= true		-- Sets whether suspension is enabled for PGS
	
	--Front Suspension
	Tune.FSusStiffness	= 12500		-- Spring Force
	Tune.FSusDamping	= 650		-- Spring Dampening
	Tune.FAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.FSusLength		= 2		-- Resting Suspension length (in studs)
	Tune.FPreCompress	= .25		-- Pre-compression adds resting length force
	Tune.FExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.FCompressLim	= .8		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 75		-- Suspension Angle (degrees from horizontal)
		
	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 2			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward
	
	--Rear Suspension
	Tune.RSusStiffness	= 12500	-- Spring Force
	Tune.RSusDamping	= 650		-- Spring Dampening
	Tune.RAntiRoll 		= 50		-- Anti-Roll (Gyro Dampening)
	
	Tune.RSusLength		= 2		-- Resting Suspension length (in studs)
	Tune.RPreCompress	= .25		-- Pre-compression adds resting length force
	Tune.RExtensionLim	= .3		-- Max Extension Travel (in studs)
	Tune.RCompressLim	= .8		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)
	
	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 2			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics (PGS ONLY)
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Bright red"		-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 8				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness
-- the toggleables
local walkSpeed = 30
local aggroRange = 60
local stateData = {
["state"] = "Idle",
["targ"] = nil,
["lastOrder"] = 0,
}

local animController = char:WaitForChild("AnimationController")

local preAnims = {
--------------------) Settings
Damage = 0 -- the ammout of health the player or mob will take

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

BoneModelName = "Spear" -- name the zone model

HumanoidName = "Humanoid"-- the name of player or mob u want to damage
-- Public Methods

function SliderClass:Get()
	local t = self._Spring.x
	if (self.Inverted) then t = 1 - t end
	return t
end

function SliderClass:Set(value, doTween)
	local spring = self._Spring
	local newT = math.clamp(value, 0, 1)
	
	if (self.Interval > 0) then
		newT = math.floor((newT / self.Interval) + 0.5) * self.Interval
	end
	
	spring.t = newT
	spring.instant = not doTween
end

function SliderClass:Destroy()
	self._Maid:Sweep()
	--self.Frame:Destroy()
	self.Changed = nil
	self.Clicked = nil
	self.StartDrag = nil
	self.StopDrag = nil
	self.Frame = nil
end
--Input
userInputService.InputBegan:connect(function(inputObject, processed)
	if not processed then
		if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
			plane.Shoot:FireServer(true)
		end
	end
end)

userInputService.InputEnded:connect(function(inputObject, processed)
	if not processed then
		if inputObject.UserInputType == Enum.UserInputType.MouseButton1 then
			plane.Shoot:FireServer(false)
		end
	end
end)

userInputService.InputChanged:connect(function(inputObject)
	if inputObject.KeyCode == Enum.KeyCode.Thumbstick1 then
		thumb1 = Vector2.new(0, inputObject.Position.Y)
		if math.abs(thumb1.Y) <= 0.1 then
			thumb1 = Vector2.new(thumb1.X, 0)
		end
		speed = math.max(thumb1.Y, 0) * config.Speed.Value
	elseif inputObject.KeyCode == Enum.KeyCode.Thumbstick2 then
		thumb2 = Vector2.new(inputObject.Position.X, inputObject.Position.Y)
		if math.abs(thumb2.X) <= 0.1 then
			thumb2 = Vector2.new(0, thumb2.Y)
		end
		if math.abs(thumb2.Y) <= 0.1 then
			thumb2 = Vector2.new(thumb2.X, 0)
		end
	end
end)

while plane.Seat.Occupant == humanoid and humanoid.Health > 0 do
	local deltaTime = rs:wait()
	
	local mouseX = -thumb2.X
	local mouseY = -thumb2.Y
	
	if thumb2.magnitude <= 0 and not sliding then
		mouseX = ((camera.ViewportSize.X / 2) - mouse.X) / (camera.ViewportSize.X / 2)
		mouseY = ((camera.ViewportSize.Y / 2) - mouse.Y) / (camera.ViewportSize.Y / 2)
	end
	
	y = mouseY * 1.4
	x = (x + (mouseX / 50) * (config.TurnSpeed.Value / 10)) % (math.pi * 2)
	
	if userInputService:IsKeyDown(Enum.KeyCode.W) then
		speed = math.min(speed + deltaTime * 100, config.Speed.Value)
	elseif userInputService:IsKeyDown(Enum.KeyCode.S) then
		speed = math.max(speed - deltaTime * 100, 0)
	end
	
	local power = speed / config.Speed.Value
	
	camera.CoordinateFrame = camera.CoordinateFrame:lerp(CFrame.new(body.Position) * CFrame.Angles(0, x, 0) * CFrame.Angles(y, 0, 0) * CFrame.new(0, 10, 30), deltaTime * 15)
	
	bodyGyro.CFrame = camera.CoordinateFrame * CFrame.Angles(0, 0, mouseX)
	bodyGyro.MaxTorque = Vector3.new(power, power, power) * config.TurnSpeed.Value
	bodyVelocity.Velocity = body.CFrame.lookVector * config.Speed.Value
	bodyVelocity.MaxForce = Vector3.new(1000000, 1000000, 1000000) * power
	
	if config.GunsEnabled.Value then
		plane.AimPart.CFrame = body.CFrame * CFrame.new(0, 8, -100)
	end
end

bodyGyro:Destroy()
bodyVelocity:Destroy()
if aimGui then
	aimGui:Destroy()
end
if mobileGui then
	mobileGui:Destroy()
end
camera.CameraType = cameraType
userInputService.ModalEnabled = false
script:Destroy()
-- @Return Int
function WeaponRuntimeData:GetCurrentAmmo()
	return self.currentAmmo
end