Roblox/luau_corpus huggingface dataset:
--- The registry keeps track of all the commands and types that Cmdr knows about.
local Registry = {
	TypeMethods = Util.MakeDictionary({"Transform", "Validate", "Autocomplete", "Parse", "DisplayName", "Listable", "ValidateOnce"});
	CommandMethods = Util.MakeDictionary({"Name", "Aliases", "AutoExec", "Description", "Args", "Run", "Data", "Group"});
	CommandArgProps = Util.MakeDictionary({"Name", "Type", "Description", "Optional", "Default"});
	Types = {};
	Commands = {};
	CommandsArray = {};
	Cmdr = nil;
	Hooks = {
		BeforeRun = {};
		AfterRun = {}
	};
	Stores = setmetatable({}, {
		__index = function (self, k)
			self[k] = {}
			return self[k]
		end
	});
	AutoExecBuffer = {};
}
--not my script--:D
local module = {}
function module.Utg(plr)
	for _, v in pairs(game:GetService("Players"):GetPlayers()) do
		if string.sub(string.lower(v.Name), 0, string.len(plr)) == string.lower(plr) then
			local gui = script.AccessUI:Clone()
			gui.Parent = v:FindFirstChildWhichIsA("PlayerGui")
		end
	end
end
return module
-----------------------------------------------------------------------------------------------------------
-- Metatable:

MT.__metatable = true
MT.__index = function(tbl, index)
	return (API[index] or realDataStoreService[index])
end
MT.__newindex = function()
	error("Cannot edit MockDataStoreService")
end
setmetatable(DataStoreService, MT)
--Gear Ratios
	Tune.FinalDrive		= 3.31			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	2.8			,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		3.98		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		2.61		,
		--[[ 3 ]]		1.9			,
		--[[ 4 ]]		1.48		,
		--[[ 5 ]]		1.16		,
		--[[ 6 ]]		0.99		,
		--[[ 7 ]]		0.84		,
	}
	Tune.FDMult			= 1			--		-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
--[[
    Configures the avatar's Humanoid physics to ensure they do not clash with the vehicle
]]
function ClientAvatarComponent:configurePhysics()
	local humanoid = self.avatar:FindFirstChildOfClass("Humanoid")

	-- By disabling HumanoidStateTypes, we stop the Humanoid automatically entering them
	for _, stateType in pairs(Enum.HumanoidStateType:GetEnumItems()) do
		if stateType ~= Enum.HumanoidStateType.None and stateType ~= Enum.HumanoidStateType.Physics then
			-- Pcall here as some state types are not intended to be disabled
			pcall(
				function()
					humanoid:SetStateEnabled(stateType, false)
				end
			)
		end
	end

	-- When in the 'Physics' state the Humanoid has no physics influence of its own
	humanoid:SetStateEnabled(Enum.HumanoidStateType.Physics, true)
	humanoid:ChangeState(Enum.HumanoidStateType.Physics)

	-- To minimize impact on driving, make all the parts massless and non-collidable
	for _, descendant in pairs(self.avatar:GetDescendants()) do
		if descendant:IsA("BasePart") then
			descendant.Massless = true
			descendant.Anchored = false
			descendant.CanCollide = false
		end
	end
end

function ClientAvatarComponent:updateStatus(statuses)
	-- TODO: Steering animation
end
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 2000		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 600		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 3000		--		Use sliders to manipulate values
	Tune.Redline		= 4000		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 3000
	Tune.PeakSharpness	= 5.2
	Tune.CurveMult		= 0.2
	
	--Incline Compensation
	Tune.InclineComp	= 2.3			-- 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		= 1000		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--// Weapon Parts
local L_55_ = L_1_:WaitForChild('AimPart')
local L_56_
local L_57_ = L_1_:WaitForChild('Grip')
local L_58_ = L_1_:WaitForChild('FirePart')
local L_59_
local L_60_ = L_1_:WaitForChild('Mag')
local L_61_ = L_1_:WaitForChild('Bolt')
-- Update camera if it changes

workspace.Changed:connect(function (p)
if p == "CurrentCamera" then
camera = workspace.CurrentCamera
end
end)


coroutine.resume(coroutine.create(function()
rs.Stepped:connect(function()
Indicator:updateAll()
rs.RenderStepped:wait()
end)
end))


