Prompt: --[[Transmission]]

Response:
--
	Tune.Clutch			= true		-- Implements a realistic clutch.

	Tune.TransModes		= {"Manual","DCT","Auto"}												--[[
	[Modes]
		"Manual"	;	Traditional clutch operated manual transmission
		"DCT"		;	Dual clutch transmission, where clutch is operated automatically
		"Auto"		;	Automatic transmission that shifts for you

		>Include within brackets
			eg: {"Manual"} or {"DCT", "Manual"}
	>First mode is default mode				]]

	--[[Transmission]]
	Tune.ClutchType 	= "Clutch"										--[[
	[Types]
		"Clutch"			: Standard clutch, recommended
		"TorqueConverter"	: Torque converter, keeps RPM up
		"CVT"				: CVT, found in scooters
																		]]
	Tune.ClutchMode		= "Speed"									--[[
	[Modes]
		"Speed"		: Speed controls clutch engagement
		"RPM"		: Speed and RPM control clutch engagement			]]

	--Transmission Settings
	Tune.Stall			= true		-- Stalling, enables the bike to stall. An ignition plugin would be necessary. Disables if Tune.Clutch is false.
	Tune.ClutchEngage	= 25		-- How fast engagement is (0 = instant, 99 = super slow)

	--Torque Converter:
	Tune.TQLock 		= false		-- Torque converter starts locking at a certain RPM (see below if set to true)

	--Torque Converter and CVT:
	Tune.RPMEngage 		= 5300		-- Keeps RPMs to this level until passed

	--Clutch:
	Tune.SpeedEngage 	= 15		-- Speed the clutch fully engages at (Based on SPS)

	--Clutch: "RPM" mode
	Tune.ClutchRPMMult	= 1.0		-- Clutch RPM multiplier, recommended to leave at 1.0

	--Manual: Quick Shifter
	Tune.QuickShifter	= true 		-- To quickshift, cut off the throttle to upshift, and apply throttle to downshift, all without clutch.
	Tune.QuickShiftTime	= 0.25 		-- Determines how much time you have to quick shift up or down before you need to use the clutch.

	--Automatic Settings
	Tune.AutoShiftMode	= "RPM"												--[[
	[Modes]
		"Speed"		: Shifts based on wheel speed
		"RPM"		: Shifts based on RPM										]]
	Tune.AutoShiftType	= "DCT"												--[[
	[Types]
		"Rev"		: Clutch engages fully once RPM reached
		"DCT"		: Clutch engages after a set time has passed				]]
	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)

	--Automatic: Revmatching
	Tune.ShiftThrot		= 100		-- Throttle level when shifting down to revmatch, 0 - 100%

	--Automatic: DCT
	Tune.ShiftUpTime	= 0.25		-- Time required to shift into next gear, from a lower gear to a higher one.
	Tune.ShiftDnTime	= 0.125		-- Time required to shift into next gear, from a higher gear to a lower one.

	Tune.FinalDrive		= (38/16)*1.6	-- (Final * Primary)	-- Gearing determines top speed and wheel torque
											-- for the final is recommended to divide the size of the rear sprocket to the one of the front sprocket
											-- and multiply it to the primary drive ratio, if data is missing, you can also just use a single number
	Tune.NeutralRev		= true			-- Enables you to back up manually in neutral
	Tune.Ratios			= {				-- Higher ratio = more torque, Lower ratio = higher top speed
		--[[Neutral]]	0			,	-- Ratios can also be deleted
		--[[ 1 ]]		32/14		,	-- Neutral and 1st gear are required
		--[[ 2 ]]		32/18		,
		--[[ 3 ]]		33/22		,
		--[[ 4 ]]		32/24		,
		--[[ 5 ]]		34/28		,
		--[[ 6 ]]		33/29		,
	}

	Tune.Limiter 		= false 		-- Enables a speed limiter
	Tune.SpeedLimit 	= 300 			-- At what speed (SPS) the limiter engages


Prompt: --Dupes a part from the template.

Response:
local function MakeFromTemplate(template: BasePart, currentCacheParent: Instance)
	local part: BasePart = template:Clone()
	-- ^ Ignore W000 type mismatch between Instance and BasePart. False alert.

	part.CFrame = CF_REALLY_FAR_AWAY
	part.Anchored = true
	part.Parent = currentCacheParent
	return part
end

function PartCacheStatic.new(template: BasePart, numPrecreatedParts: number?, currentCacheParent: Instance?): PartCache
	local newNumPrecreatedParts: number = numPrecreatedParts or 5
	local newCurrentCacheParent: Instance = currentCacheParent or workspace

	--PrecreatedParts value.
	--Same thing. Ensure it's a number, ensure it's not negative, warn if it's really huge or 0.
	assert(numPrecreatedParts > 0, "PrecreatedParts can not be negative!")
	assertwarn(numPrecreatedParts ~= 0, "PrecreatedParts is 0! This may have adverse effects when initially using the cache.")
	assertwarn(template.Archivable, "The template's Archivable property has been set to false, which prevents it from being cloned. It will temporarily be set to true.")

	local oldArchivable = template.Archivable
	template.Archivable = true
	local newTemplate: BasePart = template:Clone()
	-- ^ Ignore W000 type mismatch between Instance and BasePart. False alert.

	template.Archivable = oldArchivable
	template = newTemplate

	local object: PartCache = {
		Open = {},
		InUse = {},
		CurrentCacheParent = newCurrentCacheParent,
		Template = template,
		ExpansionSize = 10
	}
	setmetatable(object, PartCacheStatic)

	-- Below: Ignore type mismatch nil | number and the nil | Instance mismatch on the table.insert line.
	for _ = 1, newNumPrecreatedParts do
		table.insert(object.Open, MakeFromTemplate(template, object.CurrentCacheParent))
	end
	object.Template.Parent = nil

	return object
	-- ^ Ignore mismatch here too
end


Prompt: -- ROBLOX deviation END

Response:
local BufferedConsoleModule = require(CurrentModule.BufferedConsole)
exports.BufferedConsole = BufferedConsoleModule.default
export type BufferedConsole = BufferedConsoleModule.BufferedConsole

local CustomConsoleModule = require(CurrentModule.CustomConsole)
exports.CustomConsole = CustomConsoleModule.default
export type CustomConsole = CustomConsoleModule.CustomConsole

exports.NullConsole = require(CurrentModule.NullConsole).default
exports.getConsoleOutput = require(CurrentModule.getConsoleOutput).default

local typesModule = require(CurrentModule.types)
export type ConsoleBuffer = typesModule.ConsoleBuffer
export type LogMessage = typesModule.LogMessage
export type LogType = typesModule.LogType
export type LogEntry = typesModule.LogEntry
export type InspectOptions = typesModule.InspectOptions

return exports


Prompt: -------- OMG HAX

Response:
r = game:service("RunService")

local damage = 10

local slash_damage = 12

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

local SlashSound = Instance.new("Sound")
SlashSound.SoundId = "rbxasset://sounds\\swordslash.wav"
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 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
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			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)


Prompt:
--[=[
	@class EnumList
	Defines a new Enum.
]=]

Response: local EnumList = {}


Prompt:
--// Hash: 747c39bd00358b94599020af4dfde2375d20b56fce538fa04c22e2c14ba9503bd8f22b9b1544a90709932a0bd6eb8a80
-- Decompiled with the Synapse X Luau decompiler.

Response:
return function(p1)
	return p1:sub(#p1 - ((p1:reverse():find("%u") or #p1 + 1) - 1)):gsub("%d+$", "");
end;


Prompt: -- / Remote Events / --

Response: local ToolEvent = game.ReplicatedStorage:WaitForChild("ToolEvent")


Prompt: -- emitter block around camera used when outside

Response:
local Emitter do

	Emitter = Instance.new("Part")
	Emitter.Transparency = 1
	Emitter.Anchored = true
	Emitter.CanCollide = false
	Emitter.Locked = false
	Emitter.Archivable = false
	Emitter.TopSurface = Enum.SurfaceType.Smooth
	Emitter.BottomSurface = Enum.SurfaceType.Smooth
	Emitter.Name = "__RainEmitter"
	Emitter.Size = MIN_SIZE
	Emitter.Archivable = false

	local straight = Instance.new("ParticleEmitter")
	straight.Name = "RainStraight"
	straight.LightEmission = RAIN_DEFAULT_LIGHTEMISSION
	straight.LightInfluence = RAIN_DEFAULT_LIGHTINFLUENCE
	straight.Size = RAIN_STRAIGHT_SIZE
	straight.Texture = RAIN_STRAIGHT_ASSET
	straight.LockedToPart = true
	straight.Enabled = false
	straight.Lifetime = RAIN_STRAIGHT_LIFETIME
	straight.Rate = RAIN_STRAIGHT_MAX_RATE
	straight.Speed = NumberRange.new(RAIN_STRAIGHT_MAX_SPEED)
	straight.EmissionDirection = Enum.NormalId.Bottom
	straight.Parent = Emitter

	local topdown = Instance.new("ParticleEmitter")
	topdown.Name = "RainTopDown"
	topdown.LightEmission = RAIN_DEFAULT_LIGHTEMISSION
	topdown.LightInfluence = RAIN_DEFAULT_LIGHTINFLUENCE
	topdown.Size = RAIN_TOPDOWN_SIZE
	topdown.Texture = RAIN_TOPDOWN_ASSET
	topdown.LockedToPart = true
	topdown.Enabled = false
	topdown.Rotation = RAIN_TOPDOWN_ROTATION
	topdown.Lifetime = RAIN_TOPDOWN_LIFETIME
	topdown.Rate = RAIN_TOPDOWN_MAX_RATE
	topdown.Speed = NumberRange.new(RAIN_TOPDOWN_MAX_SPEED)
	topdown.EmissionDirection = Enum.NormalId.Bottom
	topdown.Parent = Emitter

end

local splashAttachments, rainAttachments do

	splashAttachments = {}
	rainAttachments = {}

	for i = 1, RAIN_SPLASH_NUM do

		-- splashes on ground
		local splashAttachment = Instance.new("Attachment")
		splashAttachment.Name = "__RainSplashAttachment"
		local splash = Instance.new("ParticleEmitter")
		splash.LightEmission = RAIN_DEFAULT_LIGHTEMISSION
		splash.LightInfluence = RAIN_DEFAULT_LIGHTINFLUENCE
		splash.Size = RAIN_SPLASH_SIZE
		splash.Texture = RAIN_SPLASH_ASSET
		splash.Rotation = RAIN_SPLASH_ROTATION
		splash.Lifetime = RAIN_SPLASH_LIFETIME
		splash.Transparency = NumberSequence.new {
			NSK010;
			NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T1, RAIN_SPLASH_ALPHA_LOW, 0);
			NumberSequenceKeypoint.new(RAIN_TRANSPARENCY_T2, RAIN_SPLASH_ALPHA_LOW, 0);
			NSK110;
		}
		splash.Enabled = false
		splash.Rate = 0
		splash.Speed = NumberRange.new(0)
		splash.Name = "RainSplash"
		splash.Parent = splashAttachment
		splashAttachment.Archivable = false
		table.insert(splashAttachments, splashAttachment)

		-- occluded rain particle generation
		local rainAttachment = Instance.new("Attachment")
		rainAttachment.Name = "__RainOccludedAttachment"
		local straightOccluded = Emitter.RainStraight:Clone()
		straightOccluded.Speed = NumberRange.new(RAIN_OCCLUDED_MINSPEED, RAIN_OCCLUDED_MAXSPEED)
		straightOccluded.SpreadAngle = RAIN_OCCLUDED_SPREAD
		straightOccluded.LockedToPart = false
		straightOccluded.Enabled = false
		straightOccluded.Parent = rainAttachment
		local topdownOccluded = Emitter.RainTopDown:Clone()
		topdownOccluded.Speed = NumberRange.new(RAIN_OCCLUDED_MINSPEED, RAIN_OCCLUDED_MAXSPEED)
		topdownOccluded.SpreadAngle = RAIN_OCCLUDED_SPREAD
		topdownOccluded.LockedToPart = false
		topdownOccluded.Enabled = false
		topdownOccluded.Parent = rainAttachment
		rainAttachment.Archivable = false
		table.insert(rainAttachments, rainAttachment)

	end

end


Prompt: --[[Steering]]

Response:
	Tune.SteerInner		= 36		-- Inner wheel steering angle (in degrees)
	Tune.SteerOuter		= 37		-- Outer wheel steering angle (in degrees)
	Tune.SteerSpeed		= .03		-- Steering increment per tick (in degrees)
	Tune.ReturnSpeed	= .05		-- Steering increment per tick (in degrees)
	Tune.SteerDecay		= 320		-- Speed of gradient cutoff (in SPS)
	Tune.MinSteer		= 10		-- 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			= 100000	-- Steering Aggressiveness


Prompt:
--[=[
	@within TableUtil
	@function Assign
	@param target table
	@param ... table
	@return table

	Copies all values of the given tables into the `target` table.

	```lua
	local t = {A = 10}
	local t2 = {B = 20}
	local t3 = {C = 30, D = 40}
	local newT = TableUtil.Assign(t, t2, t3)
	print(newT) --> {A = 10, B = 20, C = 30, D = 40}
	```
]=]

Response:
local function Assign(target: Table, ...: Table): Table
	local tbl = table.clone(target)
	for _,src in ipairs({...}) do
		for k,v in pairs(src) do
			tbl[k] = v
		end
	end
	return tbl
end


Prompt:
--[[
	Singleton Manager that holds Room components
]]

