Roblox/luau_corpus huggingface dataset:
-- stravant's AnimEdit helper, to make sure tools actually animate.

function Create(ty)
	return function(data)
		local obj = Instance.new(ty)
		for k, v in pairs(data) do
			if type(k) == 'number' then
				v.Parent = obj
			else
				obj[k] = v
			end
		end
		return obj
	end
end

local Tool = script.Parent.Parent

local armChildRemovedConn = nil
local Motor6DGrip = nil
local EquippedNum = 0

Tool.Equipped:connect(function()
	EquippedNum = EquippedNum + 1
	local myEquip = EquippedNum
	--some vars
	local Player = game.Players:GetPlayerFromCharacter(Tool.Parent)
	local Character = Player.Character

	local rightarm = Character:FindFirstChild('Right Arm')
	if rightarm and rightarm:FindFirstChild('RightGrip') then
		local rightGrip = rightarm['RightGrip']
		local handle = rightGrip.Part1

		--kill my joint when the normal joint is removed
		--this must be done here so that the joint is removed 
		--_right away_ after unequipping and the character doesn't 
		--glitch up.
		local armChildRemovedConn = rightarm.ChildRemoved:connect(function(ch)
			if ch == rightGrip then
				Motor6DGrip:Remove()
				Motor6DGrip = nil
				--
				if handle and Character:FindFirstChild('Torso') then
					if Tool.Parent.Parent:IsA('Player') then
						--the sword has been deselected
						--put the sword far away so the user doesn't notice that the handle doesn't
						--update for about 0.1 seconds after selecting the tool.
						handle.CFrame = CFrame.new(100000, 100000, 100000)
					else
						--if in the workspace, position the handle where it should be dropped
						--use the size of the handle to make sure it's dropped far enough away
						handle.CFrame = Character.Torso.CFrame * CFrame.new(0, 0, -(handle.Size.magnitude+2))
					end
				end
			end
		end)

		--make my new joint
		Motor6DGrip = Create'Motor6D'{
			Name = 'RightGrip_Motor';
			Part0 = rightarm;
			Part1 = handle;
			C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, -0);	-- from original right grip
			C1 = CFrame.new(0.1, -0.6, 0.4, 1, 0, 0, 0, 0, -1, 0, 1, 0);
		}
		--kill the old weld
		rightGrip.Part1 = nil
		rightGrip.Part0 = nil
		Motor6DGrip.Parent = rightGrip.Parent
	end
end)

Tool.Unequipped:connect(function()
	EquippedNum = EquippedNum + 1
	if armChildRemovedConn then
		armChildRemovedConn:disconnect()
		armChildRemovedConn = nil
	end
end)
-- создадим 10 копий
for i=1,10 do
	local x=rnd:NextInteger(-200,200)
	local z=rnd:NextInteger(-200,200)
	local v=CFrame.new(Vector3.new(x,0,z))
	local newModel = target:Clone()
	newModel:SetPrimaryPartCFrame(v)
	newModel.Parent = targets
end
-- 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(-1.5, -0.15, 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)
--[[
	Creates folders for RemoteFunctions and RemoteEvents used by
	Network. These folders are then populated with new RemoteEvents
	and RemoteFunctions for each name specified in the RemoteNames constants module.
--]]

local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RemoteEventName = require(ReplicatedStorage.Source.Network.RemoteName.RemoteEventName)
local RemoteFunctionName = require(ReplicatedStorage.Source.Network.RemoteName.RemoteFunctionName)
local RemoteFolderName = require(ReplicatedStorage.Source.Network.RemoteFolderName)
local createInstanceTree = require(ReplicatedStorage.Source.Utility.createInstanceTree)
local getInstance = require(ReplicatedStorage.Source.Utility.getInstance)

type PropertiesTable = { [string]: any }

