Prompt: --< functions >--

Response:
function handleEquip(tool)
	if tool then
		if tool.Parent ~= char then
			hum:EquipTool(tool)
		else
			hum:UnequipTools()
		end
	end
end

function create() -- creates all the icons at once (and will only run once)

	local toShow = #inputOrder -- # operator can only be used with an array, not a dictionary
	local totalX = (toShow*iconSize.X.Offset)+((toShow+1)*iconBorder.x)
	local totalY = iconSize.Y.Offset + (2*iconBorder.y)

	frame.Size = UDim2.new(0, totalX, 0, totalY)
	frame.Position = UDim2.new(0.5, -(totalX/2), 1, -(totalY+(iconBorder.y*2)))
	frame.Visible = true -- just in case!

	for i = 1, #inputOrder do

		local value = inputOrder[i]
		local clone = template:Clone()
		clone.Parent = frame
		clone.Label.Text = value["txt"]
		clone.Name = value["txt"]
		clone.Visible = true
		clone.Position = UDim2.new(0, (i-1)*(iconSize.X.Offset)+(iconBorder.x*i), 0, iconBorder.y)
		clone.ImageTransparency = unequipped

		local tool = value["tool"]
		if tool then
			clone.Tool.Image = tool.TextureId
		end

		clone.Tool.MouseButton1Down:Connect(function() -- click icon to equip/unequip
			for key, value in pairs(inputKeys) do
				if value["txt"] == clone.Name then
					handleEquip(value["tool"])
				end
			end
		end)

	end
	template:Destroy()
end

function setup() -- sets up all the tools already in the backpack (and will only run once)
	local tools = bp:GetChildren()
	for i = 1, #tools do
		if tools[i]:IsA("Tool") then -- does not assume that all objects in the backpack will be a tool (2.11.18)
		for i = 1, #inputOrder do
			local value = inputOrder[i]
			if not value["tool"] then -- if the tool slot is free...
				value["tool"] = tools[i]
				break -- stop searching for a free slot
			end
		end
		end
	end
	create()
end

function adjust()
	for key, value in pairs(inputKeys) do
		local tool = value["tool"]
		local icon = frame:FindFirstChild(value["txt"])
		if tool then
			icon.Tool.Image = tool.TextureId
			if tool.Parent == char then -- if the tool is equipped...
				icon.ImageTransparency = equipped
			else
				icon.ImageTransparency = unequipped
			end
		else
			icon.Tool.Image = ""
			icon.ImageTransparency = unequipped
		end
	end
end

function onKeyPress(inputObject) -- press keys to equip/unequip
	local key = inputObject.KeyCode.Name
	local value = inputKeys[key]
	if value and uis:GetFocusedTextBox() == nil then -- don't equip/unequip while typing in text box
		handleEquip(value["tool"])
	end
end

function handleAddition(adding)

	if adding:IsA("Tool") then
		local new = true

		for key, value in pairs(inputKeys) do
			local tool = value["tool"]
			if tool then
				if tool == adding then
					new = false
				end
			end
		end

		if new then
			for i = 1, #inputOrder do
				local tool = inputOrder[i]["tool"]
				if not tool then -- if the tool slot is free...
					inputOrder[i]["tool"] = adding
					break
				end
			end
		end

	adjust()
	end
end

function handleRemoval(removing)
	if removing:IsA("Tool") then
		if removing.Parent ~= char and removing.Parent ~= bp then

			for i = 1, #inputOrder do
				if inputOrder[i]["tool"] == removing then
					inputOrder[i]["tool"] = nil
					break
				end
			end
		end

		adjust()
	end
end


Prompt: -- NOTE: Any number greater than 2^30 will make TextService:GetTextSize give invalid results

Response:
local MAX_BOUND = 10000

local function getTextHeight(text, font, fontSize, widthCap)
	local bounds = Vector2.new(widthCap, MAX_BOUND)
	local textSize = GetTextSize(text, fontSize, font, bounds)
	return textSize.Y
end

return getTextHeight


Prompt: -- Função 1

Response:
for I,V in pairs(LightService:GetChildren()) do
	if not V:IsA("Sky") and not V:IsA("Atmosphere") then
		V.Enabled = true
	end
end


Prompt: --ticks

Response:
local equiptick
local shoottick
local delta
local frametick = tick()


Prompt:
--[[
	Fixes the window, pressurizing the room if all windows are now fixed
]]

Response:
function Window:fix()
	self._state = Constants.State.Window.Normal

	local glass = self._model:FindFirstChild("Glass")
	glass.CanCollide = true
	glass.Material = Enum.Material.Glass
	glass.Color = Color3.fromRGB(116, 161, 255)
	glass.Transparency = 0.3

	local room = self._associatedRoom

	if room:allWindowsNormal() and room:isBreached() then
		room:ventRoom()
	end

	DestroyMarker:FireAllClients(glass)
end


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

Response:
local v1 = script:FindFirstAncestor("MainUI");
local v2 = require(script.Parent);
local v3 = require(game.Players.LocalPlayer:WaitForChild("PlayerScripts"):WaitForChild("PlayerModule")):GetControls();
local v4 = game["Run Service"];
local l__UserInputService__5 = game:GetService("UserInputService");
local l__Parent__1 = script.Parent.Parent.Parent;
local l__TweenService__2 = game:GetService("TweenService");
game:GetService("ReplicatedStorage").Bricks.Caption.OnClientEvent:Connect(function(p7, p8)
	v2.caption(p7, p8);
end);


Prompt:
--- Overwrites an existing table
-- @tparam table target Table to overwite
-- @tparam table source Source table to read from
-- @treturn table target

Response:
function Table.overwrite(target, source)
	for index, item in pairs(source) do
		target[index] = item
	end

	return target
end


Prompt: -- Local Functions