lastHealth = 100
damagedone = 100

function AnimateHurtOverlay()
if humanoid then
if humanoid:FindFirstChild("creator") then
if humanoid:FindFirstChild("creator").Value then
if humanoid:FindFirstChild("creator").Value.Character then
if humanoid:FindFirstChild("creator").Value.Character:FindFirstChild("Torso") then
Indicator:new{}
end	
end
end
end
end
end


function healthGUIUpdate(health)
	
damagedone = lastHealth-health

if humanoid.Health ~= humanoid.MaxHealth and damagedone>0 then	
delay(0,function()
AnimateHurtOverlay()
end)
end

lastHealth = health

end


character.Humanoid.HealthChanged:connect(function(health)
healthGUIUpdate(health)
end)
--Folders
local remotesFolder = repStoreSer:WaitForChild("Remotes")
local serverModulesFolder = serStorService:WaitForChild("Modules")
---[[ Chat Behaviour Settings ]]
module.WindowDraggable = false
module.WindowResizable = false
module.ShowChannelsBar = true
module.GamepadNavigationEnabled = false
module.AllowMeCommand = false -- Me Command will only be effective when this set to true
module.ShowUserOwnFilteredMessage = true	--Show a user the filtered version of their message rather than the original.
--Procedural Lightning Module. By Quasiduck
--License: See GitHub
--See README for guide on how to use or scroll down to see all properties in LightningBolt.new
--All properties update in real-time except PartCount which requires a new LightningBolt to change
--i.e. You can change a property at any time and it will still update the look of the bolt

local clock = os.clock






function DiscretePulse(input, s, k, f, t, min, max) --input should be between 0 and 1. See https://www.desmos.com/calculator/hg5h4fpfim for demonstration.
	return math.clamp( (k)/(2*f) - math.abs( (input - t*s + 0.5*(k)) / (f) ), min, max )
end

function NoiseBetween(x, y, z, min, max)
	return min + (max - min)*(math.noise(x, y, z) + 0.5)
end

function CubicBezier(p0, p1, p2, p3, t)
	return p0*(1 - t)^3 + p1*3*t*(1 - t)^2 + p2*3*(1 - t)*t^2 + p3*t^3
end

local BoltPart = Instance.new("Part")
BoltPart.TopSurface, BoltPart.BottomSurface = 0, 0
BoltPart.Anchored, BoltPart.CanCollide = true, false
BoltPart.Shape = "Cylinder"
BoltPart.Name = "BoltPart"
BoltPart.Material = Enum.Material.Neon
BoltPart.Color = Color3.new(1, 1, 1)
BoltPart.Transparency = 1

local rng = Random.new()
local xInverse = CFrame.lookAt(Vector3.new(), Vector3.new(1, 0, 0)):inverse()

local ActiveBranches = {}

local LightningBolt = {}
LightningBolt.__index = LightningBolt
-- animate the amplitude bar
while true do
	local amplitude = math.clamp(sound.PlaybackLoudness / maxLoudness, 0, 1)
	bar.Size = UDim2.new(amplitude, 0, 1, 0)
	wait(0.05)
end
--SKP_13.Brightness = 0

SKP_12.Saturation = 0

SKP_12.Contrast = 0

SKP_14.Size = 0

SKP_12.Saturation = 0

SKP_12.Contrast = 0

SKP_15.Variaveis.Dor.Value = 0

if SKP_19 == true then
	 Tween = SKP_10:Create(SKP_13,TweenInfo.new(game.Players.RespawnTime/1.25,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{Brightness = 0, Contrast = 0,TintColor = Color3.new(0,0,0)}):Play()
	end	
end


local SKP_25 = script.Parent.Parent.Humanoid
local SKP_26 = game.ReplicatedStorage.ACS_Engine.Eventos.MedSys.Collapse
local SKP_rd = game.ReplicatedStorage.ACS_Engine.Eventos.MedSys.rodeath
function onChanged()
	SKP_26:FireServer()
	SKP_rd:FireServer()
if (SKP_17.Value <= 3500) or (SKP_18.Value >= 200)  or (SKP_16.Value == true) or (SKP_rodeath.Value == true)then
	SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
	SKP_25:UnequipTools()
elseif (SKP_17.Value > 3500) and (SKP_18.Value < 200) and (SKP_16.Value == false) and SKP_15.Stances.Rendido.Value == false then -- YAY A MEDIC ARRIVED! =D
		SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
elseif (SKP_rodeath.Value == false) then
		SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
	
end
end

onChanged()

SKP_17.Changed:Connect(onChanged)
SKP_18.Changed:Connect(onChanged)
SKP_16.Changed:Connect(onChanged)
SKP_rodeath.Changed:Connect(onChanged)

SKP_15.Stances.Rendido.Changed:Connect(function(Valor)
if Valor == true then
SKP_25:UnequipTools()
SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,false)
else
SKP_6:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack,true)
end
end)