Response:
local CollectionService = game:GetService("CollectionService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ServerStorage = game:GetService("ServerStorage")

local TableUtils = require(ReplicatedStorage.Dependencies.LuaUtils.TableUtils)
local Constants = require(ReplicatedStorage.Source.Common.Constants)
local Registry = require(ReplicatedStorage.Dependencies.GameUtils.Components.Registry)
local Room = require(ServerStorage.Source.Components.Room)

local statusValuesFolder = workspace.Statuses
local roomsSecure = statusValuesFolder.RoomsSecure
local roomsBreached = statusValuesFolder.RoomsBreached

local RoomManager = {}

local rooms = Registry.new(Room)


Prompt:
--[[
	Function called when the client is notified of a player state update.
]]

Response:
function UIController.onClientStateUpdated(currentState, previousState)
	UIController.setView(currentState, previousState)
end


Prompt: --Exported

Response:
function module.new(sourceInstance, data, duration)

	local record = RecurseAdd(sourceInstance, data)
	local self = setmetatable(
		{
			record = RecurseAdd(sourceInstance, data),
			state = 0,
			duration  = duration

		}, module)

	return self
end

function RemoveTween(tweenRecord, instance)
	local sourceInstance = tweenRecord.sourceInstance
	if (instance) then
		sourceInstance = instance
	end

	for key,value in pairs(tweenRecord.pairs) do
		sourceInstance[key] = value.src
	end
	for key,value in pairs(tweenRecord.children) do

		local child = tweenRecord.sourceInstance
		if (child) then
			RemoveTween(value, child)
		end
	end
end

function module:RemoveTween()
	RemoveTween(self.record)
end

function SetTween(tweenRecord, frac)

	for key,value in pairs(tweenRecord.pairs) do
		tweenRecord.sourceInstance[key] = value.func(value.src,value.dst, frac)
	end
	for key,value in pairs(tweenRecord.children) do

		local child = tweenRecord.sourceInstance
		if (child) then
			SetTween(value, frac)
		end
	end
end

function module:SetTween(frac)

	frac = math.clamp(frac,0,1)
 	SetTween(self.record, frac)
end

function module:RunTween(deltaTime, grow)

	local oldFrac = self.state
	if (grow == true) then
		self.state += deltaTime / self.duration
	else
		self.state -= deltaTime / self.duration
	end
	self.state = math.clamp(self.state,0,1)

	if (oldFrac ~= self.state) then
		self:SetTween(self.state)
	end

end

return module


Prompt: ----- cold tap handler -----

Response:
coldTap.Interactive.ClickDetector.MouseClick:Connect(function()
	if coldOn.Value == false then
		coldOn.Value = true
		faucet.ParticleEmitter.Enabled = true
		waterSound:Play()
		coldTap:SetPrimaryPartCFrame(coldTap.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(-85), 0))
	else
		coldOn.Value = false
		if hotOn.Value == false then
			faucet.ParticleEmitter.Enabled = false
			waterSound:Stop()
		end
		coldTap:SetPrimaryPartCFrame(coldTap.PrimaryPart.CFrame * CFrame.Angles(0, math.rad(85), 0))
	end
end)


Prompt: ---- Create motors

Response:
local freezerMotor = Instance.new("Motor")
freezerMotor.Name = "FreezerMotor"
freezerMotor.Parent = fridge.LeftWall
freezerMotor.Part0 = fridge.LeftWall
freezerMotor.Part1 = fridge.FreezerDoor
freezerMotor.C0 = CFrame.new(0,fridge.LeftWall.Size.Y/2-fridge.FreezerDoor.Size.Y/2,
								-fridge.LeftWall.Size.Z/2-fridge.FreezerDoor.Size.Z/2) * CFrame.Angles(-math.pi/2,0,0)
freezerMotor.C1 = CFrame.new(-fridge.FreezerDoor.Size.X/2+fridge.LeftWall.Size.X/2,0,0) * CFrame.Angles(3*math.pi/2,0,0)
freezerMotor.MaxVelocity = .1

local doorMotor = Instance.new("Motor")
doorMotor.Name = "DoorMotor"
doorMotor.Parent = fridge.LeftWall
doorMotor.Part0 = fridge.LeftWall
doorMotor.Part1 = fridge.Door
doorMotor.C0 = CFrame.new(0,-fridge.LeftWall.Size.Y/2+fridge.Door.Size.Y/2,-fridge.LeftWall.Size.Z/2-fridge.Door.Size.Z/2) * CFrame.Angles(-math.pi/2,0,0)
doorMotor.C1 = CFrame.new(-fridge.Door.Size.X/2+fridge.LeftWall.Size.X/2,0,0) * CFrame.Angles(3*math.pi/2,0,0)
doorMotor.MaxVelocity = .1


Prompt: -------- OMG HAX

Response:
r = game:service("RunService")

local damage = 0

local slash_damage = 0
local lunge_damage = 0

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 LungeSound = Instance.new("Sound")
LungeSound.SoundId = "rbxasset://sounds\\swordlunge.wav"
LungeSound.Parent = sword
LungeSound.Volume = .6

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

function blow(hit)
	if (hit.Parent == nil) then return end -- happens when bullet hits sword

	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
		-- final check, make sure sword is in-hand

		local right_arm = vCharacter:FindFirstChild("Right Arm")
		if (right_arm ~= nil) then
			local joint = right_arm:FindFirstChild("RightGrip")
			if (joint ~= nil and (joint.Part0 == sword or joint.Part1 == sword)) then
				tagHumanoid(humanoid, vPlayer)
				humanoid:TakeDamage(damage)
				wait(1)
				untagHumanoid(humanoid)
			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 lunge()
	damage = lunge_damage

	LungeSound:play()

	local anim = Instance.new("StringValue")
	anim.Name = "toolanim"
	anim.Value = "Lunge"
	anim.Parent = Tool

	local force = Instance.new("BodyVelocity")
	force.velocity = Vector3.new(0,0,0) --Tool.Parent.Torso.CFrame.lookVector * 80
	force.Parent = Tool.Parent.Torso
	wait(.25)
	swordOut()
	wait(.25)
	force.Parent = nil
	wait(.5)
	swordUp()

	damage = slash_damage
end

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

function swordOut()
	Tool.GripForward = Vector3.new(0,0,0)
	Tool.GripRight = Vector3.new(0,0,0)
	Tool.GripUp = Vector3.new(0,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

	local t = r.Stepped:wait()

	if (t - last_attack < .2) then
		lunge()
	else
		attack()
	end

	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)


Prompt: -- You may turn both of these on at once. In that case, zone-specific music will play in the appropriate zones, and global background music will play whenever you're not within any zone.

Response:
settings.DisplayMuteButton = false  -- If set to true, there will be a button in the bottom-right corner of the screen allowing players to mute the background music.

settings.MusicFadeoutTime = .5  -- How long music takes to fade out, in seconds.

settings.MusicOnlyPlaysWithinZones = false  -- (This setting only applies when UseGlobalBackgroundMusic is set to false) If a player walks into an area that's not covered by any music zone, what should happen? If true, music will stop playing. If false, the music from the previous zone will continue to play.

return settings


Prompt: --whitelisted

Response:
game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Fawn brown") then
			Character.Humanoid.MaxHealth = 200
			Character.Humanoid.Health = 200
		end
	end)
end)
game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Deep blue") then
			Character.Humanoid.MaxHealth = 200
			Character.Humanoid.Health = 200
		end
	end)
end)
game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character)
		print(Player.TeamColor)
		if Player.TeamColor == BrickColor.new("Really black") then
			Character.Humanoid.MaxHealth = 200
			Character.Humanoid.Health = 200
		end
	end)
end)


Prompt: -- Unequip logic here

Response:
function OnUnequipped()
	LeftButtonDown = 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 EquipTrack then
		EquipTrack:Stop()
	end
	if PumpTrack then
		PumpTrack:Stop()
	end
end

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


Response:
function GUIParticles.New(gui, particle)
	--- Check if gui argument is a GUI instance or UDIM2 position
	local isGeneratedGui = not pcall(function()  local x = gui.Parent  end)

	--- Generate GUI holder if it is a UDIM2 position
	if isGeneratedGui then
		local fakeGuiHolder = Instance.new("ScreenGui")
		fakeGuiHolder.Parent = _L.Player.Get("PlayerGui")
		local fakeGui = Instance.new("Frame")
		fakeGui.BackgroundTransparency = 1
		fakeGui.Size = UDim2.new(0, 1, 0, 1)
		fakeGui.Position = gui
		fakeGui.AnchorPoint = Vector2.new(0.5, 0.5)
		fakeGui.Parent = fakeGuiHolder
		gui = fakeGui
	end

	--- Setup particle folder if it doesn't already exist
	if particleFolder == nil then
		particleFolder = Instance.new("Folder")
		particleFolder.Name = "GUI Particles"
		particleFolder.Parent = game.Workspace.CurrentCamera
	end

	--- Create particle's part holder
	local particlePart = Instance.new("Part")
	particlePart.Transparency = 1
	particlePart.Material = Enum.Material.SmoothPlastic
	particlePart.CanCollide = false
	particlePart.Anchored = true
	particlePart.Size = Vector3.new(0, 0, 0)
	particlePart.Name = particle.Name
	particlePart.Parent = particleFolder

	--- Create attachment for particles (avoid spread)
	local attachment = Instance.new("Attachment")
	attachment.Parent = particlePart

	--- Add in particles
	particle = particle:Clone()
	particle.ZOffset = particle.ZOffset + displayZ * 0.645 --- Hack of the century
	particle.Parent = attachment

	--- Math
	local function Update()
		local camera = game.Workspace.CurrentCamera
		local cameraSize = camera.ViewportSize
		local sizeX, sizeY = gui.AbsoluteSize.X, gui.AbsoluteSize.Y
		local posX, posY = gui.AbsolutePosition.X + (sizeX / 2), gui.AbsolutePosition.Y + (sizeY / 2)
		--[[local sizeInStudsTop = camera:ScreenPointToRay(gui.AbsolutePosition.X, gui.AbsolutePosition.Y, displayZ).Origin
		local sizeInStudsBottom = camera:ScreenPointToRay(gui.AbsolutePosition.X+sizeX, gui.AbsolutePosition.Y+sizeY, displayZ).Origin
		particlePart.Size = Vector3.new(math.abs(sizeInStudsBottom.X-sizeInStudsTop.X), math.abs(sizeInStudsBottom.Y-sizeInStudsTop.Y), 0.05) ]]
		local positionInStuds = camera:ScreenPointToRay(posX, posY, displayZ).Origin
		particlePart.CFrame = CFrame.new(positionInStuds) * CFrame.Angles(camera.CFrame:toEulerAnglesXYZ())
	end

	--- Main
	coroutine.wrap(function()
		--- Update
		while (gui and particleFolder and particle and particlePart and particle.Parent) do
			Update()
			_L.Services.RunService.RenderStepped:wait()
		end

		--- Destroy
		if gui.Parent and isGeneratedGui then  gui.Parent:Destroy()  end
		if particle then  particle:Destroy()  end
		if particlePart then  particlePart:Destroy()  end
	end)()

	--
	return particle
end


Response:
end
wait(0.15)
if game.Workspace.DoorFlashing.Value == true then


Prompt: --use this to determine if you want this human to be harmed or not, returns boolean

Response:
function checkTeams(otherHuman)
	return not (sameTeam(otherHuman) and not FriendlyFire)
end

function getKnife()
	local knife = Handle:clone()
	knife.Transparency = 0
	knife.Hit.Pitch = math.random(90, 110)/100

	local lift = Instance.new("BodyForce")
	lift.force = Vector3.new(0, 196.2, 0) * knife:GetMass() * 0.8
	lift.Parent = knife

	local proj = Tool.Projectile:Clone()
	proj.Disabled = false
	proj.Parent = knife

	return knife
end

function equippedLoop()
	local client = game.StarterPlayer.StarterCharacterScripts.CombatClient

	client.Disabled = true
	while Equipped do
		local dt = Heartbeat:wait()

		if AttackPower < 1 then
			AttackPower = AttackPower + dt * AttackRecharge
			if AttackPower > 1 then
				AttackPower = 1
			end
		end

		Handle.Transparency = 1 - AttackPower
	end
end

function onLeftDown(mousePos)
	local knife = getKnife()
	knife.CFrame = CFrame.new(Handle.Position, mousePos)
	knife.Velocity = knife.CFrame.lookVector * AttackSpeed * AttackPower
	local damage = AttackDamage * AttackPower
	local touched
	touched = knife.Touched:connect(function(part)
		if part:IsDescendantOf(Tool.Parent) then return end
		if contains(Knives, part) then return end

		if part.Parent and part.Parent:FindFirstChild("Humanoid") then
			local human = part.Parent.Humanoid
			if checkTeams(human) then
				tagHuman(human)
				human:TakeDamage(damage)
				knife.Hit:Play()
			end
		end

		knife.Projectile:Destroy()

		local w = Instance.new("Weld")
		w.Part0 = part
		w.Part1 = knife
		w.C0 = part.CFrame:toObjectSpace(knife.CFrame)
		w.Parent = w.Part0
	end)
	table.insert(Knives, knife)
	knife.Parent = workspace

	game:GetService("Debris"):AddItem(knife, 3.5)
	delay(2, function()
		knife.Transparency = 1
	end)

	Remote:FireClient(getPlayer(), "PlayAnimation", "Throw")

	Handle.Throw.Pitch = 0.8 + 0.4 * AttackPower
	Handle.Throw:Play()

	AttackPower = 0
	wait(10)
end

function onRemote(player, func, ...)
	if player ~= getPlayer() then return end

	if func == "LeftDown" then
		onLeftDown(...)
	end
end

function onEquip()
	local client = game.StarterPlayer.StarterCharacterScripts.CombatClient

	client.Disabled = true
	Equipped = true
	equippedLoop()
end

function onUnequip()
	local client = game.StarterPlayer.StarterCharacterScripts.CombatClient

	client.Enabled = true
	Equipped = false
end

Remote.OnServerEvent:connect(onRemote)
Tool.Equipped:connect(onEquip)
Tool.Unequipped:connect(onUnequip)


Response:
function onPlayerRespawned(newPlayer)