local function createRemotes(remoteFolder: Folder)
	local remoteEventsFolder: Folder = getInstance(remoteFolder, RemoteFolderName.RemoteEvents)

	for eventName in pairs(RemoteEventName) do
		local remoteEvent = Instance.new("RemoteEvent")
		remoteEvent.Name = eventName
		remoteEvent.Parent = remoteEventsFolder
	end

	local remoteFunctionsFolder: Folder = getInstance(remoteFolder, RemoteFolderName.RemoteFunctions)

	for functionName in pairs(RemoteFunctionName) do
		local remoteFunction = Instance.new("RemoteFunction")
		remoteFunction.Name = functionName
		remoteFunction.Parent = remoteFunctionsFolder
	end
end

local function createRemotesFolders(rootFolderName: string): Folder
	local folder = createInstanceTree({
		className = "Folder",
		properties = {
			Name = rootFolderName,
		},
		children = {
			{
				className = "Folder",
				properties = {
					Name = RemoteFolderName.RemoteFunctions,
				} :: PropertiesTable,
			},
			{
				className = "Folder",
				properties = {
					Name = RemoteFolderName.RemoteEvents,
				} :: PropertiesTable,
			},
		},
	})

	createRemotes(folder)

	return folder
end

return createRemotesFolders
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 840		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 1000		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 15000		--		Use sliders to manipulate values
	Tune.Redline		= 14000		--		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		= 200		-- 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)
-- excluding the `+` and `*` character, since findOr tests and graphql use them explicitly
local luaPatternCharacters = "([" .. ("$%^()-[].?"):gsub("(.)", "%%%1") .. "])"

local function findOr(str: string, patternTable: { string }, initIndex: number?): Match | nil
	-- loop through all options in patern patternTable

	local init = utf8.offset(str, initIndex or 1)
	local matches = {}
	for _, value in patternTable do
		value = value:gsub(luaPatternCharacters, "%%%1")
		local iStart, iEnd = string.find(str, value, init)
		if iStart then
			local prefix = string.sub(str, 1, iStart - 1)
			local prefixEnd, invalidBytePosition = utf8.len(prefix)
			if prefixEnd == nil then
				error(("string `%s` has an invalid byte at position %s"):format(prefix, tostring(invalidBytePosition)))
			end
			local iStartIndex = prefixEnd :: number + 1
			local match = {
				index = iStartIndex,
				match = string.sub(str, iStart, iEnd),
			}
			table.insert(matches, match)
		end
	end

	-- if no matches, return nil
	if #matches == 0 then
		return nil
	end

	-- find the first matched index (after the init param)
	-- for each, if we get a hit, return the earliest index and matched term

	local firstMatch
	for _, value in matches do
		-- load first condition
		if firstMatch == nil then
			firstMatch = value
		end
		-- identify if current match comes before first match
		if value.index < firstMatch.index then
			firstMatch = value
		end
	end

	-- return first match
	return firstMatch
end

return findOr
---------------
-- Constants --
---------------

local FADE_TARGET = 0.75
local FADE_RATE = 0.1

local MODE = {
	CUSTOM = 1, -- Whatever you want!
	LIMBS = 2, -- Track limbs
	MOVEMENT = 3, -- Track movement
	CORNERS = 4, -- Char model corners
	CIRCLE1 = 5, -- Circle of casts around character
	CIRCLE2 = 6, -- Circle of casts around character, camera relative
	LIMBMOVE = 7, -- LIMBS mode + MOVEMENT mode
}
Invisicam.MODE = MODE

local STARTING_MODE = MODE.LIMBS

local LIMB_TRACKING_SET = {
	['Head'] = true,
	['Left Arm'] = true,
	['Right Arm'] = true,
	['Left Leg'] = true,
	['Right Leg'] = true,
}
local CORNER_FACTORS = {
	Vector3.new(1, 1, -1),
	Vector3.new(1, -1, -1),
	Vector3.new(-1, -1, -1),
	Vector3.new(-1, 1, -1)
}
local CIRCLE_CASTS = 10
local MOVE_CASTS = 3
-------- OMG HAX

r = game:service("RunService")


local damage = 5

black = BrickColor.new("Really black")

local slash_damage = 22


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