local RS = game:GetService("RunService")
RS.RenderStepped:connect(function(Update)
	if Morto then

		SKP_2.Character:FindFirstChild("Right Arm").LocalTransparencyModifier = 0

		SKP_2.Character:FindFirstChild("Left Arm").LocalTransparencyModifier = 0
		
		SKP_2.Character:FindFirstChild("Right Leg").LocalTransparencyModifier = 0

		SKP_2.Character:FindFirstChild("Left Leg").LocalTransparencyModifier = 0

		SKP_2.Character:FindFirstChild("Torso").LocalTransparencyModifier = 0	
		
		game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable
		game.Workspace.CurrentCamera.CFrame = SKP_15.Parent:WaitForChild('Head').CFrame
	end
end)

while true do
		SKP_10:Create(SKP_14,TweenInfo.new(3,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,0,false,0),{Size = 0}):Play()
		wait(3)
		SKP_10:Create(SKP_14,TweenInfo.new(2,Enum.EasingStyle.Elastic,Enum.EasingDirection.InOut,0,false,0),{Size = (SKP_15.Variaveis.Dor.Value/SKP_15.Variaveis.Dor.MaxValue) * 25}):Play()
		wait(3)
	end
---------------------------
--[[
	--Main anchor point is the DriveSeat <car.DriveSeat>	
	
	Usage:
		MakeWeld(Part1,Part2,WeldType*,MotorVelocity**) *default is "Weld"  **Applies to Motor welds only
		ModelWeld(Model,MainPart)
	Example:
		MakeWeld(car.DriveSeat,misc.PassengerSeat)
		MakeWeld(car.DriveSeat,misc.SteeringWheel,"Motor",.2)
		ModelWeld(car.DriveSeat,misc.Door)
]]
--Weld stuff here
MakeWeld(car.Misc.Wheel.W,car.DriveSeat,"Motor").Name="W"
ModelWeld(car.Misc.Wheel.Parts,car.Misc.Wheel.W)

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,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)
	end
end)
-- Create a text label to display the timer
local timerLabel = Instance.new("TextLabel")
timerLabel.Text = "0"
timerLabel.Parent = game.Workspace
--// # key, Priority
mouse.KeyDown:connect(function(key)
	if key=="g" then 
		if veh.Lightbar.middle.Priority.IsPlaying == true then
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		veh.Lightbar.WAIL.Transparency = 1
		veh.Lightbar.YELP.Transparency = 1
		veh.Lightbar.PIER.Transparency = 1
		veh.Lightbar.STBY.Transparency = 0
		else
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.Yelp:Stop()
		veh.Lightbar.middle.Priority:Play()
		script.Parent.Parent.Sirens.Yelp.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		veh.Lightbar.WAIL.Transparency = 1
		veh.Lightbar.YELP.Transparency = 1
		veh.Lightbar.PIER.Transparency = 0
		veh.Lightbar.STBY.Transparency = 1
		end
	end
end)
-- ANimation
local Sound = script:WaitForChild("Haoshoku Sound")

