Pinkstack/roblox-luau-corpus-text huggingface dataset:
-- << COMMANDS >>


local module = {
	
	-----------------------------------
	{
	Name = "";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {};
	Function = function(speaker, args)
		
	end;
	UnFunction = function(speaker, args)
		
	end;
	--
	};
	
	
	
	
	-----------------------------------
	{
	Name = "bad";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {"Player"};
	ClientCommand = true;
	FireAllClients = true;
	--[[
	ClientCommand = true;
	FireAllClients = true;
	BlockWhenPunished = true;
	PreFunction = function(speaker, args)
		
	end;
	Function = function(speaker, args)
		wait(1)
	end;
	--]]
	--
	};
	
	
	
	
	-----------------------------------
	
};



return module
--> LOCAL VARIABLES


local Flare = script.Parent
local FlareBullet = Flare:WaitForChild("FlareAmmunition")
local ClickedEvent = Flare:WaitForChild("PlayerClicked")
local FlareBulletScript = script:WaitForChild("FlareBulletScript")
local ReloadTime = Flare:WaitForChild("Customisation"):WaitForChild("ReloadTime").Value
local BulletVelocity = Flare:WaitForChild("Customisation"):WaitForChild("BulletVelocity")
local Reloading = false
------------------------------------------------------------------------
-- leaves a code unit, close any upvalues
------------------------------------------------------------------------


function luaY:leaveblock(fs)
  local bl = fs.bl
  fs.bl = bl.previous
  self:removevars(fs.ls, bl.nactvar)
  if bl.upval then
    luaK:codeABC(fs, "OP_CLOSE", bl.nactvar, 0, 0)
  end
  -- a block either controls scope or breaks (never both)
  assert(not bl.isbreakable or not bl.upval)
  assert(bl.nactvar == fs.nactvar)
  fs.freereg = fs.nactvar  -- free registers
  luaK:patchtohere(fs, bl.breaklist)
end
--This is a Join Trigger


if (not game:IsLoaded()) then game.Loaded:Wait() end
repeat wait() until game.Workspace.CurrentCamera
if game.Players.CharacterAutoLoads then
	repeat wait() until game.Players.LocalPlayer.Character
end

local EasingStyles = {
	["Linear"] = Enum.EasingStyle.Linear,
	["Sine"] = Enum.EasingStyle.Sine,
	["Back"] = Enum.EasingStyle.Back,
	["Quad"] = Enum.EasingStyle.Quad,
	["Quart"] = Enum.EasingStyle.Quart,
	["Quint"] = Enum.EasingStyle.Quint,
	["Bounce"] = Enum.EasingStyle.Bounce,
	["Elastic"] = Enum.EasingStyle.Elastic,
	["Exponential"] = Enum.EasingStyle.Exponential,
	["Circular"] = Enum.EasingStyle.Circular,
	["Cubic"] = Enum.EasingStyle.Cubic
}

local EasingDirections = {
	["In"] = Enum.EasingDirection.In,
	["InOut"] = Enum.EasingDirection.InOut,
	["Out"] = Enum.EasingDirection.Out
}

local cutsceneinfo = script.CutsceneInfo
local currentcameramode = game.Workspace.CurrentCamera.CameraType

game.Workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable

local camera = game.Workspace.CurrentCamera
--------LEFT DOOR 8--------


game.Workspace.doorleft.l71.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l43.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(135)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(135)

game.Workspace.doorleft.l11.BrickColor = BrickColor.new(102)
-- Unequip logic here


function OnUnequipped()
	Handle.UnequipSound:Play()
	Handle.EquipSound:Stop()
	Handle.EquipSound2:Stop()
	LeftButtonDown = false
	flare.MuzzleFlash.Enabled = false
	Reloading = false
	MyCharacter = nil
	MyHumanoid = nil
	MyTorso = nil
	MyPlayer = nil
	MyMouse = nil
	if OnFireConnection then
		OnFireConnection:disconnect()
	end
	if OnReloadConnection then
		OnReloadConnection:disconnect()
	end
	if FlashHolder then
		FlashHolder = nil
	end
	if WeaponGui then
		WeaponGui.Parent = nil
		WeaponGui = nil
	end
	if RecoilTrack then
		RecoilTrack:Stop()
	end
	if ReloadTrack then
		ReloadTrack:Stop()
	end
end

