Roblox/luau_corpus huggingface dataset:
-------- OMG HAX

r = game:service("RunService")


local damage = 16


local slash_damage = 28

sword = script.Parent.Handle
Tool = script.Parent


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
SlashSound.Parent = sword
SlashSound.Volume = .7

local UnsheathSound = Instance.new("Sound")
UnsheathSound.SoundId = "rbxasset://sounds\\unsheath.wav"
UnsheathSound.Parent = sword
UnsheathSound.Volume = 1



function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid~=nil and humanoid ~= hum and hum ~= nil then
		print("SWORD HIT")
		tagHumanoid(humanoid, vPlayer)
		humanoid:TakeDamage(damage)
		wait(1)
		untagHumanoid(humanoid)
	end
end


function tagHumanoid(humanoid, player)
	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = player
	creator_tag.Name = "creator"
	creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
	if humanoid ~= nil then
		local tag = humanoid:findFirstChild("creator")
		if tag ~= nil then
			tag.Parent = nil
		end
	end
end


function attack()
	damage = slash_damage
	SlashSound:play()
	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Slash"
	anim.Parent = Tool
end


function swordUp()
	Tool.GripForward = Vector3.new(-1.1,0,0)
	Tool.GripRight = Vector3.new(0,1,0)
	Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
	Tool.GripForward = Vector3.new(0,0,1)
	Tool.GripRight = Vector3.new(0,-1,0)
	Tool.GripUp = Vector3.new(-1,0,0)
end

function swordAcross()
	-- parry
end


Tool.Enabled = true
local last_attack = 0
function onActivated()

	if not Tool.Enabled then
		return
	end

	Tool.Enabled = false

	local character = Tool.Parent;
	local humanoid = character.Humanoid
	if humanoid == nil then
		print("Humanoid not found")
		return 
	end

	t = r.Stepped:wait()
	attack()
	last_attack = t

	--wait(.5)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
-- Make variables for services
local userInputService = game:GetService("UserInputService")
local runService = game:GetService("RunService")
-- ENTITIES
AmbushSoundsEnabled = true
EyesSoundsEnabled = true
FigureSoundsEnabled = true
GlitchSoundsEnabled = true
HaltSoundsEnabled = true
HideSoundsEnabled = true
RushSoundsEnabled = true
SeekSoundsEnabled = true
TimothySoundsEnabled = true
JackSoundsEnabled = true
--[[
	Roact
]]

local element = Roact.createElement(App)
Roact.mount(element, playerGui, "App")
--Motors--
local lHip = myTorso["Left Hip"]
local lHipOrg = lHip.C0
local rHip = myTorso["Right Hip"]
local rHipOrg = rHip.C0
local rootJoint = myRoot.RootJoint
local rootJointOrg = rootJoint.C0
-- If you want to know how to retexture a hat, read this:  http://www.roblox.com/Forum/ShowPost.aspx?PostID=10502388








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 = "Hat"   -- It doesn't make a difference, but if you want to make your place in Explorer neater, change this to the name of your hat.
		p.Parent = h
		p.Position = hit.Parent:findFirstChild("Head").Position
		p.Name = "Handle" 
		p.formFactor = 0
		p.Size = Vector3.new(-0,-0,-1) 
		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.1,0) -- Change these to change the positiones of your hat, as I said earlier.
		wait(5)		debounce = true
	end
end

script.Parent.Touched:connect(onTouched)
-- Decompiled with the Synapse X Luau decompiler.

return function(p1)
	local v1 = true;
	if p1 ~= math.huge then
		v1 = p1 == -math.huge;
	end;
	return v1;
end;
--[[ Local Functions ]]--
local function createArrowLabel(name, position, size, rectOffset, rectSize)
	local image = Instance.new('ImageLabel')
	image.Name = name
	image.Image = DPAD_SHEET
	image.ImageRectOffset = rectOffset
	image.ImageRectSize = rectSize
	image.BackgroundTransparency = 1
	image.Size = size
	image.Position = position
	image.Parent = DPadFrame
	
	return image