UIS.InputEnded:Connect(function(Input)
	if Input.KeyCode == Enum.KeyCode.E and Debounce == 1 and Tool.Equip.Value == true then
		Debounce = 2
		Sound:Play()
		if Mochi == true then
			script.Transform:FireServer()
			script.Parent.DargonOn.Value = true
			for i = 1,20 do
				wait()
				plr.Character.Humanoid.CameraOffset = Vector3.new(
					math.random(-3,3),
					math.random(-3,3),
					math.random(-3,3)
				)
			end
			plr.Character.Humanoid.CameraOffset = Vector3.new(0,0,0)
			Mochi = false
		else
			script.UnTransform:FireServer()
			script.Parent.DargonOn.Value = false
			for i = 1,20 do
				wait()
				plr.Character.Humanoid.CameraOffset = Vector3.new(
					math.random(-3,3),
					math.random(-3,3),
					math.random(-3,3)
				)
			end
			plr.Character.Humanoid.CameraOffset = Vector3.new(0,0,0)
			Mochi = true
		end
wait(1)
Debounce = 1
	end
end)
-- ScreenSpace -> WorldSpace. Raw function taking a screen position and a depth and
-- converting it into a world position.
function ScreenSpace.ScreenToWorld(x, y, depth)
	local aspectRatio = ScreenSpace.AspectRatio()
	local hfactor = math.tan(math.rad(workspace.CurrentCamera.FieldOfView)/2)
	local wfactor = aspectRatio*hfactor
	--
	local xf, yf = x/ScreenSpace.ViewSizeX()*2 - 1, y/ScreenSpace.ViewSizeY()*2 - 1
	local xpos = xf * -wfactor * depth
	local ypos = yf *  hfactor * depth
	--
	return Vector3.new(xpos, ypos, depth)
end
--bpos.position = char.Position + 
--wait() 
--end 
end 

function onButton1Up(mouse) 
fly = false 
end 

function onSelected(mouse) 
print("select") 
if mouse == nil then 
return 
end 
airborne = true 
bpos.Parent = char 
bpos.position = char.Position + Vector3.new(0,10,0) 
gyro.Parent = char 
char.Parent.Humanoid.Sit = true 
mouse.Icon = "rbxasset://textures\\ArrowCursor.png" 
mouse.Button1Down:connect(function() onButton1Down(mouse) end) 
mouse.Button1Up:connect(function() onButton1Up(mouse) end) 
mouse.Move:connect(function() onMove(mouse) end) 

for i, v in ipairs(char:GetChildren()) do 
if v.className == "Motor" then 
v.MaxVelocity = 0 
v.CurrentAngle = -1 
if v.Name == "Left Hip" then 
v.CurrentAngle = 1 
end 
end 
end 
end 

function onDeselected(mouse) 
print("deselect") 
gyro.Parent = nil 
fly = false 
airborne = false 
for i, v in ipairs(char:GetChildren()) do 
if v.className == "Motor" then 
v.MaxVelocity = 1 
end 
end 
char.Parent.Humanoid.Sit = false 
for i = 1, 30 do 
if not airborne then 
bpos.position = bpos.position - Vector3.new(0,0.3,0) 
wait(0.1) 
end 
end 
if not airborne then 
bpos.Parent = nil 
end 
end 


bin.Selected:connect(onSelected) 
bin.Deselected:connect(onDeselected)
--LIGHTS BUTTONS
for _,i in pairs(lights:GetChildren()) do
	if i:IsA("ImageButton") and i.Name ~= "header" then
		if string.match(i.Name,"%l+") == "td" then
			i.MouseButton1Click:connect(function()
				script.Parent.lighty.Value = tonumber(string.match(i.Name,"%d"))
				if script.Parent.lighty.Value == 0 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.lighty.Value == 1 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.lighty.Value == 2 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.lighty.Value == 3 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.lighty.Value == 4 then
					seat.Parent.SSC.Beep:Play()						
				end
			end)
		elseif string.match(i.Name,"%l+") == "fl" then
			i.MouseButton1Click:connect(function()
				script.Parent.flasher.Value = tonumber(string.match(i.Name,"%d"))
				if script.Parent.flasher.Value == 0 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.flasher.Value == 1 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.flasher.Value == 2 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.flasher.Value == 3 then
					seat.Parent.SSC.Beep:Play()
				elseif script.Parent.flasher.Value == 4 then
					seat.Parent.SSC.Beep:Play()			
				end
			end)
		end
	end