Response:
local function StartIntermission()

	-- Find flag to circle. Default to circle center of map
	local possiblePoints = {}
	table.insert(possiblePoints, Vector3.new(0,50,0))

	for _, child in ipairs(game.Workspace:GetChildren()) do
		if child.Name == "FlagStand" then
			table.insert(possiblePoints, child.FlagStand.Position)
		end
	end

	local focalPoint = possiblePoints[math.random(#possiblePoints)]
	Camera.CameraType = Enum.CameraType.Scriptable
	Camera.Focus = CFrame.new(focalPoint)

	local angle = 0
	Lighting.Blur.Enabled = true
	RunService:BindToRenderStep('IntermissionRotate', Enum.RenderPriority.Camera.Value, function()
		local cameraPosition = focalPoint + Vector3.new(50 * math.cos(angle), 20, 50 * math.sin(angle))
		Camera.CoordinateFrame = CFrame.new(cameraPosition, focalPoint)
		angle = angle + math.rad(.25)
	end)
end

local function StopIntermission()
	Lighting.Blur.Enabled = false
	RunService:UnbindFromRenderStep('IntermissionRotate')
	Camera.CameraType = Enum.CameraType.Custom
end

local function OnDisplayIntermission(display)
	if display and not InIntermission then
		InIntermission = true
		StartIntermission()
	end
	if not display and InIntermission then
		InIntermission = false
		StopIntermission()
	end
end


Prompt: -- Waits for the child of the specified parent

Response:
local function WaitForChild(parent, childName)
	while not parent:FindFirstChild(childName) do parent.ChildAdded:wait() end
	return parent[childName]
end

local Tool = script.Parent
local Handle = WaitForChild(Tool, 'Handle')
local Debounce = false

local TouchConnection

function OnTouched(hit)
	local humanoid = hit.Parent:findFirstChild('Humanoid')
	if Debounce == false then
		Debounce = true
		if humanoid then

		else
			Handle.Ting:Play()
		end
	end
	wait(0.5)
	Debounce = false
end

Tool.Equipped:connect(function()
	TouchConnection = Handle.Touched:connect(OnTouched)
end)

Tool.Unequipped:connect(function()
	if TouchConnection then
		TouchConnection:disconnect()
		TouchConnection = nil
	end
end)


Prompt: --[[ Services ]]

Response:
--
local ContextActionService = game:GetService('ContextActionService')
local Players = game:GetService('Players')
local UserInputService = game:GetService('UserInputService')
local VRService = game:GetService('VRService')


Prompt: --------|     Setting     |--------

Response: local displayZ = 10


Prompt: --[[[Default Controls]]

Response:
	--Peripheral Deadzones
	Tune.Peripherals = {
		MSteerWidth				= 67		,	-- Mouse steering control width	(0 - 100% of screen width)
		MSteerDZone				= 0		,	-- Mouse steering deadzone (0 - 100%)

		ControlLDZone			= 5			,	-- Controller steering L-deadzone (0 - 100%)
		ControlRDZone			= 5			,	-- Controller steering R-deadzone (0 - 100%)
	}

	--Control Mapping
	Tune.Controls = {

	--Keyboard Controls
		--Mode Toggles
		ToggleTCS				= nil				,
		ToggleABS				= nil					,
		ToggleTransMode			= nil					,
		ToggleMouseDrive		= nil					,

		--Primary Controls
		Throttle				= Enum.KeyCode.Up					,
		Brake					= Enum.KeyCode.Down					,
		SteerLeft				= Enum.KeyCode.Left					,
		SteerRight				= Enum.KeyCode.Right				,

		--Secondary Controls
		Throttle2				= Enum.KeyCode.W					,
		Brake2					= Enum.KeyCode.S					,
		SteerLeft2				= Enum.KeyCode.A					,
		SteerRight2				= Enum.KeyCode.D					,

		--Manual Transmission
		ShiftUp					= Enum.KeyCode.E					,
		ShiftDown				= Enum.KeyCode.Q					,
		Clutch					= Enum.KeyCode.LeftShift			,

		--Handbrake
		PBrake					= Enum.KeyCode.P					,

	--Mouse Controls
		MouseThrottle			= Enum.UserInputType.MouseButton1	,
		MouseBrake				= Enum.UserInputType.MouseButton2	,
		MouseClutch				= Enum.KeyCode.W					,
		MouseShiftUp			= Enum.KeyCode.E					,
		MouseShiftDown			= Enum.KeyCode.Q					,
		MousePBrake				= Enum.KeyCode.LeftShift			,

	--Controller Mapping
		ContlrThrottle			= Enum.KeyCode.ButtonR2				,
		ContlrBrake				= Enum.KeyCode.ButtonL2				,
		ContlrSteer				= Enum.KeyCode.Thumbstick1			,
		ContlrShiftUp			= Enum.KeyCode.ButtonY				,
		ContlrShiftDown			= Enum.KeyCode.ButtonX				,
		ContlrClutch			= Enum.KeyCode.ButtonR1				,
		ContlrPBrake			= Enum.KeyCode.ButtonL1				,
		ContlrToggleTMode		= Enum.KeyCode.DPadUp				,
		ContlrToggleTCS			= Enum.KeyCode.DPadDown				,
		ContlrToggleABS			= Enum.KeyCode.DPadRight			,
	}


Prompt: -- Set defaults

Response:
Frame.defaultProps = {
    BackgroundTransparency = 1,
    BorderSizePixel = 0,
    Size = UDim2.new(1, 0, 1, 0)
}

function Frame:render()
    local props = Support.CloneTable(self.props)
    local state = self.state

    -- Include aspect ratio constraint if specified
    if props.AspectRatio then
        local Constraint = new('UIAspectRatioConstraint', {
            AspectRatio = props.AspectRatio
        })

        -- Insert constraint into children
        props[Roact.Children] = Support.Merge(
            { AspectRatio = Constraint },
            props[Roact.Children] or {}
        )

        -- Base height off width using the aspect ratio
        if props.DominantAxis == 'Width' then
            props.SizeConstraint = 'RelativeXX'
            if typeof(props.Width) == 'UDim' then
                props.Height = UDim.new(props.Width.Scale / props.AspectRatio, 0)
            else
                props.Size = UDim2.new(
                    props.Size.X,
                    UDim.new(props.Size.X.Scale / props.AspectRatio, 0)
                )
            end

        -- Base width off height using the aspect ratio
        elseif props.DominantAxis == 'Height' then
            props.SizeConstraint = 'RelativeYY'
            if typeof(props.Height) == 'UDim' then
                props.Width = UDim.new(props.Height.Scale * props.AspectRatio, 0)
            else
                props.Size = UDim2.new(
                    UDim.new(props.Size.Y.Scale * props.AspectRatio, 0),
                    props.Size.Y
                )
            end
        end
    end

    -- Include list layout if specified
    if props.Layout == 'List' then
        local Layout = new('UIListLayout', {
            FillDirection = props.LayoutDirection,
            Padding = props.LayoutPadding,
            HorizontalAlignment = props.HorizontalAlignment,
            VerticalAlignment = props.VerticalAlignment,
            SortOrder = props.SortOrder or 'LayoutOrder',
            [Roact.Ref] = function (rbx)
                self:UpdateContentSize(rbx)
            end,
            [Roact.Change.AbsoluteContentSize] = function (rbx)
                self:UpdateContentSize(rbx)
            end
        })

        -- Update size
        props.Size = self:GetSize()

        -- Insert layout into children
        props[Roact.Children] = Support.Merge(
            { Layout = Layout },
            props[Roact.Children]
        )
    end

    -- Filter out custom properties
    props.AspectRatio = nil
    props.DominantAxis = nil
    props.Layout = nil
    props.LayoutDirection = nil
    props.LayoutPadding = nil
    props.HorizontalAlignment = nil
    props.VerticalAlignment = nil
    props.HorizontalPadding = nil
    props.VerticalPadding = nil
    props.SortOrder = nil
    props.Width = nil
    props.Height = nil
    props.ResizeParent = nil

    -- Display component in wrapper
    return new('Frame', props)

end

function Frame:GetSize(ContentSize)
    local props = self.props

    -- Determine dynamic dimensions
    local DynamicWidth = props.Size == 'WRAP_CONTENT' or
        props.Width == 'WRAP_CONTENT'
    local DynamicHeight = props.Size == 'WRAP_CONTENT' or
        props.Height == 'WRAP_CONTENT'
    local DynamicSize = DynamicWidth or DynamicHeight

    -- Get padding from props
    local Padding = UDim2.new(
        0, props.HorizontalPadding or 0,
        0, props.VerticalPadding or 0
    )

    -- Calculate size based on content if dynamic
    return Padding + UDim2.new(
        (ContentSize and DynamicWidth) and UDim.new(0, ContentSize.X) or
            (typeof(props.Width) == 'UDim' and props.Width or props.Size.X),
        (ContentSize and DynamicHeight) and UDim.new(0, ContentSize.Y) or
            (typeof(props.Height) == 'UDim' and props.Height or props.Size.Y)
    )
end

function Frame:UpdateContentSize(Layout)
    if not (Layout and Layout.Parent) then
        return
    end

    -- Set container size based on content
    Layout.Parent.Size = self:GetSize(Layout.AbsoluteContentSize)

    -- Set parent size based on content if specified
    local ResizeParent = self.props.ResizeParent
    local Parent = ResizeParent and Layout.Parent.Parent
    if ResizeParent and Parent then
        local ParentWidth = Parent.Size.X
        local ParentHeight = Parent.Size.Y
        if Support.IsInTable(ResizeParent, 'WIDTH') then
            ParentWidth = UDim.new(0, Layout.Parent.AbsoluteSize.X)
        end
        if Support.IsInTable(ResizeParent, 'HEIGHT') then
            ParentHeight = UDim.new(0, Layout.Parent.AbsoluteSize.Y)
        end
        Parent.Size = UDim2.new(ParentWidth, ParentHeight)
    end
end

return Frame


Prompt: -- ROBLOX deviation: Roblox Instance matchers

Response:
local RobloxShared = require(Packages.RobloxShared)
local instanceSubsetEquality = RobloxShared.RobloxInstance.instanceSubsetEquality
local getInstanceSubset = RobloxShared.RobloxInstance.getInstanceSubset


Prompt: --print("light loaded")

Response:
local light = script.Parent

while true do

		light.Transparency = 0.9

		wait(5)

		light.Transparency = 0.7

		wait(1)

		light.Transparency = 0.5

		wait(1)

		light.Transparency = 0.3

		wait(1)

		 light.Transparency = 0.1

		wait(2)

		light.Transparency = 1

		wait(7)

end


Prompt:
----- MAGIC NUMBERS ABOUT THE TOOL -----
-- How much damage a bullet does

Response: local Damage = 5


Prompt: -- Movement mode standardized to Enum.ComputerCameraMovementMode values

Response:
function BaseCamera:SetCameraMovementMode( cameraMovementMode )
	self.cameraMovementMode = cameraMovementMode
end

function BaseCamera:GetCameraMovementMode()
	return self.cameraMovementMode
end

function BaseCamera:SetIsMouseLocked(mouseLocked)
	self.inMouseLockedMode = mouseLocked
	self:UpdateMouseBehavior()
end

function BaseCamera:GetIsMouseLocked()
	return self.inMouseLockedMode
end

function BaseCamera:SetMouseLockOffset(offsetVector)
	self.mouseLockOffset = offsetVector
end

function BaseCamera:GetMouseLockOffset()
	return self.mouseLockOffset
end

function BaseCamera:InFirstPerson()
	return self.inFirstPerson
end

function BaseCamera:EnterFirstPerson()
	-- Overridden in ClassicCamera, the only module which supports FirstPerson
end

function BaseCamera:LeaveFirstPerson()
	-- Overridden in ClassicCamera, the only module which supports FirstPerson
end


Prompt:
--[=[
	Promises a Roblox datastore object with the name and scope. Generally only fails
	when you haven't published the place.
	@param name string
	@param scope string
	@return Promise<DataStore>
]=]

Response:
function DataStorePromises.promiseDataStore(name, scope)
	assert(type(name) == "string", "Bad name")
	assert(type(scope) == "string", "Bad scope")

	return Promise.new(function(resolve, reject)
		local result = nil
		local ok, err = pcall(function()
			result = DataStoreService:GetDataStore(name, scope)
		end)
		if not ok then
			return reject(err)
		end
		return resolve(result)
	end)

end


Prompt: --Service

Response:
local RunService = game:GetService("RunService")

return function(obj, text, duration)
    local length = #text
    local interval = duration / length

    local con, lastUpdate, currentPos = nil, time(), 1
    con = RunService.RenderStepped:Connect(function()
        if time() - lastUpdate > interval then
            currentPos += 1
            obj.Text = string.sub(text, 1, currentPos)
            lastUpdate = time()

            if currentPos == length then
                con:Disconnect()
            end
        end
    end)
end


Response:
function configureAnimationSetOld(name, fileList)
	if animTable[name] ~= nil then
		for _, connection in pairs(animTable[name].connections) do
			connection:disconnect()
		end
	end
	animTable[name] = {}
	animTable[name].count = 0
	animTable[name].totalWeight = 0
	animTable[name].connections = {}

	local allowCustomAnimations = true
	local AllowDisableCustomAnimsUserFlag = false

	local success, msg = pcall(function()
		AllowDisableCustomAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserAllowDisableCustomAnims2")
	end)

	if AllowDisableCustomAnimsUserFlag then
		local success, msg = pcall(function() allowCustomAnimations = game:GetService("StarterPlayer").AllowCustomAnimations end)
		if not success then
			allowCustomAnimations = true
		end
	end

	-- check for config values
	local config = script:FindFirstChild(name)
	if (allowCustomAnimations and config ~= nil) then
		table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
		table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
		local idx = 1
		for _, childPart in pairs(config:GetChildren()) do
			if childPart:IsA("Animation") then
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				local weightObject = childPart:FindFirstChild("Weight")
				if weightObject == nil then
					animTable[name][idx].weight = 1
				else
					animTable[name][idx].weight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				idx = idx + 1
			end
		end
	end

	-- fallback to defaults
	if animTable[name].count <= 0 then
		for idx, anim in pairs(fileList) do
			animTable[name][idx] = {}
			animTable[name][idx].anim = Instance.new("Animation")
			animTable[name][idx].anim.Name = name
			animTable[name][idx].anim.AnimationId = anim.id
			animTable[name][idx].weight = anim.weight
			animTable[name].count = animTable[name].count + 1
			animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
			-- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
		end
	end

	-- preload anims
	if PreloadAnimsUserFlag then
		for i, animType in pairs(animTable) do
			for idx = 1, animType.count, 1 do
				Humanoid:LoadAnimation(animType[idx].anim)
			end
		end
	end
end


Prompt:
--[[while wait(2) do
	local t = tick()
	script.Parent.PingRemote:InvokeServer()
	local ping = ((tick() - t) / 2) * 1000 -- time it takes in milliseconds
	local txt = string.format("Ping : %dms", ping)
	if ping > 130 then
		txt = string.format("%s (Warning high ping)",txt)
	end
	txt = string.format("%s Server location: %s",txt, script.Parent.PingLocation.Value)
	script.Parent.Text = txt
end]]

Response:
while wait(2) do
	local t = tick()
	script.Parent.PingRemote:InvokeServer()
	local ping = ((tick() - t) / 2) * 1000 -- time it takes in milliseconds
	local txt = string.format("%d ms", ping * 2)
	script.Parent.Text = txt
end


Prompt: -- Main enemy loop

Response:
function Enemy:start()
	coroutine.wrap(function()
		self._active = true
		while(self._active) do
			self:_update()
			wait(UPDATE_TIME_INTERVAL)
		end
	end)()
end

function Enemy:stop()
	self._active = false
	self._model.Humanoid.WalkSpeed = 0
end

function Enemy:_destroy()
	self._model:Destroy()
end

function Enemy:_onTouch(otherPart)
	if self._active and CollectionService:HasTag(otherPart, "Platform") then
		hitPlatformEvent:Fire()
		self:stop()
		self:_destroy()
	end
end

return Enemy


Prompt: -- Hi, its Avi8or!

Response:
l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+.02)
wait(.1)
end


Prompt:
--[[
	Create a promise that represents the immediately rejected value.
]]

Response:
function Promise.reject(value)
	return Promise.new(function(_, reject)
		reject(value)
	end)
end


Prompt: -- << COMMANDS >>

Response:
local module = {

	-----------------------------------
	{
	Name = "votekick";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 2;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "votekick players! ";
	Contributors = {};
	--
	Args = {};
	Function = function(speaker, args)

	end;
	UnFunction = function(speaker, args)

	end;
	--
	};

	-----------------------------------
	{
	Name = "";
	Aliases	= {};
	Prefixes = {settings.Prefix};
	Rank = 1;
	RankLock = false;
	Loopable = false;
	Tags = {};
	Description = "";
	Contributors = {};
	--
	Args = {};
	--[[
	ClientCommand = true;
	FireAllClients = true;
	BlockWhenPunished = true;
	PreFunction = function(speaker, args)

	end;
	Function = function(speaker, args)
		wait(1)
	end;
	--]]
	--
	};

	-----------------------------------

};

return module


Response:
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)


Prompt: --// Damage Settings

Response:
	BaseDamage = 13; -- Torso Damage
	LimbDamage = 10; -- Arms and Legs
	ArmorDamage = 10; -- How much damage is dealt against armor (Name the armor "Armor")
	HeadDamage = 18; -- If you set this to 100, there's a chance the player won't die because of the heal script


Prompt: --							else print("Didn't hit Target")

Response:
							end
							if makeRays then
								makeRay(CFrame.new(origPos, position)
									* CFrame.new(0, 0, -distance/2), Vector3.new(0.2, 0.2, distance))
							end
						end
					end
				end
			end
		end
		round:remove()
		break
	end
	wait()
end
if round then
	round:remove()
end
script:remove()


Prompt: -- Members --

Response:
	elseif (itemType == 'Property') then
		table.insert(Classes[item.Class].Properties, item)
	elseif (itemType == 'Function') then
		table.insert(Classes[item.Class].Functions, item)
	elseif (itemType == 'YieldFunction') then
		table.insert(Classes[item.Class].YieldFunctions, item)
	elseif (itemType == 'Event') then
		table.insert(Classes[item.Class].Events, item)
	elseif (itemType == 'Callback') then
		table.insert(Classes[item.Class].Callbacks, item)


Prompt: --[[ Utility Functions ]]

Response:
--
local function IsFinite(num)
	return num == num and num ~= 1/0 and num ~= -1/0
end

local function IsFiniteVector3(vec3)
	return IsFinite(vec3.x) and IsFinite(vec3.y) and IsFinite(vec3.z)
end

local movementUpdateEvent = Instance.new("BindableEvent")
movementUpdateEvent.Name = "MovementUpdate"
movementUpdateEvent.Parent = script

coroutine.wrap(function()
	local PathDisplayModule = script.Parent:WaitForChild("PathDisplay")
	if PathDisplayModule then
		PathDisplay = require(PathDisplayModule)
	end
end)()


Prompt: --Precalculated paths

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


Prompt:
--[[

   _____ _                 _                  _           _
  / ____(_)               | |        /\      | |         (_)
 | (___  _ _ __ ___  _ __ | | ___   /  \   __| |_ __ ___  _ _ __
  \___ \| | '_ ` _ \| '_ \| |/ _ \ / /\ \ / _` | '_ ` _ \| | '_ \
  ____) | | | | | | | |_) | |  __// ____ \ (_| | | | | | | | | | |
 |_____/|_|_| |_| |_| .__/|_|\___/_/    \_\__,_|_| |_| |_|_|_| |_|
                    | |
                    |_|

--]]

Response:
local Config = {
	DebugMode = false; -- Loads the MainModule (parented to the Loader) rather than the live asset.
	Asset = 5300444087;
	Settings = require(script.Parent.Parent:WaitForChild("Settings"))
}

if not _G.SimpleAdminLoaded then
	script.Parent.Parent.Parent = game:GetService("ServerScriptService")

	_G.SimpleAdmin = script.Parent.Parent
	local Start = tick()
	local Module = require((Config.DebugMode) and script:WaitForChild("MainModule") or Config.Asset)

	if Module(Config.Settings) then
		_G.SimpleAdminLoaded = true;
		warn("SimpleAdmin Loaded! (" .. tick() - Start .. " seconds)")
	else
		warn("Something went wrong while loading SimpleAdmin.")
	end
else
	local Model = script.Parent.Parent.Parent.Parent
	if Model:IsA("Model") and Model.Name == "SimpleAdmin" then
		Model:Destroy()
	end
end


Prompt: -- @preconditions: vec should be a unit vector, and 0 < rayLength <= 1000

Response:
function RayCast(startPos, vec, rayLength)
	local hitObject, hitPos = game.Workspace:FindPartOnRay(Ray.new(startPos + (vec * .01), vec * rayLength), Handle)
	if hitObject and hitPos then
		local distance = rayLength - (hitPos - startPos).magnitude
		if RayIgnoreCheck(hitObject, hitPos) and distance > 0 then
			-- there is a chance here for potential infinite recursion
			return RayCast(hitPos, vec, distance)
		end
	end
	return hitObject, hitPos
end

function TagHumanoid(humanoid, player)
	-- Add more tags here to customize what tags are available.
	while humanoid:FindFirstChild('creator') do
		humanoid:FindFirstChild('creator'):Destroy()
	end
	local creatorTag = Instance.new("ObjectValue")
	creatorTag.Value = player
	creatorTag.Name = "creator"
	creatorTag.Parent = humanoid
	DebrisService:AddItem(creatorTag, 1.5)

	local weaponIconTag = Instance.new("StringValue")
	weaponIconTag.Value = IconURL
	weaponIconTag.Name = "icon"
	weaponIconTag.Parent = creatorTag
end

local function CreateFlash()
	if FlashHolder then
		local flash = Instance.new('Fire', FlashHolder)
		flash.Color = Color3.new(1, 140 / 255, 0)
		flash.SecondaryColor = Color3.new(1, 0, 0)
		flash.Size = 0.3
		DebrisService:AddItem(flash, FireRate / 1.5)
	else
		FlashHolder = Instance.new("Part", Tool)
		FlashHolder.Transparency = 1
		FlashHolder.CanCollide= false
		FlashHolder.Size = Vector3.new(1, 1, 1)
		FlashHolder.Position = Tool.Handle.Position
		local Weld = Instance.new("ManualWeld")
		Weld.C0 = CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
		Weld.C1 = CFrame.new(0, 2.2, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0)
		Weld.Part0 = FlashHolder
		Weld.Part1 = Tool.Handle
		Weld.Parent = FlashHolder
	end
end

local function CreateBullet(bulletPos)
	local bullet = Instance.new('Part', Workspace)
	bullet.FormFactor = Enum.FormFactor.Custom
	bullet.Size = Vector3.new(0.1, 0.1, 0.1)
	bullet.BrickColor = MyPlayer.TeamColor
	bullet.Shape = Enum.PartType.Ball
	bullet.CanCollide = false
	bullet.CFrame = CFrame.new(bulletPos)
	bullet.Anchored = true
	bullet.TopSurface = Enum.SurfaceType.Smooth
	bullet.BottomSurface = Enum.SurfaceType.Smooth
	bullet.Name = 'Bullet'
	DebrisService:AddItem(bullet, 2.5)
	local fire = Instance.new("Fire", bullet)
	fire.Color = Color3.new(MyPlayer.TeamColor.r, MyPlayer.TeamColor.g, MyPlayer.TeamColor.b)
	fire.SecondaryColor = Color3.new(MyPlayer.TeamColor.r, MyPlayer.TeamColor.g, MyPlayer.TeamColor.b)
	fire.Size = 5
	fire.Heat = 0
	DebrisService:AddItem(fire, 0.2)
	return bullet
end

local function Reload()
	if not Reloading then
		Reloading = true
		-- Don't reload if you are already full or have no extra ammo
		if AmmoInClip ~= ClipSize and SpareAmmo > 0 then
			if RecoilTrack then
				RecoilTrack:Stop()
			end
			if WeaponGui and WeaponGui:FindFirstChild('Crosshair') then
				if WeaponGui.Crosshair:FindFirstChild('ReloadingLabel') then
					WeaponGui.Crosshair.ReloadingLabel.Visible = true
				end
			end
			wait(ReloadTime)
			-- Only use as much ammo as you have
			local ammoToUse = math.min(ClipSize - AmmoInClip, SpareAmmo)
			AmmoInClip = AmmoInClip + ammoToUse
			SpareAmmo = SpareAmmo - ammoToUse
			UpdateAmmo(AmmoInClip)
		end
		Reloading = false
	end
end

function OnFire()
	if IsShooting then return end
	if MyHumanoid and MyHumanoid.Health > 0 then
		if RecoilTrack and AmmoInClip > 0 then
			RecoilTrack:Play()
		end
		IsShooting = true
		while LeftButtonDown and AmmoInClip > 0 and not Reloading do
			if Spread and not DecreasedAimLastShot then
				Spread = math.min(MaxSpread, Spread + AimInaccuracyStepAmount)
				UpdateCrosshair(Spread)
			end
			DecreasedAimLastShot = not DecreasedAimLastShot
			if Handle:FindFirstChild('FireSound') then
				Handle.FireSound:Play()
			end
			CreateFlash()
			if MyMouse then
				local targetPoint = MyMouse.Hit.p
				local shootDirection = (targetPoint - Handle.Position).unit
				-- Adjust the shoot direction randomly off by a little bit to account for recoil
				shootDirection = CFrame.Angles((0.5 - math.random()) * 2 * Spread,
																(0.5 - math.random()) * 2 * Spread,
																(0.5 - math.random()) * 2 * Spread) * shootDirection
				local hitObject, bulletPos = RayCast(Handle.Position, shootDirection, Range)
				local bullet
				-- Create a bullet here
				if hitObject then
					bullet = CreateBullet(bulletPos)
				end
				if hitObject and hitObject.Parent then
					local hitHumanoid = hitObject.Parent:FindFirstChild("Humanoid")
					if hitHumanoid then
						local hitPlayer = game.Players:GetPlayerFromCharacter(hitHumanoid.Parent)
						if MyPlayer.Neutral or (hitPlayer and hitPlayer.TeamColor ~= MyPlayer.TeamColor) then
							TagHumanoid(hitHumanoid, MyPlayer)
							hitHumanoid:TakeDamage(Damage)
							if bullet then
								bullet:Destroy()
								bullet = nil
								--bullet.Transparency = 1
							end
							Spawn(UpdateTargetHit)
						end
					end
				end

				AmmoInClip = AmmoInClip - 1
				UpdateAmmo(AmmoInClip)
			end
			wait(FireRate)
		end
		IsShooting = false
		if AmmoInClip == 0 then
			Reload()
		end
		if RecoilTrack then
			RecoilTrack:Stop()
		end
	end
end

local TargetHits = 0
function UpdateTargetHit()
	TargetHits = TargetHits + 1
	if WeaponGui and WeaponGui:FindFirstChild('Crosshair') and WeaponGui.Crosshair:FindFirstChild('TargetHitImage') then
		WeaponGui.Crosshair.TargetHitImage.Visible = true
	end
	wait(0.5)
	TargetHits = TargetHits - 1
	if TargetHits == 0 and WeaponGui and WeaponGui:FindFirstChild('Crosshair') and WeaponGui.Crosshair:FindFirstChild('TargetHitImage') then
		WeaponGui.Crosshair.TargetHitImage.Visible = false
	end
end

function UpdateCrosshair(value, mouse)
	if WeaponGui then
		local absoluteY = 650
		WeaponGui.Crosshair:TweenSize(
			UDim2.new(0, value * absoluteY * 2 + 23, 0, value * absoluteY * 2 + 23),
			Enum.EasingDirection.Out,
			Enum.EasingStyle.Linear,
			0.33)
	end
end

function UpdateAmmo(value)
	if WeaponGui and WeaponGui:FindFirstChild('AmmoHud') and WeaponGui.AmmoHud:FindFirstChild('ClipAmmo') then
		WeaponGui.AmmoHud.ClipAmmo.Text = AmmoInClip
		if value > 0 and WeaponGui:FindFirstChild('Crosshair') and WeaponGui.Crosshair:FindFirstChild('ReloadingLabel') then
			WeaponGui.Crosshair.ReloadingLabel.Visible = false
		end
	end
	if WeaponGui and WeaponGui:FindFirstChild('AmmoHud') and WeaponGui.AmmoHud:FindFirstChild('TotalAmmo') then
		WeaponGui.AmmoHud.TotalAmmo.Text = SpareAmmo
	end
end

function OnMouseDown()
	LeftButtonDown = true
	OnFire()
end

function OnMouseUp()
	LeftButtonDown = false
end

function OnKeyDown(key)
	if string.lower(key) == 'r' then
		Reload()
	end
end

function OnEquipped(mouse)
	RecoilAnim = WaitForChild(Tool, 'Recoil')
	FireSound  = WaitForChild(Handle, 'FireSound')

	MyCharacter = Tool.Parent
	MyPlayer = game:GetService('Players'):GetPlayerFromCharacter(MyCharacter)
	MyHumanoid = MyCharacter:FindFirstChild('Humanoid')
	MyTorso = MyCharacter:FindFirstChild('Torso')
	MyMouse = mouse
	WeaponGui = WaitForChild(Tool, 'WeaponHud'):Clone()
	if WeaponGui and MyPlayer then
		WeaponGui.Parent = MyPlayer.PlayerGui
		UpdateAmmo(AmmoInClip)
	end
	if RecoilAnim then
		RecoilTrack = MyHumanoid:LoadAnimation(RecoilAnim)
	end

	if MyMouse then
		-- Disable mouse icon
		MyMouse.Icon = "rbxasset://textures\\GunCursor.png"
		MyMouse.Button1Down:connect(OnMouseDown)
		MyMouse.Button1Up:connect(OnMouseUp)
		MyMouse.KeyDown:connect(OnKeyDown)
	end
end


Prompt: --------------------[ STANCE FUNCTIONS ]----------------------------------------------

Response:
function Stand(OnDeselected)
	local LHip = Torso["Left Hip"]
	local RHip = Torso["Right Hip"]
	local Root = HRP.RootJoint
	Stance = 0
	if S.StanceAnimation and (not OnDeselected) then
		spawn(function()
			local PreviousOffset = Humanoid.CameraOffset
			local PreviousRootP = Root.C0.p
			for X = 0, 90, 1.5 / S.StanceChangeSpeed do
				if Stance ~= 0 then break end
				local Alpha = Sine(X)
				Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[1], Alpha)
				Root.C0 = CF(PreviousRootP:lerp(VEC3(), Alpha)) * CFANG(RAD(-90), 0, RAD(180))
				RS:wait()
			end
		end)
		TweenJoint(ABWeld, CF(), CF(), Sine, S.StanceChangeSpeed)
		TweenJoint(LHip, CF(-1, -1, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0), Sine, S.StanceChangeSpeed)
		TweenJoint(RHip, CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
	elseif OnDeselected then
		Humanoid.CameraOffset = StanceOffset[1]
		ABWeld.C0 = CF()
		ABWeld.C1 = CF()
		LHip.C0 = CF(-1, -1, 0) * CFANG(0, RAD(-90), 0)
		LHip.C1 = CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0)
		RHip.C0 = CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0)
		RHip.C1 = CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0)
		Root.C0 = CFANG(RAD(-90), 0, RAD(180))
	end