local Team = game.Players:findFirstChild(newPlayer.Name)

	if Team ~= nil then

		local TeamColor = Team.TeamColor

		local c = game.Lighting.Hats:GetChildren()

		local p = newPlayer.Character:GetChildren()

		for i = 1, #c do

			local a = Instance.new("Hat")

			if c[i].Name == "Torso" then

				a.AttachmentPos = Vector3.new(0, 8, 0)

			end

			local clone = c[i]:clone()

			wait(1)

			clone.Parent = a--Delete team color and the -- next to newplayer and the spaces to make the armor spawn the color of the Players Torso

			clone.BrickColor = TeamColor --newPlayer.Character.Torso.BrickColor

			clone.Name = "Handle"

			a.Parent = newPlayer.Character

		end

		wait(6)

		for i = 1, #p do

			print(p[i].Name)

			if p[i]:FindFirstChild("Handle") ~= nil then

				p[i]:remove()

				print("removed")

			end

		end

	end

end

function onPlayerEntered(newPlayer)

	newPlayer.Changed:connect(function(property)

		if (property == "Character") then

			onPlayerRespawned(newPlayer)

		end

	end)

end

game.Players.ChildAdded:connect(onPlayerEntered)


Prompt:
----------------------------------
------------FUNCTIONS-------------
----------------------------------

Response:
function UnDigify(digit)
	if digit < 1 or digit > 61 then
		return ""
	elseif digit == 1 then
		return "1"
	elseif digit == 2 then
		return "!"
	elseif digit == 3 then
		return "2"
	elseif digit == 4 then
		return "@"
	elseif digit == 5 then
		return "3"
	elseif digit == 6 then
		return "4"
	elseif digit == 7 then
		return "$"
	elseif digit == 8 then
		return "5"
	elseif digit == 9 then
		return "%"
	elseif digit == 10 then
		return "6"
	elseif digit == 11 then
		return "^"
	elseif digit == 12 then
		return "7"
	elseif digit == 13 then
		return "8"
	elseif digit == 14 then
		return "*"
	elseif digit == 15 then
		return "9"
	elseif digit == 16 then
		return "("
	elseif digit == 17 then
		return "0"
	elseif digit == 18 then
		return "q"
	elseif digit == 19 then
		return "Q"
	elseif digit == 20 then
		return "w"
	elseif digit == 21 then
		return "W"
	elseif digit == 22 then
		return "e"
	elseif digit == 23 then
		return "E"
	elseif digit == 24 then
		return "r"
	elseif digit == 25 then
		return "t"
	elseif digit == 26 then
		return "T"
	elseif digit == 27 then
		return "y"
	elseif digit == 28 then
		return "Y"
	elseif digit == 29 then
		return "u"
	elseif digit == 30 then
		return "i"
	elseif digit == 31 then
		return "I"
	elseif digit == 32 then
		return "o"
	elseif digit == 33 then
		return "O"
	elseif digit == 34 then
		return "p"
	elseif digit == 35 then
		return "P"
	elseif digit == 36 then
		return "a"
	elseif digit == 37 then
		return "s"
	elseif digit == 38 then
		return "S"
	elseif digit == 39 then
		return "d"
	elseif digit == 40 then
		return "D"
	elseif digit == 41 then
		return "f"
	elseif digit == 42 then
		return "g"
	elseif digit == 43 then
		return "G"
	elseif digit == 44 then
		return "h"
	elseif digit == 45 then
		return "H"
	elseif digit == 46 then
		return "j"
	elseif digit == 47 then
		return "J"
	elseif digit == 48 then
		return "k"
	elseif digit == 49 then
		return "l"
	elseif digit == 50 then
		return "L"
	elseif digit == 51 then
		return "z"
	elseif digit == 52 then
		return "Z"
	elseif digit == 53 then
		return "x"
	elseif digit == 54 then
		return "c"
	elseif digit == 55 then
		return "C"
	elseif digit == 56 then
		return "v"
	elseif digit == 57 then
		return "V"
	elseif digit == 58 then
		return "b"
	elseif digit == 59 then
		return "B"
	elseif digit == 60 then
		return "n"
	elseif digit == 61 then
		return "m"
  	else
    	return "?"
	end
end
function IsBlack(note)
	if note%12 == 2 or note%12 == 4 or note%12 == 7 or note%12 == 9 or note%12 == 11 then
		return true
	end
end
local TweenService = game:GetService("TweenService")
function TWEEN(key,t,light)
	local Goal = {}
	Goal.Transparency = 0
	local TwInfo = TweenInfo.new(t,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,4,true)
	local twn = TweenService:Create(key, TwInfo, Goal)
	twn:Play()
	light.Color = key.Color
	twn.Completed:wait()
	light:Destroy()
	return
end
function HighlightPianoKey(note1,transpose)
	if not Settings.KeyAesthetics then return end
	local octave = math.ceil(note1/12)
	local note2 = (note1 - 1)%12 + 1
	local OriginalStar = Piano.Case.ShootingStarModel
	local star = OriginalStar:Clone()
	star.Parent = Piano.Keys[octave]
	star.Name = note2
	star.Transparency = 1
	star.Position = OriginalStar.Position + Vector3.new(0,math.random(-10,10),math.random(-10,10))
	star.Anchored = false
	local key = star
	local light = Instance.new("PointLight",key)
	light.Brightness = 3
	light.Range = 5
	local y = math.random(200,270)
	star.Velocity = Vector3.new(600,y,0)
	star.Material = "Neon"
	wait(.2)
	TWEEN(star,.3,light)
	star.Anchored = true
	wait(.2)
	star:Destroy()
	key.CanCollide = false
	return
end


Prompt: -- ping loop

Response:
while true do
	for _, player in pairs(Players:GetPlayers()) do
		spawn(function()
			if player and player.Parent == Players then
				if not pings[player] then
					pings[player]	= {
						Pings	= {};
						Average	= 0;
					}
				end

				local start		= tick()
				pcall(function()
					REMOTES.Ping:InvokeClient(player)
				end)
				local elapsed	= tick() - start

				if pings[player] then
					table.insert(pings[player].Pings, elapsed)
					if #pings[player].Pings > 5 then
						table.remove(pings[player].Pings, 1)
					end

					local average	= 0
					for _, ping in pairs(pings[player].Pings) do
						average		= average + ping
					end
					pings[player].Average	= average / #pings[player].Pings
				end
			end
		end)
	end
	wait(1)
end