local function SetReticleColor(color)
	if WeaponGui and WeaponGui:FindFirstChild('Crosshair') then
		for _, line in pairs(WeaponGui.Crosshair:GetChildren()) do
			if line:IsA('Frame') then
				line.BorderColor3 = color
			end
		end
	end
end


Tool.Equipped:connect(OnEquipped)
Tool.Unequipped:connect(OnUnequipped)

while true do
	wait(0.033)
	if WeaponGui and WeaponGui:FindFirstChild('Crosshair') and MyMouse then
		WeaponGui.Crosshair.Position = UDim2.new(0, MyMouse.X, 0, MyMouse.Y)
		SetReticleColor(NeutralReticleColor)

		local target = MyMouse.Target
		if target and target.Parent then
			local player = PlayersService:GetPlayerFromCharacter(target.Parent)
			if player then
				if MyPlayer.Neutral or player.TeamColor ~= MyPlayer.TeamColor then
					SetReticleColor(EnemyReticleColor)
				else
					SetReticleColor(FriendlyReticleColor)
				end
			end
		end
	end
	if Spread and not IsShooting then
		local currTime = time()
		if currTime - LastSpreadUpdate > FireRate * 2 then
			LastSpreadUpdate = currTime
			Spread = math.max(MinSpread, Spread - AimInaccuracyStepAmount)
			UpdateCrosshair(Spread, MyMouse)
		end
	end
end
-- connect events


Humanoid.Died:connect(onDied)
Humanoid.Running:connect(onRunning)
Humanoid.Jumping:connect(onJumping)
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)
local runService = game:GetService("RunService");
playAnimation("idle", 0.1, Humanoid)
pose = "Standing"
while true do
wait(0)
local _,time = wait(0)
move(time)
end
--------------------------------------------------------------------------------------------------------------------------
---------------------------------------------------------MELEE---------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------------



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

function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	if not humanoid then return end
	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 ~= hum and hum ~= nil and game.Players:playerFromCharacter(humanoid.Parent) and game.Players:playerFromCharacter(humanoid.Parent).TeamColor~=cc then
		tagHumanoid(humanoid, vPlayer)
		humanoid:TakeDamage(160)
		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 lunge()
	SlashSound:play()

	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Lunge"
	anim.Parent = Tool
