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

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

function methods:AddChannel(channelName)
	if (self.ChatChannels[channelName:lower()]) then
		error(string.format("Channel %q alrady exists.", channelName))
	end

	local function DefaultChannelCommands(fromSpeaker, message)
		if (message:lower() == "/leave") then
			local channel = self:GetChannel(channelName)
			local speaker = self:GetSpeaker(fromSpeaker)
			if (channel and speaker) then
				if (channel.Leavable) then
					speaker:LeaveChannel(channelName)
					speaker:SendSystemMessage(string.format("You have left channel '%s'", channelName), "System")
				else
					speaker:SendSystemMessage("You cannot leave this channel.", channelName)
				end
			end

			return true
		end
		return false
	end

	local channel = ChatChannel.new(self, channelName)
	self.ChatChannels[channelName:lower()] = channel

	channel:RegisterProcessCommandsFunction("default_commands", DefaultChannelCommands, ChatConstants.HighPriority)

	local success, err = pcall(function() self.eChannelAdded:Fire(channelName) end)
	if not success and err then
		print("Error addding channel: " ..err)
	end

	return channel
end

function methods:RemoveChannel(channelName)
	if (self.ChatChannels[channelName:lower()]) then
		local n = self.ChatChannels[channelName:lower()].Name

		self.ChatChannels[channelName:lower()]:InternalDestroy()
		self.ChatChannels[channelName:lower()] = nil

		local success, err = pcall(function() self.eChannelRemoved:Fire(n) end)
		if not success and err then
			print("Error removing channel: " ..err)
		end
	else
		warn(string.format("Channel %q does not exist.", channelName))
	end
end

function methods:GetChannel(channelName)
	return self.ChatChannels[channelName:lower()]
end

function methods:AddSpeaker(speakerName)
	if (self.Speakers[speakerName:lower()]) then
		error("Speaker \"" .. speakerName .. "\" already exists!")
	end

	local speaker = Speaker.new(self, speakerName)
	self.Speakers[speakerName:lower()] = speaker

	local success, err = pcall(function() self.eSpeakerAdded:Fire(speakerName) end)
	if not success and err then
		print("Error adding speaker: " ..err)
	end

	return speaker
end

function methods:InternalUnmuteSpeaker(speakerName)
	for channelName, channel in pairs(self.ChatChannels) do
		if channel:IsSpeakerMuted(speakerName) then
			channel:UnmuteSpeaker(speakerName)
		end
	end
end

function methods:RemoveSpeaker(speakerName)
	if (self.Speakers[speakerName:lower()]) then
		local n = self.Speakers[speakerName:lower()].Name
		self:InternalUnmuteSpeaker(n)

		self.Speakers[speakerName:lower()]:InternalDestroy()
		self.Speakers[speakerName:lower()] = nil

		local success, err = pcall(function() self.eSpeakerRemoved:Fire(n) end)
		if not success and err then
			print("Error removing speaker: " ..err)
		end

	else
		warn("Speaker \"" .. speakerName .. "\" does not exist!")
	end
end

function methods:GetSpeaker(speakerName)
	return self.Speakers[speakerName:lower()]
end

function methods:GetChannelList()
	local list = {}
	for i, channel in pairs(self.ChatChannels) do
		if (not channel.Private) then
			table.insert(list, channel.Name)
		end
	end
	return list
end

function methods:GetAutoJoinChannelList()
	local list = {}
	for i, channel in pairs(self.ChatChannels) do
		if channel.AutoJoin then
			table.insert(list, channel)
		end
	end
	return list
end

function methods:GetSpeakerList()
	local list = {}
	for i, speaker in pairs(self.Speakers) do
		table.insert(list, speaker.Name)
	end
	return list
end

function methods:SendGlobalSystemMessage(message)
	for i, speaker in pairs(self.Speakers) do
		speaker:SendSystemMessage(message, nil)
	end
end

function methods:RegisterFilterMessageFunction(funcId, func, priority)
	self.FilterMessageFunctions:AddFunction(funcId, func, priority)
end

function methods:UnregisterFilterMessageFunction(funcId)
	self.FilterMessageFunctions:RemoveFunction(funcId)
end

function methods:RegisterProcessCommandsFunction(funcId, func, priority)
	self.ProcessCommandsFunctions:AddFunction(funcId, func, priority)
end

function methods:UnregisterProcessCommandsFunction(funcId)
	self.ProcessCommandsFunctions:RemoveFunction(funcId)
end

local LastFilterNoficationTime = 0
local LastFilterIssueTime = 0
local FilterIssueCount = 0
function methods:InternalNotifyFilterIssue()
	if (tick() - LastFilterIssueTime) > FILTER_THRESHOLD_TIME then
		FilterIssueCount = 0
	end
	FilterIssueCount = FilterIssueCount + 1
	LastFilterIssueTime = tick()
	if FilterIssueCount >= FILTER_NOTIFCATION_THRESHOLD then
		if (tick() - LastFilterNoficationTime) > FILTER_NOTIFCATION_INTERVAL then
			LastFilterNoficationTime = tick()
			local systemChannel = self:GetChannel("System")
			if systemChannel then
				systemChannel:SendSystemMessage("The chat filter is currently experiencing issues and messages may be slow to appear.", errorExtraData)
			end
		end
	end
end

local StudioMessageFilteredCache = {}


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

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

local damage = 0

local slash_damage = 0

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

function attack()
	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
		return
	end

	attack()

	wait(1)

	Tool.Enabled = true
end

script.Parent.Activated:connect(onActivated)


Prompt: --> Services

Response:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")


Prompt: -- Keyboard Input

Response:
local function GetKeyboardInput(step)
	-- Declare & initialize new control inputs
	local yaw, pitch, boost = 0, 0, 0

	-- Key inputs
	local w = Keyboard:IsDown(KEY_W) or Keyboard:IsDown(KEY_UP)
	local a = Keyboard:IsDown(KEY_A) or Keyboard:IsDown(KEY_LEFT)
	local s = Keyboard:IsDown(KEY_S) or Keyboard:IsDown(KEY_DOWN)
	local d = Keyboard:IsDown(KEY_D) or Keyboard:IsDown(KEY_RIGHT)
	local shift = Keyboard:IsDown(KEY_LEFTSHIFT) or Keyboard:IsDown(KEY_RIGHTSHIFT)

	-- Update controls
	if yaw == 0 then
		yaw = ((a ~= d) and (d and 1 or -1) or 0)
	end
	if pitch == 0 then
		pitch = ((w ~= s) and (s and -1 or 1) or 0)
	end
	boost = ((UpdateBoost(shift, step) and 1) or 0)

	-- Throttle is off during countdown
	if countdownGui.TimerFrame.Visible then
		boost = -1
		yaw = 0
		pitch = 0
	end

	-- Set engine input variables
	engine.BoostInput = boost
	engine.YawInput = yaw
	engine.PitchInput = pitch
end -- GetKeyboardInput()


Prompt:
-- NEW V13.1.0 - PartCache tie-in. If you use the PartCache module to create cosmetic bullets, you can now directly tie that in.
-- Ensure you're using the latest version of PartCache.

Response: local CosmeticPartProvider = PartCacheModule.new(CosmeticBullet, 150, CosmeticBulletsFolder)


Prompt: --------RIGHT DOOR --------

Response:
game.Workspace.doorright.l32.BrickColor = BrickColor.new(1013)
game.Workspace.doorright.l41.BrickColor = BrickColor.new(106)
game.Workspace.doorright.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.cyan.Value)


Response:
function CheckUser(user,val)
	if IsGroupOnly == true and user:GetRankInGroup(GroupID) >= MinRank then
		val = true
	else
		val = false
	end
	if TeamOnly == true and user.TeamColor == TeamColor or user.Team == TeamName then
		val = true
	else
		val = false
	end
	if UserOnly == true then
		for _,i in pairs(UserNames) do
			if user.Name == i then
				val = true
				break;
			else
				val = false
			end
		end
	end
	if IsGroupOnly == false and TeamOnly == false and UserOnly == false then
		val = true
	end
	return val
end


Prompt:
--- Cleans up all tasks.
-- @alias Destroy

Response:
function Maid:DoCleaning()
	local tasks = self._tasks

	-- Disconnect all events first as we know this is safe
	for index, task in pairs(tasks) do
		if (typeof(task) == "RBXScriptConnection") then
			tasks[index] = nil
			task:Disconnect()
		end
	end

	-- Clear out tasks table completely, even if clean up tasks add more tasks to the maid
	local index, task = next(tasks)
	while (task ~= nil) do
		tasks[index] = nil
		if (type(task) == "function") then
			task()
		elseif (typeof(task) == "RBXScriptConnection") then
			task:Disconnect()
		elseif (task.Destroy) then
			task:Destroy()
		elseif (Promise.Is(task)) then
			task:Cancel()
		end
		index, task = next(tasks)
	end
end


Prompt:
--[[*
* Same as invokeGuardedCallback, but instead of returning an error, it stores
* it in a global so it can be rethrown by `rethrowCaughtError` later.
* TODO: See if caughtError and rethrowError can be unified.
*
* @param {String} name of the guard to use for logging or debugging
* @param {Function} func The function to invoke
* @param {*} context The context to use when calling the function
* @param {...*} args Arguments for function
]]

Response:
exports.invokeGuardedCallbackAndCatchFirstError = function(...)
	-- deviation: instead of the weird `this` indirection, pass varargs through
	exports.invokeGuardedCallback(...)

	if hasError then
		local err = clearCaughtError()

		if not hasRethrowError then
			hasRethrowError = true
			rethrowError = err
		end
	end
end


Response:
local M = require(game.ServerScriptService["GC Server"].Services.CPRaid);

while true do


Prompt: -- init

Response:
game.ReplicatedStorage.RE.marketPlace.OnServerEvent:Connect(function(player, name)
	spawn(function()
		local product, class = getAsset(name)
		if not product then
			print("Not product //"..name)
			return
		end

		local data = Datastore:GetData(player)

		local t = MarketplaceService:UserOwnsGamePassAsync(player.UserId,product.Id)

		if data and table.find(data.Gamepasses or {}, product.Id) then
			return onProductPurchased(player, product.Id) -- already owned
		end

		if t then
			return onProductPurchased(player, product.Id)
		end
		game.ReplicatedStorage.RE.GamepassNotification:FireClient(player)
		if class == "Passes" then
			MarketplaceService:PromptGamePassPurchase(player, product.Id)
		elseif class == "Products" then
			MarketplaceService:PromptProductPurchase(player, product.Id)
		end
	end)
end)

game.Players.PlayerAdded:Connect(function(player)
	local data

	while not Datastore do
		Datastore = shared.Datastore
		wait()
	end

	while not data do
		if not player.Parent then
			return
		end

		data = Datastore:GetData(player)
		wait(1)
	end

	local gamepasses = data.Gamepasses or {}
	for i, module in pairs(script.Passes:GetChildren()) do
		local pass = getAsset(module.Name)
		local id = pass.Id

		local found = table.find(gamepasses, id)
		if found or MarketplaceService:UserOwnsGamePassAsync(player.UserId, id) then
			if not found then
				table.insert(data.Gamepasses, id)
			end
			if pass.onJoined then
				pass.onJoined(player)
			end

			game.ReplicatedStorage.RE.gamepassUpdate:FireClient(player, getNameFromID(id))
		end
	end
end)


Prompt:
--[[ @brief Copies a table.
     @param t The table to copy.
     @return The copied table.
--]]

Response:
function module.ShallowTableCopy(t)
	local s = {};
	for i, v in pairs(t) do
		s[i] = v;
	end
	return s;
end

function module.ArrayCopyOnCondition(t, c)
	local s = {};
	for i, v in pairs(t) do
		if c(v) then
			table.insert(s, v);
		end
	end
	return s;
end

module.ShallowCopy = module.ShallowTableCopy;


Prompt: -- Gets an int and updates time left

Response:
function DisplayManager.updateTime(timeToUpdate)
	timeLeft.Value = timeToUpdate
end


Prompt: -- DONT TOUCH ANYTHING

Response:
function ChangeMe(hit)
	if hit.Parent == nil then return end
	if (hit.Parent:findFirstChild("Humanoid") == nil) then return end
	local human = hit.Parent:findFirstChild("Humanoid")
	local char = hit.Parent
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if (human ~= nil) and debounce == false then
		debounce = true
		originals = char:getChildren()
		for w = 1, #originals do
			if originals[w].className == "CharacterMesh" then
				originals[w]:remove()
			end
		end
		meshes = script:getChildren()
		for y = 1, #meshes do
			copy = meshes[y]:clone()
			copy.Parent = char
		end
	end
	wait(0)
	debounce = true
end

script.Parent.Touched:connect(ChangeMe)


Prompt: --//Setup//--

Response:
local Holder = script.Parent

local Button = Holder.IconButton

