Roblox/luau_corpus huggingface dataset:
-- Create a new explosion at the location of our grenade
local Explosion = Instance.new("Explosion")
Explosion.BlastRadius = 19
Explosion.BlastPressure = 2000
Explosion.DestroyJointRadiusPercent = 0

Explosion.Position = RootModel:GetPrimaryPartCFrame().Position

local parts = workspace:GetPartBoundsInRadius(Explosion.Position,Explosion.BlastRadius)
-- Decompiled with the Synapse X Luau decompiler.

local v1 = {
	spacing = 8, 
	image = "rbxasset://textures/Cursors/Gamepad/Pointer.png", 
	imageSize = Vector2.new(2, 2)
};
local v2 = Instance.new("Model");
v2.Name = "PathDisplayPoints";
local v3 = Instance.new("Part");
v3.Anchored = true;
v3.CanCollide = false;
v3.Transparency = 1;
v3.Name = "PathDisplayAdornee";
v3.CFrame = CFrame.new(0, 0, 0);
v3.Parent = v2;
local v4 = {};
for v5 = 1, 30 do
	local v6 = Instance.new("ImageHandleAdornment");
	v6.Archivable = false;
	v6.Adornee = v3;
	v6.Image = v1.image;
	v6.Size = v1.imageSize;
	v4[v5] = v6;
end;
local u1 = 30;
local u2 = {};
function v1.setCurrentPoints(p1)
	if typeof(p1) == "table" then
		u2 = p1;
		return;
	end;
	u2 = {};
end;
local u3 = {};
function v1.clearRenderedPath()
	local v7, v8, v9 = ipairs(u3);
	while true do
		v7(v8, v9);
		if not v7 then
			break;
		end;
		v9 = v7;
		v8.Parent = nil;
		u1 = u1 + 1;
		v4[u1] = v8;	
	end;
	u3 = {};
	v2.Parent = nil;
end;
local function u4(p2, p3)
	if u1 == 0 then
		return nil;
	end;
	local v10, v11, v12 = workspace:FindPartOnRayWithIgnoreList(Ray.new(p2 + Vector3.new(0, 2, 0), Vector3.new(0, -8, 0)), { game.Players.LocalPlayer.Character, workspace.CurrentCamera });
	if not v10 then
		return nil;
	end;
	local v13 = v4[1];
	if not v13 then
		local v14 = nil;
	else
		v4[1] = v4[u1];
		v4[u1] = nil;
		u1 = u1 - 1;
		v14 = v13;
	end;
	v14.CFrame = CFrame.new(v11, v11 + v12);
	v14.Parent = v2;
	return v14;