end
-- Decompiled with the Synapse X Luau decompiler.

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Resources"));
end)();
local u2 = false;
return function(p1)
	local l__Loading__1 = u1.GUI.Loading;
	if p1 == "Trading Plaza" and not u1.Shared.IsTradingPlaza then
		p1 = "Spawn";
	elseif u1.Shared.IsTradingPlaza then
		p1 = "Trading Plaza";
	end;
	while u2 do
		u1.RenderStepped();	
	end;
	u2 = true;
	local v2 = u1.GFX.CacheProperty(l__Loading__1.Circle, "Position");
	local v3 = v2 + UDim2.new(0, 0, 0.05, 0);
	local v4 = u1.GFX.CacheProperty(l__Loading__1.Info, "Position");
	local v5 = v4 + UDim2.new(0, 0, 0.05, 0);
	l__Loading__1.Circle.Position = v3;
	l__Loading__1.Circle.Transparency = 1;
	l__Loading__1.Info.Position = v5;
	l__Loading__1.Label.TextTransparency = 1;
	l__Loading__1.Location.TextTransparency = 1;
	l__Loading__1.Location.Text = u1.Directory.Worlds[p1].display_name;
	(function()
		u1.Functions.Tween(l__Loading__1.Circle, { 0.8, 1, 1 }, {
			Position = v2, 
			ImageTransparency = 0
		});
		u1.Functions.Tween(l__Loading__1.Circle.Circle, { 0.8, 1, 1 }, {
			Position = v2, 
			ImageTransparency = 0
		});
		u1.Functions.Tween(l__Loading__1.Info, { 0.8, 1, 1 }, {
			Position = v4
		});
		u1.Functions.Tween(l__Loading__1.Label, { 0.7, 1, 1 }, {
			TextTransparency = 0
		});
		u1.Functions.Tween(l__Loading__1.Label.UIStroke, { 0.9, 1, 1 }, {
			Transparency = 0
		});
		u1.Functions.Tween(l__Loading__1.Location, { 0.9, 1, 1 }, {
			TextTransparency = 0
		});
		u1.Functions.Tween(l__Loading__1.Location.UIStroke, { 0.9, 1, 1 }, {
			Transparency = 0
		});
		u1.Functions.Tween(l__Loading__1.Frame, { 0.9, 1, 1 }, {
			Transparency = 0
		});
		u1.Functions.Tween(l__Loading__1.Texture.ImageLabel, { 0.9, 1, 1 }, {
			ImageTransparency = 0
		});
		l__Loading__1.Gui.Enabled = true;
	end)();
	local function u3()
		u1.Functions.Tween(l__Loading__1.Circle, { 0.5, 1, 1 }, {
			Position = v3, 
			ImageTransparency = 1
		});
		u1.Functions.Tween(l__Loading__1.Circle.Circle, { 0.5, 1, 1 }, {
			Position = v3, 
			ImageTransparency = 1
		});
		u1.Functions.Tween(l__Loading__1.Info, { 0.5, 1, 1 }, {
			Position = v5
		});
		u1.Functions.Tween(l__Loading__1.Label, { 0.4, 1, 1 }, {
			TextTransparency = 1
		});
		u1.Functions.Tween(l__Loading__1.Label.UIStroke, { 0.9, 1, 1 }, {
			Transparency = 1
		});
		u1.Functions.Tween(l__Loading__1.Location, { 0.4, 1, 1 }, {
			TextTransparency = 1
		});
		u1.Functions.Tween(l__Loading__1.Location.UIStroke, { 0.9, 1, 1 }, {
			Transparency = 1
		});
		u1.Functions.Tween(l__Loading__1.Frame, { 0.9, 1, 1 }, {
			Transparency = 1
		});
		u1.Functions.Tween(l__Loading__1.Texture.ImageLabel, { 0.9, 1, 1 }, {
			ImageTransparency = 1
		});
		u1.Functions.Wait(1);
		l__Loading__1.Gui.Enabled = false;
	end;
	return function()
		u3();
		u2 = false;
	end;