--[[
		___      _______                _     
	   / _ |____/ ___/ /  ___ ____ ___ (_)__ 
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]


local FE = workspace.FilteringEnabled
local car = script.Parent.Car.Value
local _Tune = require(car["A-Chassis Tune"])
local on = 0

script:WaitForChild("Rev")

if not FE then
	for i,v in pairs(car.DriveSeat:GetChildren()) do
		for _,a in pairs(script:GetChildren()) do
			if v.Name==a.Name then v:Stop() wait() v:Destroy() end
		end
	end
	for i,v in pairs(script:GetChildren()) do
		v.Parent=car.DriveSeat
	end
	
	car.DriveSeat.Rev:Play()
	
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		car.DriveSeat.Rev.Pitch = (car.DriveSeat.Rev.SetPitch.Value + car.DriveSeat.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2
	end
else
	local handler = car.AC6_FE_Sounds
	handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
	handler:FireServer("playSound","Rev")
	local pitch=0
	while wait() do
		local _RPM = script.Parent.Values.RPM.Value
		
		if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
		pitch = (script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline)*on^2
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,pitch,script.Rev.Volume)
	end
end
--NOTE: We create the rocket once and then clone it when the player fires


local Rocket = Instance.new('Part') do
	-- Set up the rocket part
	Rocket.Name = 'Rocket'
	Rocket.FormFactor = Enum.FormFactor.Custom --NOTE: This must be done before changing Size
	Rocket.Size = ROCKET_PART_SIZE
	Rocket.CanCollide = false

	-- Add the mesh
	local mesh = Instance.new('SpecialMesh', Rocket)
	mesh.MeshId = MISSILE_MESH_ID
	mesh.Scale = MISSILE_MESH_SCALE

	-- Add fire
	local fire = Instance.new('Fire', Rocket)
	fire.Heat = 5
	fire.Size = 2

	-- Add a force to counteract gravity
	local bodyForce = Instance.new('BodyForce', Rocket)
	bodyForce.Name = 'Antigravity'
	bodyForce.force = Vector3.new(0, Rocket:GetMass() * GRAVITY_ACCELERATION, 0)

	-- Clone the sounds and set Boom to PlayOnRemove
	local swooshSoundClone = SwooshSound:Clone()
	swooshSoundClone.Parent = Rocket
	local boomSoundClone = BoomSound:Clone()
	boomSoundClone.PlayOnRemove = true
	boomSoundClone.Parent = Rocket

	-- Finally, clone the rocket script and enable it
-- 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").Texture="717dea9c5a1659640155f77c84892c "	end
end

script.Parent.Touched:connect(onTouched)
--[[
	Creates a Symbol with the given name.

	When printed or coerced to a string, the symbol will turn into the string
	given as its name.
]]


function Symbol.named(name)
	assert(type(name) == "string", "Symbols must be created using a string name!")

	local self = newproxy(true)

	local wrappedName = ("Symbol(%s)"):format(name)

	getmetatable(self).__tostring = function()
		return wrappedName
	end

	return self
end
--[=[
	Maps the input brios to the output observables
	@since 3.6.0
	@param project project (Brio<T> | T) -> Brio<U> | U
	@return (source: Observable<Brio<T> | T>) -> Observable<Brio<U>>
]=]


function RxBrioUtils.map(project)
	return Rx.map(function(...)
		local n = select("#", ...)
		local brios = {}
		local args

		if n == 1 then
			if Brio.isBrio(...) then
				table.insert(brios, (...))
				args = (...):GetPackedValues()
			else
				args = {[1] = ...}
			end
		else
			args = {}
			for index, item in pairs({...}) do
				if Brio.isBrio(item) then
					table.insert(brios, item)
					args[index] = item:GetValue() -- we lose data here, but I think this is fine
				else
					args[index] = item
				end
			end
			args.n = n
		end

		local results = table.pack(project(table.unpack(args, 1, args.n)))
		local transformedResults = {}
		for i=1, results.n do
			local item = results[i]
			if Brio.isBrio(item) then
				table.insert(brios, item) -- add all subsequent brios into this table...
				transformedResults[i] = item:GetValue()
			else
				transformedResults[i] = item
			end
		end

		return BrioUtils.first(brios, table.unpack(transformedResults, 1, transformedResults.n))
	end)
end

function RxBrioUtils._mapResult(brio)
	return function(...)
		local n = select("#", ...)
		if n == 0 then
			return BrioUtils.withOtherValues(brio)
		elseif n == 1 then
			if Brio.isBrio(...) then
				return BrioUtils.first({brio, (...)}, (...):GetValue())
			else
				return BrioUtils.withOtherValues(brio, ...)
			end
		else
			local brios = { brio }
			local args = {}

			for index, item in pairs({...}) do
				if Brio.isBrio(item) then
					table.insert(brios, item)
					args[index] = item:GetValue() -- we lose data here, but I think this is fine
				else
					args[index] = item
				end
			end

			return BrioUtils.first(brios, unpack(args, 1, n))
		end
	end
end
-- @ModuleDescription Library containing other small function useful for programming.


local System = require(game.ReplicatedStorage.System)
local Module = {}
Module.Replicated = true

local HTTPService = game:GetService("HttpService")

function Module.Rotate(t)
	local output = {{}, {}, {}}

	for i, row in pairs(t) do
		for j = 1,3 do
			output[j][4-i] = row[j]
		end
	end

	return output
end

function Module.Compare(arr1, arr2) : boolean
	local a1 = HTTPService:JSONEncode(arr1)
	local a2 = HTTPService:JSONEncode(arr2)
	return a1 == a2
end

return Module
--[[function util.Tween(part,info,goal)
	local tween = game:GetService("TweenService"):Create(part,info,goal)
	return tween
end]]

--

function util.Tween(tbl)
	-- util.Tween( { part , { Position = Vector3.new(0,0,0) } , 2 , "Linear" , "Out" , 0 , false, 0 } )
	local parent,property,ttime,easingstyle,easingdirect,repeattime,reversable,delay = tbl[1],tbl[2],tbl[3] or 1,tbl[4] or "Linear",tbl[5] or "InOut",tbl[6] or 0,tbl[7] or false,tbl[8] or 0
	local ntw = game:GetService("TweenService"):Create(parent,TweenInfo.new(ttime,Enum.EasingStyle[easingstyle].Value,Enum.EasingDirection[easingdirect].Value,repeattime,reversable,delay),property)
	return ntw
end

function util.Sound(npar,sID,vol,pitch,looped)

	local par = npar or workspace

	local sound = Instance.new("Sound")
	sound.Parent = par

	sound.Volume = vol or 1
	if sID then sound.SoundId = "rbxassetid://" .. tostring(sID) end
	sound.Looped = looped or false
	sound.Pitch = pitch or 1

	return sound

end
--[[Weight and CG]]


	Tune.Weight			= 3450		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		.8		,
	 --[[Height]]		1/3		,
	 --[[Length]]		1.2		}
	Tune.WeightDist		= 50		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .7		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible
	
	--Unsprung Weight
	Tune.FWheelDensity	= .4		-- Front Wheel Density
	Tune.RWheelDensity	= .4		-- 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