end;
function v1.renderPath()
	v1.clearRenderedPath();
	if not u2 or #u2 == 0 then
		return;
	end;
	local v15 = #u2;
	local v16 = 0;
	u3[1] = u4(u2[v15], true);
	if not u3[1] then
		return;
	end;
	while true do
		local v17 = u2[v15];
		if v15 < 2 then
			break;
		end;
		local v18 = u2[v15 - 1] - v17;
		local l__magnitude__19 = v18.magnitude;
		if l__magnitude__19 < v16 then
			v16 = v16 - l__magnitude__19;
			v15 = v15 - 1;
		else
			local v20 = u4(v17 + v18.unit * v16, false);
			if v20 then
				u3[#u3 + 1] = v20;
			end;
			v16 = v16 + v1.spacing;
		end;	
	end;
	v2.Parent = workspace.CurrentCamera;
end;
return v1;
--[[Engine]]
	--Torque Curve
	Tune.Horsepower		= 800		--	[TORQUE CURVE VISUAL]
	Tune.IdleRPM		= 700		--		https://www.desmos.com/calculator/2uo3hqwdhf
	Tune.PeakRPM		= 600		--		Use sliders to manipulate values
	Tune.Redline		= 670		--		Copy and paste slider values into the respective tune values
	Tune.EqPoint		= 550
	Tune.PeakSharpness	= 7.5
	Tune.CurveMult		= 0.16
	
	--Incline Compensation
	Tune.InclineComp	= 1.7			-- Torque compensation multiplier for inclines (applies gradient from 0-90 degrees)
	
	--Misc
	Tune.RevAccel		= 150		-- RPM acceleration when clutch is off
	Tune.RevDecay		= 75		-- RPM decay when clutch is off
	Tune.RevBounce		= 500		-- RPM kickback from redline
	Tune.IdleThrottle	= 3			-- Percent throttle at idle
	Tune.ClutchTol		= 500		-- Clutch engagement threshold (higher = faster response)
--Made by Luckymaxer

Tool = script.Parent
Handle = Tool:WaitForChild("Handle")

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

Animations = {}

ServerControl = Tool:WaitForChild("ServerControl")
ClientControl = Tool:WaitForChild("ClientControl")

ToolEquipped = false

function SetAnimation(mode, value)
	if not ToolEquipped or not CheckIfAlive() then
		return
	end
	if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
		for i, v in pairs(Animations) do
			if v.Animation == value.Animation then
				v.AnimationTrack:Stop()
				table.remove(Animations, i)
			end
		end
		local AnimationTrack = Humanoid:LoadAnimation(value.Animation)
		table.insert(Animations, {Animation = value.Animation, AnimationTrack = AnimationTrack})
		AnimationTrack:Play(value.FadeTime, value.Weight, value.Speed)
	elseif mode == "StopAnimation" and value then
		for i, v in pairs(Animations) do
			if v.Animation == value.Animation then
				v.AnimationTrack:Stop()
				table.remove(Animations, i)
			end
		end
	end
end

function CheckIfAlive()
	return (((Character and Character.Parent and Humanoid and Humanoid.Parent and Humanoid.Health > 0 and Player and Player.Parent) and true) or false)
end

function Equipped(Mouse)
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	ToolEquipped = true
	if not CheckIfAlive() then
		return
	end
	PlayerMouse = Player:GetMouse()
	Mouse.KeyDown:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = true})
	end)
	Mouse.KeyUp:connect(function(Key)
		InvokeServer("KeyPress", {Key = Key, Down = false})
	end)
end

function Unequipped()
	ToolEquipped = false
	for i, v in pairs(Animations) do
		if v and v.AnimationTrack then
			v.AnimationTrack:Stop()
		end
	end
	Animations = {}
end

function InvokeServer(mode, value)
	local ServerReturn
	pcall(function()
		ServerReturn = ServerControl:InvokeServer(mode, value)
	end)
	return ServerReturn
end

function OnClientInvoke(mode, value)
	if mode == "PlayAnimation" and value and ToolEquipped and Humanoid then
		SetAnimation("PlayAnimation", value)
	elseif mode == "StopAnimation" and value then
		SetAnimation("StopAnimation", value)
	elseif mode == "PlaySound" and value then
		value:Play()
	elseif mode == "StopSound" and value then
		value:Stop()
	elseif mode == "MouseData" then
		return {Position = PlayerMouse.Hit.p, Target = PlayerMouse.Target}
	end
end

ClientControl.OnClientInvoke = OnClientInvoke
Tool.Equipped:connect(Equipped)
Tool.Unequipped:connect(Unequipped)
--[[
	*
	* Creates a server listening event
]]
local function createServerListener(id, ...)
	local args = { ... }
	local event
	if isMiddlewareArgument(args) then
		local _binding = args
		local middleware = _binding[1]
		local connect = _binding[2]
		event = ServerEventV2.new(id, middleware)
		return event:Connect(connect)
	else
		local _binding = args
		local connect = _binding[1]
		event = ServerEventV2.new(id)
		return event:Connect(connect)
	end
end
return {
	default = createServerListener,
}
-- Events
ClientOrchestration.ClientSceneMetadataEvent = Orchestra.Events.ClientEvents.ClientSceneMetadata
ClientOrchestration.SendMediaControllerConfig = Orchestra.Events.MediaControllerConfigEvents.SendMediaControllerConfig
ClientOrchestration.Seek = Orchestra.Events.ClientEvents.Seek
ClientOrchestration.Pause = Orchestra.Events.ClientEvents.Pause
ClientOrchestration.SceneEnded = Orchestra.Events.ClientEvents.SceneEnded
ClientOrchestration.SeekPermissionsEvent = Orchestra.Events.ClientEvents.SeekPermissions