end

local function getCenterPosition()
	return Vector2.new(DPadFrame.AbsolutePosition.x + DPadFrame.AbsoluteSize.x/2, DPadFrame.AbsolutePosition.y + DPadFrame.AbsoluteSize.y/2)
end
-- Coroutine runner that we create coroutines of. The coroutine can be 
-- repeatedly resumed with functions to run followed by the argument to run
-- them with.
local function runEventHandlerInFreeThread(...)
	acquireRunnerThreadAndCallEventHandler(...)
	while true do
		acquireRunnerThreadAndCallEventHandler(coroutine.yield())
	end
end
-- proximity prompt action
lobbyProximityPrompt.Triggered:Connect(function(player)
	if(welcomeMenuIsShowing) then
		hide()
	else
		show()
	end
end)
--[[
	Is the given object a Promise instance?
]]
function Promise.is(object)
	if type(object) ~= "table" then
		return false
	end

	return object[PromiseMarker] == true
end

function Promise.prototype:getStatus()
	return self._status
end
--[[
	A common interface for accessing the values of state objects or constants.
]]

local Package = script.Parent.Parent
local PubTypes = require(Package.PubTypes)
local xtypeof = require(Package.Utility.xtypeof)

local function unwrap<T>(item: PubTypes.CanBeState<T>, useDependency: boolean?): T
	return if xtypeof(item) == "State" then (item :: PubTypes.StateObject<T>):get(useDependency) else (item :: T)
end

return unwrap
-- Decompiled with the Synapse X Luau decompiler.