--- Makes an Enum type.


function Util.MakeEnumType(name, values)
	local findValue = Util.MakeFuzzyFinder(values)
	return {
		Validate = function(text)
			return findValue(text, true) ~= nil, ("Value %q is not a valid %s."):format(text, name)
		end,
		Autocomplete = function(text)
			local list = findValue(text)
			return type(list[1]) ~= "string" and Util.GetNames(list) or list
		end,
		Parse = function(text)
			return findValue(text, true)
		end
	}
end
--				if ZombieTarget.HumanoidRootPart.Position.Y > model.HumanoidRootPart.Position.Y + 2 then
--					model.Humanoid.Jump = true
--				end


			end
			
		end
	end
	PursueState.Init = function()
	end
	
	-- AttackState: Keep moving towards target and play attack animation.
	local AttackState = StateMachine.NewState()
	AttackState.Name = "Attack"
	local lastAttack = os.time()
	local attackTrack = model.Humanoid:LoadAnimation(model.Animations.Attack)
	AttackState.Action = function()
		model.Humanoid:MoveTo(ZombieTarget.HumanoidRootPart.Position)
		local now = os.time()
		if now - lastAttack > 3 then
			lastAttack = now
			attackTrack:Play()
		end
	end
	
	-- HuntState: Can't see target but NPC will move to target's last known location.
	-- Will eventually get bored and switch state.
	local HuntState = StateMachine.NewState()
	HuntState.Name = "Hunt"
	HuntState.Action = function()
		if ZombieTargetLastLocation then
			PathLib:MoveToTarget(model, ZombieTargetLastLocation)
		end
	end
	HuntState.Init = function()
		lastBored = os.time() + configs["BoredomDuration"] / 2
	end
	
	-- CONDITION DEFINITIONS	
	
	-- CanSeeTarget: Determines if a target is visible. Returns true if target is visible and
	-- sets current target. A target is valid if it is nearby, visible, has a Torso and WalkSpeed
	-- greater than 0 (this is to ignore inanimate objects that happen to use humanoids)
	local CanSeeTarget = StateMachine.NewCondition()
	CanSeeTarget.Name = "CanSeeTarget"
	CanSeeTarget.Evaluate = function()
		if model then
			-- Get list of all nearby Zombies and non-Zombie humanoids
			-- Zombie list is used to ignore zombies during later raycast
			local humanoids = HumanoidList:GetCurrent()	
			local zombies = {}
			local characters = {}
			for _, object in pairs(humanoids) do
				if object and object.Parent and object.Parent:FindFirstChild("HumanoidRootPart") and object.Health > 0 and object.WalkSpeed > 0 then				
					local torso = object.Parent:FindFirstChild("HumanoidRootPart")
					if torso then
						if not model:FindFirstChild("HumanoidRootPart") then continue end
						local distance = (model.HumanoidRootPart.Position - torso.Position).magnitude
						if distance <= configs["AggroRange"] then
							if object.Parent.Name == "Drooling Zombie" then
								table.insert(zombies, object.Parent)
							else
								table.insert(characters, object.Parent)
							end
						end	
					end	
				end
			end	
			
			local target = AIUtilities:GetClosestVisibleTarget(model, characters, zombies, configs["FieldOfView"])
			if target then
				ZombieTarget = target
				return true
			end