ClientOrchestration.SeekerGuiComponent = nil

ClientOrchestration.playerGui = Players.LocalPlayer:WaitForChild("PlayerGui")

ClientOrchestration.taskLib = task
ClientOrchestration._warn = function(msg)
	warn(msg)
end

ClientOrchestration._require = function(file)
	return require(file)
end

ClientOrchestration.handleSeekPermissionsEvent = function(hasPermission)
	if hasPermission and not ClientOrchestration.SeekerGuiComponent then
		local SeekerGuiElement = ClientOrchestration.Roact.createElement(ClientOrchestration.SeekerGui)

		ClientOrchestration.SeekerGuiComponent = ClientOrchestration.Roact.mount(
			SeekerGuiElement,
			ClientOrchestration.playerGui,
			"SceneSeeker"
		)
	end

	if not hasPermission and ClientOrchestration.SeekerGuiComponent then
		if ClientOrchestration.SeekerGuiComponent then
			ClientOrchestration.Roact.unmount(ClientOrchestration.SeekerGuiComponent)
			ClientOrchestration.SeekerGuiComponent = nil
		end
	end
end

ClientOrchestration.ClientSceneMetadataRequestConnection = nil

ClientOrchestration.setupSchema = function()
	ClientOrchestration.isSeekable = false
	local lastCalledOrchestrationTime = ClientOrchestration.lastCalledOrchestrationTime

	local setupSuccess, setupError = ClientOrchestration.SchemaProcessorInstance:Setup()

	local isSameScene = lastCalledOrchestrationTime == ClientOrchestration.lastCalledOrchestrationTime

	if not setupSuccess then
		ClientOrchestration._warn("Client Schema Setup wasn't successful")
		ClientOrchestration._warn(setupError)
	elseif isSameScene then
		ClientOrchestration.isSeekable = true
	end
	return setupSuccess
end

ClientOrchestration.processSchema = function(isSeeking)
	local processSuccess, processError = ClientOrchestration.SchemaProcessorInstance:Process(isSeeking)

	if not processSuccess then
		ClientOrchestration._warn("Client Schema Process wasn't successful")
		ClientOrchestration._warn(processError)
	end
end

ClientOrchestration.cleanUp = function()
	if ClientOrchestration.SchemaProcessorInstance then
		ClientOrchestration.SchemaProcessorInstance:CleanUp()
	end
end

ClientOrchestration.handleSceneEnded = function()
	if ClientOrchestration.SchemaProcessorInstance then
		local endSceneSuccess, endSceneError = ClientOrchestration.SchemaProcessorInstance:EndScene()
		if not endSceneSuccess then
			ClientOrchestration._warn("Client End Scene wasn't successful")
			ClientOrchestration._warn(endSceneError)
		end
		ClientOrchestration.cleanUp()
	end
end
-- << VARIABLES >>
local topBarFrame = main.gui.CustomTopBar
local topBarY = main.guiService:GetGuiInset().Y
local mainFrame = main.gui.MainFrame
local imageButton = topBarFrame.ImageButton
--[=[
	Executes the task delayed after some time.

	```lua
	-- delays cleanup by 5 seconds
	maid:GiveTask(MaidTaskUtils.delayed(5, gui))
	```

	@param time number -- Time in seconds
	@param job MaidTask -- Job to delay execution
	@return () -> () -- function that will execute the job delayed
]=]
function MaidTaskUtils.delayed(time, job)
	assert(type(time) == "number", "Bad time")
	assert(MaidTaskUtils.isValidTask(job), "Bad job")

	return function()
		task.delay(time, function()
			MaidTaskUtils.doTask(job)
		end)
	end
end