end

function Crouch()
	local LHip = Torso["Left Hip"]
	local RHip = Torso["Right Hip"]
	local Root = HRP.RootJoint
	Stance = 1
	if S.StanceAnimation then
		spawn(function()
			local PreviousOffset = Humanoid.CameraOffset
			local PreviousRootP = Root.C0.p
			for X = 0, 90, 1.5 / S.StanceChangeSpeed do
				if Stance ~= 1 then break end
				local Alpha = Sine(X)
				Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[2], Alpha)
				Root.C0 = CF(PreviousRootP:lerp(VEC3(0, -1, 0), Alpha)) * CFANG(RAD(-100), 0, RAD(190))
				RS:wait()
			end
		end)
		TweenJoint(ABWeld, CF(0, 0, -1 / 50), CF(), Sine, S.StanceChangeSpeed)
		TweenJoint(LHip, CF(-1, -0.5, 0) * CFANG(0, RAD(-60), 0), CF(-0.5, 0.5, 1) * CFANG(0, RAD(-90), RAD(-90)), Sine, S.StanceChangeSpeed)
		TweenJoint(RHip, CF(1, -0.7, 0) * CFANG(RAD(-160), RAD(90), 0), CF(0.5, 0.5, 1) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
	else
		Humanoid.CameraOffset = StanceOffset[2]
		ABWeld.C0 = CF(0, 0, -1 / 16)
		ABWeld.C1 = CF()
		LHip.C0 = CF(-1, -0.5, 0) * CFANG(0, RAD(-90), 0)
		LHip.C1 = CF(-0.5, 0.5, 1) * CFANG(0, RAD(-90), RAD(-90))
		RHip.C0 = CF(1, -0.5, 0.25) * CFANG(RAD(-180), RAD(90), 0)
		RHip.C1 = CF(0.5, 0.5, 1) * CFANG(RAD(-180), RAD(90), 0)
		Root.C0 = CF(0, -1, 0) * CFANG(RAD(-90), 0, RAD(180))
	end
end

function Prone()
	local LHip = Torso["Left Hip"]
	local RHip = Torso["Right Hip"]
	local Root = HRP.RootJoint
	Stance = 2
	if S.StanceAnimation then
		spawn(function()
			local PreviousOffset = Humanoid.CameraOffset
			local PreviousRootP = Root.C0.p
			for X = 0, 90, 1.5 / S.StanceChangeSpeed do
				if Stance ~= 2 then break end
				local Alpha = Sine(X)
				Humanoid.CameraOffset = PreviousOffset:lerp(StanceOffset[3], Alpha)
				Root.C0 = CF(PreviousRootP:lerp(VEC3(0, -2.5, 1), Alpha)) * CFANG(RAD(180), 0, RAD(180))
				RS:wait()
			end
		end)
		TweenJoint(ABWeld, CF(0, 0, -1 / 8), CF(), Sine, S.StanceChangeSpeed)
		TweenJoint(LHip, CF(-1, -1, 0) * CFANG(0, RAD(-90), 0), CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0), Sine, S.StanceChangeSpeed)
		TweenJoint(RHip, CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0), CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0), Sine, S.StanceChangeSpeed)
	else
		Humanoid.CameraOffset = StanceOffset[3]
		ABWeld.C0 = CF(0, 0, -1 / 8)
		ABWeld.C1 = CF()
		LHip.C0 = CF(-1, -1, 0) * CFANG(0, RAD(-90), 0)
		LHip.C1 = CF(-0.5, 1, 0) * CFANG(0, RAD(-90), 0)
		RHip.C0 = CF(1, -1, 0) * CFANG(RAD(-180), RAD(90), 0)
		RHip.C1 = CF(0.5, 1, 0) * CFANG(RAD(-180), RAD(90), 0)
		Root.C0 = CF(0, -2.5, 1) * CFANG(RAD(180), 0, RAD(180))
	end