Prompt:
--[[
		___      _______                _
	   / _ |____/ ___/ /  ___ ____ ___ (_)__
	  / __ /___/ /__/ _ \/ _ `(_-<(_-</ (_-<
	 /_/ |_|   \___/_//_/\_,_/___/___/_/___/
 						SecondLogic @ Inspare
]]

Response:
local FE = true
local car = script.Parent.Car.Value
local handler = car:WaitForChild("AC6_FE_Sounds")
local _Tune = require(car["A-Chassis Tune"])
local on = 0
local mult=0
local det=0
local trm=0
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0

script:WaitForChild("Rev")

script.Parent.Values.Gear.Changed:connect(function()
	mult=1
	if script.Parent.Values.RPM.Value>5000 then
		shift=.2
	end
end)

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

handler:FireServer("newSound","Rev",car.DriveSeat,script.Rev.SoundId,0,script.Rev.Volume,true)
handler:FireServer("playSound","Rev")
car.DriveSeat:WaitForChild("Rev")

while wait() do
	mult=math.max(0,mult-.1)
	local _RPM = script.Parent.Values.RPM.Value

	if script.Parent.Values.Throttle.Value <= _Tune.IdleThrottle/100 then
		throt = math.max(.2,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1
	else
		throt = math.min(.5,throt+.1)
		trmmult = 1
		trmon = 0
	end
	shift = math.min(1,shift+.2)
	if script.Parent.Values.RPM.Value > _Tune.Redline-_Tune.RevBounce/4 and script.Parent.Values.Throttle.Value > _Tune.IdleThrottle/100 then
		redline=1
	else
		redline=1
	end

	if not car.DriveSeat.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (.35*throt*shift*redline)+(trm*trmon*trmmult*(3-throt)*math.sin(tick()*50))
	local Pitch = math.max((((script.Rev.SetPitch.Value + script.Rev.SetRev.Value*_RPM/_Tune.Redline))*on^2)+(det*mult*math.sin(80*tick())),script.Rev.SetPitch.Value)
	if FE then
		handler:FireServer("updateSound","Rev",script.Rev.SoundId,Pitch,Volume)
	else
		car.DriveSeat.Rev.Volume = Volume
		car.DriveSeat.Rev.Pitch = Pitch
	end
end


Prompt:
--F.updateSound = function(Sound, Pitch, Volume)
--	if Sound then
--		if Pitch then
--			Sound.Pitch = Pitch
--		end
--		if Volume then
--			Sound.Volume = Volume
--		end
--	end
--end

Response:
F.lock = function(x)
	if x then
		for i,v in pairs(script.Parent.Parent.Misc:GetDescendants()) do
			if v:IsA("Motor") then
				if v.Parent.Parent.Name == "Mirror" then
					 v.DesiredAngle = 0
				else
				end
			end
		end
		carSeat.Lock:Play()
	else
		carSeat.Unlock:Play()
		wait(.4)
		carSeat.Unlock:Play()
	end
	for i,v in pairs(script.Parent.Parent.Misc:GetDescendants()) do
		if v:IsA("ClickDetector") then
			v.MaxActivationDistance = x and 0 or 12
		end
	end
end

local on = 0

F.rs = function(y)
	local tune = require(carSeat.Parent:FindFirstChild("A-Chassis Tune"))
	carSeat.IsOn.Value = y
	if y then
		carSeat.Startup:Play()
		if not car.DriveSeat.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*tune.IdleRPM/tune.Redline)*on^2
	else car.DriveSeat.Rev.Pitch = 0
		carSeat.Startup:Stop()
	end
end

F.user = function()
	carSeat.Parent:Destroy()
end

F.tk = function(b)
	carSeat.Parent.Misc.TK.SS.Motor.DesiredAngle = b and 1.5 or 0
end

script.Parent.OnServerEvent:connect(function(Player, Func, ...)
	if F[Func] then
		F[Func](...)
	end
end)


Prompt: --returns the wielding player of this tool

Response:
function getPlayer()
	local char = Tool.Parent
	return game:GetService("Players"):GetPlayerFromCharacter(Character)
end

function Toss(direction)
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position

	spawnPos  = spawnPos + (direction * 5)

	local Object = Tool.Handle:Clone()
	Object.Burn.Attachment.Debris.Enabled = true
	Object.ThinkFast:Destroy()
	Object.Parent = workspace
	Object.Swing.Pitch = Random.new():NextInteger(90, 110)/100
	Object.Swing:Play()
	Object.CanCollide = true
	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	Object.Trail.Enabled = true

	local rand = 11.25
	Object.RotVelocity = Vector3.new(Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand),Random.new():NextNumber(-rand,rand))
	Object:SetNetworkOwner(getPlayer())

	local ScriptClone = DamageScript:Clone()
	ScriptClone.Parent = Object
	ScriptClone.Disabled = false

	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "creator"
	tag.Parent = Object
end

PowerRemote.OnServerEvent:Connect(function(player, Power)
	local holder = getPlayer()
	if holder ~= player then return end

	AttackVelocity = Power
end)

TossRemote.OnServerEvent:Connect(function(player, mousePosition)
	local holder = getPlayer()
	if holder ~= player then return end

	if Cooldown.Value == true then return end
	Cooldown.Value = true

	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		TossRemote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit

	local SecretRNG = Random.new():NextInteger(1,10) --Change RNG value here
	if SecretRNG == 1 then
		local ChucklenutsSound = Tool.Handle.ThinkFast:Play()
	end

	Toss(lookAt)
	task.wait(5)
	Cooldown.Value = false
end)

Tool.Equipped:Connect(function()
	Character = Tool.Parent
	Humanoid = Character:FindFirstChildOfClass("Humanoid")
end)

Tool.Unequipped:Connect(function()
	Character = nil
	Humanoid = nil
end)


Prompt: --Set up gui - has its own class

Response:
local VehicleGui = require(script.Parent:WaitForChild("LocalVehicleGui")).new(Car)
VehicleGui:Enable()
VehicleGui:EnableDriverControls()
VehicleGui:EnableSpeedo()

local Keymap = require(ScriptsFolder.Keymap)
local LocalVehicleSeating = require(ScriptsFolder.LocalVehicleSeating)


Prompt:
--[[
    A component that establishes a connection to a Roblox event when it is rendered.
]]

Response:
local Roact = require(script.Parent.Parent.Parent.Packages.Roact)

local ExternalEventConnection = Roact.Component:extend("ExternalEventConnection")

function ExternalEventConnection:init()
	self.connection = nil
end


Prompt: -- Do not modify anything below here! --

Response:
coroutine.wrap(function()
EB_touchingHumanoid = nil
if script.Parent:IsA("BasePart") then
	script.Parent.Touched:Connect(function(EB_part)
	EB_touchingPart = EB_part
	local player = EB_part.Parent:FindFirstChild("Humanoid")
	if player then
		EB_touchingHumanoid = EB_part.Parent
		if EB_touchingHumanoid then
if EB_touchingHumanoid:FindFirstChild("Humanoid") then
EB_touchingHumanoid.Humanoid.Health -= tonumber((tonumber(25)))
end
end

	end
end)
end
end)()


Prompt:
--[[
	Adds specified character to character collision group
]]

Response:
function CollisionGroupsController.addCharacter(character)
	for _, child in pairs(character:GetChildren()) do
		if child:IsA("BasePart") then
			PhysicsService:SetPartCollisionGroup(child, Constants.CollisionGroup.Player)
		end
	end
end


Prompt:
--[[

	Clones a table giving it a unique memory address. Doesn't support mixed tables and userdata.

	Functions.CloneTable(
		table,					<-- |REQ| 	Table/dictionary
	)

--]]

Response:
local deepcopy
function deepcopy(t, root, omit)
	local clone = {}
	for key, value in pairs(t) do
		if t == root and key == omit then
			print"omit"
			continue
		end
		if type(key) == "table" then
			clone[key] = deepcopy(value, root, omit)
		else
			clone[key] = value
		end
	end
	return clone
end

return function(tbl, omit)
	return deepcopy(tbl, tbl, omit)
end


Prompt: -- Libraries

Response:
local Roact = require(Vendor:WaitForChild('Roact'))
local Maid = require(Libraries:WaitForChild('Maid'))
local fastSpawn = require(Libraries:WaitForChild('fastSpawn'))


Prompt: --%%Functions%%--

Response:
script.Parent.AutoSensor.Touched:connect(whileTouching)
script.Parent.AutoSensor.TouchEnded:connect(letGo)


Prompt: --- Player left

Response:
game.Players.PlayerRemoving:Connect(function(player)
	--- Remove from cache
	RemovePlayer(player)
end)


Prompt: -- Decompiled with the Synapse X Luau decompiler.

Response:
local l__Parent__1 = script.Parent;
local v2 = require(l__Parent__1:WaitForChild("MessageLabelCreator"));
local v3 = require(l__Parent__1:WaitForChild("CurveUtil"));
local v4 = require(game:GetService("Chat"):WaitForChild("ClientChatModules"):WaitForChild("ChatSettings"));
local v5 = false;
local v6, v7 = pcall(function()
	return settings():IsUserFeatureEnabled("UserFixChatMessageLogPerformance");
end);
if v6 then
	v5 = v7;
end;
local v8 = {};
v8.__index = v8;
local u1 = {
	ScrollBarThickness = 4
};
function v8.Destroy(p1)
	p1.GuiObject:Destroy();
	p1.Destroyed = true;
end;
function v8.SetActive(p2, p3)
	p2.GuiObject.Visible = p3;
end;
function v8.UpdateMessageFiltered(p4, p5)
	local v9 = nil;
	local v10 = 1;
	local l__MessageObjectLog__11 = p4.MessageObjectLog;
	while v10 <= #l__MessageObjectLog__11 do
		local v12 = l__MessageObjectLog__11[v10];
		if v12.ID == p5.ID then
			v9 = v12;
			break;
		end;
		v10 = v10 + 1;
	end;
	if v9 then
		local v13 = p4:IsScrolledDown();
		v9.UpdateTextFunction(p5);
		if not v5 then
			p4:ReorderAllMessages();
			return;
		end;
	else
		return;
	end;
	p4:PositionMessageLabelInWindow(v9, v13);
end;
local u2 = v2.new();
function v8.AddMessage(p6, p7)
	p6:WaitUntilParentedCorrectly();
	local v14 = u2:CreateMessageLabel(p7, p6.CurrentChannelName);
	if v14 == nil then
		return;
	end;
	table.insert(p6.MessageObjectLog, v14);
	p6:PositionMessageLabelInWindow(v14);
end;
function v8.AddMessageAtIndex(p8, p9, p10)
	local v15 = u2:CreateMessageLabel(p9, p8.CurrentChannelName);
	if v15 == nil then
		return;
	end;
	table.insert(p8.MessageObjectLog, p10, v15);
	local v16 = p8:IsScrolledDown();
	p8:ReorderAllMessages();
	if v16 then
		p8.Scroller.CanvasPosition = Vector2.new(0, math.max(0, p8.Scroller.CanvasSize.Y.Offset - p8.Scroller.AbsoluteSize.Y));
	end;
end;
function v8.RemoveLastMessage(p11)
	p11:WaitUntilParentedCorrectly();
	local v17 = p11.MessageObjectLog[1];
	local v18 = UDim2.new(0, 0, 0, v17.BaseFrame.AbsoluteSize.Y);
	v17:Destroy();
	table.remove(p11.MessageObjectLog, 1);
	if not v5 then
		for v19, v20 in pairs(p11.MessageObjectLog) do
			v20.BaseFrame.Position = v20.BaseFrame.Position - v18;
		end;
		p11.Scroller.CanvasSize = p11.Scroller.CanvasSize - v18;
	end;
end;
function v8.IsScrolledDown(p12)
	local v21 = nil;
	local v22 = nil;
	local v23 = nil;
	v21 = p12.Scroller.CanvasSize.Y.Offset;
	v22 = p12.Scroller.AbsoluteWindowSize.Y;
	v23 = p12.Scroller.CanvasPosition.Y;
	if v5 then
		local v24 = true;
		if not (v21 < v22) then
			v24 = v22 - 5 <= v21 + v23;
		end;
		return v24;
	end;
	local v25 = true;
	if not (v21 < v22) then
		v25 = v21 - v23 <= v22 + 5;
	end;
	return v25;
end;
function v8.PositionMessageLabelInWindow(p13, p14, p15)
	p13:WaitUntilParentedCorrectly();
	local l__BaseFrame__26 = p14.BaseFrame;
	if v5 then
		if p15 == nil then
			p15 = p13:IsScrolledDown();
		end;
		l__BaseFrame__26.LayoutOrder = p14.ID;
	else
		l__BaseFrame__26.Parent = p13.Scroller;
		l__BaseFrame__26.Position = UDim2.new(0, 0, 0, p13.Scroller.CanvasSize.Y.Offset);
	end;
	l__BaseFrame__26.Size = UDim2.new(1, 0, 0, p14.GetHeightFunction(p13.Scroller.AbsoluteSize.X));
	if v5 then
		l__BaseFrame__26.Parent = p13.Scroller;
	end;
	if p14.BaseMessage then
		if v5 then
			for v27 = 1, 10 do
				if p14.BaseMessage.TextFits then
					break;
				end;
				l__BaseFrame__26.Size = UDim2.new(1, 0, 0, p14.GetHeightFunction(p13.Scroller.AbsoluteSize.X - v27));
			end;
		else
			local v28 = p13.Scroller.AbsoluteSize.X;
			local v29 = math.min(p13.Scroller.AbsoluteSize.X - 10, 0);
			while not p14.BaseMessage.TextFits do
				v28 = v28 - 1;
				if v28 < v29 then
					break;
				end;
				l__BaseFrame__26.Size = UDim2.new(1, 0, 0, p14.GetHeightFunction(v28));
			end;
		end;
	end;
	if v5 then
		if not p15 then
			return;
		end;
	else
		p15 = p13:IsScrolledDown();
		p13.Scroller.CanvasSize = p13.Scroller.CanvasSize + UDim2.new(0, 0, 0, l__BaseFrame__26.Size.Y.Offset);
		if p15 then
			p13.Scroller.CanvasPosition = Vector2.new(0, math.max(0, p13.Scroller.CanvasSize.Y.Offset - p13.Scroller.AbsoluteSize.Y));
		end;
		return;
	end;
	p13.Scroller.CanvasPosition = Vector2.new(0, math.max(0, p13.Scroller.CanvasSize.Y.Offset - p13.Scroller.AbsoluteSize.Y));
end;
function v8.ReorderAllMessages(p16)
	p16:WaitUntilParentedCorrectly();
	if p16.GuiObject.AbsoluteSize.Y < 1 then
		return;
	end;
	p16.Scroller.CanvasSize = UDim2.new(0, 0, 0, 0);
	for v30, v31 in pairs(p16.MessageObjectLog) do
		p16:PositionMessageLabelInWindow(v31);
	end;
	if not p16:IsScrolledDown() then
		p16.Scroller.CanvasPosition = p16.Scroller.CanvasPosition;
	end;
end;
function v8.Clear(p17)
	for v32, v33 in pairs(p17.MessageObjectLog) do
		v33:Destroy();
	end;
	p17.MessageObjectLog = {};
	if not v5 then
		p17.Scroller.CanvasSize = UDim2.new(0, 0, 0, 0);
	end;
end;
function v8.SetCurrentChannelName(p18, p19)
	p18.CurrentChannelName = p19;
end;
function v8.FadeOutBackground(p20, p21)

end;
function v8.FadeInBackground(p22, p23)

end;
function v8.FadeOutText(p24, p25)
	for v34 = 1, #p24.MessageObjectLog do
		if p24.MessageObjectLog[v34].FadeOutFunction then
			p24.MessageObjectLog[v34].FadeOutFunction(p25, v3);
		end;
	end;
end;
function v8.FadeInText(p26, p27)
	for v35 = 1, #p26.MessageObjectLog do
		if p26.MessageObjectLog[v35].FadeInFunction then
			p26.MessageObjectLog[v35].FadeInFunction(p27, v3);
		end;
	end;
end;
function v8.Update(p28, p29)
	for v36 = 1, #p28.MessageObjectLog do
		if p28.MessageObjectLog[v36].UpdateAnimFunction then
			p28.MessageObjectLog[v36].UpdateAnimFunction(p29, v3);
		end;
	end;
end;
function v8.WaitUntilParentedCorrectly(p30)
	while not p30.GuiObject:IsDescendantOf(game:GetService("Players").LocalPlayer) do
		p30.GuiObject.AncestryChanged:wait();
	end;
end;
local function u3()
	local v37 = Instance.new("Frame");
	v37.Selectable = false;
	v37.Size = UDim2.new(1, 0, 1, 0);
	v37.BackgroundTransparency = 1;
	local v38 = Instance.new("ScrollingFrame");
	v38.Selectable = v4.GamepadNavigationEnabled;
	v38.Name = "Scroller";
	v38.BackgroundTransparency = 1;
	v38.BorderSizePixel = 0;
	v38.Position = UDim2.new(0, 0, 0, 3);
	v38.Size = UDim2.new(1, -4, 1, -6);
	v38.CanvasSize = UDim2.new(0, 0, 0, 0);
	v38.ScrollBarThickness = u1.ScrollBarThickness;
	v38.Active = false;
	v38.Parent = v37;
	local v39 = nil;
	if v5 then
		v39 = Instance.new("UIListLayout");
		v39.SortOrder = Enum.SortOrder.LayoutOrder;
		v39.Parent = v38;
	end;
	return v37, v38, v39;
end;
function u1.new()
	local v40 = setmetatable({}, v8);
	v40.Destroyed = false;
	local v41, v42, v43 = u3();
	v40.GuiObject = v41;
	v40.Scroller = v42;
	v40.Layout = v43;
	v40.MessageObjectLog = {};
	v40.Name = "MessageLogDisplay";
	v40.GuiObject.Name = "Frame_" .. v40.Name;
	v40.CurrentChannelName = "";
	v40.GuiObject:GetPropertyChangedSignal("AbsoluteSize"):Connect(function()
		spawn(function()
			v40:ReorderAllMessages();
		end);
	end);
	if v5 then
		local u4 = true;
		v40.Layout:GetPropertyChangedSignal("AbsoluteContentSize"):Connect(function()
			local l__AbsoluteContentSize__44 = v40.Layout.AbsoluteContentSize;
			v40.Scroller.CanvasSize = UDim2.new(0, 0, 0, l__AbsoluteContentSize__44.Y);
			if u4 then
				v40.Scroller.CanvasPosition = Vector2.new(0, l__AbsoluteContentSize__44.Y - v40.Scroller.AbsoluteWindowSize.Y);
			end;
		end);
		v40.Scroller:GetPropertyChangedSignal("CanvasPosition"):Connect(function()
			u4 = v40:IsScrolledDown();
		end);
	end;
	return v40;
end;
return u1;


Prompt: ------------------------------------------------------WeldArm---------------------------------------------------------------

Response:
Tool = script.Parent;
local arms = nil
local torso = nil
local welds = {}
local neck = nil
local orginalC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)

function Equip(mouse)
wait(0.01)
arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
head = Tool.Parent:FindFirstChild("Head")
torso = Tool.Parent:FindFirstChild("Torso")
if neck == nil then
neck = Tool.Parent:FindFirstChild("Torso").Neck
end
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld")
weld1.Name = "weld1"
weld1.Part0 = head
weld1.Parent = head
weld1.Part1 = arms[1]
welds[1] = weld1
local weld2 = Instance.new("Weld")
weld2.Name = "weld2"
weld2.Part0 = head
weld2.Parent = head
weld2.Part1 = arms[2]
welds[2] = weld2


Prompt: --["Walk"] = "rbxassetid://1136173829",

Response:
["Walk"] = "http://www.roblox.com/asset/?id=507767714",
["Idle"] = "http://www.roblox.com/asset/?id=507766666",
["SwingTool"] = "rbxassetid://1262318281"
}
local anims = {}
for animName,animId in next,preAnims do
local anim = Instance.new("Animation")
anim.AnimationId = animId
game:GetService("ContentProvider"):PreloadAsync({anim})
anims[animName] = animController:LoadAnimation(anim)
end

local fallConstant = -2
run.Heartbeat:connect(function()
	local part,pos,norm,mat = workspace:FindPartOnRay(Ray.new(root.Position,Vector3.new(0,-10,0)),char)
	if target.Value then
	local facingCFrame = CFrame.new(Vector3.new(root.CFrame.X,pos.Y+10,root.CFrame.Z),CFrame.new(target.Value.CFrame.X,pos.Y+10,target.Value.CFrame.Z).p)
	bg.CFrame = facingCFrame
	else
	--bg.CFrame = CFrame.new(root.CFrame.X,pos.Y+3,root.CFrame.Z)
	end
	if target.Value then
		bv.P = 100000
		bv.Velocity = root.CFrame.lookVector*10
		if not part then
			bv.Velocity = bv.Velocity+Vector3.new(0,fallConstant,0)
			fallConstant = fallConstant-1
		else
			fallConstant = -2
		end
		if not anims["Walk"].IsPlaying then
		anims["Walk"]:Play()
		end
	else
		bv.P = 0
		bv.Velocity = Vector3.new(0,0,0)
		anims["Walk"]:Stop()
anims["Idle"]:Play()
	end
end)

while true do
	local thresh,nearest = 60,nil
	for _,player in next,game.Players:GetPlayers() do
		if player.Character and player.Character.PrimaryPart then
			local dist = (player.Character.PrimaryPart.Position-root.Position).magnitude
			if dist < thresh then
				thresh = dist
				nearest = player.Character.PrimaryPart
			end
		end
	end
	if nearest then
if thresh < 10 then
anims["SwingTool"]:Play()
nearest.Parent.Humanoid:TakeDamage(24)
target.Value = nil
task.wait(1)
end
		target.Value = nearest
	else
		target.Value = nil
	end
task.wait(1)
end


Prompt:
--[[Engine]]
--Torque Curve

Response:
Tune.Horsepower		= 4500		--	[TORQUE CURVE VISUAL]
Tune.IdleRPM		= 2000		--		https://www.desmos.com/calculator/2uo3hqwdhf
Tune.PeakRPM		= 4500		--		Use sliders to manipulate values
Tune.Redline		= 10000
Tune.EqPoint		= 7500
Tune.PeakSharpness	= 16
Tune.CurveMult		= 4


Prompt:
--[=[
	@interface KnitOptions
	.ServicePromises boolean?
	.Middleware Middleware?
	.PerServiceMiddleware PerServiceMiddleware?
	@within KnitClient

	- `ServicePromises` defaults to `true` and indicates if service methods use promises.
	- Each service will go through the defined middleware, unless the service
	has middleware defined in `PerServiceMiddleware`.
]=]

Response:
type KnitOptions = {
	ServicePromises: boolean,
	Middleware: Middleware?,
	PerServiceMiddleware: PerServiceMiddleware?,
}

local defaultOptions: KnitOptions = {
	ServicePromises = true,
	Middleware = nil,
	PerServiceMiddleware = {},
}

local selectedOptions = nil


Prompt:
--[[ This script removes the border part.
The border parts are there to make sure when you pawn the model in, that it's not tilted.]]

Response:
wait()
script.Parent:Destroy()


Prompt: -- Services

Response:
local Players = game:GetService('Players')
local TweenService = game:GetService('TweenService')
local Debris = game:GetService('Debris')


Prompt: -- setup emote chat hook

Response:
game:GetService("Players").LocalPlayer.Chatted:Connect(function(msg)
	local emote = ""
	if (string.sub(msg, 1, 3) == "/e ") then
		emote = string.sub(msg, 4)
	elseif (string.sub(msg, 1, 7) == "/emote ") then
		emote = string.sub(msg, 8)
	end

	if (pose == "Standing" and emoteNames[emote] ~= nil) then
		playAnimation(emote, 0.1, Humanoid)
	end
end)


Prompt:
--for _,Spawn in next,Rep.Spawns:GetDescendants() do
--	if Spawn:IsA("BasePart") and allowedParents[Spawn.Parent.Name] then
--		if not Spawn:FindFirstChild("Radius") then
--			table.insert(_G.Safezones, {["Position"] = Spawn.Position, ["Magnitude"] = 30})
--		else
--			local radi = Spawn:FindFirstChild("Radius").Value
--			table.insert(_G.Safezones, {["Position"] = Spawn.Position, ["Magnitude"] = radi})
--		end
--	end
--end


Prompt: -- NPC animation script (will be added to dropper)

Response:
local Worker = script.Parent

while true do
	local animationTrack = Worker.Char.Humanoid:LoadAnimation(Worker.Animations.WorkerAnim)
	animationTrack:Play()
	wait(1)
end


Prompt: --reset

Response:
script.Parent.Mode.Value = 1
end
end)

script.Parent.Mode.Changed:connect(function()
if script.Parent.Mode.Value == 1 then
script.Parent.B1.Transparency = 0
script.Parent.Main.Transparency = 1
script.Parent.B2.Transparency = 1
elseif script.Parent.Mode.Value == 2 then
script.Parent.B1.Transparency = 1
script.Parent.Main.Transparency = 0
script.Parent.B2.Transparency = 1
elseif script.Parent.Mode.Value == 3 then
script.Parent.B1.Transparency = 1
script.Parent.Main.Transparency = 1
script.Parent.B2.Transparency = 0
end
end)

script.Parent.Main.ClickDetector.MouseClick:connect (ChangeMode)


Prompt:
--[[
	Is the given object a Promise instance?
]]

Response:
function Promise.is(object)
	if type(object) ~= "table" then
		return false
	end

	return object._type == "Promise"
end


Response:
	,FastReload = true					--- Automatically operates the bolt on reload if needed
	,SlideLock = false
	,MoveBolt = false
	,BoltLock = false
	,CanBreachDoor = true
	,CanBreak = true					--- Weapon can jam?
	,JamChance = 1000					--- This old piece of brick doesn't work fine >;c
	,IncludeChamberedBullet = true		--- Include the chambered bullet on next reload
	,Chambered = false					--- Start with the gun chambered?
	,LauncherReady = false				--- Start with the GL ready?
	,CanCheckMag = true					--- You can check the magazine
	,ArcadeMode = false					--- You can see the bullets left in magazine
	,RainbowMode = false				--- Operation: Party Time xD
	,ModoTreino = false					--- Surrender enemies instead of killing them
	,GunSize = 8
	,GunFOVReduction = 8

	,BoltExtend = Vector3.new(0, 0, 0.4)
	,SlideExtend = Vector3.new(0, 0, 0.4)


Prompt:
--[[
	local missile = Instance.new("Part")

	missile.Position = spawnPos
	missile.Size = Vector3.new(2,2,2)
	missile.Velocity = v * 200
	missile.BrickColor = BrickColor.random() -- BrickColor.new(26)
	missile.Shape = 0
	missile.BottomSurface = 0
	missile.TopSurface = 0
	missile.Name = "Cannon Shot"
	missile.Elasticity = 1
	missile.Reflectance = 0
	missile.Friction = 0

	Tool.Handle.Boing:clone().Parent = missile

	local new_script = script.Parent.CannonBall:clone()
	new_script.Disabled = false
	new_script.Parent = missile

	local creator_tag = Instance.new("ObjectValue")
	creator_tag.Value = vPlayer
	creator_tag.Name = "creator"
	creator_tag.Parent = missile

	missile.Parent = game.Workspace
]]

Response:
	connection:disconnect()
	wait()
	Tool.Parent = game.Workspace
	Tool.Handle.Position = spawnPos
	Tool.Handle.Velocity = v * 175
end


Prompt:
--[[

	LOWGames Studios
	Date: 27 October 2022
	by Elder

]]

Response:
--

local u1 = nil;
coroutine.wrap(function()
	u1 = require(game.ReplicatedStorage:WaitForChild("Framework"):WaitForChild("Library"));
end)();
local u2 = Random.new();
return function(p1, p2)
	if p2 then
		p1 = u2:NextNumber(p1, p2);
	end;
	task.wait(p1);
end;


Prompt: -- local input = game:GetService('UserInputService');

Response:
Mouse.KeyDown:connect(function(key)
	key = string.lower(key)
	if string.byte(key) == 48 then -- Shift  Number
		if Debounce == false then
			Debounce = true
			C.Humanoid.WalkSpeed = 28 -- Você pode mudar pra tal numero
			for i=1,10 do
				game.Workspace.CurrentCamera.FieldOfView = (70 + (i * 2))
				wait()
			end;
		end;
	end;
end);


Prompt:
------------------------------------------------------------------------
-- emit a set list instruction if enough elements (LFIELDS_PER_FLUSH)
-- * used in constructor()
------------------------------------------------------------------------

Response:
function luaY:closelistfield(fs, cc)
  if cc.v.k == "VVOID" then return end  -- there is no list item
  luaK:exp2nextreg(fs, cc.v)
  cc.v.k = "VVOID"
  if cc.tostore == luaP.LFIELDS_PER_FLUSH then
    luaK:setlist(fs, cc.t.info, cc.na, cc.tostore)  -- flush
    cc.tostore = 0  -- no more items pending
  end
end


Prompt: -- Placeholder texture can be any roblox asset link

Response:
local initialTexture = ""

local RowCount = 5
local ColCount = 3
local perImageSpriteCount = RowCount * ColCount
local width = 320
local height = 200

local framesInTotal = 26
assert(numImages * RowCount * ColCount >= framesInTotal)

local animPeriod = 1 -- period for the whole animation, in seconds
assert(animPeriod > 0)

local curImageIdx = 0
local curSpriteIdx = 0

local fps = framesInTotal / animPeriod
local accumulatedTime = 0

local function AnimateImageSpriteSheet(dt)
	accumulatedTime = math.fmod(accumulatedTime + dt, animPeriod)
	curSpriteIdx = math.floor(accumulatedTime * fps)

	local prevImageIndex = curImageIdx
	curImageIdx = math.floor(curSpriteIdx / perImageSpriteCount)
	if prevImageIndex ~= curImageIdx then
		imageInstance.Image = imageAssetIDs[curImageIdx + 1]
	end

	local localSpriteIndex = curSpriteIdx - curImageIdx * perImageSpriteCount
	local row = math.floor(localSpriteIndex / ColCount)
	local col = localSpriteIndex - row * ColCount
	imageInstance.ImageRectOffset = Vector2.new(col * width, row * height)
end

Animator.Connection = nil

Animator.Init = function()
	Animator.Connection = game:GetService("RunService").RenderStepped:Connect(AnimateImageSpriteSheet)
end

Animator.Stop = function()
	if Animator.Connection then
		imageInstance.Image = initialTexture
		Animator.Connection:Disconnect()
	end
end

return Animator


Prompt:
---------------------------------
---Day/Night Script for Blocks---
---------------------------------

Response:
b = script.Parent

local oh,om = 6,10	-- Open Time (hours,minutes) DON'T TOUCH!
local ch,cm = 17,30	-- Close Time (hours, minutes) DON'T TOUCH!

local l = game:service("Lighting")
if (om == nil) then om = 0 end
if (cm == nil) then cm = 0 end

function TimeChanged()
	local ot = (oh + (om/60)) * 60
	local ct = (ch + (cm/60)) * 60
	if (ot < ct) then
		if (l:GetMinutesAfterMidnight() >= ot) and (l:GetMinutesAfterMidnight() <= ct) then
b.Material = ("SmoothPlastic")
b.Color = Color3.fromRGB(255, 195, 0)
		else
b.Material = ("Neon")
b.Color = Color3.fromRGB(180, 135, 0)
		end
	elseif (ot > ct) then
		if (l:GetMinutesAfterMidnight() >= ot) or (l:GetMinutesAfterMidnight() <= ct) then
b.Material = ("SmoothPlastic")
b.Color = Color3.fromRGB(255, 195, 0)
		else
b.Material = ("Neon")
b.Color = Color3.fromRGB(180, 135, 0)
		end
	end
end

TimeChanged()
game.Lighting.Changed:connect(function(property)
			if (property == "TimeOfDay") then
				TimeChanged()
			end
		end)


Prompt: --Unordered service loading

Response:
for _,Module in packages:GetChildren() do
	if string.find(string.lower(Module.Name), "service") and Module.Name ~= "ServiceBag" then
		serviceBag:GetService(Module)
	end
end

serviceBag:Init()
serviceBag:Start()


Prompt:
--SMOOTHDRIVE TECHNOLOGY BOGIE CONTROLLER
--Copyright 2017 NsNidPL. All rights resrved.


Prompt: -- Connections

Response: Players.PlayerAdded:Connect(onPlayerAdded)


Prompt:
--doomSuite = {
--fogColor = Color3.fromRGB(205, 0, 29),
--fogDist = 1200,
--brightness = 2.5,
--},

Response:
}

return module


Prompt: -- spawn a random ore

Response:
local oreName = oreBank[math.random(1,#oreBank)]

GU.SpawnItem(oreName,1,root.CFrame*CFrame.new(0,1,0))

end
end)
AttitudeCoroutine()

while true do
if mode == "charLock" then
targetLocation = (charRoot.CFrame*CFrame.new(-3,-2.6,1)).p
targetLook = charRoot.CFrame*CFrame.new(charRoot.CFrame.lookVector*1000)
end
bg.CFrame = targetLook
bp.Position = targetLocation
wait()
end


Prompt: -- FACES

Response:
x2FacesButton.MouseEnter:Connect(function()
	x2FacesButton.Text = "179 R$"
	x2FacesButton.TextColor3 = Color3.fromRGB(0, 255, 0)
end)

x2FacesButton.MouseLeave:Connect(function()
	x2FacesButton.Text = "BUY"
	x2FacesButton.TextColor3 = Color3.fromRGB(255, 255, 255)
end)


Prompt: -- Define the function to open or close the window with gene-alike effect

Response:
local function toggleWindow(button)
	local windowName = button.Name

	-- Find the corresponding frame in the AppManager using the window name
	local window = gui:FindFirstChild(windowName)
	if window then
		if window.Visible == false then
			-- Close other windows
			for _, child in ipairs(gui:GetChildren()) do
				if child:IsA("Frame") and child.Visible then
				end
			end

			local startPos = UDim2.new(0.0, 0, 0.978, 0)
			window.Position = startPos

			-- Set the initial size of the window to be zero
			window.Size = UDim2.new(1, 0, 0.022, 0)

			-- Show the window and tween its position and size from the button position and size to its original position and size
			window.Visible = true
			window:TweenSizeAndPosition(
				UDim2.new(1, 0, 0.597, 0),
				UDim2.new(0, 0, 0.403, 0),
				'Out',
				'Quad',
				0.2
			)
		end
	end
end


Prompt: --- Transparency ---

Response:
button.MouseEnter:Connect(function()
	TweenService:Create(leftarrow, Info, {TextTransparency = 0}):Play()
	TweenService:Create(rightarrow, Info, {TextTransparency = 0}):Play()
end)

button.MouseLeave:Connect(function()
	TweenService:Create(leftarrow, Info, {TextTransparency = 1}):Play()
	TweenService:Create(rightarrow, Info, {TextTransparency = 1}):Play()
end)


Prompt: -- Local Functions

Response:
local MakeFlag

local function DestroyFlag(flagObject)
	flagObject.Flag:Destroy()
	for player, object in pairs(FlagCarriers) do
		if object == flagObject then
			FlagCarriers[player] = nil
		end
	end
end

local function OnCarrierDied(player)
	local flagObject = FlagCarriers[player]
	if flagObject then
		local flagPole = flagObject.FlagPole
		local flagBanner = flagObject.FlagBanner

		flagPole.CanCollide = false
		flagBanner.CanCollide = false
		flagPole.Anchored = true
		flagBanner.Anchored = true

		flagObject.PickedUp = false

		FlagCarriers[player] = nil

		if Configurations.RETURN_FLAG_ON_DROP then
			wait(Configurations.FLAG_RESPAWN_TIME)
			if not flagObject.AtSpawn and not flagObject.PickedUp then
				DestroyFlag(flagObject)
				MakeFlag(flagObject)
				ReturnFlag:Fire(flagObject.FlagBanner.BrickColor)
			end
		end
	end
end

local function PickupFlag(player, flagObject)
	FlagCarriers[player] = flagObject
	flagObject.AtSpawn = false
	flagObject.PickedUp = true

	local torso = player.Character:FindFirstChild('Torso')
	local flagPole = flagObject.FlagPole
	local flagBanner = flagObject.FlagBanner

	flagPole.Anchored = false
	flagBanner.Anchored = false
	flagPole.CanCollide = false
	flagBanner.CanCollide = false
	local weld = Instance.new('Weld', flagPole)
	weld.Name = 'PlayerFlagWeld'
	weld.Part0 = flagPole
	weld.Part1 = torso
	weld.C0 = CFrame.new(0,0,-1)
end

local function BindFlagTouched(flagObject)
	local flagPole = flagObject.FlagPole
	local flagBanner = flagObject.FlagBanner
	flagPole.Touched:connect(function(otherPart)
		local player = Players:GetPlayerFromCharacter(otherPart.Parent)
		if not player then return end
		if not player.Character then return end
		local humanoid = player.Character:FindFirstChild('Humanoid')
		if not humanoid then return end
		if humanoid.Health <= 0 then return end
		if flagBanner.BrickColor ~= player.TeamColor and not flagObject.PickedUp then
			PickupFlag(player, flagObject)
		elseif flagBanner.BrickColor == player.TeamColor and not flagObject.AtSpawn and Configurations.FLAG_RETURN_ON_TOUCH then
			DestroyFlag(flagObject)
			MakeFlag(flagObject)
			ReturnFlag:Fire(flagObject.FlagBanner.BrickColor)
		end
	end)
end

function MakeFlag(flagObject)
	flagObject.Flag = flagObject.FlagCopy:Clone()
	flagObject.Flag.Parent = flagObject.FlagContainer
	flagObject.FlagPole = flagObject.Flag.FlagPole
	flagObject.FlagBanner = flagObject.Flag.FlagBanner
	flagObject.FlagBanner.CanCollide = false
	flagObject.AtSpawn = true
	flagObject.PickedUp = false
	BindFlagTouched(flagObject)
end

local function BindBaseTouched(flagObject)
	local flagBase = flagObject.FlagBase
	flagBase.Touched:connect(function(otherPart)
		local player = Players:GetPlayerFromCharacter(otherPart.Parent)
		if not player then return end
		if flagBase.BrickColor == player.TeamColor and FlagCarriers[player] then
			CaptureFlag:Fire(player)
			local otherFlag = FlagCarriers[player]
			DestroyFlag(otherFlag)
			MakeFlag(otherFlag)
		end
	end)
end

local function OnPlayerAdded(player)
	player.CharacterAdded:connect(function(character)
		character:WaitForChild('Humanoid').Died:connect(function() OnCarrierDied(player) end)
	end)
	player.CharacterRemoving:connect(function()
		OnCarrierDied(player)
	end)
end


Prompt: -- Local player

Response:
local player = Players.LocalPlayer
local character = player.Character or player.CharacterAdded:wait()
local humanoidRoot = character:WaitForChild("HumanoidRootPart")


Prompt: -- Output from buffer.

Response:
function ChangeBuffer:moveLinesTo(lines: Array<Diff>): ()
	if not self:isLineEmpty() then
		self:pushLine()
	end

	for _, value in ipairs(self.lines) do
		table.insert(lines, value)
	end
	self.lines = {}
end


Response:
local  Paint = false

script.Parent.MouseButton1Click:connect(function()
	Paint = not Paint
	handler:FireServer("Crimson",Paint)
end)


Prompt: --Precalculated paths

Response:
local t,f,n=true,false,{}
local r={
[58]={{71,61,59,41,30,56,58},t},
[49]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49},t},
[16]={n,f},
[19]={{71,61,59,41,30,56,58,20,19},t},
[59]={{71,61,59},t},
[63]={{71,61,59,41,30,56,58,23,62,63},t},
[34]={{71,61,59,41,39,35,34},t},
[21]={{71,61,59,41,30,56,58,20,21},t},
[48]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48},t},
[27]={{71,61,59,41,39,35,34,32,31,29,28,27},t},
[14]={n,f},
[31]={{71,61,59,41,39,35,34,32,31},t},
[56]={{71,61,59,41,30,56},t},
[29]={{71,61,59,41,39,35,34,32,31,29},t},
[13]={n,f},
[47]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47},t},
[12]={n,f},
[45]={{71,61,59,41,39,35,34,32,31,29,28,44,45},t},
[57]={{71,61,59,41,30,56,57},t},
[36]={{71,61,59,41,39,35,37,36},t},
[25]={{71,61,59,41,39,35,34,32,31,29,28,27,26,25},t},
[71]={{71},t},
[20]={{71,61,59,41,30,56,58,20},t},
[60]={{71,61,60},t},
[8]={n,f},
[4]={n,f},
[75]={{71,72,76,73,75},t},
[22]={{71,61,59,41,30,56,58,20,21,22},t},
[74]={{71,72,76,73,74},t},
[62]={{71,61,59,41,30,56,58,23,62},t},
[1]={n,f},
[6]={n,f},
[11]={n,f},
[15]={n,f},
[37]={{71,61,59,41,39,35,37},t},
[2]={n,f},
[35]={{71,61,59,41,39,35},t},
[53]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53},t},
[73]={{71,72,76,73},t},
[72]={{71,72},t},
[33]={{71,61,59,41,39,35,37,36,33},t},
[69]={{71,61,69},t},
[65]={{71,61,59,41,30,56,58,20,19,66,64,65},t},
[26]={{71,61,59,41,39,35,34,32,31,29,28,27,26},t},
[68]={{71,61,59,41,30,56,58,20,19,66,64,67,68},t},
[76]={{71,72,76},t},
[50]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50},t},
[66]={{71,61,59,41,30,56,58,20,19,66},t},
[10]={n,f},
[24]={{71,61,59,41,39,35,34,32,31,29,28,27,26,25,24},t},
[23]={{71,61,59,41,30,56,58,23},t},
[44]={{71,61,59,41,39,35,34,32,31,29,28,44},t},
[39]={{71,61,59,41,39},t},
[32]={{71,61,59,41,39,35,34,32},t},
[3]={n,f},
[30]={{71,61,59,41,30},t},
[51]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,50,51},t},
[18]={n,f},
[67]={{71,61,59,41,30,56,58,20,19,66,64,67},t},
[61]={{71,61},t},
[55]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54,55},t},
[46]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,46},t},
[42]={{71,61,59,41,39,40,38,42},t},
[40]={{71,61,59,41,39,40},t},
[52]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52},t},
[54]={{71,61,59,41,39,35,34,32,31,29,28,44,45,49,48,47,52,53,54},t},
[43]={n,f},
[7]={n,f},
[9]={n,f},
[41]={{71,61,59,41},t},
[17]={n,f},
[38]={{71,61,59,41,39,40,38},t},
[28]={{71,61,59,41,39,35,34,32,31,29,28},t},
[5]={n,f},
[64]={{71,61,59,41,30,56,58,20,19,66,64},t},
}
return r


Prompt: ---Creator function return object keys

Response:
local KEY_BASE_FRAME = "BaseFrame"
local KEY_BASE_MESSAGE = "BaseMessage"
local KEY_UPDATE_TEXT_FUNC = "UpdateTextFunction"
local KEY_GET_HEIGHT = "GetHeightFunction"
local KEY_FADE_IN = "FadeInFunction"
local KEY_FADE_OUT = "FadeOutFunction"
local KEY_UPDATE_ANIMATION = "UpdateAnimFunction"


Prompt: --None of this is mine...

Response:
Tool = script.Parent;
local arms = nil
local torso = nil
local welds = {}

script.act.OnServerEvent:Connect(function()
wait(0.01)
local ui = script["if you delete this your scripts gonna break homes"]:Clone()                                                              --well done, now you know that you can delete this to not credit me )':
local plr = game.Players:GetPlayerFromCharacter(Tool.Parent)
ui.Parent = plr.PlayerGui
arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
torso = Tool.Parent:FindFirstChild("Torso")
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld")
weld1.Name = "weld1"
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]
weld1.C1 = CFrame.new(1.2, 0, 0.) * CFrame.fromEulerAnglesXYZ(math.rad(-10), math.rad(-6), 0)
welds[1] = weld1
local weld2 = Instance.new("Weld")
weld2.Name = "weld2"
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = CFrame.new(-1.2, 1, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), -.4)
welds[2] = weld2
end
else
print("sh")
end
else
print("arms")
end
end)
arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
torso = Tool.Parent:FindFirstChild("Torso")
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = nil
sh[2].Part1 = nil
local weld1 = Instance.new("Weld")
weld1.Part0 = torso
weld1.Parent = torso
weld1.Part1 = arms[1]
weld1.C1 = CFrame.new(1.2, 0, 0.) * CFrame.fromEulerAnglesXYZ(math.rad(-10), math.rad(-6), 0)
welds[1] = weld1
local weld2 = Instance.new("Weld")
weld2.Name = "weld2"
weld2.Part0 = torso
weld2.Parent = torso
weld2.Part1 = arms[2]
weld2.C1 = CFrame.new(-1.2, 1, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-5), -.4)
welds[2] = weld2
weld2.Name = "weld2"
end
else
print("sh")
end
else
print("arms")
end;
script.dct.OnServerEvent:Connect(function()
	local ui = script.Parent.Parent.Parent.PlayerGui["if you delete this your scripts gonna break homes"]
ui:Destroy()
if arms ~= nil and torso ~= nil then
local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
if sh ~= nil then
local yes = true
if yes then
yes = false
sh[1].Part1 = arms[1]
sh[2].Part1 = arms[2]
welds[1].Parent = nil
welds[2].Parent = nil
end
else
print("sh")
end
else

end
end)


Prompt: --Prefabricate objects

Response:
local Camera		= Instance.new("Camera")
	Camera.FieldOfView	= 20

local ViewportFrame	= Instance.new("ViewportFrame")
	ViewportFrame.BackgroundColor3			= Color3.new()
	ViewportFrame.BackgroundTransparency	= 1
	ViewportFrame.LightDirection			= Vector3.new(0,1,0)
	ViewportFrame.Ambient					= Color3.new(1,1,1)
	ViewportFrame.Size						= UDim2.new(0,100,0,100)

local Decal			= Instance.new("Decal")
	Decal.Face			= Enum.NormalId.Top


Prompt: --todo: remove this once TouchTapInWorld is on all platforms

Response:
local touchWorkspaceEventEnabled = pcall(function() local test = UserInputService.TouchTapInWorld end)

local function layoutGestureArea(portraitMode)
	if GestureArea and not GestureAreaManagedByControlScript then
		if portraitMode then
			GestureArea.Size = UDim2.new(1, 0, .6, 0)
			GestureArea.Position = UDim2.new(0, 0, 0, 0)
		else
			GestureArea.Size = UDim2.new(1, 0, .5, -18)
			GestureArea.Position = UDim2.new(0, 0, 0, 0)
		end
	end
end


Prompt: --[[ Version ]]

Response:
module.MajorVersion = 0
module.MinorVersion = 8
module.BuildVersion = "2018.05.16"


Response:
function onClicked()
R.Function1.Disabled = true

FX.ROLL.BrickColor = BrickColor.new("CGA brown")
FX.ROLL.loop.Disabled = true

FX.REVERB.BrickColor = BrickColor.new("CGA brown")
FX.REVERB.loop.Disabled = true

FX.GATE.BrickColor = BrickColor.new("CGA brown")
FX.GATE.loop.Disabled = true

FX.PHASER.BrickColor = BrickColor.new("CGA brown")
FX.PHASER.loop.Disabled = true

FX.SLIPROLL.BrickColor = BrickColor.new("CGA brown")
FX.SLIPROLL.loop.Disabled = true

FX.FILTER.BrickColor = BrickColor.new("CGA brown")
FX.FILTER.loop.Disabled = true

FX.ECHO.BrickColor = BrickColor.new("CGA brown")
FX.ECHO.loop.Disabled = true

FX.TRANS.BrickColor = BrickColor.new("CGA brown")
FX.TRANS.loop.Disabled = true

FX.MultiTapDelay.BrickColor = BrickColor.new("CGA brown")
FX.MultiTapDelay.loop.Disabled = true

FX.DELAY.BrickColor = BrickColor.new("CGA brown")
FX.DELAY.loop.Disabled = true

FX.REVROLL.BrickColor = BrickColor.new("CGA brown")
FX.REVROLL.loop.Disabled = true
R.loop.Disabled = false
R.Function2.Disabled = false
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)


Prompt: -- Gets a part from the cache, or creates one if no more are available.

Response:
function PartCacheStatic:GetPart(): BasePart
	assert(getmetatable(self) == PartCacheStatic, ERR_NOT_INSTANCE:format("GetPart", "PartCache.new"))

	if #self.Open == 0 then
		warn("No parts available in the cache! Creating [" .. self.ExpansionSize .. "] new part instance(s) - this amount can be edited by changing the ExpansionSize property of the PartCache instance... (This cache now contains a grand total of " .. tostring(#self.Open + #self.InUse + self.ExpansionSize) .. " parts.)")
		for i = 1, self.ExpansionSize, 1 do
			table.insert(self.Open, MakeFromTemplate(self.Template, self.CurrentCacheParent))
		end
	end
	local part = self.Open[#self.Open]
	self.Open[#self.Open] = nil
	table.insert(self.InUse, part)
	return part
end


Prompt: -- Decompiled with the Synapse X Luau decompiler.

Response:
script.Parent.Humanoid:ApplyDescription(game.Players:GetHumanoidDescriptionFromUserId(game.CreatorId));
script.Parent.Humanoid.BodyDepthScale.Value = script.Parent.Humanoid.BodyDepthScale.Value * 100;
script.Parent.Humanoid.BodyWidthScale.Value = script.Parent.Humanoid.BodyWidthScale.Value * 100;
script.Parent.Humanoid.BodyHeightScale.Value = script.Parent.Humanoid.BodyHeightScale.Value * 100;
script.Parent.Humanoid.HeadScale.Value = script.Parent.Humanoid.HeadScale.Value * 100;
script.Parent.Humanoid.BodyProportionScale.Value = script.Parent.Humanoid.BodyProportionScale.Value;


Prompt: --On lines 10 and 29 change Gold to the name of your money and Exp to the stat you wish to upgrade.

Response:
local Humanoid = script.Parent.Humanoid -- Change Enemy to the name of your Monsters Humanoid
function PwntX_X()
local tag = Humanoid:findFirstChild("creator")
	if tag ~= nil then
		if tag.Value ~= nil then
local Leaderstats = tag.Value:findFirstChild("leaderstats")
if Leaderstats ~= nil then
Leaderstats.ABFightCoins.Value = Leaderstats.ABFightCoins.Value + 2 --How Much Money Given
wait(0.1)
script:remove()
			end
		end
	end
end
Humanoid.Died:connect(PwntX_X)


Prompt: --- RUNTIME ---

Response:
Humanoid:GetPropertyChangedSignal("Health"):Connect(function()
	if Debounce == true then return end
	-- Clone script.Indicator to Character.Face, rotate, float via StudsOffset tween, and fade a BillboardGui damage indicator when the dummy is attacked

	-- Get the damage dealt
	local Damage = Humanoid.MaxHealth - Humanoid.Health

	Debounce = true
	Humanoid.Health += Damage
	Debounce = false

	-- Clone script.Indicator to Character.Face
	local Indicator = script.Indicator:Clone()
	Indicator.Enabled = true
	Indicator.Parent = Character.Face

	Indicator.TextLabel.Text = Damage

	-- Rotate the indicator a random amount of degrees
	Indicator.StudsOffset = Vector3.new(math.random(-15,15)/10,3,math.random(-50,50)/100)
	Indicator.TextLabel.Rotation = math.random(-30, 30)

	-- Float via StudsOffset tween and fade out over time with BillboardGui's TextTransparency property
	local Tween = TweenService:Create(Indicator, TweenInfo.new(3, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {StudsOffset = Vector3.new(Indicator.StudsOffset.X, math.random(30,60)/10, Indicator.StudsOffset.Z)})
	Tween:Play()

	local Tween = TweenService:Create(Indicator.TextLabel, TweenInfo.new(3, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {TextTransparency = 1})
	Tween:Play()
	local Tween = TweenService:Create(Indicator.TextLabel, TweenInfo.new(3, Enum.EasingStyle.Cubic, Enum.EasingDirection.In), {TextStrokeTransparency = 1})
	Tween:Play()

	task.wait(3)

	Indicator:Destroy()

end)


Prompt: --mayo's pedal script

Response:
local mouse = game.Players.LocalPlayer:GetMouse()
local car = script.Parent.Car.Value
local handler = car:WaitForChild("PedalsFE")

script.Parent.Values.Throttle.Changed:connect(function()
	local gas = script.Parent.Values.Throttle.Value^1*math.rad(32)
	handler:FireServer("PedalUpdate","Gas",gas)
end)

script.Parent.Values.Brake.Changed:connect(function()
	local bp = script.Parent.Values.Brake.Value^1*math.rad(26)
	handler:FireServer("PedalUpdate","Brake",bp)
end)

script.Parent.Values.Gear.Changed:connect(function()
	handler:FireServer("PedalUpdate","Clutch",0.55)
end)

script.Parent.Values.PBrake.Changed:connect(function()
	if script.Parent.Values.PBrake.Value == true then
		handler:FireServer("PBrake")
	end
end)

script.Parent.Values.Gear.Changed:connect(function()
	if script.Parent.Values.Gear.Changed then
		handler:FireServer("Pedal")
		wait(.15)
		handler:FireServer("Shift")
	end
end)

mouse.KeyDown:connect(function(key)
	if script.Parent.Values.MouseSteerOn.Value == false and key=="w" then
		handler:FireServer("Pedal")
	end
end)

mouse.KeyDown:connect(function(key)
	if script.Parent.Values.MouseSteerOn.Value == false and key=="s" then
		handler:FireServer("Pedal")
	end
end)

mouse.Button1Down:connect(function()
	if script.Parent.Values.MouseSteerOn.Value == true then
		handler:FireServer("Pedal")
	end
end)

mouse.Button2Down:connect(function()
	if script.Parent.Values.MouseSteerOn.Value == true then
		handler:FireServer("Pedal")
	end
end)


Prompt:
--////////////////////////////// Methods
--//////////////////////////////////////

Response:
local methods = {}
methods.__index = methods

function getClassicChatEnabled()
	if ChatSettings.ClassicChatEnabled ~= nil then
		return ChatSettings.ClassicChatEnabled
	end
	return Players.ClassicChat
end

function getBubbleChatEnabled()
	if ChatSettings.BubbleChatEnabled ~= nil then
		return ChatSettings.BubbleChatEnabled
	end
	return Players.BubbleChat
end

function bubbleChatOnly()
 	return not getClassicChatEnabled() and getBubbleChatEnabled()
end

function methods:CreateGuiObjects(targetParent)
	local BaseFrame = Instance.new("Frame")
	BaseFrame.BackgroundTransparency = 1
	BaseFrame.Active = ChatSettings.WindowDraggable
	BaseFrame.Parent = targetParent

	local ChatBarParentFrame = Instance.new("Frame")
	ChatBarParentFrame.Selectable = false
	ChatBarParentFrame.Name = "ChatBarParentFrame"
	ChatBarParentFrame.BackgroundTransparency = 1
	ChatBarParentFrame.Parent = BaseFrame

	local ChannelsBarParentFrame = Instance.new("Frame")
	ChannelsBarParentFrame.Selectable = false
	ChannelsBarParentFrame.Name = "ChannelsBarParentFrame"
	ChannelsBarParentFrame.BackgroundTransparency = 1
	ChannelsBarParentFrame.Position = UDim2.new(0, 0, 0, 0)
	ChannelsBarParentFrame.Parent = BaseFrame

	local ChatChannelParentFrame = Instance.new("Frame")
	ChatChannelParentFrame.Selectable = false
	ChatChannelParentFrame.Name = "ChatChannelParentFrame"
	ChatChannelParentFrame.BackgroundTransparency = 1
	ChatChannelParentFrame.BackgroundColor3 = ChatSettings.BackGroundColor
	ChatChannelParentFrame.BackgroundTransparency = 0.6
	ChatChannelParentFrame.BorderSizePixel = 0
	ChatChannelParentFrame.Parent = BaseFrame

	local ChatResizerFrame = Instance.new("ImageButton")
	ChatResizerFrame.Selectable = false
	ChatResizerFrame.Image = ""
	ChatResizerFrame.BackgroundTransparency = 0.6
	ChatResizerFrame.BorderSizePixel = 0
	ChatResizerFrame.Visible = false
	ChatResizerFrame.BackgroundColor3 = ChatSettings.BackGroundColor
	ChatResizerFrame.Active = true
	if bubbleChatOnly() then
		ChatResizerFrame.Position = UDim2.new(1, -ChatResizerFrame.AbsoluteSize.X, 0, 0)
	else
		ChatResizerFrame.Position = UDim2.new(1, -ChatResizerFrame.AbsoluteSize.X, 1, -ChatResizerFrame.AbsoluteSize.Y)
	end
	ChatResizerFrame.Parent = BaseFrame

	local ResizeIcon = Instance.new("ImageLabel")
	ResizeIcon.Selectable = false
	ResizeIcon.Size = UDim2.new(0.8, 0, 0.8, 0)
	ResizeIcon.Position = UDim2.new(0.2, 0, 0.2, 0)
	ResizeIcon.BackgroundTransparency = 1
	ResizeIcon.Image = "rbxassetid://261880743"
	ResizeIcon.Parent = ChatResizerFrame

	local function GetScreenGuiParent()
		--// Travel up parent list until you find the ScreenGui that the chat window is parented to
		local screenGuiParent = BaseFrame
		while (screenGuiParent and not screenGuiParent:IsA("ScreenGui")) do
			screenGuiParent = screenGuiParent.Parent
		end

		return screenGuiParent
	end

	local deviceType = DEVICE_DESKTOP

	local screenGuiParent = GetScreenGuiParent()
	if (screenGuiParent.AbsoluteSize.X <= PHONE_SCREEN_WIDTH) then
		deviceType = DEVICE_PHONE

	elseif (screenGuiParent.AbsoluteSize.X <= TABLET_SCREEN_WIDTH) then
		deviceType = DEVICE_TABLET

	end

	local checkSizeLock = false
	local function doCheckSizeBounds()
		if (checkSizeLock) then return end
		checkSizeLock = true

		if (not BaseFrame:IsDescendantOf(PlayerGui)) then return end

		local screenGuiParent = GetScreenGuiParent()

		local minWinSize = ChatSettings.MinimumWindowSize
		local maxWinSize = ChatSettings.MaximumWindowSize

		local forceMinY = ChannelsBarParentFrame.AbsoluteSize.Y + ChatBarParentFrame.AbsoluteSize.Y

		local minSizePixelX = (minWinSize.X.Scale * screenGuiParent.AbsoluteSize.X) + minWinSize.X.Offset
		local minSizePixelY = math.max((minWinSize.Y.Scale * screenGuiParent.AbsoluteSize.Y) + minWinSize.Y.Offset, forceMinY)

		local maxSizePixelX = (maxWinSize.X.Scale * screenGuiParent.AbsoluteSize.X) + maxWinSize.X.Offset
		local maxSizePixelY = (maxWinSize.Y.Scale * screenGuiParent.AbsoluteSize.Y) + maxWinSize.Y.Offset

		local absSizeX = BaseFrame.AbsoluteSize.X
		local absSizeY = BaseFrame.AbsoluteSize.Y

		if (absSizeX < minSizePixelX) then
			local offset = UDim2.new(0, minSizePixelX - absSizeX, 0, 0)
			BaseFrame.Size = BaseFrame.Size + offset

		elseif (absSizeX > maxSizePixelX) then
			local offset = UDim2.new(0, maxSizePixelX - absSizeX, 0, 0)
			BaseFrame.Size = BaseFrame.Size + offset

		end

		if (absSizeY < minSizePixelY) then
			local offset = UDim2.new(0, 0, 0, minSizePixelY - absSizeY)
			BaseFrame.Size = BaseFrame.Size + offset

		elseif (absSizeY > maxSizePixelY) then
			local offset = UDim2.new(0, 0, 0, maxSizePixelY - absSizeY)
			BaseFrame.Size = BaseFrame.Size + offset

		end

		local xScale = BaseFrame.AbsoluteSize.X / screenGuiParent.AbsoluteSize.X
		local yScale = BaseFrame.AbsoluteSize.Y / screenGuiParent.AbsoluteSize.Y
		BaseFrame.Size = UDim2.new(xScale, 0, yScale, 0)

		checkSizeLock = false
	end

	BaseFrame.Changed:connect(function(prop)
		if (prop == "AbsoluteSize") then
			doCheckSizeBounds()
		end
	end)

	ChatResizerFrame.DragBegin:connect(function(startUdim)
		BaseFrame.Draggable = false
	end)

	local function UpdatePositionFromDrag(atPos)
		if ChatSettings.WindowDraggable == false and ChatSettings.WindowResizable == false then
			return
		end
		local newSize = atPos - BaseFrame.AbsolutePosition + ChatResizerFrame.AbsoluteSize
		BaseFrame.Size = UDim2.new(0, newSize.X, 0, newSize.Y)
		if bubbleChatOnly() then
			ChatResizerFrame.Position = UDim2.new(1, -ChatResizerFrame.AbsoluteSize.X, 0, 0)
		else
			ChatResizerFrame.Position = UDim2.new(1, -ChatResizerFrame.AbsoluteSize.X, 1, -ChatResizerFrame.AbsoluteSize.Y)
		end
	end

	ChatResizerFrame.DragStopped:connect(function(endX, endY)
		BaseFrame.Draggable = ChatSettings.WindowDraggable
		--UpdatePositionFromDrag(Vector2.new(endX, endY))
	end)

	local resizeLock = false
	ChatResizerFrame.Changed:connect(function(prop)
		if (prop == "AbsolutePosition" and not BaseFrame.Draggable) then
			if (resizeLock) then return end
			resizeLock = true

			UpdatePositionFromDrag(ChatResizerFrame.AbsolutePosition)

			resizeLock = false
		end
	end)

	local function CalculateChannelsBarPixelSize(textSize)
		if (deviceType == DEVICE_PHONE) then
			textSize = textSize or ChatSettings.ChatChannelsTabTextSizePhone
		else
			textSize = textSize or ChatSettings.ChatChannelsTabTextSize
		end

		local channelsBarTextYSize = textSize
		local chatChannelYSize = math.max(32, channelsBarTextYSize + 8) + 2

		return chatChannelYSize
	end

	local function CalculateChatBarPixelSize(textSize)
		if (deviceType == DEVICE_PHONE) then
			textSize = textSize or ChatSettings.ChatBarTextSizePhone
		else
			textSize = textSize or ChatSettings.ChatBarTextSize
		end

		local chatBarTextSizeY = textSize
		local chatBarYSize = chatBarTextSizeY + (7 * 2) + (5 * 2)

		return chatBarYSize
	end

	if bubbleChatOnly() then
		ChatBarParentFrame.Position = UDim2.new(0, 0, 0, 0)
		ChannelsBarParentFrame.Visible = false
		ChannelsBarParentFrame.Active = false
		ChatChannelParentFrame.Visible = false
		ChatChannelParentFrame.Active = false

		local useXScale = 0
		local useXOffset = 0

		local screenGuiParent = GetScreenGuiParent()

		if (deviceType == DEVICE_PHONE) then
			useXScale = ChatSettings.DefaultWindowSizePhone.X.Scale
			useXOffset = ChatSettings.DefaultWindowSizePhone.X.Offset

		elseif (deviceType == DEVICE_TABLET) then
			useXScale = ChatSettings.DefaultWindowSizeTablet.X.Scale
			useXOffset = ChatSettings.DefaultWindowSizeTablet.X.Offset

		else
			useXScale = ChatSettings.DefaultWindowSizeTablet.X.Scale
			useXOffset = ChatSettings.DefaultWindowSizeTablet.X.Offset

		end

		local chatBarYSize = CalculateChatBarPixelSize()

		BaseFrame.Size = UDim2.new(useXScale, useXOffset, 0, chatBarYSize)
		BaseFrame.Position = ChatSettings.DefaultWindowPosition

	else

		local screenGuiParent = GetScreenGuiParent()

		if (deviceType == DEVICE_PHONE) then
			BaseFrame.Size = ChatSettings.DefaultWindowSizePhone

		elseif (deviceType == DEVICE_TABLET) then
			BaseFrame.Size = ChatSettings.DefaultWindowSizeTablet

		else
			BaseFrame.Size = ChatSettings.DefaultWindowSizeDesktop

		end

		BaseFrame.Position = ChatSettings.DefaultWindowPosition

	end

	if (deviceType == DEVICE_PHONE) then
		ChatSettings.ChatWindowTextSize = ChatSettings.ChatWindowTextSizePhone
		ChatSettings.ChatChannelsTabTextSize = ChatSettings.ChatChannelsTabTextSizePhone
		ChatSettings.ChatBarTextSize = ChatSettings.ChatBarTextSizePhone
	end

	local function UpdateDraggable(enabled)
		BaseFrame.Active = enabled
		BaseFrame.Draggable = enabled
	end

	local function UpdateResizable(enabled)
		ChatResizerFrame.Visible = enabled
		ChatResizerFrame.Draggable = enabled

		local frameSizeY = ChatBarParentFrame.Size.Y.Offset

		if (enabled) then
			ChatBarParentFrame.Size = UDim2.new(1, -frameSizeY - 2, 0, frameSizeY)
			if not bubbleChatOnly() then
				ChatBarParentFrame.Position = UDim2.new(0, 0, 1, -frameSizeY)
			end
		else
			ChatBarParentFrame.Size = UDim2.new(1, 0, 0, frameSizeY)
			if not bubbleChatOnly() then
				ChatBarParentFrame.Position = UDim2.new(0, 0, 1, -frameSizeY)
			end
		end
	end

	local function UpdateChatChannelParentFrameSize()
		local channelsBarSize = CalculateChannelsBarPixelSize()
		local chatBarSize = CalculateChatBarPixelSize()

		if (ChatSettings.ShowChannelsBar) then
			ChatChannelParentFrame.Size = UDim2.new(1, 0, 1, -(channelsBarSize + chatBarSize + 2 + 2))
			ChatChannelParentFrame.Position = UDim2.new(0, 0, 0, channelsBarSize + 2)

		else
			ChatChannelParentFrame.Size = UDim2.new(1, 0, 1, -(chatBarSize + 2 + 2))
			ChatChannelParentFrame.Position = UDim2.new(0, 0, 0, 2)

		end
	end

	local function UpdateChatChannelsTabTextSize(size)
		local channelsBarSize = CalculateChannelsBarPixelSize(size)
		ChannelsBarParentFrame.Size = UDim2.new(1, 0, 0, channelsBarSize)

		UpdateChatChannelParentFrameSize()
	end

	local function UpdateChatBarTextSize(size)
		local chatBarSize = CalculateChatBarPixelSize(size)

		ChatBarParentFrame.Size = UDim2.new(1, 0, 0, chatBarSize)
		if not bubbleChatOnly() then
			ChatBarParentFrame.Position = UDim2.new(0, 0, 1, -chatBarSize)
		end

		ChatResizerFrame.Size = UDim2.new(0, chatBarSize, 0, chatBarSize)
		ChatResizerFrame.Position = UDim2.new(1, -chatBarSize, 1, -chatBarSize)

		UpdateChatChannelParentFrameSize()
		UpdateResizable(ChatSettings.WindowResizable)
	end

	local function UpdateShowChannelsBar(enabled)
		ChannelsBarParentFrame.Visible = enabled
		UpdateChatChannelParentFrameSize()
	end

	UpdateChatChannelsTabTextSize(ChatSettings.ChatChannelsTabTextSize)
	UpdateChatBarTextSize(ChatSettings.ChatBarTextSize)
	UpdateDraggable(ChatSettings.WindowDraggable)
	UpdateResizable(ChatSettings.WindowResizable)
	UpdateShowChannelsBar(ChatSettings.ShowChannelsBar)

	ChatSettings.SettingsChanged:connect(function(setting, value)
		if (setting == "WindowDraggable") then
			UpdateDraggable(value)

		elseif (setting == "WindowResizable") then
			UpdateResizable(value)

		elseif (setting == "ChatChannelsTabTextSize") then
			UpdateChatChannelsTabTextSize(value)

		elseif (setting == "ChatBarTextSize") then
			UpdateChatBarTextSize(value)

		elseif (setting == "ShowChannelsBar") then
			UpdateShowChannelsBar(value)

		end
	end)

	self.GuiObject = BaseFrame

	self.GuiObjects.BaseFrame = BaseFrame
	self.GuiObjects.ChatBarParentFrame = ChatBarParentFrame
	self.GuiObjects.ChannelsBarParentFrame = ChannelsBarParentFrame
	self.GuiObjects.ChatChannelParentFrame = ChatChannelParentFrame
	self.GuiObjects.ChatResizerFrame = ChatResizerFrame
	self.GuiObjects.ResizeIcon = ResizeIcon
	self:AnimGuiObjects()
end

function methods:GetChatBar()
	return self.ChatBar
end

function methods:RegisterChatBar(ChatBar)
	self.ChatBar = ChatBar
	self.ChatBar:CreateGuiObjects(self.GuiObjects.ChatBarParentFrame)
end

function methods:RegisterChannelsBar(ChannelsBar)
	self.ChannelsBar = ChannelsBar
	self.ChannelsBar:CreateGuiObjects(self.GuiObjects.ChannelsBarParentFrame)
end

function methods:RegisterMessageLogDisplay(MessageLogDisplay)
	self.MessageLogDisplay = MessageLogDisplay
	self.MessageLogDisplay.GuiObject.Parent = self.GuiObjects.ChatChannelParentFrame
end

function methods:AddChannel(channelName)
	if (self:GetChannel(channelName)) then
		error("Channel '" .. channelName .. "' already exists!")
		return
	end

	local channel = moduleChatChannel.new(channelName, self.MessageLogDisplay)
	self.Channels[channelName:lower()] = channel

	channel:SetActive(false)

	local tab = self.ChannelsBar:AddChannelTab(channelName)
	tab.NameTag.MouseButton1Click:connect(function()
		self:SwitchCurrentChannel(channelName)
	end)

	channel:RegisterChannelTab(tab)

	return channel
end

function methods:GetFirstChannel()
	--// Channels are not indexed numerically, so this function is necessary.
	--// Grabs and returns the first channel it happens to, or nil if none exist.
	for i, v in pairs(self.Channels) do
		return v
	end
	return nil
end

function methods:RemoveChannel(channelName)
	if (not self:GetChannel(channelName)) then
		error("Channel '" .. channelName .. "' does not exist!")
	end

	local indexName = channelName:lower()

	local needsChannelSwitch = false
	if (self.Channels[indexName] == self:GetCurrentChannel()) then
		needsChannelSwitch = true

		self:SwitchCurrentChannel(nil)
	end

	self.Channels[indexName]:Destroy()
	self.Channels[indexName] = nil

	self.ChannelsBar:RemoveChannelTab(channelName)

	if (needsChannelSwitch) then
		local generalChannelExists = (self:GetChannel(ChatSettings.GeneralChannelName) ~= nil)
		local removingGeneralChannel = (indexName == ChatSettings.GeneralChannelName:lower())

		local targetSwitchChannel = nil

		if (generalChannelExists and not removingGeneralChannel) then
			targetSwitchChannel = ChatSettings.GeneralChannelName
		else
			local firstChannel = self:GetFirstChannel()
			targetSwitchChannel = (firstChannel and firstChannel.Name or nil)
		end

		self:SwitchCurrentChannel(targetSwitchChannel)
	end

	if not ChatSettings.ShowChannelsBar then
		if self.ChatBar.TargetChannel == channelName then
			self.ChatBar:SetChannelTarget(ChatSettings.GeneralChannelName)
		end
	end
end

function methods:GetChannel(channelName)
	return channelName and self.Channels[channelName:lower()] or nil
end

function methods:GetTargetMessageChannel()
	if (not ChatSettings.ShowChannelsBar) then
		return self.ChatBar.TargetChannel
	else
		local curChannel = self:GetCurrentChannel()
		return curChannel and curChannel.Name
	end
end

function methods:GetCurrentChannel()
	return self.CurrentChannel
end

function methods:SwitchCurrentChannel(channelName)
	if (not ChatSettings.ShowChannelsBar) then
		local targ = self:GetChannel(channelName)
		if (targ) then
			self.ChatBar:SetChannelTarget(targ.Name)
		end

		channelName = ChatSettings.GeneralChannelName
	end

	local cur = self:GetCurrentChannel()
	local new = self:GetChannel(channelName)
	if new == nil then
		error(string.format("Channel '%s' does not exist.", channelName))
	end

	if (new ~= cur) then
		if (cur) then
			cur:SetActive(false)
			local tab = self.ChannelsBar:GetChannelTab(cur.Name)
			tab:SetActive(false)
		end

		if (new) then
			new:SetActive(true)
			local tab = self.ChannelsBar:GetChannelTab(new.Name)
			tab:SetActive(true)
		end

		self.CurrentChannel = new
	end

end

function methods:UpdateFrameVisibility()
	self.GuiObject.Visible = (self.Visible and self.CoreGuiEnabled)
end

function methods:GetVisible()
	return self.Visible
end

function methods:SetVisible(visible)
	self.Visible = visible
	self:UpdateFrameVisibility()
end

function methods:GetCoreGuiEnabled()
	return self.CoreGuiEnabled
end

function methods:SetCoreGuiEnabled(enabled)
	self.CoreGuiEnabled = enabled
	self:UpdateFrameVisibility()
end

function methods:EnableResizable()
	self.GuiObjects.ChatResizerFrame.Active = true
end

function methods:DisableResizable()
	self.GuiObjects.ChatResizerFrame.Active = false
end

function methods:FadeOutBackground(duration)
	self.ChannelsBar:FadeOutBackground(duration)
	self.MessageLogDisplay:FadeOutBackground(duration)
	self.ChatBar:FadeOutBackground(duration)

	self.AnimParams.Background_TargetTransparency = 1
	self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
end

function methods:FadeInBackground(duration)
	self.ChannelsBar:FadeInBackground(duration)
	self.MessageLogDisplay:FadeInBackground(duration)
	self.ChatBar:FadeInBackground(duration)

	self.AnimParams.Background_TargetTransparency = 0.6
	self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(duration)
end

function methods:FadeOutText(duration)
	self.MessageLogDisplay:FadeOutText(duration)
	self.ChannelsBar:FadeOutText(duration)
end

function methods:FadeInText(duration)
	self.MessageLogDisplay:FadeInText(duration)
	self.ChannelsBar:FadeInText(duration)
end

function methods:AnimGuiObjects()
	self.GuiObjects.ChatChannelParentFrame.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency
	self.GuiObjects.ChatResizerFrame.BackgroundTransparency = self.AnimParams.Background_CurrentTransparency
	self.GuiObjects.ResizeIcon.ImageTransparency = self.AnimParams.Background_CurrentTransparency
end

function methods:InitializeAnimParams()
	self.AnimParams.Background_TargetTransparency = 0.6
	self.AnimParams.Background_CurrentTransparency = 0.6
	self.AnimParams.Background_NormalizedExptValue = CurveUtil:NormalizedDefaultExptValueInSeconds(0)
end

function methods:Update(dtScale)
	self.ChatBar:Update(dtScale)
	self.ChannelsBar:Update(dtScale)
	self.MessageLogDisplay:Update(dtScale)

	self.AnimParams.Background_CurrentTransparency = CurveUtil:Expt(
			self.AnimParams.Background_CurrentTransparency,
			self.AnimParams.Background_TargetTransparency,
			self.AnimParams.Background_NormalizedExptValue,
			dtScale
	)

	self:AnimGuiObjects()
end


Prompt:
--[[Main.Radios.BuyRadio.Get.MouseButton1Click:connect(function()
	game.ReplicatedStorage.GetRadio:FireServer();
end)]]