local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "http://www.roblox.com/asset/?id=10730819"
SlashSound.Parent = sword
SlashSound.Volume = 1


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 player = game.Players:FindFirstChild(hit.Parent.Name)
	if player then
		local vCharacter = Tool.Parent
		local vPlayer = game.Players:playerFromCharacter(vCharacter)
		local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
		local myteam = vPlayer.TeamColor
		local theirteam = player.TeamColor
		if humanoid~=nil and humanoid ~= hum and hum ~= nil then
			-- final check, make sure sword is in-hand
			local right_arm = vCharacter:FindFirstChild("Right Arm") or vCharacter:FindFirstChild("RightHand")
			if (right_arm ~= nil) then
				local joint = right_arm:FindFirstChild("RightGrip")
				if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
					if player and player ~= vPlayer and not vPlayer.Neutral and not player.Neutral and (myteam ~= theirteam or (myteam == black and theirteam == black)) then
						tagHumanoid(humanoid, vPlayer)                                                         
						humanoid:TakeDamage(damage) 
						wait(1) 
						untagHumanoid(humanoid)
					end
				end
			end
		end
	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,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



Tool.Enabled = true

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

	

	attack()

	wait(1)

	Tool.Enabled = true
end


function onEquipped()
	UnsheathSound:play()
end


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


connection = sword.Touched:connect(blow)
--		print(hum.Health)
		if hum.Health<1 then return end
	end
	if hit.Parent:findFirstChild("Humanoid2") ~= nil then
		local hum=hit.Parent:findFirstChild("Humanoid2")
-- ================================================================================
-- Settings - Training Jet
-- ================================================================================

local Settings = {}

Settings.DefaultSpeed = 110		-- Speed when not boosted [Studs/second, Range 50-300]
Settings.BoostSpeed = 180		-- Speed when boosted [Studs/second, Maximum: 400]
Settings.BoostAmount = 9		-- Duration of boost in seconds
Settings.Steering = 6			-- How quickly the speeder turns [Range: 1-10]
--// Aim|Zoom|Sensitivity Customization
	ZoomSpeed = 0.125; -- The lower the number the slower and smoother the tween
	AimZoom = 5; -- Default zoom
	AimSpeed = 0.70;
	UnaimSpeed = 0.23;
	CycleAimZoom = 55; -- Cycled zoom
	MouseSensitivity = 0.05; -- Number between 0.1 and 1
	SensitivityIncrement = 0.05; -- No touchy
--Horsepower Curve
local fgc_h=_Tune.Horsepower/100
local fgc_n=_Tune.PeakRPM/1000
local fgc_a=_Tune.PeakSharpness
local fgc_c=_Tune.CurveMult

function FGC(x)
	x=x/1000
	return (((-(x-fgc_n)^2)*math.min(fgc_h/(fgc_n^2),fgc_c^(fgc_n/fgc_h)))+fgc_h)*(x-((x^fgc_a)/((fgc_a*fgc_n)^(fgc_a-1))))