end

function Dive(Speed)
	local DiveVelocity = (HRP.CFrame * CFANG(RAD(18),0,0)).lookVector * Speed * (35 / 16) * 4e3
	HRP.Velocity = VEC3()
	Torso.Velocity = VEC3()
	local BF = Instance.new("BodyForce")
	BF.force = DiveVelocity
	BF.Parent = HRP
	delay(0.05, function()
		Prone()
		local Start = tick()
		while true do
			wait()
			if (tick() - Start) > 0.1 then break end
			BF.force = -HRP.Velocity * 700
		end
		BF:Destroy()
	end)
end


Prompt:
--[[
    Turns brake lights on or off depending on the status
]]

Response:
function VehicleLightsComponent:updateStatus(statusesChanged)
	if statusesChanged.Braking ~= nil then
		local brakeLightsOn = statusesChanged.Braking
		if brakeLightsOn ~= self.state.brakeLights then
			self.state.brakeLights = brakeLightsOn
			self:toggleLights(self.brakeLights, brakeLightsOn)
		end
	end
end

return VehicleLightsComponent


Response:
local ObjectShakeAddedEvent = Instance.new("BindableEvent")
local ObjectShakeRemovedEvent = Instance.new("BindableEvent")
local ObjectShakeUpdatedEvent = Instance.new("BindableEvent")
local PausedEvent = Instance.new("BindableEvent")
local ResumedEvent = Instance.new("BindableEvent")