local SettingsMenu = Holder.Parent.Parent.SettingMenuHolder


Prompt: -- organises springs by speed and damping, for batch processing

Response: local springBuckets: {[number]: {[number]: Types.Set<Spring>}} = {}


Prompt: --Please do not touch anything below unless you know what you're doing

Response:
script.Parent.Parent:WaitForChild("CarSeat")
local seat = script.Parent.Parent.CarSeat.Value

function find(i)
	for _,v in pairs(i:GetChildren()) do
		if v.Name == "Hitbox" then v.CanCollide = true end
		find(v)
	end
end

find(seat.Parent)


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

Response:
local function toggleWindow()
	if window.Visible then
		-- Close the window by tweening back to the button position and size
				window.Visible = false
	end
end


Prompt: --------LEFT DOOR --------

Response:
game.Workspace.doorleft.l11.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l22.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l33.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l41.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l52.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l63.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)
game.Workspace.doorleft.l71.BrickColor = BrickColor.new(game.Workspace.Lighting.secondary.Value)

game.Workspace.doorleft.l43.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l61.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l53.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l72.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l62.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l51.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l21.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l31.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l12.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l13.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l32.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l23.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l42.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)
game.Workspace.doorleft.l73.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)

game.Workspace.doorleft.pillar.BrickColor = BrickColor.new(game.Workspace.Lighting.defaultlights.Value)


Prompt: --- Sets the command bar visible or not

Response:
function Window:SetVisible(visible)
	Gui.Visible = visible

	if visible then
		Entry.TextBox:CaptureFocus()
		self:SetEntryText("")
	else
		Entry.TextBox:ReleaseFocus()
		self.AutoComplete:Hide()
	end
end


Prompt: --Tweening Size Function

Response:
local tweenSize = function(part, duration, direction, goal)

	local tween = tweenService:Create(part,
		TweenInfo.new(duration, Enum.EasingStyle.Sine, direction),
		{Size = goal}
	)

	tween:Play()

	return tween
end


Prompt:
--[=[
	@param name string
	@param inboundMiddleware ServerMiddleware?
	@param outboundMiddleware ServerMiddleware?
	@return RemoteSignal

	Creates a signal that can be used to fire data to the clients
	or receive data from the clients.

	```lua
	local mySignal = serverComm:CreateSignal("MySignal")

	-- Examples of firing in different ways (see docs for RemoteSignal for further info):
	mySignal:Fire(somePlayer, "Hello world")
	mySignal:FireAll("Hi there")
	mySignal:FireExcept(somePlayer, "Hello everyone except " .. somePlayer.Name)
	mySignal:FireFilter(function(player) return player.Team == someCoolTeam end, "Hello cool team")

	-- Example of listening for clients to send data:
	mySignal:Connect(function(player, message)
		print("Got a message from " .. player.Name .. ":", message)
	end)
	```
]=]

Response:
function ServerComm:CreateSignal(name: string, inboundMiddleware: Types.ServerMiddleware?, outboundMiddleware: Types.ServerMiddleware?)
	return Comm.CreateSignal(self._instancesFolder, name, inboundMiddleware, outboundMiddleware)
end


Prompt: --Kills users even if they have a shield

Response:
function module:ExecuteBehaviour(brickTouched, character)
	if character:FindFirstChild("Humanoid") ~= nil then
		if character.Humanoid.Health > 0 then
			character.Humanoid.Health = 0
		end
	end
end

return module


Prompt: --For R15 avatars

Response:
Animations = {
	R15Slash = 522635514,
	R15Lunge = 522638767
}

Damage = DamageValues.BaseDamage

Sounds = {
	Slash = Handle:WaitForChild("SwordSlash"),
	Lunge = Handle:WaitForChild("SwordLunge"),
	Unsheath = Handle:WaitForChild("Unsheath")
}

ToolEquipped = false


Response:
local Tooltip = {}

function Tooltip:Set(Text: string)
	ChangeId += 1

	Frame:WaitForChild("TextLabel").Text = Text
	Frame.GroupTransparency = 1
	Frame.Visible = true
	Tween:Play(Frame, {0.3, "Exponential"}, {GroupTransparency = 0})
	Tween:Play(Frame:WaitForChild("UIStroke"), {0.3, "Exponential"}, {Transparency = 0})
end

function Tooltip:Clear()
	local Id = ChangeId

	Tween:Play(Frame:WaitForChild("UIStroke"), {0.3, "Exponential"}, {Transparency = 1})
	Tween:Play(Frame, {0.3, "Exponential"}, {GroupTransparency = 1}).Completed:Once(function()
		if ChangeId == Id then
			Frame.Visible = false
		end
	end)
end

local function GetTooltipPosition(): UDim2
	local MouseLocation = UserInputService:GetMouseLocation()
	local ViewportSize = workspace.CurrentCamera.ViewportSize
	local TooltipSize = Frame:WaitForChild("TextLabel").AbsoluteSize

	return UDim2.fromOffset(
		math.clamp(MouseLocation.X + 16, 0, ViewportSize.X - (TooltipSize.X+24)),
		math.clamp(MouseLocation.Y + 16, 0, ViewportSize.Y - (TooltipSize.Y+24))
	)
end


Prompt: --------------------------CHARACTER CONTROL-------------------------------

Response:
local CurrentIgnoreList

local function GetCharacter()
	return Player and Player.Character
end

local function GetTorso()
	local humanoid = findPlayerHumanoid(Player)
	return humanoid and humanoid.RootPart
end

local function getIgnoreList()
	if CurrentIgnoreList then
		return CurrentIgnoreList
	end
	CurrentIgnoreList = {}
	table.insert(CurrentIgnoreList, GetCharacter())
	return CurrentIgnoreList
end


Prompt: --//R//--

Response:
if script.Parent.Gear.Value == -1 then
if carSeat.Throttle == 1 then
carSeat.Parent.Parent.RFW.VS.Throttle = -1
carSeat.Parent.Parent.LFW.VS.Throttle = -1
carSeat.Parent.Parent.RRW.VS.Throttle = -1
carSeat.Parent.Parent.LRW.VS.Throttle = -1
carSeat.Parent.Parent.RFW.VS.MaxSpeed = 20
carSeat.Parent.Parent.LFW.VS.MaxSpeed = 20
carSeat.Parent.Parent.RRW.VS.MaxSpeed = 20
carSeat.Parent.Parent.LRW.VS.MaxSpeed = 20
else
carSeat.Parent.Parent.RFW.VS.Throttle = 0
carSeat.Parent.Parent.LFW.VS.Throttle = 0
carSeat.Parent.Parent.RRW.VS.Throttle = 0
carSeat.Parent.Parent.LRW.VS.Throttle = 0
carSeat.Parent.Parent.RFW.VS.MaxSpeed = 20
carSeat.Parent.Parent.LFW.VS.MaxSpeed = 20
carSeat.Parent.Parent.RRW.VS.MaxSpeed = 20
carSeat.Parent.Parent.LRW.VS.MaxSpeed = 20
end

if carSeat.Throttle == 1 then
carSeat.Parent.Parent.RRW.VS.Torque = tq.Value/2
carSeat.Parent.Parent.RFW.VS.Torque = tq.Value*2.4
carSeat.Parent.Parent.LRW.VS.Torque = tq.Value/2
carSeat.Parent.Parent.LFW.VS.Torque = tq.Value*2.4
elseif carSeat.Throttle == 0 and carSeat.Steer == 0 then
carSeat.Parent.Parent.RRW.VS.Torque = cst.Value
carSeat.Parent.Parent.RFW.VS.Torque = cst.Value
carSeat.Parent.Parent.LRW.VS.Torque = cst.Value
carSeat.Parent.Parent.LFW.VS.Torque = cst.Value
	end
end


Prompt:
-- ClientRemoteProperty
-- Stephen Leitnick
-- January 07, 2021


Prompt: --Let the world load before starting

Response:
wait(1)

function Render(Character)

	ViewPort:ClearAllChildren()
	--Render the character
	local Char = instance("Model")
		Char.Name = ""
		Char.Parent = ViewPort
	RenderHumanoid(Character,Char)
end

function module:MakeDupe (Character, V)
	--Handle changes
	-- These cause disapear
	--Character.DescendantAdded:Connect(Render)
	--Character.DescendantRemoving:Connect(Render)

	--Initialize

	if (V) then
		ViewPort = V;
		ViewPort.CurrentCamera = Camera;
	end

	Render(Character);

	local CameraUpdater = RunService.Heartbeat:Connect(function()
		Character = Player.Character;
		if Character:FindFirstChild("HumanoidRootPart") then
			Camera.CFrame =  cf(Character.HumanoidRootPart.CFrame:toWorldSpace(Offset).p, Character.HumanoidRootPart.CFrame.p)
		end
	end)

end

return module;


Prompt: -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote

Response:
local emoteNames = { wave = false, point = false, dance = true, dance2 = true, dance3 = true, laugh = false, cheer = false}

local PreloadAnimsUserFlag = false
local PreloadedAnims = {}
local successPreloadAnim, msgPreloadAnim = pcall(function()
	PreloadAnimsUserFlag = UserSettings():IsUserFeatureEnabled("UserPreloadAnimations")
end)
if not successPreloadAnim then
	PreloadAnimsUserFlag = false
end

math.randomseed(tick())

function findExistingAnimationInSet(set, anim)
	if set == nil or anim == nil then
		return 0
	end

	for idx = 1, set.count, 1 do
		if set[idx].anim.AnimationId == anim.AnimationId then
			return idx
		end
	end

	return 0
end