end
local PeakFGC = FGC(_Tune.PeakRPM)
--[[

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

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
return function(p1, p2, p3)
	local l__Gravity__1 = game.Workspace.Gravity;
	local v2 = math.atan((p3 ^ 2 + math.sqrt(p3 ^ 4 - l__Gravity__1 * (l__Gravity__1 * p1 ^ 2 + 2 * p2 * p3 ^ 2))) / (l__Gravity__1 * p1));
	if v2 ~= v2 then
		v2 = math.pi / 4;
	end;
	return v2;
end;
--= Functions =--

UIS.InputBegan:connect(function(key, gameProcessed)
	if key.KeyCode == Enum.KeyCode.LeftShift and gameProcessed == false then
		character.Humanoid.WalkSpeed = NewWalkSpeed
		sprinting = true
		while power > 0 and sprinting do
			power = power - .03
			Bar.Size = UDim2.new(power / 10, 0, 1, 0)
			--Bar.BackgroundColor3 = Bar.BackgroundColor3:lerp(Color3.fromRGB(255, 42, 42), 0.001)
			tween:Play()
			wait()
			if power <= 0 then
				character.Humanoid.WalkSpeed = NormalWalkSpeed
			end
		end
	end
end)

UIS.InputEnded:connect(function(key, gameProcessed)
	if key.KeyCode == Enum.KeyCode.LeftShift and gameProcessed == false then
		character.Humanoid.WalkSpeed = NormalWalkSpeed
		sprinting = false
		while power < 10 and not sprinting do
			power = power + .03
			Bar.Size = UDim2.new(power / 10, 0, 1, 0)
			--Bar.BackgroundColor3 = Bar.BackgroundColor3:lerp(Color3.fromRGB(255, 166, 11), 0.001)
			tween2:Play()
			wait()
			if power <= 0 then
				character.Humanoid.WalkSpeed = NormalWalkSpeed
			end
		end
	end
end)
--[[
	This function spawns a set number of tools within each room. Spawn locations are randomly picked, as long as it's 
	within the room, and there is sufficient free space around the ranodmly picked location. 
]]
local ServerStorage = game:GetService("ServerStorage")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local RoomManager = require(ServerStorage.Source.Managers.RoomManager)
local getRandomClearLocationInRegionAsync = require(ServerStorage.Source.Common.getRandomClearLocationInRegionAsync)

local toolsFolder = ReplicatedStorage.Tools
local gravityFuel = toolsFolder.GravityFuel
local repairKit = toolsFolder.RepairKit
local broom = toolsFolder.Broom
local largeCargo = toolsFolder.LargeCargo
local smallCargo = toolsFolder.SmallCargo
local torch = toolsFolder.Torch
local TOTAL_TOOLS_PER_ROOM = 7
local AREA_CLEAR_SIZE = Vector3.new(5, 5, 5)

local random = Random.new(tick())
--// F key, HornOn
mouse.KeyDown:connect(function(key)
	if key=="f" then 
		veh.Lightbar.middle.Airhorn:Play()
		veh.Lightbar.middle.Wail.Volume = 0
		veh.Lightbar.middle.Yelp.Volume = 0
		veh.Lightbar.middle.Priority.Volume = 0 
		veh.Lightbar.HORN.Transparency = 0
	end
end)
-- Now with exciting TeamColors HACK!

        function waitForChild(parent, childName)
        local child = parent:findFirstChild(childName)
        if child then return child end
        while true do
        child = parent.ChildAdded:wait()
        if child.Name==childName then return child end
        end
        end

        -- TEAM COLORS


        function onTeamChanged(player)

        wait(1)

        local char = player.Character
        if char == nil then return end

        if player.Neutral then
        -- Replacing the current BodyColor object will force a reset
        local old = char:findFirstChild("Body Colors")
        if not old then return end
        old:clone().Parent = char
        old.Parent = nil
        else
        local head = char:findFirstChild("Head")
        local torso = char:findFirstChild("Torso")
        local left_arm = char:findFirstChild("Left Arm")
        local right_arm = char:findFirstChild("Right Arm")
        local left_leg = char:findFirstChild("Left Leg")
        local right_leg = char:findFirstChild("Right Leg")

        if head then head.BrickColor = BrickColor.new(24) end
        if torso then torso.BrickColor = player.TeamColor end
        if left_arm then left_arm.BrickColor = BrickColor.new(26) end
        if right_arm then right_arm.BrickColor = BrickColor.new(26) end
        if left_leg then left_leg.BrickColor = BrickColor.new(26) end
        if right_leg then right_leg.BrickColor = BrickColor.new(26) end
        end
        end

        function onPlayerPropChanged(property, player)
        if property == "Character" then
        onTeamChanged(player)
        end
        if property== "TeamColor" or property == "Neutral" then
        onTeamChanged(player)
        end
        end


        local cPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
        cPlayer.Changed:connect(function(property) onPlayerPropChanged(property, cPlayer) end )
        onTeamChanged(cPlayer)
-- connect events
Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Climbing:connect(onClimbing)
Humanoid.GettingUp:connect(onGettingUp)
Humanoid.FreeFalling:connect(onFreeFall)
Humanoid.FallingDown:connect(onFallingDown)
Humanoid.Seated:connect(onSeated)
Humanoid.PlatformStanding:connect(onPlatformStanding)
Humanoid.Swimming:connect(onSwimming)
--These are all donations that can be done. You must set this up with your own products to make money of it.
--To make a product you have to make a Developer Product in your game's settings page.
--You can make as many as you want, Once you made one, copy it's ID and past it in the 'ProductId' variable in this script. 
--Change the 'ProductPrice' to what the Developer Product Costs.

local module = {}	

module.Products = {
	
	{
		ProductPrice = 5, --The price from the Developer Product.
		ProductId = 33152750 -- The ID from the Developer Product.	
	},
	
	{
		ProductPrice = 10, --The price from the Developer Product.
		ProductId = 33152755 -- The ID from the Developer Product.	
	},
	
	{
		ProductPrice = 50, --The price from the Developer Product.
		ProductId = 33152758 -- The ID from the Developer Product.	
	},
	
	{
		ProductPrice = 100, --The price from the Developer Product.
		ProductId = 33152760 -- The ID from the Developer Product.	
	},
	
}
-- Mounts the custom material walking sounds into the provided
-- humanoid. This mounting assumes the HumanoidRootPart is the
-- part that will be storing the character's "Running" sound.

function CharacterRealism:MountMaterialSounds(humanoid)
	local character = humanoid.Parent
	local rootPart = character and character:WaitForChild("HumanoidRootPart", 10)
	
	if not (rootPart and rootPart:IsA("BasePart")) then
		return
	end
	
	Util:PromiseChild(rootPart, "Running", function (running)
		if not running:IsA("Sound") then
			return
		end
		
		local oldPitch = Instance.new("NumberValue")
		oldPitch.Name = "OldPitch"
		oldPitch.Parent = running
		oldPitch.Value = 1
		
		local function onStateChanged(old, new)			
			if new.Name:find("Running") then
				while humanoid:GetState() == new do
					local hipHeight = humanoid.HipHeight
					
					if humanoid.RigType.Name == "R6" then
						hipHeight = 2.8
					end
					
					local scale = hipHeight / 3
					local speed = (rootPart.Velocity * XZ_VECTOR3).Magnitude
					
					local volume = ((speed - 4) / 12) * scale
					running.Volume = math.clamp(volume, 0, 1)
					
					local pitch = oldPitch.Value / ((scale * 15) / speed)
					running.Pitch = pitch
					
					RunService.Heartbeat:Wait()
				end	
			end
		end
		
		local function updateRunningSoundId()
			local soundId = self.Sounds.Concrete
			local material = humanoid.FloorMaterial.Name
			
			if not self.Sounds[material] then
				if not self.MaterialMap[material] then
					material = self.Sounds.Concrete
				else
					material = self.MaterialMap[material]
				end
			end
			
			if self.Sounds[material] then
				soundId = self.Sounds[material]
			end
			
			running.SoundId = "rbxassetid://" .. soundId
		end
		
		local floorListener = humanoid:GetPropertyChangedSignal("FloorMaterial")
		floorListener:Connect(updateRunningSoundId)
		
		running.EmitterSize = 1
		running.MaxDistance = 50
		
		updateRunningSoundId()
		humanoid.StateChanged:Connect(onStateChanged)
		
		onStateChanged(nil, Enum.HumanoidStateType.Running)
	end)
end
--[[**
	Checks if the player is in the given group.
	@param [Instance<Player>] Player The player you are checking for. Can also be their UserID.
	@param [Integer] GroupID The group you are checking.
	@returns [Boolean] Whether or not the player is in the group.
**--]]
function GroupService:IsInGroupAsync(Player, GroupID)
	for _, Group in ipairs(GroupService:GetGroupsAsync(Player)) do
		if Group.Id == GroupID then
			return true
		end
	end

	return false
end
--[[**
	ensures value is a number where min <= value

	@param min The minimum to use

	@returns A function that will return true iff the condition is passed
**--]]
function t.numberMin(min)
	return function(value)
		local success, errMsg = t.number(value)
		if not success then
			return false, errMsg or ""
		end
		if value >= min then
			return true
		else
			return false, string.format("number >= %s expected, got %s", min, value)
		end
	end
end
--SIREN CONTROLS
HUB.Sound.Off.MouseButton1Click:connect(function()
	carSeat.Parent.Body.Lightbar.M.Wail:Stop()
	carSeat.Parent.Body.Lightbar.M.Yelp:Stop()
	carSeat.Parent.Body.Lightbar.M.Priority:Stop()
	HUB.Sound.Off.BackgroundColor3 = Color3.new(255,0,0)
	HUB.Sound.P.BackgroundColor3 = Color3.new(0,0,0)
	HUB.Sound.W.BackgroundColor3 = Color3.new(0,0,0)
	HUB.Sound.Y.BackgroundColor3 = Color3.new(0,0,0)
end)
HUB.Sound.P.MouseButton1Click:connect(function()
	carSeat.Parent.Body.Lightbar.M.Wail:Stop()
	carSeat.Parent.Body.Lightbar.M.Yelp:Stop()
	carSeat.Parent.Body.Lightbar.M.Priority:Play()
	HUB.Sound.P.BackgroundColor3 = Color3.new(255,0,0)
	HUB.Sound.Off.BackgroundColor3 = Color3.new(0,0,0)
	HUB.Sound.W.BackgroundColor3 = Color3.new(0,0,0)
	HUB.Sound.Y.BackgroundColor3 = Color3.new(0,0,0)
end)
HUB.Sound.W.MouseButton1Click:connect(function()
	carSeat.Parent.Body.Lightbar.M.Wail:Play()
	carSeat.Parent.Body.Lightbar.M.Yelp:Stop()
	carSeat.Parent.Body.Lightbar.M.Priority:Stop()
	HUB.Sound.W.BackgroundColor3 = Color3.new(255,0,0)
	HUB.Sound.P.BackgroundColor3 = Color3.new(0,0,0)
	HUB.Sound.Off.BackgroundColor3 = Color3.new(0,0,0)
	HUB.Sound.Y.BackgroundColor3 = Color3.new(0,0,0)
end)
HUB.Sound.Y.MouseButton1Click:connect(function()
	carSeat.Parent.Body.Lightbar.M.Wail:Stop()
	carSeat.Parent.Body.Lightbar.M.Yelp:Play()
	carSeat.Parent.Body.Lightbar.M.Priority:Stop()
	HUB.Sound.Y.BackgroundColor3 = Color3.new(255,0,0)
	HUB.Sound.P.BackgroundColor3 = Color3.new(0,0,0)
	HUB.Sound.W.BackgroundColor3 = Color3.new(0,0,0)
	HUB.Sound.Off.BackgroundColor3 = Color3.new(0,0,0)
end)
----- MAGIC NUMBERS ABOUT THE TOOL -----
-- How much damage a bullet does
local Damage = 8
--				new.Pname.Position = UDim2.new(0,0,0,80)
--				new.Pname.Size = UDim2.new(1,0,1,0)
			end

			new.Parent = sf--Parent to scrolling frame
		end
		
		wait()
		sf.Size = UDim2.new(0.6,0,0,ui.AbsoluteContentSize.Y)
		sf.CanvasSize = UDim2.new(0,0,0,ui.AbsoluteContentSize.Y)
		--Give enough room for the frames to sit in
	end
	wait(1)
end
-- -- -- -- -- -- --
--DIRECTION SCROLL--
-- -- -- -- -- -- --

Elevator:WaitForChild("Direction").Changed:connect(function(val)
	if val == 1 then
		SetDisplay(1,"U1",9)
		wait(3)
		SetDisplay(1,"NIL",9)
	elseif val == -1 then
		SetDisplay(1,"D1",9)
		wait(3)
		SetDisplay(1,"NIL",9)
	else
		SetDisplay(1,"NIL",9)
	end
end)
-- Compare two strings character-by-character.
-- Optionally clean up small common substrings, also known as chaff.
function diffStringsRaw(a: string, b: string, cleanup: boolean): Array<Diff>
	local diffs = diffStrings(a, b)

	if cleanup then
		cleanupSemantic(diffs) -- impure function
	end

	return diffs
end

return {
	diffStringsUnified = diffStringsUnified,
	diffStringsRaw = diffStringsRaw,
}