local WindShake = {
	ObjectMetadata = {};
	Octree = Octree.new();

	Handled = 0;
	Active = 0;
	LastUpdate = os.clock();

	ObjectShakeAdded = ObjectShakeAddedEvent.Event;
	ObjectShakeRemoved = ObjectShakeRemovedEvent.Event;
	ObjectShakeUpdated = ObjectShakeUpdatedEvent.Event;
	Paused = PausedEvent.Event;
	Resumed = ResumedEvent.Event;

}

export type WindShakeSettings = {
	WindDirection: Vector3?,
	WindSpeed: number?,
	WindPower: number?,
}

function WindShake:Connect(funcName: string, event: RBXScriptSignal): RBXScriptConnection
	local callback = self[funcName]
	assert(typeof(callback) == "function", "Unknown function: " .. funcName)

	return event:Connect(function (...)
		return callback(self, ...)
	end)
end

function WindShake:AddObjectShake(object: BasePart, settingsTable: WindShakeSettings?)
	if typeof(object) ~= "Instance" then
		return
	end

	if not object:IsA("BasePart") then
		return
	end

	local metadata = self.ObjectMetadata

	if metadata[object] then
		return
	else
		self.Handled += 1
	end

	metadata[object] = {
		Node = self.Octree:CreateNode(object.Position, object);
		Settings = Settings.new(object, DEFAULT_SETTINGS);

		Seed = math.random(1000) * 0.1;
		Origin = object.CFrame;
	}

	self:UpdateObjectSettings(object, settingsTable)

	ObjectShakeAddedEvent:Fire(object)