--[=[
	@return Promise
	Starts Knit. Should only be called once.

	Optionally, `KnitOptions` can be passed in order to set
	Knit's custom configurations.

	:::caution
	Be sure that all services have been created _before_
	calling `Start`. Services cannot be added later.
	:::

	```lua
	Knit.Start():andThen(function()
		print("Knit started!")
	end):catch(warn)
	```
	
	Example of Knit started with options:
	```lua
	Knit.Start({
		Middleware = {
			Inbound = {
				function(player, args)
					print("Player is giving following args to server:", args)
					return true
				end
			}
		}
	}):andThen(function()
		print("Knit started!")
	end):catch(warn)
	```
]=]


function KnitServer.Start(options: KnitOptions?)

	if started then
		return Promise.reject("Knit already started")
	end

	started = true

	if options == nil then
		selectedOptions = defaultOptions
	else
		assert(typeof(options) == "table", "KnitOptions should be a table or nil; got " .. typeof(options))
		selectedOptions = options
		for k,v in pairs(defaultOptions) do
			if selectedOptions[k] == nil then
				selectedOptions[k] = v
			end
		end
	end

	return Promise.new(function(resolve)

		local knitMiddleware = selectedOptions.Middleware or {}

		-- Bind remotes:
		for _,service in pairs(services) do
			local middleware = service.Middleware or {}
			local inbound = middleware.Inbound or knitMiddleware.Inbound
			local outbound = middleware.Outbound or knitMiddleware.Outbound
			service.Middleware = nil
			for k,v in pairs(service.Client) do
				if type(v) == "function" then
					service.KnitComm:WrapMethod(service.Client, k, inbound, outbound)
				elseif v == SIGNAL_MARKER then
					service.Client[k] = service.KnitComm:CreateSignal(k, inbound, outbound)
				elseif type(v) == "table" and v[1] == PROPERTY_MARKER then
					service.Client[k] = service.KnitComm:CreateProperty(k, v[2], inbound, outbound)
				end
			end
		end

		-- Init:
		local promisesInitServices = {}
		for _,service in pairs(services) do
			if type(service.KnitInit) == "function" then
				table.insert(promisesInitServices, Promise.new(function(r)
					service:KnitInit()
					r()
				end))
			end
		end

		resolve(Promise.all(promisesInitServices))

	end):andThen(function()

		-- Start:
		for _,service in pairs(services) do
			if type(service.KnitStart) == "function" then
				task.spawn(service.KnitStart, service)
			end
		end

		startedComplete = true
		onStartedComplete:Fire()

		task.defer(function()
			onStartedComplete:Destroy()
		end)

		-- Expose service remotes to everyone:
		knitRepServiceFolder.Parent = script.Parent

	end)

end
--[[
	Novena Constraint Type: Motorcycle
			The Bike Chassis
	
	
				Avxnturador | Novena
--]]



local mouse = game.Players.LocalPlayer:GetMouse()
script.Parent.Parent:WaitForChild("Bike")
local bike = script.Parent.Parent.Bike.Value
local on = script.Parent.Parent.IsOn
local _Tune = require(bike["Tuner"])

if not _Tune.Engine and not _Tune.Electric then return end

script.Parent:WaitForChild("TextLabel").Visible = not on.Value

script.Parent.Parent.IsOn.Changed:connect(function() 
	script.Parent.TextLabel.Visible = not on.Value
end)

mouse.keyDown:connect(function(k) 
	if k=="f" then 
		if not on.Value then
			script.Parent.TextLabel.Visible=false
			on.Value = true
		else
			on.Value = false
			script.Parent.TextLabel.Visible=true
		end
	end 
end)
-- I only made it a model for easier access.



game.Players.PlayerAdded:Connect(function(p)
	p.CharacterAdded:Connect(function(c)
		c.Humanoid.BreakJointsOnDeath = false
		c.Humanoid.Died:Connect(function()
			c.HumanoidRootPart.RotVelocity = Vector3.new(180,360,90) -- Hopefully makes it so whenever you die, you don't just stand still. Feel free to remove it because this would only work for r6 lols
			for _, v in pairs(c:GetDescendants()) do
				if v:IsA("Motor6D") then
					local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
					a0.CFrame = v.C0
					a1.CFrame = v.C1
					a0.Parent = v.Part0
					a1.Parent = v.Part1
					
					local b = Instance.new("BallSocketConstraint")
					b.Attachment0 = a0
					b.Attachment1 = a1
					b.Parent = v.Part0
					
					v:Destroy()
				end
			end
			c.HumanoidRootPart.CanCollide = false
		end)
	end)
end)