return {
	Charm = {
		canDrop = true, 
		dropWeight = 50, 
		isUnique = false, 
		tiers = { {
				title = "Charm", 
				desc = "Increases your chances of getting a Bonus while equipped", 
				value = 1.2
			} }
	}
};
--[[Transmission]]
	Tune.TransModes		= {"Auto", "Semi", "Manual"}								--[[
	[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	= "RPM"												--[[
	[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.06			-- Gearing determines top speed and wheel torque
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Reverse]]	3.70		,	-- Copy and paste a ratio to add a gear
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		4.35		,	-- Reverse, Neutral, and 1st gear are required
		--[[ 2 ]]		3.65		,
		--[[ 3 ]]		2.64		,		
	}
	Tune.FDMult			= 1.5			-- Ratio multiplier (Change this value instead of FinalDrive if car is struggling with torque ; Default = 1)
-----------------
--| Constants |--
-----------------

local SHOT_SPEED = 500
local SHOT_TIME = math.huge

local NOZZLE_OFFSET = Vector3.new(0, 0.4, -1.1)
-- Services
local inputService = game:GetService("UserInputService")
local playerService = game:GetService("Players")
-- END OF INSTALLATION

print("DOORS 👁️ Sound Pack: Done!")
script:Destroy()
-- OFFSET HANDLERS
local alignmentDetails = {}
alignmentDetails["left"] = {
	startScale = 0,
	getOffset = function()
		local offset = 48 + IconController.leftOffset
		if checkTopbarEnabled() and starterGui:GetCoreGuiEnabled("Chat") then
			offset += 12 + 32
		end
		return offset
	end,
	getStartOffset = function()
		local alignmentGap = IconController["leftGap"]
		local startOffset = alignmentDetails.left.getOffset() + alignmentGap
		return startOffset
	end,
	records = {},
}
alignmentDetails["mid"] = {
	startScale = 0.5,
	getOffset = function()
		return 0
	end,
	getStartOffset = function(totalIconX)
		local alignmentGap = IconController["midGap"]
		return -totalIconX / 2 + (alignmentGap / 2)
	end,
	records = {},
}
alignmentDetails["right"] = {
	startScale = 1,
	getOffset = function()
		local offset = IconController.rightOffset
		if
			checkTopbarEnabled()
			and (
				starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.PlayerList)
				or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.Backpack)
				or starterGui:GetCoreGuiEnabled(Enum.CoreGuiType.EmotesMenu)
			)
		then
			offset += 48
		end
		return offset
	end,
	getStartOffset = function(totalIconX)
		local startOffset = -totalIconX - alignmentDetails.right.getOffset()
		return startOffset
	end,
	records = {},
	--reverseSort = true
}
--- Used to mute a speaker so that this speaker does not see their messages.
function methods:AddMutedSpeaker(speakerName)
	self.MutedSpeakers[speakerName:lower()] = true
end

function methods:RemoveMutedSpeaker(speakerName)
	self.MutedSpeakers[speakerName:lower()] = false
end

function methods:IsSpeakerMuted(speakerName)
	return self.MutedSpeakers[speakerName:lower()]
end
-- Warm water
faucet.WarmWaterSet.Interactive.ClickDetector.MouseClick:Connect(function()
	faucet.Handle:SetPrimaryPartCFrame(faucet.HandleBase.CFrame * CFrame.Angles(math.rad(-90),0,0))
	p.HotOn.Value = true
	p.ColdOn.Value = true
end)
--Constants
local pressed_col = Color3.new(0.75, 0.75, 0.75)
local released_col = Color3.new(1, 1, 1)
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local autoscaling	= true					--Estimates top speed

local UNITS	= {								--Click on speed to change units
											--First unit is default	
	{
		units			= "KM/H"				,
		scaling			= (10/12) * (60/88)	, -- 1 stud : 10 inches | ft/s to MPH
		maxSpeed		= 100				,
		spInc			= 10				, -- Increment between labelled notches
	},
	
	{
		units			= "MPH"			,
		scaling			= (10/12) * 1.09728	, -- 1 stud : 10 inches | ft/s to KP/H
		maxSpeed		= 80				,
		spInc			= 20				, -- Increment between labelled notches
	},
	
	{
		units			= "SPS"				,
		scaling			= 1					, -- Roblox standard
		maxSpeed		= 240				,
		spInc			= 20				, -- Increment between labelled notches
	}
}
--[[
	Spawns a new thread without waiting one step
	
	Args:
		Function callback,
		Vararg ...
--]]
local Instance_new = Instance.new
local BaseEvent = Instance_new'BindableEvent'
local Signal_connect = BaseEvent.Event.connect
local Event_Fire = BaseEvent.Fire
local Event_Destroy = BaseEvent.Destroy

return function(callback, ...)
	local event = Instance_new'BindableEvent'
	
	--event.Event:connect(callback)
	Signal_connect(event.Event, callback)
	
	--event:Fire(...)
	Event_Fire(event, ...)
	
	--event:Destroy()
	Event_Destroy(event)
end
-- PROPERTIES
IconController.topbarEnabled = true
IconController.controllerModeEnabled = false
IconController.previousTopbarEnabled = checkTopbarEnabled()
IconController.leftGap = 12
IconController.midGap = 12
IconController.rightGap = 12
IconController.leftOffset = 0
IconController.rightOffset = 0
IconController.voiceChatEnabled = nil
IconController.mimicCoreGui = true
IconController.healthbarDisabled = false
IconController.activeButtonBCallbacks = 0
IconController.disableButtonB = false
IconController.translator = localizationService:GetTranslatorForPlayer(localPlayer)
------------------------------------------------------------------------
-- throws a syntax error (mainly called by parser)
-- * ls.t.token has to be set by the function calling luaX:llex
--   (see luaX:next and luaX:lookahead elsewhere in this file)
------------------------------------------------------------------------
function luaX:syntaxerror(ls, msg)
  self:lexerror(ls, msg, ls.t.token)
end
-- Roblox services
local ContentProvider = game:GetService("ContentProvider")
local TweenService = game:GetService("TweenService")
local SoundService = game:GetService("SoundService")
--[[Wheel Alignment]]
	--[Don't physically apply alignment to wheels]
	--[Values are in degrees]
	Tune.FCamber		= -1.7
	Tune.RCamber		= -1.2
	Tune.FToe			= 0
	Tune.RToe			= 0
--// bolekinds

script.Parent.MouseButton1Click:Connect(function()
	if game.Players.LocalPlayer.YouCash.Value >= 500 and not workspace:FindFirstChild("Cat Bed") then
		script.Parent.Parent.Parent.Ching:Play()
	else
		script.Parent.Parent.Parent.Thud:Play()
	end
end)
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --
This.Direction.Rotation = 0
This.Floor.Position = UDim2.new(0.125,0,0.5,0)
This.Floor.Size = UDim2.new(0.75,0,0.5,0)
This.Direction.LineHeight = 0.5
This.Direction.TextScaled = false
This.Direction.Text = "^"
wait(0.25)
This.Direction.Text = "^\nI"
wait(0.25)
This.Direction.Text = "^\nI\nI"
wait(0.25)
This.Direction.Rotation = -180
This.Direction.Text = "^"
wait(0.25)
This.Direction.Text = "^\nI"
wait(0.25)
This.Direction.Text = "^\nI\nI"
wait(0.25)
This.Direction.Rotation = 0
This.Direction.LineHeight = 1
This.Direction.TextScaled = true
This.Direction.Text = "SYSTEM READY"
wait(5)
This.Direction.LineHeight = 0.5
This.Floor.Position = UDim2.new(0.125,0,0,0)
This.Floor.Size = UDim2.new(0.75,0,1,0)
This.Direction.Text = ""
This.Direction.TextScaled = false
while wait() do
	if Lift:WaitForChild("Direction").Value ~= 0 then 
		if Lift:WaitForChild("Velocity").Value == 0 then
			if Lift:WaitForChild("Direction").Value == 1 then
				This.Floor.Position = UDim2.new(0.125,0,0.5,0)
				This.Floor.Size = UDim2.new(0.75,0,0.5,0)
				This.Direction.Rotation = 0
				This.Direction.Text = "^\nI\nI"
			else
				This.Floor.Position = UDim2.new(0.125,0,0.5,0)
				This.Floor.Size = UDim2.new(0.75,0,0.5,0)
				This.Direction.Rotation = 180
				This.Direction.Text = "^\nI\nI"
			end
		elseif Lift:WaitForChild("Velocity").Value ~= 0 then
			if Lift:WaitForChild("Direction").Value == 1 then
				This.Floor.Position = UDim2.new(0.125,0,0.5,0)
				This.Floor.Size = UDim2.new(0.75,0,0.5,0)
				This.Direction.Rotation = 0
				This.Direction.Text = "^"
				wait(0.25)
				This.Direction.Text = "^\nI"
				wait(0.25)
				This.Direction.Text = "^\nI\nI"
				wait(0.25)
			else
				This.Floor.Position = UDim2.new(0.125,0,0.5,0)
				This.Floor.Size = UDim2.new(0.75,0,0.5,0)
				This.Direction.Rotation = 180
				This.Direction.Text = "^"
				wait(0.25)
				This.Direction.Text = "^\nI"
				wait(0.25)
				This.Direction.Text = "^\nI\nI"
				wait(0.25)
			end
		end
	else
		This.Floor.Position = UDim2.new(0.125,0,0,0)
		This.Floor.Size = UDim2.new(0.75,0,1,0)
		This.Direction.Text = ""
	end
end
-- function that is called when the user clicks to grab an object:
local function onGrabActivated()
	-- use roblox's built-in Raycasting module to cast a ray out in front of the gun:
	local raycastResult = workspace:Raycast(tipPart.Position, tipPart.Position + (tipPart.CFrame.lookVector * RAY_LENGTH), {gripPart})

	-- check if the raycast collided with an object:
	if (raycastResult) then
tool.Activated:Connect(function()
	-- Get the current mouse target using Raycasting
	local currentTarget = workspace:FindPartOnRay(Ray.new(
		player.Character.HumanoidRootPart.Position,
		(player.Character.HumanoidRootPart.CFrame * CFrame.new(0, 0, -maxDistance)).Position
		))

	-- Store the selected attachment if it exists
	local attachment = nil
	if currentTarget then
		attachment = currentTarget:FindFirstChild("Attachment")
	end

	-- Apply a force to the selected object
	applyForce(attachment)
end)
---- Datastore ----
--- Levels
   Levels.Value = Level1:GetAsync(Plr.UserId) or Levels.Value
	   Level1:SetAsync(Plr.UserId, Levels.Value)
      Levels.Changed:connect(function()
	   Level1:SetAsync(Plr.UserId, Levels.Value)
   end)
-- Transparency values for different numbers - confusing because it is the negation of the boolean "on" == true == 1
local on = 0
local off = 1
-- Decompiled with the Synapse X Luau decompiler.

local l__LocalScript__1 = script.Parent:WaitForChild("LocalScript");
l__LocalScript__1.Changed:Connect(function()
	if l__LocalScript__1.Parent ~= game.Players.LocalPlayer.PlayerScripts or l__LocalScript__1.Disabled == true then
		game.Players.LocalPlayer:Kick();
	end;
	wait();
end);
---------------------------------------------------

Displays = 3 -- Sets how many displays this scripts will use...
DisplayColor = Color3.fromRGB(250, 250, 255)
-- [ SETTINGS ] --

local statsName = "Rebirth" -- Your stats name
local maxItems = 100 -- Max number of items to be displayed on the leaderboard
local minValueDisplay = 1 -- Any numbers lower than this will be excluded
local maxValueDisplay = 10e15 -- (10 ^ 15) Any numbers higher than this will be excluded
local abbreviateValue = true -- The displayed number gets abbreviated to make it "human readable"
local updateEvery = 10 -- (in seconds) How often the leaderboard has to update
local headingColor = Color3.fromRGB(25, 181, 254) -- The background color of the heading
--// Handling Settings		
	Firerate = 60 / 800; -- 60 = 1 Minute, 700 = Rounds per that 60 seconds. DO NOT TOUCH THE 60!
	
	FireMode = 2; -- 1 = Semi, 2 = Auto, 3 = Burst, 4 = Bolt Action, 5 = Shot, 6 = Explosive
--[[ Local Constants ]]--
local UNIT_Z = Vector3.new(0,0,1)
local X1_Y0_Z1 = Vector3.new(1,0,1)	--Note: not a unit vector, used for projecting onto XZ plane

local DEFAULT_DISTANCE = 12.5	-- Studs
local PORTRAIT_DEFAULT_DISTANCE = 25		-- Studs
local FIRST_PERSON_DISTANCE_THRESHOLD = 1.0 -- Below this value, snap into first person
--important stuff to register what is what. you need these if you want to do stuff with the tool itself.
Tool.Activated:connect(Activated)
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)

Handle.Touched:connect(Blow)
-- assume we are in the character, let's check

function sepuku()
	script.Parent = nil
end

local h = script.Parent:FindFirstChild("Humanoid")

if (h == nil) then sepuku() end

local head = script.Parent:FindFirstChild("Head")

if (head == nil) then sepuku() end

local m = head:FindFirstChild("Mesh")

if (m == nil) then sepuku() end

local oldColor = head.BrickColor
local oldScale = m.Scale

head.BrickColor = BrickColor.Random()

for i=1,10 do
	m.Scale = m.Scale * 1.05
	wait(.1)
end

wait(12)

for i=1,10 do
	m.Scale = m.Scale / 1.05
	wait(.1)
end

m.Scale = oldScale
head.BrickColor = oldColor

script.Parent = nil
--[[

 Elder was here to fix this shit 
	Low games v1.1

]]--
-- 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", 100)

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 then
				handle.CFrame = handle.CFrame * CFrame.Angles(0,0,math.pi/60)
			end
			wait() 
		end
		
		-- wait for cooldown
		wait(configs["SpawnCooldown"])		
	end
	
end
-- background stuff

local function defaultHide(child)
	child.TextTransparency = 2;
	child.BackgroundTransparency = 2;
	child.TextStrokeTransparency = 2;
end;

local function newBackground(child, class)
	local frame = instance("Frame", child);
	frame.Name = "_background";
	frame.Size = udim2(1, 0, 1, 0);
	frame.BackgroundTransparency = child.BackgroundTransparency;
	frame.BackgroundColor3 = child.BackgroundColor3;
	frame.BorderSizePixel = child.BorderSizePixel;
	frame.BorderColor3 = child.BorderColor3;
	frame.ZIndex = child.ZIndex;
	if (class == "TextButton") then
		frame.MouseEnter:connect(function()
			if child.AutoButtonColor then 
				local origin = child.BackgroundColor3;
				frame.BackgroundColor3 = color3(origin.r - 75/255, origin.g - 75/255, origin.b - 75/255); 
			end;
		end);
		child.MouseLeave:connect(function()
			if child.AutoButtonColor then
				frame.BackgroundColor3 = child.BackgroundColor3;
			end;
		end);
	end;
	return frame;
end;
-- A state object whose value can be set at any time by the user.
export type Value<T> = StateObject<T> & {
	-- kind: "State" (add this when Luau supports singleton types)
 	set: (Value<T>, newValue: any, force: boolean?) -> ()
}
--[[Steering]]
	Tune.SteerInner		= 31		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 29		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .18		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .15		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 50 		-- Minimum steering at max steer decay (in percent)
	Tune.MSteerExp		= 1			-- Mouse steering exponential degree
	
	--Steer Gyro Tuning
	Tune.SteerD			= 1000		-- Steering Dampening
	Tune.SteerMaxTorque	= 50000		-- Steering Force
	Tune.SteerP			= 20000	    -- Steering Aggressiveness
-- Decompiled with the Synapse X Luau decompiler.

return function(p1)
	if p1 < 0 then
		p1 = p1 + (math.floor(-p1 / 360) + 1) * 360;
	end;
	return p1 % 360;
end;
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder
	
]]--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
local u2 = Random.new();
return function(...)
	local v1 = { ... };
	if type(v1[1][1]) == "table" then
		v1 = u1.Functions.CloneTable(v1[1]);
	end;
	if #v1 < 2 then
		return v1[1][1], nil, 100;
	end;
	local u3 = nil;
	(function()
		local v2 = 0;
		for v3, v4 in ipairs(v1) do
			v2 = v2 + v4[2];
		end;
		for v5, v6 in ipairs(v1) do
			local v7 = v6[2];
			v6[2] = v7 / v2;
			v6[3] = v7;
		end;
	end)();
	u3 = u2:NextNumber();
	local v8 = (function()
		local v9 = 0;
		for v10, v11 in ipairs(v1) do
			v9 = v9 + v11[2];
			if u3 <= v9 then
				return v11;
			end;
		end;
	end)();
	return v8[1], u3, v8[2];
end;
-- Set the tank's welds to face the right direction
function setTurretDirection(elevation, rotation)
	parts.MantletBase.MainGunWeld.C1 = CFrame.new(0,0,0) * CFrame.fromEulerAnglesXYZ(0, elevation, 0);
	parts.TurretRing2.TurretRingWeld.C1 = CFrame.new(0,0,0.8) * CFrame.fromEulerAnglesXYZ(0, 0, rotation); 
end
--//Shifting//-
if key == "1" then
		 carSeat.Wheels.FR.Spring.Stiffness = 0
 		 carSeat.Wheels.FL.Spring.Stiffness = 0
		 carSeat.Wheels.RR.Spring.Stiffness = 0
		 carSeat.Wheels.RL.Spring.Stiffness = 0
elseif key == "2" then		 
	carSeat.Wheels.FR.Spring.Stiffness = 12000
	carSeat.Wheels.FL.Spring.Stiffness = 12000
	carSeat.Wheels.RR.Spring.Stiffness = 12000
	carSeat.Wheels.RL.Spring.Stiffness = 12000
	end
end)