return MaidTaskUtils
-- The states where the Last Standing Y Position variable will not be changed.
local States = {
	[Enum.HumanoidStateType.Running] = true;
	[Enum.HumanoidStateType.RunningNoPhysics] = true;
	[Enum.HumanoidStateType.Climbing] = true;
	[Enum.HumanoidStateType.Ragdoll] = true;
	[Enum.HumanoidStateType.FallingDown] = true;
	[Enum.HumanoidStateType.Flying] = true;
	[Enum.HumanoidStateType.GettingUp] = true;
	[Enum.HumanoidStateType.Dead] = true;
	[Enum.HumanoidStateType.None] = true;
	[Enum.HumanoidStateType.Physics] = true;
	[Enum.HumanoidStateType.Swimming] = true;
	[Enum.HumanoidStateType.Seated] = true;
	[Enum.HumanoidStateType.PlatformStanding] = true;
}

local Character

repeat wait() until script.Parent.Parent:FindFirstChild("Humanoid")

Character = script.Parent.Parent

local Humanoid = Character:WaitForChild("Humanoid")
local HRP = Character:WaitForChild("HumanoidRootPart")
local Values = require(script.Parent.Values)

while true do
	local state = getHumanoidState(Humanoid)
	--print(state)
	if States[state] and not Values.DontUpdateYet then
		Values.LastStandingPos = HRP.Position
		--print(Values.LastStandingYPos)
	end
	task.wait()
end
-- Driver Input Loop --
while script.Parent ~= nil do
	--Update throttle, steer, handbrake
	getInputValues()

	local currentVel = Chassis.GetAverageVelocity()

	if Car:GetAttribute("Fuel") > 0 and Car:GetAttribute("Health") > 0 then
		local steer = script.Steering.Value
		Chassis.UpdateSteering(steer, currentVel)

		-- Taking care of throttling
		local throttle = script.Throttle.Value
		script.AngularMotorVelocity.Value = currentVel
		script.ForwardVelocity.Value = DriverSeat.CFrame.LookVector:Dot(DriverSeat.Velocity)
		Chassis.UpdateThrottle(currentVel, throttle)

		-- Taking care of handbrake
		if script.HandBrake.Value > 0 then
			Chassis.EnableHandbrake()
		end
	else
		script.AngularMotorVelocity.Value = 0
		script.ForwardVelocity.Value = 0
		Chassis.UpdateThrottle(0, 0)
	end
	
	task.wait()
end
-- Decompiled with the Synapse X Luau decompiler.

local l__Value__1 = script.Parent.Car.Value;
local l__AC6_FE_Sounds__2 = l__Value__1:WaitForChild("AC6_FE_Sounds");
local v3 = require(l__Value__1["A-Chassis Tune"]);
local v4 = 0;
local v5 = 0;
local v6 = 0;
script:WaitForChild("Rev");
local u1 = 0;
local u2 = 0;
script.Parent.Values.Gear.Changed:connect(function()
	u1 = 1;
	if script.Parent.Values.RPM.Value > 5000 then
		u2 = 0.2;
	end;
end);
for v7, v8 in pairs(l__Value__1.DriveSeat:GetChildren()) do
	for v9, v10 in pairs(script:GetChildren()) do
		if v8.Name == v10.Name then
			v8:Stop();
			wait();
			v8:Destroy();
		end;
	end;
end;
l__AC6_FE_Sounds__2:FireServer("newSound", true, "Rev", l__Value__1.DriveSeat, script.Rev.SoundId, 0, script.Rev.Volume, true);
l__AC6_FE_Sounds__2:FireServer("playSound", "Rev");
l__Value__1.DriveSeat:WaitForChild("Rev");
while wait() do
	u1 = math.max(0, u1 - 0.1);
	if script.Parent.Values.Throttle.Value <= v3.IdleThrottle / 100 then
		local v11 = math.max(0.6, 0 - 0.2);
		local v12 = math.max(0, 0 - 0.05);
		local v13 = 1;
	else
		v11 = math.min(1.1, 0 + 0.1);
		v12 = 1;
		v13 = 0;
	end;
	u2 = math.min(1, u2 + 0.2);
	if v3.Redline - v3.RevBounce / 4 < script.Parent.Values.RPM.Value and v3.IdleThrottle / 100 < script.Parent.Values.Throttle.Value then
		local v14 = 1;
	else
		v14 = 1;
	end;
	if not script.Parent.IsOn.Value then
		v4 = math.max(v4 - 0.015, 0);
	else
		v4 = 1;
	end;
	l__AC6_FE_Sounds__2:FireServer("updateSound", true, "Rev", script.Rev.SoundId, math.max((script.Rev.SetPitch.Value + script.Rev.SetRev.Value * script.Parent.Values.RPM.Value / v3.Redline) * v4 ^ 2 + v5 * u1 * math.sin(80 * tick()), script.Rev.SetPitch.Value), 1 * 0 * u2 * v14 + v6 * v13 * 0 * (3 - 0) * math.sin(tick() * 50));