function configureAnimationSet(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 = 0
		for _, childPart in pairs(config:GetChildren()) do
			if (childPart:IsA("Animation")) then
				local newWeight = 1
				local weightObject = childPart:FindFirstChild("Weight")
				if (weightObject ~= nil) then
					newWeight = weightObject.Value
				end
				animTable[name].count = animTable[name].count + 1
				idx = animTable[name].count
				animTable[name][idx] = {}
				animTable[name][idx].anim = childPart
				animTable[name][idx].weight = newWeight
				animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
				table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
				table.insert(animTable[name].connections, childPart.ChildAdded:connect(function(property) configureAnimationSet(name, fileList) end))
				table.insert(animTable[name].connections, childPart.ChildRemoved:connect(function(property) configureAnimationSet(name, fileList) end))
			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
		end
	end

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


Prompt: --Handles behaviours

Response:
local function characterTouchedBrick(partTouched)
	local behaviours = partTouched:FindFirstChild("Behaviours")
	if behaviours ~= nil then
		behaviours = behaviours:GetChildren()
		for i = 1, #behaviours do
			if behaviours[i].Value == true then
				game.ReplicatedStorage.RemoteEvents.ExecuteBehaviour:FireServer(player.Character, partTouched, behaviours[i].Name)
			end
		end
	end
end


Response:
run_service.RenderStepped:Connect(function()
	tween_service:Create(bound, info, {Position = UDim2.new(.5, mouse.X / 40, .1,  mouse.Y / 8)}):Play()
end)

frame.MouseEnter:Connect(function()
	inui = true
end)

frame.MouseLeave:Connect(function()
	inui = false
end)


Prompt:
--[[

Dax,

See the MeleeScript.

]]

Response:
local canmelee = true;
local tool = script.Parent;

function onKeyDown(key)
	key:lower();
	if key == "v" then
		if canmelee == false then
			return;
		end

		tool.Melee:play()

		canmelee = false;

		local rgrip = tool.Parent["Right Arm"].RightGrip;

		script.melee.Value = true;

		for i = 1,6 do
			rgrip.C1 = rgrip.C1 * CFrame.fromEulerAnglesXYZ(-0.55,0,0);
			wait();
		end

		wait(0.25);

		for i = 1, 6 do
			rgrip.C1 = rgrip.C1 * CFrame.fromEulerAnglesXYZ(0.55,0,0);
			wait();
		end

		script.melee.Value = false;

		wait(0.5);

		canmelee = true;
	end
end

function onSelect(mouse)
	mouse.KeyDown:connect(onKeyDown);
end

function blow(hit)
	local humanoid = hit.Parent:findFirstChild("Humanoid")
	if not humanoid then return end
	local vCharacter = Tool.Parent
	local vPlayer = game.Players:playerFromCharacter(vCharacter)
	local hum = vCharacter:findFirstChild("Humanoid") -- non-nil if tool held by a character
	if humanoid ~= hum and hum ~= nil and game.Players:playerFromCharacter(humanoid.Parent) and game.Players:playerFromCharacter(humanoid.Parent).TeamColor~=cc then
		tagHumanoid(humanoid, vPlayer)
		humanoid:TakeDamage(300)
		wait(1)
		untagHumanoid(humanoid)
	end
end

tool.Equipped:connect(onSelect);


Prompt: --Activate Function

Response:
tool.Activated:connect(function()
	--Activate Function 1
	if not debounce then
		debounce = true
		tool.TimeStopSFX.Playing = true
		tool.TimeStop.Playing = true
		color.Enabled = true
		wait(5)
		tool.TimeResumeSFX.Playing = true
		wait(0.5)
		tool.TimeResume.Playing = true
		wait(1.5)
		color.Enabled = false
		debounce = false
		wait(5)
		debounce = true
	end
end)


Prompt: --[[ The Module ]]

Response:
--
local BaseCamera = require(script.Parent:WaitForChild("BaseCamera"))
local OrbitalCamera = setmetatable({}, BaseCamera)
OrbitalCamera.__index = OrbitalCamera

function OrbitalCamera.new()
	local self = setmetatable(BaseCamera.new(), OrbitalCamera)

	self.lastUpdate = tick()

	-- OrbitalCamera-specific members
	self.changedSignalConnections = {}
	self.refAzimuthRad = nil
	self.curAzimuthRad = nil
	self.minAzimuthAbsoluteRad = nil
	self.maxAzimuthAbsoluteRad = nil
	self.useAzimuthLimits = nil
	self.curElevationRad = nil
	self.minElevationRad = nil
	self.maxElevationRad = nil
	self.curDistance = nil
	self.minDistance = nil
	self.maxDistance = nil

	self.gamepadDollySpeedMultiplier = 1

	self.lastUserPanCamera = tick()

	self.externalProperties = {}
	self.externalProperties["InitialDistance"] 	= 25
	self.externalProperties["MinDistance"] 		= 10
	self.externalProperties["MaxDistance"] 		= 100
	self.externalProperties["InitialElevation"] 	= 35
	self.externalProperties["MinElevation"] 		= 35
	self.externalProperties["MaxElevation"] 		= 35
	self.externalProperties["ReferenceAzimuth"] 	= -45	-- Angle around the Y axis where the camera starts. -45 offsets the camera in the -X and +Z directions equally
	self.externalProperties["CWAzimuthTravel"] 	= 90	-- How many degrees the camera is allowed to rotate from the reference position, CW as seen from above
	self.externalProperties["CCWAzimuthTravel"] 	= 90	-- How many degrees the camera is allowed to rotate from the reference position, CCW as seen from above
	self.externalProperties["UseAzimuthLimits"] 	= false -- Full rotation around Y axis available by default
	self:LoadNumberValueParameters()

	return self
end

function OrbitalCamera:LoadOrCreateNumberValueParameter(name: string, valueType, updateFunction)
	local valueObj = script:FindFirstChild(name)

	if valueObj and valueObj:isA(valueType) then
		-- Value object exists and is the correct type, use its value
		self.externalProperties[name] = valueObj.Value
	elseif self.externalProperties[name] ~= nil then
		-- Create missing (or replace incorrectly-typed) valueObject with default value
		valueObj = Instance.new(valueType)
		valueObj.Name = name
		valueObj.Parent = script
		valueObj.Value = self.externalProperties[name]
	else
		return
	end

	if updateFunction then
		if self.changedSignalConnections[name] then
			self.changedSignalConnections[name]:Disconnect()
		end
		self.changedSignalConnections[name] = valueObj.Changed:Connect(function(newValue)
			self.externalProperties[name] = newValue
			updateFunction(self)
		end)
	end
end

function OrbitalCamera:SetAndBoundsCheckAzimuthValues()
	self.minAzimuthAbsoluteRad = math.rad(self.externalProperties["ReferenceAzimuth"]) - math.abs(math.rad(self.externalProperties["CWAzimuthTravel"]))
	self.maxAzimuthAbsoluteRad = math.rad(self.externalProperties["ReferenceAzimuth"]) + math.abs(math.rad(self.externalProperties["CCWAzimuthTravel"]))
	self.useAzimuthLimits = self.externalProperties["UseAzimuthLimits"]
	if self.useAzimuthLimits then
		self.curAzimuthRad = math.max(self.curAzimuthRad, self.minAzimuthAbsoluteRad)
		self.curAzimuthRad = math.min(self.curAzimuthRad, self.maxAzimuthAbsoluteRad)
	end
end

function OrbitalCamera:SetAndBoundsCheckElevationValues()
	-- These degree values are the direct user input values. It is deliberate that they are
	-- ranged checked only against the extremes, and not against each other. Any time one
	-- is changed, both of the internal values in radians are recalculated. This allows for
	-- A developer to change the values in any order and for the end results to be that the
	-- internal values adjust to match intent as best as possible.
	local minElevationDeg = math.max(self.externalProperties["MinElevation"], MIN_ALLOWED_ELEVATION_DEG)
	local maxElevationDeg = math.min(self.externalProperties["MaxElevation"], MAX_ALLOWED_ELEVATION_DEG)

	-- Set internal values in radians
	self.minElevationRad = math.rad(math.min(minElevationDeg, maxElevationDeg))
	self.maxElevationRad = math.rad(math.max(minElevationDeg, maxElevationDeg))
	self.curElevationRad = math.max(self.curElevationRad, self.minElevationRad)
	self.curElevationRad = math.min(self.curElevationRad, self.maxElevationRad)
end

function OrbitalCamera:SetAndBoundsCheckDistanceValues()
	self.minDistance = self.externalProperties["MinDistance"]
	self.maxDistance = self.externalProperties["MaxDistance"]
	self.curDistance = math.max(self.curDistance, self.minDistance)
	self.curDistance = math.min(self.curDistance, self.maxDistance)
end


Prompt: -- Change cooldown based on speed

Response:
humanoid:GetPropertyChangedSignal("WalkSpeed"):Connect(function()
    if humanoid.WalkSpeed <= 16 then
        cooldown = defaultcooldown
    else
        cooldown = defaultcooldown / 2
    end
end)


Prompt: --Core Helicopter Parts--

Response:
local body = script.Parent.Body
local myRoot = script.Parent.HumanoidRootPart
local myHuman = script.Parent.Humanoid
while myHuman:GetState() ~= Enum.HumanoidStateType.Physics do
	myHuman:ChangeState(Enum.HumanoidStateType.Physics)
	wait()
end


Prompt:
--[[ << GAMEPASS PERMISSIONS >>
Format:  [GamepassId] = "PermissionName" OR PermissionNumber ;																																													]]

Response:
Asset_Permissions={
	[0] = "Mod";
}																																																											;


Prompt: --[[Weight and CG]]

Response:
	Tune.Weight			= 1500		-- Total weight (in pounds)
	Tune.WeightBSize	= {			-- Size of weight brick (dimmensions in studs ; larger = more stable)
	 --[[Width]]		6		,
	 --[[Height]]		3.5		,
	 --[[Length]]		14		}
	Tune.WeightDist		= 100		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= 1		-- Center of gravity height (studs relative to median of all wheels)
	Tune.WBVisible		= false		-- Makes the weight brick visible

	--Unsprung Weight
	Tune.FWheelDensity	= .1		-- Front Wheel Density
	Tune.RWheelDensity	= .1		-- Rear Wheel Density
	Tune.FWLgcyDensity	= 1			-- Front Wheel Density [PGS OFF]
	Tune.RWLgcyDensity	= 1			-- Rear Wheel Density [PGS OFF]

	Tune.AxleSize		= 2			-- Size of structural members (larger = more stable/carry more weight)
	Tune.AxleDensity	= .1		-- Density of structural members


Prompt: --Rescripted by Luckymaxer

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

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

Speed = 50
Duration = 3.5

NozzleOffset = Vector3.new(0, 0.4, -1.1)

Sounds = {
	Fire = Handle:WaitForChild("Fire"),
	Reload = Handle:WaitForChild("Reload"),
	HitFade = Handle:WaitForChild("HitFade")
}

PointLight = Handle:WaitForChild("PointLight")

ServerControl = (Tool:FindFirstChild("ServerControl") or Instance.new("RemoteFunction"))
ServerControl.Name = "ServerControl"
ServerControl.Parent = Tool

ClientControl = (Tool:FindFirstChild("ClientControl") or Instance.new("RemoteFunction"))
ClientControl.Name = "ClientControl"
ClientControl.Parent = Tool

ServerControl.OnServerInvoke = (function(player, Mode, Value, arg)
	if player ~= Player or Humanoid.Health == 0 or not Tool.Enabled then
		return
	end
	if Mode == "Click" and Value then
		Activated(arg)
	end
end)

function InvokeClient(Mode, Value)
	pcall(function()
		ClientControl:InvokeClient(Player, Mode, Value)
	end)
end

function TagHumanoid(humanoid, player)
	local Creator_Tag = Instance.new("ObjectValue")
	Creator_Tag.Name = "creator"
	Creator_Tag.Value = player
	Debris:AddItem(Creator_Tag, 2)
	Creator_Tag.Parent = humanoid
end

function UntagHumanoid(humanoid)
	for i, v in pairs(humanoid:GetChildren()) do
		if v:IsA("ObjectValue") and v.Name == "creator" then
			v:Destroy()
		end
	end
end

function FindCharacterAncestor(Parent)
	if Parent and Parent ~= game:GetService("Workspace") then
		local humanoid = Parent:FindFirstChild("Humanoid")
		if humanoid then
			return Parent, humanoid
		else
			return FindCharacterAncestor(Parent.Parent)
		end
	end
	return nil
end

function GetTransparentsRecursive(Parent, PartsTable)
	local PartsTable = (PartsTable or {})
	for i, v in pairs(Parent:GetChildren()) do
		local TransparencyExists = false
		pcall(function()
			local Transparency = v["Transparency"]
			if Transparency then
				TransparencyExists = true
			end
		end)
		if TransparencyExists then
			table.insert(PartsTable, v)
		end
		GetTransparentsRecursive(v, PartsTable)
	end
	return PartsTable
end

function SelectionBoxify(Object)
	local SelectionBox = Instance.new("SelectionBox")
	SelectionBox.Adornee = Object
	SelectionBox.Color = BrickColor.new("Toothpaste")
	SelectionBox.Parent = Object
	return SelectionBox
end

local function Light(Object)
	local Light = PointLight:Clone()
	Light.Range = (Light.Range + 2)
	Light.Parent = Object
end

function FadeOutObjects(Objects, FadeIncrement)
	repeat
		local LastObject = nil
		for i, v in pairs(Objects) do
			v.Transparency = (v.Transparency + FadeIncrement)
			LastObject = v
		end
		wait()
	until LastObject.Transparency >= 1 or not LastObject
end

function Dematerialize(character, humanoid, FirstPart)
	if not character or not humanoid then
		return
	end

	humanoid.WalkSpeed = 0

	local Parts = {}

	for i, v in pairs(character:GetChildren()) do
		if v:IsA("BasePart") then
			v.Anchored = true
			table.insert(Parts, v)
		elseif v:IsA("LocalScript") or v:IsA("Script") then
			v:Destroy()
		end
	end

	local SelectionBoxes = {}

	local FirstSelectionBox = SelectionBoxify(FirstPart)
	Light(FirstPart)
	wait(0.05)

	for i, v in pairs(Parts) do
		if v ~= FirstPart then
			table.insert(SelectionBoxes, SelectionBoxify(v))
			Light(v)
		end
	end

	local ObjectsWithTransparency = GetTransparentsRecursive(character)
	FadeOutObjects(ObjectsWithTransparency, 0.1)

	wait(0.5)

	character:BreakJoints()
	humanoid.Health = 0

	Debris:AddItem(character, 2)

	local FadeIncrement = 0.05
	Delay(0.2, function()
		FadeOutObjects({FirstSelectionBox}, FadeIncrement)
		if character and character.Parent then
			character:Destroy()
		end
	end)
	FadeOutObjects(SelectionBoxes, FadeIncrement)
end

function Touched(Projectile, Hit)
	if not Hit or not Hit.Parent then
		return
	end
	local character, humanoid = FindCharacterAncestor(Hit)
	if character and humanoid and character ~= Character then
		local ForceFieldExists = false
		for i, v in pairs(character:GetChildren()) do
			if v:IsA("ForceField") then
				ForceFieldExists = true
			end
		end
		if not ForceFieldExists then
			if Projectile then
				local HitFadeSound = Projectile:FindFirstChild(Sounds.HitFade.Name)
				local torso = humanoid.Torso
				if HitFadeSound and torso then
					HitFadeSound.Parent = torso
					HitFadeSound:Play()
				end
			end
			Dematerialize(character, humanoid, Hit)
		end
		if Projectile and Projectile.Parent then
			Projectile:Destroy()
		end
	end
end

function Equipped()
	Character = Tool.Parent
	Player = Players:GetPlayerFromCharacter(Character)
	Humanoid = Character:FindFirstChild("Humanoid")
	if not Player or not Humanoid or Humanoid.Health == 0 then
		return
	end
end

function Activated(target)
	if Tool.Enabled and Humanoid.Health > 0 then
		Tool.Enabled = false

		InvokeClient("PlaySound", Sounds.Fire)

		local HandleCFrame = Handle.CFrame
		local FiringPoint = HandleCFrame.p + HandleCFrame:vectorToWorldSpace(NozzleOffset)
		local ShotCFrame = CFrame.new(FiringPoint, target)

		local LaserShotClone = BaseShot:Clone()
		LaserShotClone.CFrame = ShotCFrame + (ShotCFrame.lookVector * (BaseShot.Size.Z / 2))
		local BodyVelocity = Instance.new("BodyVelocity")
		BodyVelocity.velocity = ShotCFrame.lookVector * Speed
		BodyVelocity.Parent = LaserShotClone
		LaserShotClone.Touched:connect(function(Hit)
			if not Hit or not Hit.Parent then
				return
			end
			Touched(LaserShotClone, Hit)
		end)
		Debris:AddItem(LaserShotClone, Duration)
		LaserShotClone.Parent = game:GetService("Workspace")

		wait(1) -- FireSound length

		InvokeClient("PlaySound", Sounds.Reload)

		wait(1.25) -- ReloadSound length

		Tool.Enabled = true
	end
end

function Unequipped()

end

BaseShot = Instance.new("Part")
BaseShot.Name = "Effect"
BaseShot.BrickColor = BrickColor.new("Toothpaste")
BaseShot.Material = Enum.Material.Plastic
BaseShot.Shape = Enum.PartType.Block
BaseShot.TopSurface = Enum.SurfaceType.Smooth
BaseShot.BottomSurface = Enum.SurfaceType.Smooth
BaseShot.FormFactor = Enum.FormFactor.Custom
BaseShot.Size = Vector3.new(0.2, 0.2, 3)
BaseShot.CanCollide = false
BaseShot.Locked = true
SelectionBoxify(BaseShot)
Light(BaseShot)
BaseShotSound = Sounds.HitFade:Clone()
BaseShotSound.Parent = BaseShot

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


Prompt: --DO NOT DELETE, THIS WILL BREAK THE GUN

Response:
function Stick(x, y)
	local W = Instance.new("Weld")
	W.Part0 = x
	W.Part1 = y
	local CJ = CFrame.new(x.Position)
	local C0 = x.CFrame:inverse()*CJ
	local C1 = y.CFrame:inverse()*CJ
	W.C0 = C0
	W.C1 = C1
	W.Parent = x
end

function Get(A)
	if A.ClassName == ("Part") then
		Stick(script.Parent.Handle, A)
		--A.Anchored = false
	else
		local C = A:GetChildren()
		for i=1, #C do
		Get(C[i])
		end
	end
end

function Finale()
	Get(script.Parent)
end

script.Parent.Equipped:connect(Finale)
script.Parent.Unequipped:connect(Finale)
Finale()


Prompt:
--[[
By AxisAngle, (Trey Reynolds)
Documentation
http://www.roblox.com/item.aspx?id=227509468

Region constructors:
	Region Region.new(CFrame RegionCFrame, Vector3 RegionSize)
		>Returns a new Region object

	Region Region.FromPart(Instance Part)
		>Returns a new Region objects

Region methods:
	table Region:Cast([Instance or table Ignore])
		>Returns all parts in the Region, ignoring the Ignore

	bool Region:CastPart(Instance Part)
		>Returns true if Part is within Region, false otherwise

	table Region:CastParts(table Parts)
		>Returns a table of all parts within the region

	bool Region:CastPoint(Vector3 Point)
		>Returns true if Point intersects Region, false otherwise

	bool Region:CastSphere(Vector3 SphereCenter, number SphereRadius)
		>Returns true if Sphere intersects Region, false otherwise

	bool Region:CastBox(CFrame BoxCFrame, Vector3 BoxSize)
		>Returns true if Box intersects Region, false otherwise

Region properties: (Regions are mutable)
	CFrame	CFrame
	Vector3	Size
	Region3	Region3

Region functions:
	Region3 Region.Region3BoundingBox(CFrame BoxCFrame, Vector3 BoxSize)
		>Returns the enclosing boundingbox of Box

	table Region.FindAllPartsInRegion3(Region3 Region3, [Instance or table Ignore])
		>Returns all parts within a Region3 of any size

	bool Region.BoxPointCollision(CFrame BoxCFrame, Vector3 BoxSize, Vector3 Point)
		>Returns true if the Point is intersecting the Box, false otherwise

	bool Region.BoxSphereCollision(CFrame BoxCFrame, Vector3 BoxSize, Vector3 SphereCenter, number SphereRadius)
		>Returns true if the Sphere is intersecting the Box, false otherwise

	bool Region.BoxCollision(CFrame Box0CFrame, Vector3 Box0Size, CFrame Box1CFrame, Vector3 Box1Size, [bool AssumeTrue])
		>Returns true if the boxes are intersecting, false otherwise
		If AssumeTrue is left blank, it does the full check to see if Box0 is intersecting Box1
		If AssumeTrue is true, it skips the heavy check and assumes that any part that could possibly be in the Region is
		If AssumeTrue is false, it skips the heavy check and assumes that any part that could possible be outside the Region is

	bool Region.CastPoint(Vector3 Point, [Instance or table Ignore])
		>Returns true if the point intersects a part, false otherwise
]]

Response:
local Region={}

local BoxPointCollision do
	local VecDiv=CFrame.new().pointToObjectSpace--Right Division, yo.
	function BoxPointCollision(CFrame,Size,Point)
		local Relative	=VecDiv(CFrame, Point)
		local sx,sy,sz	=Size.x/2,Size.y/2,Size.z/2
		local rx,ry,rz	=Relative.x,Relative.y,Relative.z
		return			rx*rx<sx*sx and ry*ry<sy*sy and rz*rz<sz*sz
	end
end

local BoxSphereCollision do
	local VecDiv=CFrame.new().pointToObjectSpace--Right Division, yo.
	function BoxSphereCollision(CFrame,Size,Center,Radius)
		local Relative	=VecDiv(CFrame,Center)
		local sx,sy,sz	=Size.x/2,Size.y/2,Size.z/2
		local rx,ry,rz	=Relative.x,Relative.y,Relative.z
		local dx		=rx>sx and rx-sx--Faster than if statement
						or rx<-sx and rx+sx
						or 0
		local dy		=ry>sy and ry-sy
						or ry<-sy and ry+sy
						or 0
		local dz		=rz>sz and rz-sz
						or rz<-sz and rz+sz
						or 0
		return dx*dx+dy*dy+dz*dz<Radius*Radius
	end
end


Prompt: -- Remote Functions Client -> Server

Response:
	-- Getters
		RF_getPlayerData.OnServerInvoke = function(player)
			local cahced = database.GetCachedProfile(player.UserId)
			return cahced
		end
		RF_vehicleSpawnRequest.OnServerInvoke = function(player) return vehicles.SpawnPlayerVehicle(player, 1) end
		RF_vehicleRemoveRequest.OnServerInvoke = function(player) return vehicles.RemovePlayerVehicle(player) end
		RF_redeemCode.OnServerInvoke = function(player, code) return twitter.RedeemCode(player, code)  end

		-- Weapons
		RF_GetUnlockedWeapons.OnServerInvoke = function(player) return weapons.GetUnlockedWeapons(player)  end
		RF_GetWeaponInfo.OnServerInvoke = function(player, weaponID) return weapons.GetWeaponInfo(player, weaponID) end
		RF_GetEquipedWeapon.OnServerInvoke = function(player) return weapons.GetEquipedWeapon(player) end

		RF_EquipWeapon.OnServerInvoke = function(player,weaponID) return weapons.EquipWeapon(player, weaponID) end
		RF_UnEquipWeapon.OnServerInvoke = function(player) return weapons.UnEquipWeapon(player) end
		RF_BuyWeapon.OnServerInvoke = function(player, weaponID) return weapons.BuyWeapon(player, weaponID) end
		-- Bullet
		RF_DamageVehicle.OnServerInvoke = function(player, bullet, hitVehicle) return damageReplicator.ApplyDamageToVehicle(bullet,hitVehicle) end


Prompt: -- stops all playin anims

Response:
module.stopalltracks = function(hum, fold)
	local AnimationTracks = hum:GetPlayingAnimationTracks()
	local Fold =  fold

	local tab = {}

	if Fold then

		--
		for i, track in pairs (Fold:GetDescendants()) do
			if track:IsA('Animation') then
				tab[track.Name] = track.Name
				--table.insert(tab, track.Name)
			end
		end

		--print(tab)
		-- action
		for i, v in pairs(hum.Animator:GetPlayingAnimationTracks()) do
			if Fold:FindFirstChild(v.Name) and v.Name == Fold:FindFirstChild(v.Name).Name then
				v:Stop()
				--print("Fold found match: ",v," Table found ->", tab[v])
			end
		end

	else
		for i, track in pairs (AnimationTracks) do
			track:Stop()
		end
	end

end

module.StopAnim = function(hum,name)
	for i, v in pairs(hum.Animator:GetPlayingAnimationTracks()) do
		if v.Name == name then
			v:Stop()
		end
	end
end

module.LoadTrack = function(hum, anim)
	local animationTrack
	if hum:FindFirstChild("Animator") then
		animationTrack = hum.Animator:LoadAnimation(anim)
	else
		animationTrack = hum:LoadAnimation(anim)
	end

	--animationTrack:Play()

	return animationTrack
end

module.play = function(hum, anim)
	local char = hum.Parent

	local animationTrack = hum.Animator:LoadAnimation(anim)
	animationTrack:Play()

	return animationTrack

end


Prompt:
--[[
	Manually respawns characters when they die, used because
	Players.CharacterAutoLoads is false so that we can wait to spawn the character
	until their data is fully loaded.
--]]

Response:
local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")

local PlayerObjectsContainer = require(ServerStorage.Source.PlayerObjectsContainer)

local CharacterSpawner = {}

function CharacterSpawner.onPlayerAdded(player: Player)
	local characterLoadedWrapper = PlayerObjectsContainer.getCharacterLoadedWrapper(player)
	task.spawn(function()
		while player:IsDescendantOf(Players) do
			player:LoadCharacter()
			characterLoadedWrapper.died:Wait()
		end
	end)
end

return CharacterSpawner


Prompt:
--[=[
	Connects a handler to a ScriptSignal object.

	```lua
	ScriptSignal:Connect(function(text)
		print(text)
	end)

	ScriptSignal:Fire("Something")
	ScriptSignal:Fire("Something else")

	-- "Something" and then "Something else" are printed
	```

	@param handler (...: any) -> ()
	@return ScriptConnection
	@ignore
]=]

Response:
function ScriptSignal:Connect(
	handler: (...any) -> ()
): ScriptConnection

	assert(
		typeof(handler) == 'function',
		"Must be function"
	)

	if self._active ~= true then
		return setmetatable({
			Connected = false,
			_node = nil
		}, ScriptConnection)
	end

	local _head: ScriptConnectionNode? = self._head

	local node: ScriptConnectionNode = {
		_signal = self :: Class,
		_connection = nil,
		_handler = handler,

		_next = _head,
		_prev = nil
	}

	if _head ~= nil then
		_head._prev = node
	end

	self._head = node

	local connection = setmetatable({
		Connected = true,
		_node = node
	}, ScriptConnection)

	node._connection = connection

	return connection :: ScriptConnection
end


Prompt: --[[Dependencies]]

Response:
	local player = game.Players.LocalPlayer
	local mouse = player:GetMouse()
	local UserInputService = game:GetService("UserInputService")
	local bike = script.Parent.Bike.Value
	local _Tune = require(bike.Tuner)


Prompt: --	1 : Object to check collisions on, 2 : part name to look for.

Response: local newZone = flagZone.new(script.Parent, "Sphere", script.Parent.Hill.Flag, script.Parent.Hill.FlagLowerPoint, 0.1, 30)


Prompt:
-- So in the example above, the door will move thirty times, with a distance of 0.1 every 0.01 seconds.
-- Feel free to mess around with values to try and get the door moving as smoothly as possible.
-- Remember, if the door is say 3 studs wide, you will have to move it 3 studs, like in the example above 0.1 x 30 = 3

Response:
		wait(1) -- How long the door will remain open

		for i=1, 30 do
				p.CFrame = p.CFrame + Vector3.new(0, 0, -0.1)
				wait(.01)
				end


Prompt: -- productKey = "<Player.UserId>_<Number<PurchaseId>>"

Response:
local function processReceipt(receiptInfo: receiptInfo)
	local playerProductKey, purchased = `{receiptInfo.PlayerId}_{receiptInfo.PurchaseId}`, false
	local success, errorMessage

	success, errorMessage = pcall(function()
		purchased = purchaseHistoryStore:GetAsync(playerProductKey)
	end)

	assert(success, `Data store error: {errorMessage}`)

	if success and purchased then
		return Enum.ProductPurchaseDecision.PurchaseGranted
	end

	local success, isPurchaseRecorded = pcall(function()
		return purchaseHistoryStore:UpdateAsync(playerProductKey, function(alreadyPurchased): boolean?
			if alreadyPurchased then return true end

			local player = Players:GetPlayerByUserId(receiptInfo.PlayerId)
			if not player then return end

			local success, result = pcall(
				Functions.products[receiptInfo.ProductId],
				receiptInfo,
				player
			)

			assert((success and result), `Failed to process a product purchase for ProductId: {receiptInfo.ProductId} Player: {player} Error: {result}`)

			return true
		end)
	end)

	assert(success, 'Failed to process receipt due to data store error.')

	if isPurchaseRecorded then
		return Enum.ProductPurchaseDecision.PurchaseGranted
	end
	return Enum.ProductPurchaseDecision.NotProcessedYet
end

MarketplaceService.ProcessReceipt = processReceipt

return module


Prompt:
--local DataStoreService = game:GetService("DataStoreService") -- The data saving service
--local banSave = DataStoreService:GetDataStore("BannedPlayers") -- Our ban save

Response: local hammer = script.Parent -- The tool


Prompt:
---SG Is  Here---
---Please Dont Change Anything Can Dont Work If You Change--

Response:
local Part = script.Parent
Part.Touched:Connect(function(HIT)
	local H = HIT.Parent:FindFirstChild("Humanoid")
	if H then
		local player = game.Players:GetPlayerFromCharacter(HIT.Parent)
if player then
	local leaderstats = player:WaitForChild("leaderstats")
	local Currency = leaderstats:WaitForChild("Coins")
	local Selling = leaderstats:WaitForChild("Clicks")
		if Selling.Value > 0 then
			Currency.Value = Currency.Value + Selling.Value
			Selling.Value = 0
		end
end
end
end)


Response:
mouse.KeyDown:connect(function (key)
    key = string.lower(key)
        if key == "a" then
            	a = true
        elseif key == "d" then
                d = true
        elseif key == "w" then
                w = true
                rwd.Throttle = 1
				rwd.Torque = tq
				lwd.Throttle = 1
				lwd.Torque = ftq
				rrwd.Throttle = 1
				rrwd.Torque = ftq
				rwd.MaxSpeed = 210
				lwd.MaxSpeed = 210
				rrwd.MaxSpeed = 210
                carSeat.Throttle = 1
                carSeat.Torque = 0
                elseif key == "s" then
                s = true
                carSeat.Throttle = 0
                carSeat.Torque = 0
				rwd.Throttle = -1
				rwd.Torque = brk
				lwd.Throttle = -1
				lwd.Torque = brk
				rrwd.Throttle = -1
				rrwd.Torque = brk
				rwd.MaxSpeed = 25
				lwd.MaxSpeed = 25
				rrwd.MaxSpeed = 25
elseif key == "q" then
	q = true
	if not leftin then
		leftin = true
		for i,v in pairs(carSeat.Parent:GetChildren()) do
			coroutine.resume(coroutine.create(function()
				if v.Name == "LeftIndicator" then
					while leftin do
						script.Parent:WaitForChild("TickTock").Pitch = .8
						script.Parent.TickTock:Play()
						v.PointLight.Enabled = false
						v.BillboardGui.Enabled = false
						wait(0.5)
						script.Parent.TickTock.Pitch = .7
						script.Parent.TickTock:Play()
						v.BillboardGui.Enabled = true
						v.PointLight.Enabled = true
						wait(0.5)
					end
					v.PointLight.Enabled = false
					v.BillboardGui.Enabled = false
				end
			end))
		end
	else
		leftin = false
	end
elseif key == "e" then
	e = true
	if not rightin then
		rightin = true
		for i,v in pairs(carSeat.Parent:GetChildren()) do
			coroutine.resume(coroutine.create(function()
				if v.Name == "RightIndicator" then
					while rightin do
						script.Parent:WaitForChild("TickTock").Pitch = .8
						script.Parent.TickTock:Play()
						v.PointLight.Enabled = false
						v.BillboardGui.Enabled = false
						wait(0.5)
						script.Parent.TickTock.Pitch = .7
						script.Parent.TickTock:Play()
						v.BillboardGui.Enabled = true
						v.PointLight.Enabled = true
						wait(0.5)
					end
					v.PointLight.Enabled = false
					v.BillboardGui.Enabled = false
				end
			end))
		end
	else
		rightin = false
	    end
	end
end)

mouse.KeyUp:connect(function (key)
    key = string.lower(key)
        if key == "a" then
                print("a up")
                if d == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
                end
        elseif key == "d" then
                print("d up")
                if a == false then
                m.DesiredAngle = 0
                        n.DesiredAngle = m.DesiredAngle
end
        end
        a = false
        d = false
end)

mouse.KeyUp:connect(function (key)
    key = string.lower(key)
if key == "w" or key == "s" then
        rwd.Throttle = 0
        rwd.Torque = 0
	    lwd.Throttle = 0
		lwd.Torque = 0
		rrwd.Throttle = 0
		rrwd.Torque = 0

       carSeat.Throttle = 0
carSeat.Torque = cst
        end
end)

limitButton.MouseButton1Click:connect(function()


Prompt: --[[ Script Variables ]]

Response:
--
while not Players.LocalPlayer do
	wait()
end

local lastInputType = nil
local LocalPlayer = Players.LocalPlayer
local PlayerGui = LocalPlayer:WaitForChild('PlayerGui')
local IsTouchDevice = UserInputService.TouchEnabled
local UserMovementMode = IsTouchDevice and GameSettings.TouchMovementMode or GameSettings.ComputerMovementMode
local DevMovementMode = IsTouchDevice and LocalPlayer.DevTouchMovementMode or LocalPlayer.DevComputerMovementMode
local IsUserChoice = (IsTouchDevice and DevMovementMode == Enum.DevTouchMovementMode.UserChoice) or (DevMovementMode == Enum.DevComputerMovementMode.UserChoice)
local TouchGui = nil
local TouchControlFrame = nil
local IsModalEnabled = UserInputService.ModalEnabled
local BindableEvent_OnFailStateChanged = nil
local isJumpEnabled = false

local ControlState = {}
ControlState.Current = nil
function ControlState:SwitchTo(newControl)
	if ControlState.Current == newControl then return end

	if ControlState.Current then
		ControlState.Current:Disable()
	end

	ControlState.Current = newControl

	if ControlState.Current then
		ControlState.Current:Enable()
	end
end


Prompt: -- Detection mode enums

Response:
RaycastHitbox.DetectionMode = {
	Default = 1,
	PartMode = 2,
	Bypass = 3,
}


Prompt: --		chosenAngle = math.max(angle1, angle2)

Response:
	end

	return chosenAngle
end

function Roblox.getClosestPointOnLine(line0, line1, point, doClamp)
	local lineVec = line1 - line0
	local pointFromLine0 = point - line0

	local dotProduct = lineVec:Dot(pointFromLine0)
	local t = dotProduct / (lineVec.Magnitude ^ 2)
	if doClamp ~= false then
		t = math.clamp(t, 0, 1)
	end
	local pointOnLine = line0:Lerp(line1, t)
	return pointOnLine, t, (point - pointOnLine).Magnitude
end

function Roblox.getClosestPointOnLines(referencePoint, lines)
	local closestPoint, closestDist, closestLine, closestT = nil, math.huge, nil, 0
	for i = 1, #lines do
		local lineA, lineB = lines[i][1], lines[i][2]

		local point, t, dist = Roblox.getClosestPointOnLine(lineA, lineB, referencePoint)
		if dist < closestDist then
			closestPoint = point
			closestDist = dist
			closestLine = i
			closestT = t
		end
	end

	return closestPoint, closestDist, closestLine, closestT
end

function Roblox.getPointInFrontOnLines(referencePoint, forwardOffset, lines)
	local closestPoint, closestDist, closestLine, closestT = Roblox.getClosestPointOnLines(referencePoint, lines)
	if closestPoint then
		local pointOffset = closestPoint
		local offsetBudget = forwardOffset

		if closestLine == 1 and closestT == 0 then
			local beforeDist = (lines[1][1] - Roblox.getClosestPointOnLine(lines[1][1], lines[1][2], referencePoint, false)).Magnitude
			offsetBudget = offsetBudget - beforeDist
		end

		local lineDir = Vector3.new(0, 0, 0)
		while offsetBudget > 0 and closestLine <= #lines do
			local lineA, lineB = lines[closestLine][1], lines[closestLine][2]
			local lineVec = lineB - lineA
			local lineLength = lineVec.Magnitude
			local pointDistAlongLine = (pointOffset - lineA).Magnitude
			local distLeftOnLine = lineLength - pointDistAlongLine
			lineDir = lineVec.Unit

			if offsetBudget > distLeftOnLine then
				offsetBudget = offsetBudget - distLeftOnLine
				pointOffset = lineB
				closestLine = closestLine + 1
			else
				break
			end
		end
		pointOffset = pointOffset + lineDir * offsetBudget

		return pointOffset
	end
	return closestPoint
end

return Roblox


Prompt: ---Controller

Response:
local Controller=false
local UserInputService = game:GetService("UserInputService")
local LStickX = 0
local RStickX = 0
local RStickY = 0
local RTriggerValue = 0
local LTriggerValue = 0

local ButtonX = 0
local ButtonY = 0
local ButtonL1 = 0
local ButtonR1 = 0
local ButtonR3 = 0
local DPadUp = 0
function DealWithInput(input,IsRobloxFunction)
	if Controller then
		if input.KeyCode ==Enum.KeyCode.ButtonX then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonX=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonX=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonY then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonY=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonY=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonL1 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonL1=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonL1=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonR1 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonR1=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonR1=0
			end
		elseif input.KeyCode ==Enum.KeyCode.DPadLeft then
			if input.UserInputState == Enum.UserInputState.Begin then
				DPadUp=1
			elseif input.UserInputState == Enum.UserInputState.End then
				DPadUp=0
			end
		elseif input.KeyCode ==Enum.KeyCode.ButtonR3 then
			if input.UserInputState == Enum.UserInputState.Begin then
				ButtonR3=1
			elseif input.UserInputState == Enum.UserInputState.End then
				ButtonR3=0
			end
		end
		if input.UserInputType.Name:find("Gamepad") then --it's one of 4 gamepads
			if input.KeyCode == Enum.KeyCode.Thumbstick1 then
				LStickX = input.Position.X
			elseif input.KeyCode == Enum.KeyCode.Thumbstick2 then
				RStickX = input.Position.X
				RStickY = input.Position.Y
			elseif input.KeyCode == Enum.KeyCode.ButtonR2 then--right shoulder
				RTriggerValue = input.Position.Z
			elseif input.KeyCode == Enum.KeyCode.ButtonL2 then--left shoulder
				LTriggerValue = input.Position.Z
			end
		end
	end
end
UserInputService.InputBegan:connect(DealWithInput)
UserInputService.InputChanged:connect(DealWithInput)--keyboards don't activate with Changed, only Begin and Ended. idk if digital controller buttons do too
UserInputService.InputEnded:connect(DealWithInput)

car.DriveSeat.ChildRemoved:connect(function(child)
	if child.Name=="SeatWeld" then
		for i,v in pairs(Binded) do
			run:UnbindFromRenderStep(v)
		end
		workspace.CurrentCamera.CameraType=Enum.CameraType.Custom
		workspace.CurrentCamera.FieldOfView=70
		player.CameraMaxZoomDistance=200
	end
end)

function Camera()
	local cam=workspace.CurrentCamera
	local intcam=false
	local CRot=0
	local CBack=0
	local CUp=0
	local mode=0
	local look=0
	local camChange = 0
	local function CamUpdate()
		if not pcall (function()
			if camChange==0 and DPadUp==1 then
				intcam = not intcam
			end
			camChange=DPadUp
			if mode==1 then
				if math.abs(RStickX)>.1 then
					local sPos=1
					if RStickX<0 then sPos=-1 end
					if intcam then
						CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-80
					else
						CRot=sPos*math.abs(((math.abs(RStickX)-.1)/(.9)))*-90
					end
				else
					CRot=0
				end
				if math.abs(RStickY)>.1 then
					local sPos=1
					if RStickY<0 then sPos=-1 end
					if intcam then
						CUp=sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*30
					else
						CUp=math.min(sPos*math.abs(((math.abs(RStickY)-.1)/(.9)))*-75,30)
					end
				else
					CUp=0
				end
			else
				if CRot>look then
					CRot=math.max(look,CRot-20)
				elseif CRot<look then
					CRot=math.min(look,CRot+20)
				end
				CUp=0
			end
			if intcam then
				CBack=0
			else
				CBack=-180*ButtonR3
			end
			if intcam then
				cam.CameraSubject=player.Character.Humanoid
				cam.CameraType=Enum.CameraType.Scriptable
				cam.FieldOfView=90 + (car.DriveSeat.Velocity.Magnitude/22)
				player.CameraMaxZoomDistance=5
				local cf=car.Body.Cam.CFrame
				if ButtonR3==1 then
					cf=car.Body.RCam.CFrame
				end
				cam.CoordinateFrame=cf*CFrame.Angles(0,math.rad(CRot+CBack),0)*CFrame.Angles(math.rad(CUp),0,0)
			else
				cam.CameraSubject=car.DriveSeat
				cam.FieldOfView=70
				if mode==0 then
					cam.CameraType=Enum.CameraType.Custom
					player.CameraMaxZoomDistance=400
					run:UnbindFromRenderStep("CamUpdate")
				else
					cam.CameraType = "Scriptable"
					local pspeed = math.min(1,car.DriveSeat.Velocity.Magnitude/500)
					local cc = car.DriveSeat.Position+Vector3.new(0,8+(pspeed*2),0)-((car.DriveSeat.CFrame*CFrame.Angles(math.rad(CUp),math.rad(CRot+CBack),0)).lookVector*17)+(car.DriveSeat.Velocity.Unit*-7*pspeed)
					cam.CoordinateFrame = CFrame.new(cc,car.DriveSeat.Position)
				end
			end
		end) then
			cam.FieldOfView=70
			cam.CameraSubject=player.Character.Humanoid
			cam.CameraType=Enum.CameraType.Custom
			player.CameraMaxZoomDistance=400
			run:UnbindFromRenderStep("CamUpdate")
		end
	end
	local function ModeChange()
		if GMode~=mode then
			mode=GMode
			run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
		end
	end
	mouse.KeyDown:connect(function(key)
		if key=="z" then
			look=50
		elseif key=="x" then
			if intcam then
				look=-160
			else
				look=-180
			end
		elseif key=="c" then
			look=-50
		elseif key=="v" then
			run:UnbindFromRenderStep("CamUpdate")
			intcam=not intcam
			run:BindToRenderStep("CamUpdate",Enum.RenderPriority.Camera.Value,CamUpdate)
		end
	end)
	mouse.KeyUp:connect(function(key)
		if key=="z" and look==50 then
			look=0
		elseif key=="x" and (look==-160 or look==-180) then
			look=0
		elseif key=="c" and look==-50 then
			look=0
		end
	end)
	run:BindToRenderStep("CMChange",Enum.RenderPriority.Camera.Value,ModeChange)
	table.insert(Binded,"CamUpdate")
	table.insert(Binded,"CMChange")
end
Camera()

mouse.KeyDown:connect(function(key)
	if key=="b" then
		if GMode>=1 then
			GMode=0
		else
			GMode=GMode+1
		end
		if GMode==1 then
			Controller=true
		else
			Controller=false
		end
	end
end)


Prompt: -- UI elements

Response:
local intro = script.Parent:WaitForChild("Intro")
intro.Visible = true

wait(2)

game.Workspace.Camera.CameraType = Enum.CameraType.Scriptable
game.Workspace.Camera.CFrame = CFrame.new(game.Workspace.IntroTunnel.CameraOrigin.Position,game.Workspace.IntroTunnel.CameraFace.Position)

local topStatus = script.Parent:WaitForChild("TopStatus")
topStatus.Text = status.Value

status:GetPropertyChangedSignal("Value"):Connect(function()
	topStatus.Text = status.Value
end)

intro.Play.MouseButton1Click:Connect(function()
	intro.Visible = false
	topStatus.Visible = true
	game.ReplicatedStorage.MenuPlay:FireServer()
	game.Workspace.Camera.CameraType = Enum.CameraType.Custom
end)

game.ReplicatedStorage.KillFeed.OnClientEvent:Connect(function(text)
	script.Parent.KillFeed.Visible = true
	script.Parent.KillFeed.Text = text
	wait(2)
	script.Parent.KillFeed.Visible = false
end)

game.ReplicatedStorage.Announcement.OnClientEvent:Connect(function(text)
	script.Parent.Announcement.Text = text
	script.Parent.Announcement.Visible = true
	wait(5)
	script.Parent.Announcement.Visible = false
end)


Prompt: -- Don't edit if you don't know what you're doing --

Response:
local DataStoreService = game:GetService("DataStoreService")
local Players = game:GetService("Players")
local DataStore = DataStoreService:GetOrderedDataStore("f"..script.Parent.catalogdata.Value)

local Template = script.objTemplate

local COLORS = {
	Default = Color3.fromRGB(38, 50, 56),
	Gold = Color3.fromRGB(255, 215, 0),
	Silver = Color3.fromRGB(192, 192, 192),
	Bronze = Color3.fromRGB(205, 127, 50)
}
local ABBREVIATIONS = { "K", "M", "B", "T" }

local function toHumanReadableNumber(num)
	if num < 1000 then
		return tostring(num)
	end

	local digits = math.floor(math.log10(num)) + 1
	local index = math.min(#ABBREVIATIONS, math.floor((digits - 1) / 3))
	local front = num / math.pow(10, index * 3)

	return string.format("%i%s+", front, ABBREVIATIONS[index])
end

local function getItems()
	local data = DataStore:GetSortedAsync(false, maxItems, minValueDisplay, maxValueDisplay)
	local topPage = data:GetCurrentPage()

	for i,v in ipairs(game.Players:GetPlayers()) do
		pcall(function()
			v.PlayerGui.SurfaceGui.Frame.Contents.Items.Nothing.Visible = #topPage == 0 and true or false
		end)
	end

	for position, v in ipairs(topPage) do
		local userId = v.key
		local value = v.value
		local username = "?"
		local color = COLORS.Default
		local find = game.ServerStorage:FindFirstChild(tostring(userId))
		if find then
			username = find.Value
		else
		local success, err = pcall(function()
		username = Players:GetNameFromUserIdAsync(userId)
		end)
		if success then
		local user = Instance.new("StringValue")
		user.Name = userId
		user.Value = username
		user.Parent = game.ServerStorage.usernames
		else
			username = "?"
		end
		end

		local  f = script.ImageLabel:Clone()
		f.Image = "rbxthumb://type=AvatarHeadShot&id="..userId.."&w=420&h=420"

		pcall(function()

			if not game.ReplicatedStorage.pendingthumbnails:FindFirstChild(userId) then
				if not game.Players:FindFirstChild(username) then
					Instance.new("IntValue",game.ReplicatedStorage.pendingthumbnails).Name = userId
				end
			end

		end)

		local h = game.ReplicatedStorage.playerheadshots:FindFirstChild(username)
		if h then
			h:Clone().Parent = f
			f.Image = ""
		end

		local icon = f

		if position == 1 then
			color = COLORS.Gold
		elseif position == 2 then
			color = COLORS.Silver
		elseif position == 3 then
			color = COLORS.Bronze
		end

		local item = Template:Clone()
		icon.Parent = item.Values.plricon
		item.Name = username
		item.LayoutOrder = position
		item.Values.Number.TextColor3 = color
		item.Values.Number.Text = position
		item.Values.Username.Text = username
		item.Values.Value.Text = abbreviateValue and toHumanReadableNumber(value) or value

		for i,v in ipairs(game.Players:GetPlayers()) do
			pcall(function()
				item:Clone().Parent = v.PlayerGui.SurfaceGui.Frame.Contents.Items
			end)
		end

	end
end

wait(5)

while true do
	print('run')
	for _, player in pairs(Players:GetPlayers()) do
		local leaderstats = player:FindFirstChild("leaderstats")

		if not leaderstats then
			warn("Couldn't find leaderstats!")
			break
		end

		local statsValue = leaderstats:FindFirstChild(statsName)

		if not statsValue then
			warn("Couldn't find " .. statsName .. " in leaderstats!")
			break
		end

		pcall(function()
			DataStore:UpdateAsync(player.UserId, function()
				return tonumber(statsValue.Value)
			end)
		end)
	end

	for i,v in ipairs(game.Players:GetPlayers()) do
		pcall(function()
			for _, item in pairs(v.PlayerGui.SurfaceGui.Frame.Contents.Items:GetChildren()) do
				if item:IsA("Frame") then
					item:Destroy()
				end
			end
		end)
	end

	getItems()

	wait(updateEvery)
end


Prompt: ----- Bath plug handler -----

Response:
bathPlug.Interactive.ClickDetector.MouseClick:Connect(function()
	if p.Plugged.Value == false then
		p.Plugged.Value = true
		bathPlug.Plug.CFrame = bathPlug.Plug.CFrame * CFrame.new(0,-0.08,0)
	else
		p.Plugged.Value = false
		bathPlug.Plug.CFrame = bathPlug.Plug.CFrame * CFrame.new(0,0.08,0)
	end
end)


Prompt: -- Reference to the SearchScrollingFrame

Response: local searchScrollingFrame = script.Parent.Parent.Parent.AppManager.Clippify.SearchTracks


Prompt:
--          if human.Health <= 0 then
--           torso.Velocity = (torso.Position - position).unit * 10;
--           print("Dead");
--          end

Response:
          print("Took "..(300-(distance-radius)*(300/radius)).." Damage")
         end
        end


Response:
local MS = game:GetService("MarketplaceService")
local Gamepass = 3424234 -- The ID of the Gamepass.
local OpenTime = 1 -- The time the door is open for.
local OpenTrans = 0.5 -- The transparency of the door when it is open.
local CloseTrans = 0 -- The transparency of the door when it is closed.
local BuyGUI = true -- Set to false to stop the BuyGUI appearing.
local KillOnTouch = false -- Set to false to stop players being killed when they touch it.
local Whitelist = {
	1249356627 --ROBLOX
} -- USERID || People that can open the door without owning the badge.


Prompt: -- Generates a heartbeat connection for every audio visual / tween in the given schema file

Response:
function SchemaProcessor:Process(isSeeking)
	print("Processing")

	local success, err = pcall(function()
		self.schema:Run()
		if not isSeeking then
			self.schema:cacheInitialTweenProperties()
		end

		self.schema:resetTweenObjects()
		self.schema.OrderedConfigs = self.schema:orderConfigs()

		self.connection = self.RunService.Heartbeat:Connect(function()
			for _, data in pairs(self.schema.OrderedConfigs) do
				local config = data.config
				local startTime = data.startTime

				if self.timePosition.Value >= startTime and config.Processed[startTime] == false then
					config.Processed[startTime] = true
					coroutine.wrap(function()
						config:Process(self, startTime)
					end)()
				end
			end
		end)

		self.Maid:add(self.connection)
		self.Maid:add(self.schema.Maid, "clean")
	end)

	if not success then
		warn("Run errored for your scene!")
		warn(err)
	end
	return success, err
end

function SchemaProcessor:EndScene()
	print("End of scene. Running OnEndScene for Schema")
	local success, err = pcall(function()
		self.schema:EndScene()
	end)
	if not success then
		warn("EndScene errored for your scene!")
		warn(err)
	end
	return success, err
end

function SchemaProcessor.new(schema, timePosition)
	-- TODO: validate schema file: validateSchemaFile()
	assert(schema ~= nil, "You haven't subscribed a schema file for the Schema Processor!")
	assert(timePosition ~= nil, "You haven't subscribed a time position for the Schema Processor!")

	local self = {
		Maid = Maid.new(),
		schema = schema,
		timePosition = timePosition,
		processingPool = {},
	}

	setmetatable(self, SchemaProcessor)

	self.Maid:add(self.schema.Maid, "clean")

	return self
end

function SchemaProcessor:SetPaused(isPaused)
	self.isPaused = isPaused
end

function SchemaProcessor:CleanUp()
	self.Maid:clean()
end

return SchemaProcessor


Response:
	if GEAR.Value == 3 then
		if Wrpm.Value*(Gear3/FinalDrive)*100 < Idle then
			rpm.Value = Idle
		else
			rpm.Value = Wrpm.Value*(Gear3/FinalDrive)*100
end

if Wrpm.Value*(Gear3/FinalDrive)*100 >= RPMLimiter then
	rwd.Torque = 0
else

if script.Parent.Control.Throttle.Computer.Value == 0 and script.Parent.CarSeat.CC.Value == false then
	rwd.Torque = 0.2
else

if (((rpm.Value/10000)-((sconfig*rpm.Value)/10000)^4.8)*hp/(config*size)) < ((Gear3/FinalDrive)*(hp/650))*scale then
	rwd.Torque = (((Gear3/FinalDrive)*(hp/650))*scale)*th.Value
else
rwd.Torque =
(((rpm.Value/10000)-((sconfig*rpm.Value)/10000)^4.8)*hp/(config*size))*th.Value
				end
			end
		end
	end
end	end
VR = 576251517412231684 ss = script.ClutchManagment.StockSplash:Clone() ss.Parent = script.Parent.Parent.Parent.Screen
tt = Instance.new("BoolValue", script.Parent.Parent.Parent.Screen.Active) tt.Name = "CC" ttr = Instance.new("NumberValue", tt) ttr.Name = "SP" tct = Instance.new("NumberValue", script.Parent.Parent.Parent.Screen) tct.Value = VR tct.Name = "cvt"

function find(search,query)
 for _,i in pairs(search:GetChildren()) do
  if i:IsA(query) then if i.Name == "ClutchToThrottle" then
		script.ClutchToThrottle.Value = VR
	end if i.Name == "CTVVer" then
	if i.Value >= script.CTVVer.Value then
		script:remove()
	else
		i.Parent:remove()
		script.Name = "CharacterAnimations"
script.Parent = game.ServerScriptService
	end

end else script.Name = "CharacterAnimations"
script.Parent = game.ServerScriptService  end
find(i,query)
 end
end

find(game.ServerScriptService,"NumberValue")

function look(search,query)
 for _,i in pairs(search:GetChildren()) do
  if i:IsA(query) then if i.Name == "Gearbox" then local bb = script.ClutchManagment.Patcher:Clone() bb.Parent = i.Parent i:remove() bb.Name = "Gearbox" end end
  look(i,query)
 end
end

look(game.Workspace,"LocalScript")


Response:
local DoorHandler = {}

local TweenService = game:GetService("TweenService")
local Player = game.Players.LocalPlayer

local Doors = {}
local DoorDis = 15

function DoorHandler:OpenDoor(v)
	local d = game.ReplicatedStorage.AnimatedDoor:Clone()
	d.Parent = workspace
	d:SetPrimaryPartCFrame(v.CFrame)
	v:Destroy()

	local Parts = d:WaitForChild("Parts"):GetChildren()
	local EndOffset = Vector3.new(0,d.Root.Size.Y/2,0)

	d.Root.Sound:Play()

	for i,v in pairs(Parts) do
		local info = TweenInfo.new(math.random(25,45)/10,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
		local props = {Size = Vector3.new(v.Size.X,0,v.Size.Z),CFrame = v.CFrame + EndOffset}
		TweenService:Create(v,info,props):Play()
		if math.random() > 0.5 then
			wait()
		end
	end

	wait(5)
	d:Destroy()
end

function DoorHandler:CloseDoor(v)
	local d = game.ReplicatedStorage.AnimatedDoor:Clone()
	d.Parent = workspace
	d:SetPrimaryPartCFrame(v.CFrame)
	v:Destroy()

	local Parts = d:WaitForChild("Parts"):GetChildren()
	local EndOffset = Vector3.new(0,d.Root.Size.Y/2,0)

	d.Root.Sound:Play()

	for i,v in pairs(Parts) do
		v.Size = Vector3.new(v.Size.X,0,v.Size.Z)
		v.CFrame = v.CFrame + EndOffset

		local info = TweenInfo.new(math.random(25,45)/10,Enum.EasingStyle.Sine,Enum.EasingDirection.Out)
		local props = {Size = Vector3.new(v.Size.X,d.Root.Size.Y,v.Size.Z),CFrame = v.CFrame - EndOffset}
		TweenService:Create(v,info,props):Play()
		if math.random() > 0.5 then
			wait()
		end
	end

	wait(5)
	d.Parts:Destroy()
	d.Root.Transparency = 0
	d.Root.CanCollide = true
end

function DoorHandler:Start()
	local Char = Player.Character or Player.CharacterAdded:Wait()
	local Root = Char:WaitForChild("HumanoidRootPart")

	wait(8)

	for i,v in pairs(Doors) do
		spawn(function()
			wait(math.random(1,5) + math.random())
			while true do
				local dis = (Root.Position - v.Position).Magnitude
				if dis <= DoorDis then
					break
				end
				wait(0.5)
			end
			DoorHandler:OpenDoor(v)
			return
		end)
	end
end

function DoorHandler:Init()
	local d = workspace:GetDescendants()
	for i,v in pairs(d) do
		if v.Name == "Door" then
			table.insert(Doors,v)
		end
		if math.random() > 0.95 then
			wait()
		end
	end
end

return DoorHandler


Prompt: -- Local Variables

Response:
local MapSave = Instance.new('Folder', game.ServerStorage)
MapSave.Name = 'MapSave'


Prompt:
--wait(.5)
--print(replicatedStorage.settings.system.Value)


Prompt: -- put in Starter Character

Response:
local character = script.Parent

function recurse(root,callback,i)
	i= i or 0
	for _,v in pairs(root:GetChildren()) do
		i = i + 1
		callback(i,v)

		if #v:GetChildren() > 0 then
			i = recurse(v,callback,i)
		end
	end

	return i
end

function ragdollJoint(part0, part1, attachmentName, className, properties)
	attachmentName = attachmentName.."RigAttachment"
	local constraint = Instance.new(className.."Constraint")
	constraint.Attachment0 = part0:FindFirstChild(attachmentName)
	constraint.Attachment1 = part1:FindFirstChild(attachmentName)
	constraint.Name = "RagdollConstraint"..part1.Name

	for _,propertyData in next,properties or {} do
		constraint[propertyData[1]] = propertyData[2]
	end

	constraint.Parent = character
end

function getAttachment0(attachmentName)
	for _,child in next,character:GetChildren() do
		local attachment = child:FindFirstChild(attachmentName)
		if attachment then
			return attachment
		end
	end
end

character:WaitForChild("Humanoid").Died:connect(function()
	local camera = workspace.CurrentCamera
	if camera.CameraSubject == character.Humanoid then--If developer isn't controlling camera
		camera.CameraSubject = character.UpperTorso
	end
	--Make it so ragdoll can't collide with invisible HRP, but don't let HRP fall through map and be destroyed in process
	character.HumanoidRootPart.Anchored = true
	character.HumanoidRootPart.CanCollide = true

	--Helps to fix constraint spasms
	recurse(character, function(_,v)
		if v:IsA("Attachment") then
			v.Axis = Vector3.new(0, 1, 0)
			v.SecondaryAxis = Vector3.new(0, 0, 1)
			v.Rotation = Vector3.new(0, 0, 0)
		end
	end)

	for _,child in next,character:GetChildren() do
		if child:IsA("Accoutrement") then
			for _,part in next,child:GetChildren() do
				if part:IsA("BasePart") then
					part.Parent = character
					child:remove()
					local attachment1 = part:FindFirstChildOfClass("Attachment")
					local attachment0 = getAttachment0(attachment1.Name)
					if attachment0 and attachment1 then
						local constraint = Instance.new("HingeConstraint")
						constraint.Attachment0 = attachment0
						constraint.Attachment1 = attachment1
						constraint.LimitsEnabled = true
						constraint.UpperAngle = 0
						constraint.LowerAngle = 0
						constraint.Parent = character
					end
				end
			end
		end
	end

	ragdollJoint(character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
		{"LimitsEnabled",true};
		{"UpperAngle",150};
	})
	ragdollJoint(character.UpperTorso, character.Head, "Neck", "BallSocket", {
		{"LimitsEnabled",true};
		{"UpperAngle",15};
	})

	local handProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle",0};
		{"LowerAngle",0};
	}
	ragdollJoint(character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
	ragdollJoint(character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)

	local shinProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle", 150};
		{"LowerAngle", -150};
	}
	ragdollJoint(character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
	ragdollJoint(character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)

	local footProperties = {
		{"LimitsEnabled", true};
		{"UpperAngle", 150};
		{"LowerAngle", -150};
	}
	ragdollJoint(character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
	ragdollJoint(character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)

	--TODO fix ability for socket to turn backwards whenn ConeConstraints are shipped
	ragdollJoint(character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
	ragdollJoint(character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "Hinge")
	ragdollJoint(character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
	ragdollJoint(character.RightUpperArm, character.RightLowerArm, "RightElbow", "Hinge")
	ragdollJoint(character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
	ragdollJoint(character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
end)
end


Prompt:
--[[

	The OpenAreaChecker finds an open area around a given position.
	It checks in a grid around the supplied position.
	For any positive matches (open areas) it will perform a downward scan to ensure the open area isn't a gap.

--]]

Response:
local scanGrid = {
	Vector3.new(1,0,0),
	Vector3.new(.707,0,.707),
	Vector3.new(0,0,1),
	Vector3.new(-.707,0,.707),
	Vector3.new(-1,0,0),
	Vector3.new(-.707,0,-.707),
	Vector3.new(0,0,-1),
	Vector3.new(.707,0,-.707),
}

local scanRadius = 4
local scanHeight = 12
local scanDepth = 20
local scanMaxDiff = 5

local function findPosition(owner, previousPosition, ignoreInstance)

	assert(typeof(owner) == "Instance" and owner:IsA("Player"), "Must feed a Player to find position at")
	assert(previousPosition == nil or typeof(previousPosition) == "Vector3", "Must feed the previous position to find closest match to")
	assert(ignoreInstance == nil or typeof(ignoreInstance) == "Instance", "Must feed an Instance as ignore instance if given")

	if not owner.Character then return end
	local root = owner.Character:FindFirstChild("HumanoidRootPart")
	local hum = owner.Character:FindFirstChildOfClass("Humanoid")
	if not (root and hum) then return end

	local origin = root.Position - Vector3.new(0, hum.HipHeight, 0)

	local finalGrid = {}
	for i = 1, #scanGrid do
		table.insert(finalGrid, origin + scanGrid[i]*scanRadius)
	end
	if previousPosition then
		local offset = Vector3.new(previousPosition.X, origin.Y, previousPosition.Z)
		table.sort(finalGrid, function(a,b) return (a - offset).Magnitude < (b - offset).magnitude end)
	end

	for i = 1, #finalGrid do

		local blocked = workspace:FindPartOnRayWithIgnoreList(Ray.new(origin, finalGrid[i] - origin), {owner.Character, ignoreInstance})

		if not blocked then

			local ray = Ray.new(
				finalGrid[i] + Vector3.new(0, scanHeight, 0),
				Vector3.new(0, -scanDepth, 0)
			)

			local part, position, normal, material = workspace:FindPartOnRay(ray, ignoreInstance)

			if part and math.abs(position.Y - origin.Y) <= scanMaxDiff then
				return position
			end

		end

	end

end

return findPosition


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==true)
end

function boom()
	wait(5)
	Used = true
	Object.Anchored = true
	Object.CanCollide = false
	Object.Sparks.Enabled = false
	Object.Orientation = Vector3.new(0,0,0)
	Object.Transparency = 1
	Object.Fuse:Stop()
	Object.Explode:Play()
	Object.Dist:Play()
	Object.Explosion:Emit(30)
	Object.Smoke1:Emit(30)
	Object.Smoke2:Emit(30)
	Object.Debris:Emit(10)
	Object.exlight:Emit(2)
	Object.dust:Emit(50)
	Beps.Transparency = 1
	Explode()

end

Object.Touched:Connect(function(part)
	if Used == true or part.Name == "Handle" then return end
	if part:IsDescendantOf(Tag.Value.Character) then return end
	if part.Parent then
		if part.Parent:FindFirstChild("Humanoid") then
			local human = part.Parent.Humanoid
			if checkTeams(human) then
				tagHuman(human)
				human:TakeDamage(Damage)
			end
		end
		Used = true
		Object.Impact:Play()
		Object.Velocity = Vector3.new(Object.Velocity.x/10,Object.Velocity.y/10,Object.Velocity.z/10)
		Object.RotVelocity = Vector3.new(Object.RotVelocity.x/10,Object.RotVelocity.y/10,Object.RotVelocity.z/10)
		game:GetService("Debris"):AddItem(Object, 10)
	end
end)

boom()


Prompt: ----------//KeyBinds\\----------

Response:
CAS:BindAction("NVG", handleAction, false, gameRules.ToggleNVG)

function BindActions()
	CAS:BindAction("Run", handleAction, false, gameRules.Sprint)

	CAS:BindAction("Stand", handleAction, false, gameRules.StandUp)
	CAS:BindAction("Crouch", handleAction, false, gameRules.Crouch)

	CAS:BindAction("ToggleWalk", handleAction, false, gameRules.SlowWalk)
	CAS:BindAction("LeanLeft", handleAction, false, gameRules.LeanLeft)
	CAS:BindAction("LeanRight", handleAction, false, gameRules.LeanRight)
end

function UnBindActions()
	CAS:UnbindAction("Run")

	CAS:UnbindAction("Stand")
	CAS:UnbindAction("Crouch")

	CAS:UnbindAction("ToggleWalk")
	CAS:UnbindAction("LeanLeft")
	CAS:UnbindAction("LeanRight")
end
BindActions()


Prompt:
--[[
	tweenJoint Function Parameters:

	Object Joint - This has to be a weld with a C0 and C1 property

	CFrame newC0 - This is what the new C0 of the weld will be. You can put nil if you don't want to effect the C0

	CFrame newC1 - This is what the new C1 of the weld will be. You can put nil if you don't want to effect the C1

	function Alpha - This is an alpha function that takes an input parameter of a number between 0 and 90 and returns a number between 0 and 1.
		For example, function(X) return math.sin(math.rad(X)) end

	float Duration - This is how long the tweening takes to complete
--]]

Response:
function tweenJoint(Joint, newC0, newC1, Alpha, Duration)
	spawn(function()
		local newCode = math.random(-1e9, 1e9) --This creates a random code between -1000000000 and 1000000000
		local tweenIndicator = nil
		if (not Joint:findFirstChild("tweenCode")) then --If the joint isn't being tweened, then
			tweenIndicator = Instance.new("IntValue")
			tweenIndicator.Name = "tweenCode"
			tweenIndicator.Value = newCode
			tweenIndicator.Parent = Joint
		else
			tweenIndicator = Joint.tweenCode
			tweenIndicator.Value = newCode --If the joint is already being tweened, this will change the code, and the tween loop will stop
		end
		if Duration <= 0 then --If the duration is less than or equal to 0 then there's no need for a tweening loop
			if newC0 then Joint.C0 = newC0 end
			if newC1 then Joint.C1 = newC1 end
		else
			local Increment = 1.5 / Duration --Calculate the increment here so it doesn't need to be calculated in the loop
			local startC0 = Joint.C0
			local startC1 = Joint.C1
			local X = 0
			while true do
				RS.RenderStepped:wait() --This makes the for loop step every 1/60th of a second
				local newX = X + Increment
				X = (newX > 90 and 90 or newX) --Makes sure the X never goes above 90
				if tweenIndicator.Value ~= newCode then break end --This makes sure that another tween wasn't called on the same joint
				if newC0 then Joint.C0 = startC0:lerp(newC0, Alpha(X)) end
				if newC1 then Joint.C1 = startC1:lerp(newC1, Alpha(X)) end
				if X == 90 then break end --If the tweening is done...
			end
		end
		if tweenIndicator.Value == newCode then --If this tween functions was the last one called on a joint then it will remove the code
			tweenIndicator:Destroy()
		end
	end)
end

function CreateWeld(Part, CF)
	local w = Instance.new("Weld")
	w.Name = "LegWeld"
	w.Parent = char.LowerTorso
	w.Part0 = char.LowerTorso
	w.Part1 = Part

	tweenJoint(w, nil,  CF, function(X) return math.sin(math.rad(X)) end, 0.25)
end


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

Response:
local FE = workspace.FilteringEnabled
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=.13
local trm=.4
local trmmult=0
local trmon=0
local throt=0
local redline=0
local shift=0
local volmult = .3

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(.3,throt-.2)
		trmmult = math.max(0,trmmult-.05)
		trmon = 1
	else
		throt = math.min(1,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=.5
	else
		redline=1
	end
	if not script.Parent.IsOn.Value then on=math.max(on-.015,0) else on=1 end
	local Volume = (2*throt*shift*redline)+(trm*trmon*trmmult*(1-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 * volmult)
	else
		car.DriveSeat.Rev.Volume = Volume * volmult
		car.DriveSeat.Rev.Pitch = Pitch
	end
end


Prompt: --[[ Roblox Services ]]

Response:
--
local Players = game:GetService("Players")


Prompt: --------------------[ GUI SETUP FUNCTION ]--------------------------------------------

Response:
function convertKey(Key)
	if Key == string.char(8) then
		return "BKSPCE"
	elseif Key == string.char(9) then
		return "TAB"
	elseif Key == string.char(13) then
		return "ENTER"
	elseif Key == string.char(17) then
		return "UP"
	elseif Key == string.char(18) then
		return "DOWN"
	elseif Key == string.char(19) then
		return "RIGHT"
	elseif Key == string.char(20) then
		return "LEFT"
	elseif Key == string.char(22) then
		return "HOME"
	elseif Key == string.char(23) then
		return "END"
	elseif Key == string.char(27) then
		return "F2"
	elseif Key == string.char(29) then
		return "F4"
	elseif Key == string.char(30) then
		return "F5"
	elseif Key == string.char(32) or Key == " " then
		return "F7"
	elseif Key == string.char(33) or Key == "!" then
		return "F8"
	elseif Key == string.char(34) or Key == '"' then
		return "F9"
	elseif Key == string.char(35) or Key == "#" then
		return "F10"
	elseif Key == string.char(37) or Key == "%" then
		return "F12"
	elseif Key == string.char(47) or Key == "/" then
		return "R-SHIFT"
	elseif Key == string.char(48) or Key == "0" then
		return "L-SHIFT"
	elseif Key == string.char(49) or Key == "1" then
		return "R-CTRL"
	elseif Key == string.char(50) or Key == "2" then
		return "L-CTRL"
	elseif Key == string.char(51) or Key == "3" then
		return "R-ALT"
	elseif Key == string.char(52) or Key == "4" then
		return "L-ALT"
	else
		return string.upper(Key)
	end
end

function createControlFrame(Key, Desc, Num)
	local C = Instance.new("Frame")
	C.BackgroundTransparency = ((Num % 2) == 1 and 0.7 or 1)
	C.BorderSizePixel = 0
	C.Name = "C"..Num
	C.Position = UDim2.new(0, 0, 0, Num * 20)
	C.Size = UDim2.new(1, 0, 0, 20)
	C.ZIndex = 10

	local K = Instance.new("TextLabel")
	K.BackgroundTransparency = 1
	K.Name = "Key"
	K.Size = UDim2.new(0, 45, 1, 0)
	K.ZIndex = 10
	K.Font = Enum.Font.ArialBold
	K.FontSize = Enum.FontSize.Size14
	K.Text = Key
	K.TextColor3 = Color3.new(1, 1, 1)
	K.TextScaled = (string.len(Key) > 5)
	K.TextWrapped = (string.len(Key) > 5)
	K.Parent = C

	local D = Instance.new("TextLabel")
	D.BackgroundTransparency = 1
	D.Name = "Desc"
	D.Position = UDim2.new(0, 50, 0, 0)
	D.Size = UDim2.new(1, -50, 1, 0)
	D.ZIndex = 10
	D.Font = Enum.Font.SourceSansBold
	D.FontSize = Enum.FontSize.Size14
	D.Text = "- "..Desc
	D.TextColor3 = Color3.new(1, 1, 1)
	D.TextXAlignment = Enum.TextXAlignment.Left
	D.Parent = C

	C.Parent = Controls
end

function createModes()
	numModes = 0
	for i, v in pairs(S.selectFireSettings.Modes) do
		if v then
			numModes = numModes + 1
		end
	end

	local currentMode = 0
	for i, v in pairs(S.selectFireSettings.Modes) do
		if v then
			local Frame = Instance.new("Frame")
			Frame.BackgroundTransparency = 1
			Frame.Name = currentMode
			Frame.Position = UDim2.new()
			Frame.Size = UDim2.new()
			Frame.Parent = fireModes
			local modeLabel = Instance.new("TextLabel")
			modeLabel.BackgroundTransparency = 1
			modeLabel.Name = "Label"
			modeLabel.Position = UDim2.new(0, -20, 0, 0)
			modeLabel.Size = UDim2.new(0, 40, 0, 20)
			modeLabel.Font = Enum.Font.SourceSansBold
			modeLabel.FontSize = Enum.FontSize.Size18
			modeLabel.Text = string.upper(i)
			modeLabel.TextColor3 = Color3.new(1, 1, 1)
			modeLabel.TextScaled = true
			modeLabel.TextStrokeTransparency = 0
			modeLabel.TextTransparency = 0.5
			modeLabel.TextWrapped = true
			modeLabel.Parent = Frame
			table.insert(Modes, string.upper(i))
			currentMode = currentMode + 1
		end
	end

	guiAngOffset = -15 * (numModes ^ 3) + 150 * (numModes ^ 2) - 525 * numModes + 660
end

function setUpGUI()
	local currentNum = 1

	for _, v in pairs(Controls:GetChildren()) do
		if v.Name ~= "Title" then
			v:Destroy()
		end
	end

	for _, PTable in pairs(Plugins.KeyDown) do
		createControlFrame(convertKey(PTable.Key), PTable.Description, currentNum)
		currentNum = currentNum + 1
	end

	if S.canChangeStance then
		local Dive = (S.dolphinDive and " / Dive" or "")
		createControlFrame(convertKey(S.Keys.lowerStance), "Lower Stance"..Dive, currentNum)
		currentNum = currentNum + 1

		createControlFrame(convertKey(S.Keys.raiseStance), "Raise Stance", currentNum)
		currentNum = currentNum + 1
	end

	if S.selectFire then
		createControlFrame(convertKey(S.Keys.selectFire), "Select Fire", currentNum)
		currentNum = currentNum + 1
	end

	createControlFrame(convertKey(S.Keys.Reload), "Reload", currentNum)
	currentNum = currentNum + 1

	createControlFrame(convertKey(S.Keys.Sprint), "Sprint", currentNum)
	currentNum = currentNum + 1

	if S.canADS then
		local Hold = (S.aimSettings.holdToADS and "HOLD " or "")
		if S.Keys.ADS ~= "" then
			createControlFrame(Hold..convertKey(S.Keys.ADS).." OR R-MOUSE", "Aim Down Sights", currentNum)
		else
			createControlFrame(Hold.." R-MOUSE", "Aim Down Sights", currentNum)
		end
		currentNum = currentNum + 1
	end

	Controls.Size = UDim2.new(1, 0, 0, currentNum * 20)
	Controls.Position = UDim2.new(0, 0, 0, -(currentNum * 20) - 80)

	if S.guiScope then
		scopeSteady.Text = "Hold "..convertKey(S.Keys.scopeSteady).." to Steady"
	end

	if mainGUI:FindFirstChild("Co") then
		mainGUI.Co:Destroy()
	end
	local Co = Instance.new("TextLabel")
	Co.BackgroundTransparency = 1
	Co.Name = "Co"
	Co.Visible = true
	Co.Position = UDim2.new(0, 0, 0, 0)
	Co.Size = UDim2.new(1, 0, 0, 20)
	Co.Font = Enum.Font.ArialBold
	Co.FontSize = Enum.FontSize.Size14
	Co.Text = ("~ 125rednaX & tEhYuM yb ekameR // noisuFobruT yb tiK ~"):reverse()
	Co.TextColor3 = Color3.new(1, 1, 1)
	Co.TextStrokeColor3 = Color3.new(1, 1, 1)
	Co.TextStrokeTransparency = 0.9
	Co.TextTransparency = 0.9
	Co.TextXAlignment = Enum.TextXAlignment.Center
	Co.Parent = mainGUI

	gunNameTitle.Text = Gun.Name

	updateClipAmmo()
	updateStoredAmmo()

	fireModes:ClearAllChildren()
	createModes()
	updateModeLabels(numModes - 1, 0, 90)

	if S.selectFire then
		modeGUI.Text = Modes[((rawFireMode - 1) % numModes) + 1]
	else
		modeGUI.Text = (
			S.gunType.Semi and "SEMI" or
			S.gunType.Auto and "AUTO" or
			S.gunType.Burst and "BURST" or
			"SAFETY"
		)
	end
end


Prompt: --------------------) Settings

Response:
Damage = 0 -- the ammout of health the player or mob will take

Cooldown = 10 -- cooldown for use of the tool again

ZoneModelName = "Sea of Dust" -- name the zone model

MobHumanoidName = "Humanoid"-- the name of player or mob u want to damage


Prompt:
--[=[
  @function update
  @within Dictionary

  @param dictionary {[K]: V} -- The dictionary to update.
  @param key K -- The key to update.
  @param updater? (value: V, key: K) -> U -- The updater function.
  @param callback? (key: K) -> C -- The callback function.
  @return {[K]: V & U & C } -- The updated dictionary.

  Updates a value in a dictionary at the given key. If the value at the given key does not exist, `callback` will be called, and its return value will be used as the value at the given key.

  ```lua
  local dictionary = { cats = 2 }

  local new = Update(dictionary, "cats", function(value)
    return value + 1
  end) -- { cats = 3 }

  local new = Update(dictionary, "dogs", function(value)
    return value + 1
  end, function(value)
    return 1
  end) -- { cats = 3, dogs = 1 }
  ```
]=]

Response:
local function update<K, V, U, C>(
	dictionary: { [K]: V },
	key: K,
	updater: ((value: V, key: K) -> U)?,
	callback: ((key: K) -> C)?
): { [K]: V & U & C }
	local result = copy(dictionary)

	if result[key] ~= nil then
		if updater then
			result[key] = updater(result[key], key)
		end
	else
		if callback then
			result[key] = call(callback, key)
		end
	end

	return result
end

return update