end

function WindShake:RemoveObjectShake(object: BasePart)
	if typeof(object) ~= "Instance" then
		return
	end

	local metadata = self.ObjectMetadata
	local objMeta = metadata[object]

	if objMeta then
		self.Handled -= 1
		metadata[object] = nil
		objMeta.Settings:Destroy()
		objMeta.Node:Destroy()

		if object:IsA("BasePart") then
			object.CFrame = objMeta.Origin
		end
	end

	ObjectShakeRemovedEvent:Fire(object)
end

function WindShake:Update()
	local now = os.clock()
	local dt = now - self.LastUpdate

	if dt < UPDATE_HZ then
		return
	end

	self.LastUpdate = now

	debug.profilebegin("WindShake")

	local camera = workspace.CurrentCamera
	local cameraCF = camera and camera.CFrame

	debug.profilebegin("Octree Search")
	local updateObjects = self.Octree:RadiusSearch(cameraCF.Position + (cameraCF.LookVector * 115), 120)
	debug.profileend()

	local activeCount = #updateObjects

	self.Active = activeCount

	if activeCount < 1 then
		return
	end

	local step = math.min(1, dt * 8)
	local cfTable = table.create(activeCount)
	local objectMetadata = self.ObjectMetadata

	debug.profilebegin("Calc")
	for i, object in ipairs(updateObjects) do
		local objMeta = objectMetadata[object]
		local lastComp = objMeta.LastCompute or 0

		local origin = objMeta.Origin
		local current = objMeta.CFrame or origin

		if (now - lastComp) > COMPUTE_HZ then
			local objSettings = objMeta.Settings

			local seed = objMeta.Seed
			local amp = objSettings.WindPower * 0.1

			local freq = now * (objSettings.WindSpeed * 0.08)
			local rotX = math.noise(freq, 0, seed) * amp
			local rotY = math.noise(freq, 0, -seed) * amp
			local rotZ = math.noise(freq, 0, seed+seed) * amp
			local offset = object.PivotOffset
			local worldpivot = origin * offset

			objMeta.Target = (worldpivot * CFrame.Angles(rotX, rotY, rotZ) + objSettings.WindDirection * ((0.5 + math.noise(freq, seed, seed)) * amp)) * offset:Inverse()

			objMeta.LastCompute = now
		end

		current = current:Lerp(objMeta.Target, step)
		objMeta.CFrame = current
		cfTable[i] = current
	end
	debug.profileend()

	workspace:BulkMoveTo(updateObjects, cfTable, Enum.BulkMoveMode.FireCFrameChanged)
	debug.profileend()