end;
-------------------------------------------------------------------------------
-- Core:

local MAX_PATHS = 10

local pathfindingService = game:GetService("PathfindingService")


local function SimplifyPointsStraight(points)
	local simplified = {}
	local i = 1
	while (i < #points) do
		local pt = points[i]
		table.insert(simplified, pt)
		if (i < #points) then
			local ptNext = points[i + 1]
			local dx, dy, dz = (ptNext.x - pt.x), (ptNext.y - pt.y), (ptNext.z - pt.z)
			for j = i+1, #points do
				i = j
				local ptLast = points[i - 1]
				local pt2 = points[i]
				local dx2, dy2, dz2 = (pt2.x - ptLast.x), (pt2.y - ptLast.y), (pt2.z - ptLast.z)
				if (dx ~= dx2 or dy ~= dy2 or dz ~= dz2) then
					i = (i - 1)
					break
				end
			end
		end
	end
	table.insert(simplified, points[#points])
	return simplified
end


local function SimplifyPointsDiagonal(points)
	local simplified = {}
	local i = 3
	while (i < #points) do
		local p1 = points[i - 2]
		local p2 = points[i - 1]
		local p3 = points[i]
		local a = (p1 - p2).magnitude
		local b = (p2 - p3).magnitude
		local c = (p1 - p3).magnitude
		table.insert(simplified, p1)
		if (a == b) then
			i = (i + 2)
		else
			i = (i + 1)
		end
	end
	table.insert(simplified, points[#points])
	return simplified
end


function CreatePathObject(paths, points, finalStatus)
	local path = {}
	local api = {}
	api.Status = finalStatus
	function api:GetPointCoordinates()
		return points
	end
	function api:CheckOcclusionAsync(start)
		local n = 0
		local startIndex = 1
		for i,p in pairs(paths) do
			local numPoints = #p:GetPointCoordinates()
			n = (n + numPoints)
			if (n >= start) then
				startIndex = i + 1
				local test = p:CheckOcclusionAsync(n - numPoints + start)
				if (test ~= -1) then
					return (n - numPoints + test)
				end
				break
			end
		end
		for i = startIndex, #paths do
			local p = paths[i]
			local numPoints = #p:GetPointCoordinates()
			n = (n + numPoints)
			if (numPoints > 0) then
				local test = p:CheckOcclusionAsync(1)
				if (test ~= -1) then
					return (n - numPoints + test)
				end
			end
		end
		return -1
	end
	return setmetatable(path, {
		__metatable = true;
		__index = api;
		__newindex = function()
			error("Cannot edit Path")
		end;
	})
end
--DO NOT CHANGE ANYTHING INSIDE OF THIS SCRIPT BESIDES WHAT YOU ARE TOLD TO UNLESS YOU KNOW WHAT YOU'RE DOING OR THE SCRIPT WILL NOT WORK!!
local hitPart = script.Parent
local debounce = true
local tool = game.ServerStorage.CutieBear -- Change "Sword" to the name of your tool, make sure your tool is in ServerStorage

hitPart.Touched:Connect(function(hit)
	if debounce == true then
		if hit.Parent:FindFirstChild("Humanoid") then
			local plr = game.Players:FindFirstChild(hit.Parent.Name)
			if plr then
				debounce = false
				hitPart.BrickColor = BrickColor.new("Bright red")
				tool:Clone().Parent = plr.Backpack
				wait(3) -- Change "3" to however long you want the player to have to wait before they can get the tool again
				debounce = true
				hitPart.BrickColor = BrickColor.new("Bright green")
			end
		end
	end
end)
--// This script should be placed as a decendant to StarterGui for it to properly work.

local GENERAL_DAMPING = 2.5 -- Higher number equals less bob
local TILT_DAMPING = 1 -- Higher number equals less tilt
local OFFSET_DAMPING = 0.1 -- Higher number equals less camera offset bobbing
--l__LocalPlayer__1.Character.RightFoot.Touched:connect(function(p1) --r15
l__LocalPlayer__1.Character["Right Leg"].Touched:connect(function(p1) --r6
	if p1.Name == "floor" and l__Running__2.SoundId ~= "rbxassetid://1977094302" then
		l__Running__2.Pitch = 2.8;
		l__Running__2.Volume = 0.2;
		l__Running__2.SoundId = "rbxassetid://1977094302";
		l__Running__2:Play();
	end;
	if p1.Name == "grass" and l__Running__2.SoundId ~= "rbxassetid://252965149" then
		l__Running__2.Pitch = 2.3;
		l__Running__2.Volume = 2;
		l__Running__2.SoundId = "rbxassetid://252965149";
		l__Running__2:Play();
	end;
	if p1.Name == "wood" and l__Running__2.SoundId ~= "rbxassetid://1244506786" then
		l__Running__2.Pitch = 2.3;
		l__Running__2.Volume = 0.1;
		l__Running__2.SoundId = "rbxassetid://1244506786";
		l__Running__2:Play();
	end;
	if p1.Name == "metal" and l__Running__2.SoundId ~= "rbxassetid://3477114901" then
		l__Running__2.Pitch = 2.6;
		l__Running__2.Volume = 1;
		l__Running__2.SoundId = "rbxassetid://3477114901";
		l__Running__2:Play();
	end;
	if p1.Name == "nasty" and l__Running__2.SoundId ~= "rbxassetid://3477114901" then
		l__Running__2.Pitch = 3.1;
		l__Running__2.Volume = 0.4;
		l__Running__2.SoundId = "rbxassetid://344167846";
		l__Running__2:Play();
	end;
end);
-- скрипт ПРИМЕР по созданию ландшафта из блоков и переделке в воду
-- game.Workspace.Terrain:FillBlock(game.Workspace.Baseplate.CFrame, game.Workspace.Baseplate.Size, Enum.Material.Grass)

local mod=game.Workspace.Base
--[[spawn(function()
	while wait(5) do
		for i = 1,5 do
			module:Notice(main.hdAdminCoreName, "Your rank is 'Owner'! Click to view the commands.", {"ShowSpecificPage", "Commands", "Commands"})
			wait(1)
			--module:Notice(main.hdAdminCoreName, "You're a Donor! Click to view Donor commands." )
			--wait(1)
		end
	end
end)--]]


return module
-- Main script execution
game.Players.PlayerAdded:Connect(function(player)
	local leaderstats = Instance.new("Folder")
	leaderstats.Name = "leaderstats"

	local points = Instance.new("IntValue")
	points.Name = "Points"
	points.Parent = leaderstats

	local survival = Instance.new("IntValue")
	survival.Name = "Survival"
	survival.Parent = leaderstats

	leaderstats.Parent = player
end)

dayNightCycle()
--  Fixed By DT4E  --

while true do
script.Parent.BrickColor = BrickColor.new("Lime green")
wait(0.15)
script.Parent.BrickColor = BrickColor.new("Bright Blue")
wait(0.15)
end
--[[Drivetrain Initialize]]

	local Drive={}
	
	--Power Front Wheels
		if _Tune.Config == "FWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="FL" or v.Name=="FR" or v.Name=="F" then table.insert(Drive,v) end end end
	
	--Power Rear Wheels
		if _Tune.Config == "RWD" or _Tune.Config == "AWD" then for i,v in pairs(car.Wheels:GetChildren()) do if v.Name=="RL" or v.Name=="RR" or v.Name=="R" then table.insert(Drive,v) end end end
	
	--Determine Wheel Size
	local wDia = 0 for i,v in pairs(Drive) do if v.Size.x>wDia then wDia = v.Size.x end end
	
	--Pre-Toggled PBrake
	for i,v in pairs(car.Wheels:GetChildren()) do if math.abs(v["#AV"].maxTorque.Magnitude-PBrakeForce)<1 then _PBrake=true end end
--[[**
	Gets the player's primary group if it exists.
	@param [Instance<Player>] Player The player you are checking for. Can also be their UserID.
	@returns [DictionaryOrNil] The player's primary group if it exists, otherwise nil.
**--]]
function GroupService:GetPrimaryGroupAsync(Player)
	for _, Group in ipairs(GroupService:GetGroupsAsync(Player)) do
		if Group.IsPrimary then
			return Group
		end
	end

	return nil
end
--create tables:
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "e" then
		table.insert(e, 1, part)
	end
end
for i,part in pairs(model:GetChildren()) do
	if string.sub(part.Name, 1,1) == "f" then
		table.insert(f, 1, part)
	end
end

function lightOn(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("On") then
			part.On.Value  = true
		end
	end
end

function lightOff(T)
	for i, part in pairs (T) do
		if part:FindFirstChild("On") then
			part.On.Value = false
		end
	end
end

while true do

	lightOn(e)
	lightOn(f)
	wait(0.15)

	lightOff(e)
	lightOff(f)
	wait(0.15)
	
end
--[=[
	Transforms the observable with the following transformers

	```lua
	Rx.of(1, 2, 3):Pipe({
		Rx.map(function(result)
			return result + 1
		end);
		Rx.map(function(value)
			return ("%0.2f"):format(value)
		end);
	}):Subscribe(print)

	--> 2.00
	--> 3.00
	--> 4.00
	```
	@param transformers { (observable: Observable<T>) -> Observable<T> }
	@return Observable<T>
]=]
function Observable:Pipe(transformers)
	assert(type(transformers) == "table", "Bad transformers")

	local current = self
	for _, transformer in pairs(transformers) do
		assert(type(transformer) == "function", "Bad transformer")
		current = transformer(current)
		assert(Observable.isObservable(current), "Transformer must return an observable")
	end

	return current
end
----------------------------------
-----------CONNECTIONS------------
----------------------------------

PianoKeysConnections = {}
ExitButtonConnection = nil
SheetsButtonConnection = nil
SheetsEditedConnection = nil
CapsButtonConnection = nil

function MakeGuiConnections()
	for i, v in pairs(PianoGui.Keys:GetChildren()) do
		PianoKeysConnections[i] = v.InputBegan:connect(function(Object) PianoKeyPressed(Object, tonumber(v.Name)) end)
	end
	
	ExitButtonConnection = PianoGui.ExitButton.InputBegan:connect(ExitButtonPressed)
	SheetsButtonConnection = PianoGui.SheetsButton.InputBegan:connect(SheetsButtonPressed)
	SheetsEditedConnection = SheetsGui.Sheet.ScrollingFrame.TextBox.Changed:connect(SheetsEdited)
	CapsButtonConnection = PianoGui.CapsButton.InputBegan:connect(CapsButtonPressed)
end
function BreakGuiConnections()
	for i, v in pairs(PianoKeysConnections) do
		v:disconnect()
	end
	
	ExitButtonConnection:disconnect()
	SheetsButtonConnection:disconnect()
	SheetsEditedConnection:disconnect()
	CapsButtonConnection:disconnect()
end
-- Customization
	AntiTK = false; -- Set to false to allow TK and damaging of NPC, true for no TK. (To damage NPC, this needs to be false)
	
	MouseSense = 0.5;

	CanAim = false; -- Allows player to aim
	CanBolt = false; -- When shooting, if this is enabled, the bolt will move (SCAR-L, ACR, AK Series)
	
	LaserAttached = true;
	LightAttached = true;
	TracerEnabled = true;
	
	SprintSpeed = 22;
-- Get the correct sound from our sound list.
local function getSoundProperties()
	for name, data in pairs(IDList) do
		if name == material then
			id = data.id
			volume = data.volume

			playbackSpeed = (humanoid.WalkSpeed / 16) * data.speed
			break
		end
	end
end