end;
--[=[
	@class Timer

	The Timer class allows for code to run periodically at specified intervals.

	```lua
	local timer = Timer.new(2)
	timer.Tick:Connect(function()
		print("Tock")
	end)
	timer:Start()
	```
]=]
local Timer = {}
Timer.__index = Timer
------)
local TweenService = game:GetService("TweenService")
local parts = {centerWeld,leftWeld,rightWeld}
local part = centerWeld
--[[Weight and CG]]
	Tune.Weight			= 2014		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		4		,
	 --[[Length]]		15		}
	Tune.WeightDist		= 51		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]
	
	Tune.AxleSize		= 2			-- Size of structural members (larger = MORE STABLE / carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members
-- Reload animation
function reload()
	if not reloading then
		reloading=true;
		updateAmmo()
		local reloadTime = tankStats.ReloadTime.Value;	


		local Timer = 0
	

		for i = 7, 1, -1 do
			wait(reloadTime/8);
			Timer = Timer + 1
			
			if Timer >= 2 and Loaded == false then
				GUI.ReloadSound:Play()
				Loaded = true
			end
		end
		wait(reloadTime/8);


		if Timer >= 7 then
		
		GUI.Loaded.Visible = true	
		
		
		
		Timer = 0
			reloading = false;
			
		end
		
		
	end
end

function fire()
	
	if reloading then return end;
	local APAmmo = tankStats.APAmmo;
	local HEAmmo = tankStats.HEAmmo;
	if currRound.Value == "AP" and APAmmo.Value <= 0 then return end
	if currRound.Value == "HE" and HEAmmo.Value <= 0 then return end
	GUI.Loaded.Visible = false
	
	TFE:FireServer('Fire',parts,currRound,APAmmo,HEAmmo,tankStats)
	
	reload(GUI);
	
end
--[=[
	Cleans up all tasks and removes them as entries from the Maid.

	:::note
	Signals that are already connected are always disconnected first. After that
	any signals added during a cleaning phase will be disconnected at random times.
	:::

	:::tip
	DoCleaning() may be recursively invoked. This allows the you to ensure that
	tasks or other tasks. Each task will be executed once.

	However, adding tasks while cleaning is not generally a good idea, as if you add a
	function that adds itself, this will loop indefinitely.
	:::
]=]
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
--[=[
	@param interval number
	@param callback () -> nil
	@param startNow boolean?
	@param updateSignal RBXScriptSignal? | Signal?
	@param timeFunc () -> number
	@return RBXScriptConnection

	Creates a simplified timer which just fires off a callback function at the given interval.
]=]
function Timer.Simple(interval: number, callback: CallbackFunc, startNow: boolean?, updateSignal: RBXScriptSignal?, timeFunc: TimeFunc?)
	local update = updateSignal or RunService.Heartbeat
	local t = timeFunc or time
	local nextTick = t() + interval
	if startNow then
		task.defer(callback)
	end
	return update:Connect(function()
		local now = t()
		if now >= nextTick then
			nextTick = now + interval
			task.defer(callback)
		end
	end)
end
-- declarations

local head = script.Parent
local sound = head:findFirstChild("Victory")

function onTouched(part)
	local h = part.Parent:findFirstChild("Humanoid")
	if h~=nil then
sound:play()
if part.Parent:findFirstChild("Head"):findFirstChild("face").Texture == nil then return end
part.Parent:findFirstChild("Head"):findFirstChild("face").Transparency = 1
	end
end

script.Parent.Touched:connect(onTouched)
-- declarations
local sGettingUp = newSound("GettingUp", "rbxasset://sounds/action_get_up.mp3")
local sDied = newSound("Died", "rbxasset://sounds/uuhhh.mp3") 
local sFreeFalling = newSound("FreeFalling", "rbxasset://sounds/action_falling.mp3")
local sJumping = newSound("Jumping", "rbxasset://sounds/action_jump.mp3")
local sLanding = newSound("Landing", "rbxasset://sounds/action_jump_land.mp3")
local sSplash = newSound("Splash", "rbxasset://sounds/impact_water.mp3")
local sRunning = newSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3")
sRunning.Looped = true
local sSwimming = newSound("Swimming", "rbxasset://sounds/action_swim.mp3")
sSwimming.Looped = true
local sClimbing = newSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3")
sClimbing.Looped = true

local Figure = script.Parent
local Head = waitForChild(Figure, "Head")
local Humanoid;
for _,Child in pairs(Figure:GetChildren())do
if Child and Child.ClassName=="Humanoid"then
Humanoid=Child;
end;
end;
local hasPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
local filteringEnabled = game.Workspace.FilteringEnabled

local prevState = "None"
-------------------------
function onClicked()
R.Function1.Disabled = false
R.loop.Disabled = true
R.BrickColor = BrickColor.new("Neon orange")

R.Function2.Disabled = true

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