end

function WindShake:Pause()
	if self.UpdateConnection then
		self.UpdateConnection:Disconnect()
		self.UpdateConnection = nil
	end

	self.Active = 0
	self.Running = false

	PausedEvent:Fire()
end

function WindShake:Resume()
	if self.Running then
		return
	else
		self.Running = true
	end

	-- Connect updater
	self.UpdateConnection = self:Connect("Update", RunService.Heartbeat)

	ResumedEvent:Fire()
end

function WindShake:Init()
	if self.Initialized then
		return
	else
		self.Initialized = true
	end

	-- Define attributes if they're undefined.
	local power = script:GetAttribute("WindPower")
	local speed = script:GetAttribute("WindSpeed")
	local direction = script:GetAttribute("WindDirection")

	if typeof(power) ~= "number" then
		script:SetAttribute("WindPower", DEFAULT_SETTINGS.WindPower)
	end

	if typeof(speed) ~= "number" then
		script:SetAttribute("WindSpeed", DEFAULT_SETTINGS.WindSpeed)
	end

	if typeof(direction) ~= "Vector3" then
		script:SetAttribute("WindDirection", DEFAULT_SETTINGS.WindDirection)
	end

	-- Clear any old stuff.
	self:Cleanup()

	-- Wire up tag listeners.
	local windShakeAdded = CollectionService:GetInstanceAddedSignal(COLLECTION_TAG)
	self.AddedConnection = self:Connect("AddObjectShake", windShakeAdded)

	local windShakeRemoved = CollectionService:GetInstanceRemovedSignal(COLLECTION_TAG)
	self.RemovedConnection = self:Connect("RemoveObjectShake", windShakeRemoved)

	for _,object in pairs(CollectionService:GetTagged(COLLECTION_TAG)) do
		self:AddObjectShake(object)
	end

	-- Automatically start.
	self:Resume()
end

function WindShake:Cleanup()
	if not self.Initialized then
		return
	end

	self:Pause()

	if self.AddedConnection then
		self.AddedConnection:Disconnect()
		self.AddedConnection = nil
	end

	if self.RemovedConnection then
		self.RemovedConnection:Disconnect()
		self.RemovedConnection = nil
	end

	table.clear(self.ObjectMetadata)
	self.Octree:ClearNodes()

	self.Handled = 0
	self.Active = 0
	self.Initialized = false
end

function WindShake:UpdateObjectSettings(object: Instance, settingsTable: WindShakeSettings)
	if typeof(object) ~= "Instance" then
		return
	end

	if typeof(settingsTable) ~= "table" then
		return
	end

	if (not self.ObjectMetadata[object]) and (object ~= script) then
		return
	end

	for key, value in pairs(settingsTable) do
		object:SetAttribute(key, value)
	end

	ObjectShakeUpdatedEvent:Fire(object)
end

function WindShake:UpdateAllObjectSettings(settingsTable: WindShakeSettings)
	if typeof(settingsTable) ~= "table" then
		return
	end

	for obj, objMeta in pairs(self.ObjectMetadata) do
		for key, value in pairs(settingsTable) do
			obj:SetAttribute(key, value)
		end
		ObjectShakeUpdatedEvent:Fire(obj)
	end
end

function WindShake:SetDefaultSettings(settingsTable: WindShakeSettings)
	self:UpdateObjectSettings(script, settingsTable)
end

return WindShake


Prompt: --	HUB.Default:TweenPosition(UDim2.new(0, 0, mode,3),Enum.EasingDirection.Out,Enum.EasingStyle.Quad,.4,true)

Response:
end

swap()

mouse.KeyDown:connect(function (key)
    key = string.lower(key)
	if key == "k" then --Camera controls
        if cam == ("car") then
			Camera.CameraSubject = player.Character.Humanoid
			Camera.CameraType = ("Custom")
			cam = ("freeplr")
			Camera.FieldOfView = 70
		elseif cam == ("freeplr") then
			Camera.CameraSubject = player.Character.Humanoid
			Camera.CameraType = ("Attach")
			cam = ("lockplr")
        elseif cam == ("lockplr") then
			Camera.CameraSubject = carSeat
			Camera.CameraType = ("Custom")
			cam = ("car")
			Camera.FieldOfView = 70
        end


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(obj,Goal,Time,Wait,...)
    local TwInfo = TweenInfo.new(Time,...)
    local twn = TweenService:Create(obj, TwInfo, Goal)
    twn:Play()
    if Wait then
        twn.Completed:wait()
    end
	return
end

local originals = Piano.Case.Originals:GetChildren()

function HighlightPianoKey(note1,transpose)
	if not Settings.KeyAesthetics then return end
	local octave = math.ceil(note1/12)
	local note2 = (note1 - 1)%12 + 1
	local yDist = 3
	local TimeUp = .2
	local TimeDn = .25
	local key = Keys[octave][note2]
	local parts = key:GetChildren()
	for i,v in pairs(parts) do
		if i >= #parts then
			local obj = v
			local Properties = {}
			Properties.Position = Vector3.new(v.Position.x,originals[octave][note2][v.Name].Position.y + yDist,v.Position.z)
			Tween(obj,Properties,TimeUp,true,Enum.EasingStyle.Linear)
		else
			local obj = v
			local Properties = {}
			Properties.Position = Vector3.new(v.Position.x,originals[octave][note2][v.Name].Position.y + yDist,v.Position.z)
			Tween(obj,Properties,TimeUp,false,Enum.EasingStyle.Linear)
		end
	end
	for i,v in pairs(parts) do
		if i >= #parts then
			local obj = v
			local Properties = {}
			Properties.Position = Vector3.new(v.Position.x,originals[octave][note2][v.Name].Position.y - yDist,v.Position.z)
			Tween(obj,Properties,TimeDn,true,Enum.EasingStyle.Linear)
		else
			local obj = v
			local Properties = {}
			Properties.Position = Vector3.new(v.Position.x,originals[octave][note2][v.Name].Position.y - yDist,v.Position.z)
			Tween(obj,Properties,TimeDn,false,Enum.EasingStyle.Linear)
		end
	end
	for i,v in pairs(parts) do
		v.CFrame = originals[octave][note2][v.Name].CFrame
	end
	return
end


Prompt:
--[=[
	Taps into the observable and executes the onFire/onError/onComplete
	commands.

	https://rxjs-dev.firebaseapp.com/api/operators/tap

	@param onFire function?
	@param onError function?
	@param onComplete function?
	@return (source: Observable<T>) -> Observable<T>
]=]

Response:
function Rx.tap(onFire, onError, onComplete)
	assert(type(onFire) == "function" or onFire == nil, "Bad onFire")
	assert(type(onError) == "function" or onError == nil, "Bad onError")
	assert(type(onComplete) == "function" or onComplete == nil, "Bad onComplete")

	return function(source)
		assert(Observable.isObservable(source), "Bad observable")

		return Observable.new(function(sub)
			return source:Subscribe(
				function(...)
					if onFire then
						onFire(...)
					end
					if sub:IsPending() then
						sub:Fire(...)
					end
				end,
				function(...)
					if onError then
						onError(...)
					end
					sub:Error(...)
				end,
				function(...)
					if onComplete then
						onComplete(...)
					end
					sub:Complete(...)
				end)
		end)
	end
end


Prompt:
--[[**
	ensures value is an integer

	@param value The value to check against

	@returns True iff the condition is satisfied, false otherwise
**--]]

Response:
function t.integer(value)
	local success = t.number(value)
	if not success then
		return false
	end

	if value % 1 == 0 then
		return true
	else
		return false
	end
end


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

Response:
script.Parent.Visible = true;
script.Parent.Parent.Background.Visible = true;
wait(2);
for v1 = 1, 10 do
	wait();
	script.Parent.Text1.TextTransparency = script.Parent.Text1.TextTransparency - 0.1;
end;
wait(1);
script.Parent.Names.Visible = true;
wait();
script.Parent.Names.Frame:TweenPosition(UDim2.new(0, 0, -0.925, 0), "In", "Quint", 5);
wait(7.5);
script.Parent.Parent:Destroy();


Prompt: --// # key, meme

Response:
mouse.KeyDown:connect(function(key)
	if key=="k" then
		if veh.Lightbar.middle.meme.IsPlaying == true then
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.meme:Stop()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.meme.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		else
		veh.Lightbar.middle.Wail:Stop()
		veh.Lightbar.middle.meme:Play()
		veh.Lightbar.middle.Priority:Stop()
		script.Parent.Parent.Sirens.meme.BackgroundColor3 = Color3.fromRGB(215, 135, 110)
		script.Parent.Parent.Sirens.Wail.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		script.Parent.Parent.Sirens.Priority.BackgroundColor3 = Color3.fromRGB(62, 62, 62)
		end
	end
end)


Response:
runService.RenderStepped:connect(function()

	if running then
		updatechar()

		CamPos = CamPos + (TargetCamPos - CamPos) *0.28
		AngleX = AngleX + (TargetAngleX - AngleX) *0.35
		local dist = TargetAngleY - AngleY
		dist = math.abs(dist) > 180 and dist - (dist / math.abs(dist)) * 360 or dist
		AngleY = (AngleY + dist *0.35) %360
		cam.CameraType = Enum.CameraType.Scriptable

		cam.CoordinateFrame = CFrame.new(head.Position)
		* CFrame.Angles(0,math.rad(AngleY),0)
		* CFrame.Angles(math.rad(AngleX),0,0)
		* CFrame.new(0,0.8,0) -- offset

		humanoidpart.CFrame=CFrame.new(humanoidpart.Position)*CFrame.Angles(0,math.rad(AngleY),0)
		character.Humanoid.AutoRotate = false
		else game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default; character.Humanoid.AutoRotate = true
	end

	if (cam.Focus.p-cam.CoordinateFrame.p).magnitude < 1 then
		running = false
	else
		running = true
		if freemouse == true then
			game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.Default
		else
			game:GetService("UserInputService").MouseBehavior = Enum.MouseBehavior.LockCenter
		end
	end

	if not CanToggleMouse.allowed then
		freemouse = false
	end

	cam.FieldOfView = FieldOfView

end)


Prompt:
--!strict
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER

Response: return 9007199254740991


Prompt: --throttle.Value = TCount

Response:
if carSeat.Throttle == 1 then
if autoF - 1 > autoR or clutch.Clutch.Value ~= 1 then
	TCount = 1
	else
	if TCount >= 1 then
		TCount = 1
	else
		if speed > 50 then
		TCount = TCount + 0.167

		elseif speed < 20 then
		TCount = TCount + 0.3334

			else
		TCount = TCount + 0.02
		end
	end

	end
else
	if TCount <= 0 then
		TCount = 0
	else
		TCount = 0
	end
end

if currentgear.Value ~= 1 then tlR = 0
	if clutch.Clutch.Value ~= 1 then
		if throttle.Value ~= 0 then
			if engine.Value > redline.Value * (1-clutch.Clutch.Value) then --------------?? WE DONT NEED A 'FOR' IN THE CLUTCH CODE
				engine.Value = engine.Value - 300
				else
				engine.Value = engine.Value + (((600+decay.Value) * throttle.Value) - decay.Value)
			end else engine.Value = engine.Value - decay.Value
		end
		rpm.Value = engine.Value
	else
		engine.Value = rpm.Value
	end
else
	tlR = tlR + 0.05
	if tlR > 20 then
		script.Parent.Functions.Engine.Value = false
		first = 0.333
	end
	engine.Value = engine.Value + (((600+decay.Value) * first) - decay.Value)
	if engine.Value > idle.Value*2 then
		first = 0
	end
		--engine.Value = (idle.Value-decay.Value)

end

drive = "x"


Prompt: --[[Susupension]]

Response:
	Tune.SusEnabled		= true		-- works only in with PGSPhysicsSolverEnabled, defaults to false when PGS is disabled

	--Front Suspension
	Tune.FSusDamping	= 500		-- Spring Dampening
	Tune.FSusStiffness	= 7500		-- Spring Force
	Tune.FSusLength		= 2			-- Suspension length (in studs)
	Tune.FSusMaxExt		= .3		-- Max Extension Travel (in studs)
	Tune.FSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.FSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.FWsBoneLen		= 5			-- Wishbone Length
	Tune.FWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.FAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Rear Suspension
	Tune.RSusDamping	= 500		-- Spring Dampening
	Tune.RSusStiffness	= 7500		-- Spring Force
	Tune.RSusLength		= 2			-- Suspension length (in studs)
	Tune.RSusMaxExt		= .3		-- Max Extension Travel (in studs)
	Tune.RSusMaxComp	= .1		-- Max Compression Travel (in studs)
	Tune.RSusAngle		= 80		-- Suspension Angle (degrees from horizontal)

	Tune.RWsBoneLen		= 5			-- Wishbone Length
	Tune.RWsBoneAngle	= 0			-- Wishbone angle (degrees from horizontal)
	Tune.RAnchorOffset	= {			-- Suspension anchor point offset (relative to center of wheel)
	 --[[Lateral]]		-.4		,	-- positive = outward
	 --[[Vertical]]		-.5		,	-- positive = upward
	 --[[Forward]]		0		}	-- positive = forward

	--Aesthetics
	Tune.SusVisible		= true			-- Spring Visible
	Tune.WsBVisible		= false			-- Wishbone Visible
	Tune.SusRadius		= .2			-- Suspension Coil Radius
	Tune.SusThickness	= .1			-- Suspension Coil Thickness
	Tune.SusColor		= "Really black"	-- Suspension Color [BrickColor]
	Tune.SusCoilCount	= 6				-- Suspension Coil Count
	Tune.WsColor		= "Black"		-- Wishbone Color [BrickColor]
	Tune.WsThickness	= .1			-- Wishbone Rod Thickness


Prompt: -- AUTOOPEN EGGS

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

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


Prompt: --s.Pitch = 0.7

Response:
while s.Pitch<0.65 do
s.Pitch=s.Pitch+0.009
s:Play()
if s.Pitch>1 then
	s.Pitch=1
end
wait(0.001)
end

while s.Pitch<0.97 do
s.Pitch=s.Pitch+0.003
s:Play()
if s.Pitch>0.97 then
	s.Pitch=0.97
end
wait(0.001)
end