Prompt:
--[[if JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Thumbnail")then]]--
--[[JeffTheKiller:FindFirstChild("Thumbnail"):Destroy();]]--
--[[end;]]

Response:
--
local JeffTheKillerHumanoid;
for _,Child in pairs(JeffTheKiller:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
JeffTheKillerHumanoid=Child;
end;
end;
local AttackDebounce=false;
local JeffTheKillerKnife=JeffTheKiller:FindFirstChild("Knife");
local JeffTheKillerHead=JeffTheKiller:FindFirstChild("Head");
local JeffTheKillerHumanoidRootPart=JeffTheKiller:FindFirstChild("HumanoidRootPart");
local WalkDebounce=false;
local Notice=false;
local JeffLaughDebounce=false;
local MusicDebounce=false;
local NoticeDebounce=false;
local ChosenMusic;
function FindNearestBae()
local NoticeDistance=100;
local TargetMain;
for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and TargetModel.className=="Model"and TargetModel~=JeffTheKiller and TargetModel.Name~=JeffTheKiller.Name and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
local TargetPart=TargetModel:FindFirstChild("Torso");
local FoundHumanoid;
for _,Child in pairs(TargetModel:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
FoundHumanoid=Child;
end;
end;
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<NoticeDistance then
TargetMain=TargetPart;
NoticeDistance=(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude;
local hit,pos=raycast(JeffTheKillerHumanoidRootPart.Position,(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).unit,500)
if hit and hit.Parent and hit.Parent.ClassName=="Model"and hit.Parent:FindFirstChild("Torso")and hit.Parent:FindFirstChild("Head")then
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<9 and not AttackDebounce then
Spawn(function()
AttackDebounce=true;
local SwingAnimation=JeffTheKillerHumanoid:LoadAnimation(JeffTheKiller:FindFirstChild("Swing"));
local SwingChoice=math.random(1,2);
local HitChoice=math.random(1,3);
SwingAnimation:Play();
SwingAnimation:AdjustSpeed(1.5+(math.random()*0.1));
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Swing")then
local SwingSound=JeffTheKillerKnife:FindFirstChild("Swing");
SwingSound.Pitch=1+(math.random()*0.04);
SwingSound:Play();
end;
Wait(0.3);
if TargetModel and TargetPart and FoundHumanoid and FoundHumanoid.Health~=0 and(TargetPart.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<8 then
FoundHumanoid:TakeDamage(30);
if HitChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit1")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit1");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
elseif HitChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit2")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit2");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
elseif HitChoice==3 and JeffTheKillerScript and JeffTheKiller and JeffTheKillerKnife and JeffTheKillerKnife:FindFirstChild("Hit3")then
local HitSound=JeffTheKillerKnife:FindFirstChild("Hit3");
HitSound.Pitch=1+(math.random()*0.04);
HitSound:Play();
end;
end;
Wait(0.1);
AttackDebounce=false;
end);
end;
end;
end;
end;
end;
return TargetMain;
end;
while Wait(0)do
local TargetPoint=JeffTheKillerHumanoid.TargetPoint;
local Blockage,BlockagePos=RayCast((JeffTheKillerHumanoidRootPart.CFrame+CFrame.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(TargetPoint.X,JeffTheKillerHumanoidRootPart.Position.Y,TargetPoint.Z)).lookVector*(JeffTheKillerHumanoidRootPart.Size.Z/2)).p,JeffTheKillerHumanoidRootPart.CFrame.lookVector,(JeffTheKillerHumanoidRootPart.Size.Z*2.5),{JeffTheKiller,JeffTheKiller})
local Jumpable=false;
if Blockage then
Jumpable=true;
if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
local BlockageHumanoid;
for _,Child in pairs(Blockage.Parent:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
BlockageHumanoid=Child;
end;
end;
if Blockage and Blockage:IsA("Terrain")then
local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
if CellMaterial==Enum.CellMaterial.Water then
Jumpable=false;
end;
elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Hat"or Blockage.Name=="Handle"and Blockage.Parent.ClassName=="Tool"then
Jumpable=false;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and not JeffTheKillerHumanoid.Sit and Jumpable then
JeffTheKillerHumanoid.Jump=true;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHumanoidRootPart and JeffTheKillerHead:FindFirstChild("Jeff_Step")and (JeffTheKillerHumanoidRootPart.Velocity-Vector3.new(0,JeffTheKillerHumanoidRootPart.Velocity.y,0)).magnitude>=5 and not WalkDebounce and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
Spawn(function()
WalkDebounce=true;
local FiredRay=Ray.new(JeffTheKillerHumanoidRootPart.Position,Vector3.new(0,-4,0));
local RayTarget,endPoint=Game:GetService("Workspace"):FindPartOnRay(FiredRay,JeffTheKiller);
if RayTarget then
local JeffTheKillerHeadFootStepClone=JeffTheKillerHead:FindFirstChild("Jeff_Step"):Clone();
JeffTheKillerHeadFootStepClone.Parent=JeffTheKillerHead;
JeffTheKillerHeadFootStepClone:Play();
JeffTheKillerHeadFootStepClone:Destroy();
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed<17 then
Wait(0.5);
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and JeffTheKillerHumanoid.WalkSpeed>17 then
Wait(0.2);
end
end;
WalkDebounce=false;
end);
end;
local MainTarget=FindNearestBae();
local FoundHumanoid;
if MainTarget then
for _,Child in pairs(MainTarget.Parent:GetChildren())do
if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
FoundHumanoid=Child;
end;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and MainTarget.Parent and FoundHumanoid and FoundHumanoid.Jump then
JeffTheKillerHumanoid.Jump=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<25 then
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and not JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=1;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Play();
end;
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>25 then
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")and JeffTheKillerHead:FindFirstChild("Jeff_Laugh").IsPlaying then
if not JeffLaughDebounce then
Spawn(function()
JeffLaughDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
JeffLaughDebounce=false;
end);
end;
end;
end;
if not ChosenMusic and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<50 then
local MusicChoice=math.random(1,2);
if MusicChoice==1 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1")then
ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound1");
elseif MusicChoice==2 and JeffTheKillerScript and JeffTheKiller and JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2")then
ChosenMusic=JeffTheKiller:FindFirstChild("Jeff_Scene_Sound2");
end;
if JeffTheKillerScript and JeffTheKiller and ChosenMusic and not ChosenMusic.IsPlaying then
ChosenMusic.Volume=0.5;
ChosenMusic:Play();
end;
elseif JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 and MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>50 then
if JeffTheKillerScript and JeffTheKiller and ChosenMusic and ChosenMusic.IsPlaying then
if not MusicDebounce then
Spawn(function()
MusicDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
if ChosenMusic then
ChosenMusic.Volume=0;
ChosenMusic:Stop();
end;
ChosenMusic=nil;
MusicDebounce=false;
end);
end;
end;
end;
if not MainTarget and not JeffLaughDebounce then
Spawn(function()
JeffLaughDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Laugh")then JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume-0.1;else break;end;until JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume==0 or JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume<0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh").Volume=0;
JeffTheKillerHead:FindFirstChild("Jeff_Laugh"):Stop();
JeffLaughDebounce=false;
end);
end;
if not MainTarget and not MusicDebounce then
Spawn(function()
MusicDebounce=true;
repeat Wait(0);if JeffTheKillerScript and JeffTheKiller and ChosenMusic then ChosenMusic.Volume=ChosenMusic.Volume-0.01;else break;end;until ChosenMusic.Volume==0 or ChosenMusic.Volume<0;
if ChosenMusic then
ChosenMusic.Volume=0;
ChosenMusic:Stop();
end;
ChosenMusic=nil;
MusicDebounce=false;
end);
end;
if MainTarget then
Notice=true;
if Notice and not NoticeDebounce and JeffTheKillerScript and JeffTheKiller and JeffTheKillerHead and JeffTheKillerHead:FindFirstChild("Jeff_Susto2")then
JeffTheKillerHead:FindFirstChild("Jeff_Susto2"):Play();
NoticeDebounce=true;
end
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
if MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude>5 then
JeffTheKillerHumanoid.WalkSpeed=12;
elseif MainTarget and FoundHumanoid and FoundHumanoid.Health~=0 and(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).magnitude<5 then
JeffTheKillerHumanoid.WalkSpeed=0.004;
end;
JeffTheKillerHumanoid:MoveTo(MainTarget.Position+(MainTarget.Position-JeffTheKillerHumanoidRootPart.Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
end;
else
Notice=false;
NoticeDebounce=false;
local RandomWalk=math.random(1,150);
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Health~=0 then
JeffTheKillerHumanoid.WalkSpeed=12;
if RandomWalk==1 then
JeffTheKillerHumanoid:MoveTo(Game:GetService("Workspace"):FindFirstChild("Terrain").Position+Vector3.new(math.random(-2048,2048),0,math.random(-2048,2048)),Game:GetService("Workspace"):FindFirstChild("Terrain"));
end;
end;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid then
JeffTheKillerHumanoid.DisplayDistanceType="None";
JeffTheKillerHumanoid.HealthDisplayDistance=0;
JeffTheKillerHumanoid.Name="ColdBloodedKiller";
JeffTheKillerHumanoid.NameDisplayDistance=0;
JeffTheKillerHumanoid.NameOcclusion="EnemyOcclusion";
JeffTheKillerHumanoid.AutoJumpEnabled=true;
JeffTheKillerHumanoid.AutoRotate=true;
JeffTheKillerHumanoid.MaxHealth=500;
JeffTheKillerHumanoid.JumpPower=60;
JeffTheKillerHumanoid.MaxSlopeAngle=89.9;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoJumpEnabled then
JeffTheKillerHumanoid.AutoJumpEnabled=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and not JeffTheKillerHumanoid.AutoRotate then
JeffTheKillerHumanoid.AutoRotate=true;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.PlatformStand then
JeffTheKillerHumanoid.PlatformStand=false;
end;
if JeffTheKillerScript and JeffTheKiller and JeffTheKillerHumanoid and JeffTheKillerHumanoid.Sit then
JeffTheKillerHumanoid.Sit=false;
end;
end;


Prompt:
--[=[
	@return Shake
	Creates a new shake with identical properties as
	this one. This does _not_ clone over playing state,
	and thus the cloned instance will be in a stopped
	state.

	A use-case for using `Clone` would be to create a module
	with a list of shake presets. These presets can be cloned
	when desired for use. For instance, there might be presets
	for explosions, recoil, or earthquakes.

	```lua
	--------------------------------------
	-- Example preset module
	local ShakePresets = {}

	local explosion = Shake.new()
	-- Configure `explosion` shake here
	ShakePresets.Explosion = explosion

	return ShakePresets
	--------------------------------------

	-- Use the module:
	local ShakePresets = require(somewhere.ShakePresets)
	local explosionShake = ShakePresets.Explosion:Clone()
	```
]=]

Response:
function Shake:Clone()
	local shake = Shake.new()
	local cloneFields = {
		"Amplitude", "Frequency", "FadeInTime",
		"FadeOutTime", "SustainTime", "Sustain",
		"PositionInfluence", "RotationInfluence",
		"TimeFunction"
	}
	for _,field in ipairs(cloneFields) do
		shake[field] = self[field]
	end
	return shake
end


Prompt: --[[ Local Functions ]]

Response:
--
local function onShiftLockToggled()
	IsShiftLocked = not IsShiftLocked
	if IsShiftLocked then
		ShiftLockIcon.Image = SHIFT_LOCK_ON
		Mouse.Icon = SHIFT_LOCK_CURSOR
	else
		ShiftLockIcon.Image = SHIFT_LOCK_OFF
		Mouse.Icon = ""
	end
	ShiftLockController.OnShiftLockToggled:Fire()
end

local function initialize()
	if ScreenGui then
		ScreenGui:Destroy()
		ScreenGui = nil
	end
	ScreenGui = Instance.new('ScreenGui')
	ScreenGui.Name = "ControlGui"

	local frame = Instance.new('Frame')
	frame.Name = "BottomLeftControl"
	frame.Size = UDim2.new(0, 130, 0, 46)
	frame.Position = UDim2.new(0, 0, 1, -46)
	frame.BackgroundTransparency = 1
	frame.Parent = ScreenGui

	ShiftLockIcon = Instance.new('ImageButton')
	ShiftLockIcon.Name = "MouseLockLabel"
	ShiftLockIcon.Size = UDim2.new(0, 31, 0, 31)
	ShiftLockIcon.Position = UDim2.new(0, 12, 0, 2)
	ShiftLockIcon.BackgroundTransparency = 1
	ShiftLockIcon.Image = IsShiftLocked and SHIFT_LOCK_ON or SHIFT_LOCK_OFF
	ShiftLockIcon.Visible = IsShiftLockMode
	ShiftLockIcon.Parent = frame

	ShiftLockIcon.MouseButton1Click:connect(onShiftLockToggled)

	ScreenGui.Parent = PlayerGui
end


Prompt:
--[=[
	@param tbl table
	@param name string
	@param inboundMiddleware ServerMiddleware?
	@param outboundMiddleware ServerMiddleware?
	@return RemoteFunction

	Binds a function to a table method. The name must match the
	name of the method in the table. The same name will be used
	on the client to access the given function.

	```lua
	local MyObject = {
		_Data = 10,
	}

	function MyObject:GetData(player: Player)
		return self._Data
	end

	serverComm:WrapMethod(MyObject, "GetData")
	```
]=]

Response:
function ServerComm:WrapMethod(tbl: {}, name: string, inboundMiddleware: Types.ServerMiddleware?, outboundMiddleware: Types.ServerMiddleware?): RemoteFunction
	return Comm.WrapMethod(self._instancesFolder, tbl, name, inboundMiddleware, outboundMiddleware)
end


Prompt: -- собственно создание ландшафта

Response:
local function mountLayer(x, heightY, z, material)
	local beginY = -BASE_HEIGHT
	local endY = heightY
	-- так что вот тут надо добавить условие на воду!!!!
	-- сперва добавим воду если надо,  а потом уже дно...
	if endY < BASE_HEIGHT*WATER then
		local cframe = CFrame.new(x * 4 + 2, (endY + BASE_HEIGHT*WATER) *2 / 2 , z * 4 + 2) -- отрисовка новой позиции
		local size = Vector3.new(4, (BASE_HEIGHT*WATER - endY) *2 , 4) -- а попросту, заполнение от низа до полученного значения
		workspace.Terrain:FillBlock(cframe, size, Enum.Material.Water)
	end

	local cframe = CFrame.new(x * 4 + 2, (beginY + endY)*2 /2 , z * 4 + 2) -- отрисовка новой позиции
	local size = Vector3.new(4, (endY - beginY)*2 , 4) -- а попросту, заполнение от низа до полученного значения
	workspace.Terrain:FillBlock(cframe, size, material)
end

function makeChunk(chunkX, chunkZ)
	local rootPosition = Vector3.new(chunkX * CHUNK_SCALE, 0, chunkZ * CHUNK_SCALE)
	chunks[chunkX][chunkZ] = true -- Acknowledge the chunk's existance.
	for x = 0, CHUNK_SCALE - 1 do
		for z = 0, CHUNK_SCALE - 1 do
			local noise=0
			local cx = (chunkX * CHUNK_SCALE) + x
			local cz = (chunkZ * CHUNK_SCALE) + z
			local r=math.sqrt(cx*cx + cz*cz) -- растояние от центра
			--- пример ровного места
			if  r > RADIUS then
				noise = math.noise(cx / X_SCALE, cz / Z_SCALE, GENERATION_SEED)
 				if r-RADIUS <= (RADIUS*R_SCALE) then
					local k=(r-RADIUS)/(RADIUS*R_SCALE)
					noise = noise * k
				end
			end
			-- расчёт вертикали
			local cy = noise * BASE_HEIGHT
			-- присвоение материал
			if  r < RADIUS then
				mountLayer(cx, cy, cz, Enum.Material.Cobblestone)
			else
				if cy<BASE_HEIGHT*WATER then
					mountLayer(cx, cy, cz, Enum.Material.Mud)
				elseif cy<-BASE_HEIGHT/3 then
					if rnd:NextNumber()>DELTA then -- if math.random()>DELTA then
						mountLayer(cx, cy, cz, Enum.Material.Sand)
					else
						mountLayer(cx, cy, cz, Enum.Material.Grass)
					end
				elseif cy>BASE_HEIGHT/2 then
					if rnd:NextNumber()>DELTA then --if math.random()>DELTA then
						mountLayer(cx, cy, cz, Enum.Material.Ice)
					else
						mountLayer(cx, cy, cz, Enum.Material.Cobblestone)
					end
				else
					if rnd:NextNumber()>DELTA/2 then --if math.random()>DELTA/2 then
						if rnd:NextNumber()>DELTA then
							mountLayer(cx, cy, cz, Enum.Material.LeafyGrass)
							-- высадим дерево?
							if  r > RADIUS then
								 spawnTree(Vector3.new(cx*4,cy,cz*4))
							end
						else
							mountLayer(cx, cy, cz, Enum.Material.Grass)
						end
					else
						mountLayer(cx, cy, cz, Enum.Material.Slate)
					end
				end
			end
		end
	end
end

function checkSurroundings(location)
	local chunkX, chunkZ = math.floor(location.X / 4 / CHUNK_SCALE), math.floor(location.Z / 4 / CHUNK_SCALE)
	local range = math.max(1, RENDER_DISTANCE / CHUNK_SCALE)
	for x = -range, range do
		for z = -range, range do
			local cx = chunkX + x
			local cz = chunkZ + z
			if not chunkExists(cx, cz) then
				makeChunk(cx, cz)
			end
		end
	end
end

while true do
	for _, player in pairs(Players:GetPlayers()) do
		if player.Character then
			local humanoidRootPart = player.Character:FindFirstChild("HumanoidRootPart")
			if humanoidRootPart then
				checkSurroundings(humanoidRootPart.Position)
			end
		end
	end
	wait(1)
	game.Workspace.Finish.Value=1 -- отрисовано
end


Prompt: --print("Shot")

Response:
parts = script.Parent;
ignoreList = {script.Parent}
dealingDamage = 160

makeRays = false


Prompt:
-- int rd_int_basic(string src, int s, int e, int d)
-- @src - Source binary string
-- @s - Start index of a little endian integer
-- @e - End index of the integer
-- @d - Direction of the loop

Response:
local function rd_int_basic(src, s, e, d)
	local num = 0

	-- if bb[l] > 127 then -- signed negative
	-- 	num = num - 256 ^ l
	-- 	bb[l] = bb[l] - 128
	-- end

	for i = s, e, d do num = num + src:byte(i, i) * 256 ^ (i - s) end

	return num
end


Prompt:
--Ammo.Changed:connect(Update_Gui)
--StoredAmmo.Changed:connect(Update_Gui)
--GLAmmo.Changed:connect(Update_Gui)

Response: local RAD, SIN, ATAN, COS = math.rad, math.sin, math.atan2, math.cos


Prompt: --//Declarations

Response:
Camera 	= game.Workspace.CurrentCamera
Last 	= Camera.CFrame.lookVector
Blur 	= Instance.new("BlurEffect",Camera)


Prompt: --helpfully checks a table for a specific value

Response:
function contains(t, v)
	for _, val in pairs(t) do
		if val == v then
			return true
		end
	end
	return false
end


Prompt: -- emote bindable hook

Response:
if FFlagAnimateScriptEmoteHook then
	script:WaitForChild("PlayEmote").OnInvoke = function(emote)
		-- Only play emotes when idling
		if pose ~= "Standing" then
			return
		end

		if emoteNames[emote] ~= nil then
			-- Default emotes
			playAnimation(emote, EMOTE_TRANSITION_TIME, Humanoid)

			if userPlayEmoteByIdAnimTrackReturn then
				return true, currentAnimTrack
			else
				return true
			end
		elseif typeof(emote) == "Instance" and emote:IsA("Animation") then
			-- Non-default emotes
			playEmote(emote, EMOTE_TRANSITION_TIME, Humanoid)

			if userPlayEmoteByIdAnimTrackReturn then
				return true, currentAnimTrack
			else
				return true
			end
		end

		-- Return false to indicate that the emote could not be played
		return false
	end
end


Prompt: -- Colors

Response:
local FriendlyReticleColor = Color3.new(0, 1, 0)
local EnemyReticleColor	= Color3.new(1, 0, 0)
local NeutralReticleColor	= Color3.new(1, 1, 1)

local Spread = MinSpread
local AmmoInClip = ClipSize

local Camera = workspace.CurrentCamera

local Tool = script.Parent
local Handle = WaitForChild(Tool, 'Handle')
local WeaponGui = nil


Prompt:
--[[**
	ensures Roblox DockWidgetPluginGuiInfo type

	@param value The value to check against

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

Response: t.DockWidgetPluginGuiInfo = primitive("DockWidgetPluginGuiInfo")


Prompt:
--[[**
	ensures value is an enum of the correct type

	@param enum The enum to check

	@returns A function that will return true iff the condition is passed
**--]]

Response:
function t.enum(enum)
	assert(t.Enum(enum))
	return function(value)
		local enumItemSuccess, enumItemErrMsg = t.EnumItem(value)
		if not enumItemSuccess then
			return false, enumItemErrMsg
		end

		if value.EnumType == enum then
			return true
		else
			return false, string.format("enum of %s expected, got enum of %s", tostring(enum), tostring(value.EnumType))
		end
	end
end

do
	local checkWrap = t.tuple(t.callback, t.callback)


Prompt: -- Sound

Response:
CEs.PlaySound.OnClientEvent:connect(function(Sound,Rchr)
	if not Sound then return end
	if not Rchr then
		if Sound:IsDescendantOf(plr.Character) then return end
	else
		if plr.Character == Rchr then return end
	end

	local newSound = Instance.new("Sound", Sound.Parent)
	newSound.SoundId = Sound.SoundId
	newSound.PlaybackSpeed = Sound.PlaybackSpeed
	newSound.Volume = Sound.Volume
	newSound.Name = Sound.Name.."Playing"
	newSound:Play()
	game:GetService("Debris"):AddItem(newSound, Sound.TimeLength)
end)

CEs.StopSound.OnClientEvent:connect(function(Sound,Rchr)
	if not Sound then return end
	if not Rchr then
		if Sound:IsDescendantOf(plr.Character) then return end
	else
		if plr.Character == Rchr then return end
	end
	local newSound = Sound.Parent:FindFirstChild(Sound.Name.."Playing")
	if newSound then newSound:Destroy() end
end)


Prompt:
--[[**
	<description>
	Takes a function to be called before :Save(). This function must return a value that will be saved in the data store. Used for serializing.
	</description>

	<parameter name = "modifier">
	The modifier function.
	</parameter>
**--]]

Response:
function DataStore:BeforeSave(modifier)
	self.beforeSave = modifier
end


Prompt: -- Special Effects

Response:
local EffectsFolder = ReplicatedStorage:WaitForChild("Effects")
local Explosion = EffectsFolder:WaitForChild("Explode")


Prompt: -- Teleport error logging

Response:
function Lobby._onTeleportFailure(player, status, message)
	Log.Error.Lobby("Teleport Failed: %s (%s)", player.UserId, message)

	-- Send error back to the server
	local data = {
		type = "FAILURE",
		status = status,
		message = message,
	}
	self.joinEvent:FireServer(data)
end

TeleportService.TeleportInitFailed:Connect(Lobby._onTeleportFailure)


Prompt:
--[=[
	@within Shake
	@prop PositionInfluence Vector3
	This is similar to `Amplitude` but multiplies against each axis
	of the resultant shake vector, and only affects the position vector.

	Defaults to `Vector3.one`.
]=]


Prompt: -- Define the mouse offset

Response: local mouseOffset = Vector2.new(0, 0)


Prompt: -- A collection of instances that may be parented to another instance.

Response: export type Children = Instance | StateObject<Children> | {[any]: Children}


Prompt: --[[Weight and CG]]

Response:
	Tune.Weight			= 1000		-- 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		= 55		-- Weight distribution (0 - on rear wheels, 100 - on front wheels, can be <0 or >100)
	Tune.CGHeight		= .8		-- 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:
-- Smart Circle mode needs the intersection of 2 rays that are known to be in the same plane
-- because they are generated from cross products with a common vector. This function is computing
-- that intersection, but it's actually the general solution for the point halfway between where
-- two skew lines come nearest to each other, which is more forgiving.

Response:
local function RayIntersection(p0, v0, p1, v1)
	local v2 = v0:Cross(v1)
	local d1 = p1.x - p0.x
	local d2 = p1.y - p0.y
	local d3 = p1.z - p0.z
	local denom = Det3x3(v0.x,-v1.x,v2.x,v0.y,-v1.y,v2.y,v0.z,-v1.z,v2.z)

	if (denom == 0) then
		return ZERO_VECTOR3 -- No solution (rays are parallel)
	end

	local t0 = Det3x3(d1,-v1.x,v2.x,d2,-v1.y,v2.y,d3,-v1.z,v2.z) / denom
	local t1 = Det3x3(v0.x,d1,v2.x,v0.y,d2,v2.y,v0.z,d3,v2.z) / denom
	local s0 = p0 + t0 * v0
	local s1 = p1 + t1 * v1
	local s = s0 + 0.5 * ( s1 - s0 )

	-- 0.25 studs is a threshold for deciding if the rays are
	-- close enough to be considered intersecting, found through testing
	if (s1-s0).Magnitude < 0.25 then
		return s
	else
		return ZERO_VECTOR3
	end
end

local function SmartCircleBehavior(castPoints)
	local torsoUp = TorsoPart.CFrame.upVector.unit
	local torsoRight = TorsoPart.CFrame.rightVector.unit

	-- SMART_CIRCLE mode includes rays to head and 5 to the torso.
	-- Hands, arms, legs and feet are not included since they
	-- are not canCollide and can therefore go inside of parts
	castPoints[#castPoints + 1] = TorsoPart.CFrame.p
	castPoints[#castPoints + 1] = TorsoPart.CFrame.p + torsoUp
	castPoints[#castPoints + 1] = TorsoPart.CFrame.p - torsoUp
	castPoints[#castPoints + 1] = TorsoPart.CFrame.p + torsoRight
	castPoints[#castPoints + 1] = TorsoPart.CFrame.p - torsoRight
	if HeadPart then
		castPoints[#castPoints + 1] = HeadPart.CFrame.p
	end

	local cameraOrientation = Camera.CFrame - Camera.CFrame.p
	local torsoPoint = Vector3_new(0,0.5,0) + (TorsoPart and TorsoPart.Position or HumanoidRootPart.Position)
	local radius = 2.5

	-- This loop first calculates points in a circle of radius 2.5 around the torso of the character, in the
	-- plane orthogonal to the camera's lookVector. Each point is then raycast to, to determine if it is within
	-- the free space surrounding the player (not inside anything). Two iterations are done to adjust points that
	-- are inside parts, to try to move them to valid locations that are still on their camera ray, so that the
	-- circle remains circular from the camera's perspective, but does not cast rays into walls or parts that are
	-- behind, below or beside the character and not really obstructing view of the character. This minimizes
	-- the undesirable situation where the character walks up to an exterior wall and it is made invisible even
	-- though it is behind the character.
	for i = 1, SMART_CIRCLE_CASTS do
		local angle = SMART_CIRCLE_INCREMENT * i - 0.5 * math.pi
		local offset = radius * Vector3_new(math_cos(angle), math_sin(angle), 0)
		local circlePoint = torsoPoint + cameraOrientation * offset

		-- Vector from camera to point on the circle being tested
		local vp = circlePoint - Camera.CFrame.p

		local ray = Ray.new(torsoPoint, circlePoint - torsoPoint)
		local hit, hp, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {Character}, false, false )
		local castPoint = circlePoint

		if hit then
			local hprime = hp + 0.1 * hitNormal.unit -- Slightly offset hit point from the hit surface
			local v0 = hprime - torsoPoint -- Vector from torso to offset hit point
			local d0 = v0.magnitude

			local perp = (v0:Cross(vp)).unit

			-- Vector from the offset hit point, along the hit surface
			local v1 = (perp:Cross(hitNormal)).unit

			-- Vector from camera to offset hit
			local vprime = (hprime - Camera.CFrame.p).unit

			-- This dot product checks to see if the vector along the hit surface would hit the correct
			-- side of the invisicam cone, or if it would cross the camera look vector and hit the wrong side
			if ( v0.unit:Dot(-v1) < v0.unit:Dot(vprime)) then
				castPoint = RayIntersection(hprime, v1, circlePoint, vp)

				if castPoint.Magnitude > 0 then
					local ray = Ray.new(hprime, castPoint - hprime)
					local hit, hitPoint, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {Character}, false, false )

					if hit then
						local hprime2 = hitPoint + 0.1 * hitNormal.unit
						castPoint = hprime2
					end
				else
					castPoint = hprime
				end
			else
				castPoint = hprime
			end

			local ray = Ray.new(torsoPoint, (castPoint - torsoPoint))
			local hit, hitPoint, hitNormal = game.Workspace:FindPartOnRayWithIgnoreList(ray, {Character}, false, false )

			if hit then
				local castPoint2 = hitPoint - 0.1 * (castPoint - torsoPoint).unit
				castPoint = castPoint2
			end
		end

		castPoints[#castPoints + 1] = castPoint
	end
end

local function CheckTorsoReference()
	if Character then
		TorsoPart = Character:FindFirstChild("Torso")
		if not TorsoPart then
			TorsoPart = Character:FindFirstChild("UpperTorso")
			if not TorsoPart then
				TorsoPart = Character:FindFirstChild("HumanoidRootPart")
			end
		end

		HeadPart = Character:FindFirstChild("Head")
	end
end

local function OnCharacterAdded(character)
	if childAddedConn then
		childAddedConn:disconnect()
		childAddedConn = nil
	end
	if childRemovedConn then
		childRemovedConn:disconnect()
		childRemovedConn = nil
	end

	Character = character

	TrackedLimbs = {}
	local function childAdded(child)
		if child:IsA('BasePart') then
			if LIMB_TRACKING_SET[child.Name] then
				TrackedLimbs[child] = true
			end

			if (child.Name == 'Torso' or child.Name == 'UpperTorso') then
				TorsoPart = child
			end

			if (child.Name == 'Head') then
				HeadPart = child
			end
		end
	end

	local function childRemoved(child)
		TrackedLimbs[child] = nil

		-- If removed/replaced part is 'Torso' or 'UpperTorso' double check that we still have a TorsoPart to use
		CheckTorsoReference()
	end

	childAddedConn = character.ChildAdded:connect(childAdded)
	childRemovedConn = character.ChildRemoved:connect(childRemoved)

	for _, child in pairs(Character:GetChildren()) do
		childAdded(child)
	end
end

local function OnCurrentCameraChanged()
	local newCamera = workspace.CurrentCamera
	if newCamera then
		Camera = newCamera
	end
end


Prompt:
--[[
class Spring

Description:
	A physical model of a spring, useful in many applications. Properties only evaluate
	upon index making this model good for lazy applications

API:
	Spring = Spring.new(number position)
		Creates a new spring in 1D
	Spring = Spring.new(Vector3 position)
		Creates a new spring in 3D

	Spring.Position
		Returns the current position
	Spring.Velocity
		Returns the current velocity
	Spring.Target
		Returns the target
	Spring.Damper
		Returns the damper
	Spring.Speed
		Returns the speed

	Spring.Target = number/Vector3
		Sets the target
	Spring.Position = number/Vector3
		Sets the position
	Spring.Velocity = number/Vector3
		Sets the velocity
	Spring.Damper = number [0, 1]
		Sets the spring damper, defaults to 1
	Spring.Speed = number [0, infinity)
		Sets the spring speed, defaults to 1

	Spring:TimeSkip(number DeltaTime)
		Instantly skips the spring forwards by that amount of now
	Spring:Impulse(number/Vector3 velocity)
		Impulses the spring, increasing velocity by the amount given

Visualization (by Defaultio):
	https://www.desmos.com/calculator/hn2i9shxbz
]]

Response: local Spring = {}


Prompt: --Explosion Effects, yes its just a particle effect xD--

Response: local explosionvault1 = script.Parent.DepositBoxDoor1.ExplosionEffect1


Prompt: --Weld stuff here

Response:
misc:WaitForChild("Spoiler")
MakeWeld(car.DriveSeat,misc.Spoiler:WaitForChild("A1")).Name="W"
MakeWeld(misc.Spoiler.A1,misc.Spoiler:WaitForChild("A2"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.A2,misc.Spoiler:WaitForChild("A3"),"Motor",.02).Name="W"
MakeWeld(misc.Spoiler.A3,misc.Spoiler:WaitForChild("A"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.A3,misc.Spoiler:WaitForChild("A4"),"Motor",.01).Name="P"
MakeWeld(misc.Spoiler.A4,misc.Spoiler:WaitForChild("Sp"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.Sp,misc.Spoiler:WaitForChild("B1"))
MakeWeld(misc.Spoiler.B1,misc.Spoiler:WaitForChild("Paint"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.B2,misc.Spoiler:WaitForChild("Paint"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.B3,misc.Spoiler:WaitForChild("Paint"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.B4,misc.Spoiler:WaitForChild("Paint"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.B5,misc.Spoiler:WaitForChild("Paint"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.B6,misc.Spoiler:WaitForChild("Paint"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.B7,misc.Spoiler:WaitForChild("Paint"),"Motor",.01).Name="W"
MakeWeld(misc.Spoiler.RFL,misc.Spoiler:WaitForChild("Paint"),"Motor",.01).Name="W"

car.DriveSeat.ChildAdded:connect(function(child)
	if child.Name=="SeatWeld" and child:IsA("Weld") and game.Players:GetPlayerFromCharacter(child.Part1.Parent)~=nil then
		child.C0=CFrame.new(0,-.5,0)*CFrame.fromEulerAnglesXYZ(-(math.pi/2),0,0)*CFrame.Angles(math.rad(13),0,0)
	end
end)


Prompt: -- Please don't edit this script

Response:
L1 = script.Parent.LED1.Scripts.on
L2 = script.Parent.LED2.Scripts.on
L3 = script.Parent.LED3.Scripts.on
L4 = script.Parent.LED4.Scripts.on
L5 = script.Parent.LED5.Scripts.on

R1 = script.Parent.Parent.Relays.Relay1
R2 = script.Parent.Parent.Relays.Relay2
R3 = script.Parent.Parent.Relays.Relay3
R4 = script.Parent.Parent.Relays.Relay4
R5 = script.Parent.Parent.Relays.Relay5

repeat task.wait()
	L1.Value = R1.RelayOn.Value
	L2.Value = R2.RelayOn.Value
	L3.Value = R3.RelayOn.Value
	L4.Value = R4.RelayOn.Value
	L5.Value = R5.RelayOn.Value
until script.Enabled == false


Prompt: -- Here be dragons

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

return function (Cmdr)
	local Util = Cmdr.Util

	local Window = require(script:WaitForChild("Window"))
	Window.Cmdr = Cmdr

	local AutoComplete = require(script:WaitForChild("AutoComplete"))(Cmdr)
	Window.AutoComplete = AutoComplete

	-- Sets the Window.ProcessEntry callback so that we can dispatch our commands out
	function Window.ProcessEntry(text)
		text = Util.TrimString(text)

		if #text == 0 then return end

		Window:AddLine(Window:GetLabel() .. " " .. text, Color3.fromRGB(255, 223, 93))

		Window:AddLine(Cmdr.Dispatcher:EvaluateAndRun(text, Player, {
			IsHuman = true
		}))
	end

	-- Sets the Window.OnTextChanged callback so we can update the auto complete
	function Window.OnTextChanged (text)
		local command = Cmdr.Dispatcher:Evaluate(text, Player, true)
		local arguments = Util.SplitString(text)
		local commandText = table.remove(arguments, 1)
		local atEnd = false
		if command then
			arguments = Util.MashExcessArguments(arguments, #command.Object.Args)

			atEnd = #arguments == #command.Object.Args
		end

		local entryComplete = commandText and #arguments > 0

		if text:sub(#text, #text):match("%s") and not atEnd then
			entryComplete = true
			arguments[#arguments + 1] = ""
		end

		if command and entryComplete then
			local commandValid, errorText = command:Validate()

			Window:SetIsValidInput(commandValid, ("Validation errors: %s"):format(errorText or ""))

			local acItems = {}

			local lastArgument = command:GetArgument(#arguments)
			if lastArgument then
				local typedText = lastArgument.RawSegments[#lastArgument.RawSegments]
				local items = lastArgument:GetAutocomplete()
				for i, item in pairs(items) do
					acItems[i] = {typedText, item}
				end

				local valid = true

				if #typedText > 0 then
					valid, errorText = lastArgument:Validate()
				end

				return AutoComplete:Show(acItems, {
					at = atEnd and #text - #typedText + (text:sub(#text, #text):match("%s") and -1 or 0);
					prefix = #lastArgument.RawSegments == 1 and lastArgument.Prefix or "";
					isLast = #command.Arguments == #command.ArgumentDefinitions and #typedText > 0;
					numArgs = #arguments;
					command = command;
					arg = lastArgument;
					name = lastArgument.Name .. (lastArgument.Required and "" or "?");
					type = lastArgument.Type.DisplayName;
					description = (valid == false and errorText) or lastArgument.Object.Description;
					invalid = not valid;
				})
			end
		elseif commandText and #arguments == 0 then
			Window:SetIsValidInput(true)
			local exactCommand = Cmdr.Registry:GetCommand(commandText)
			local exactMatch
			if exactCommand then
				exactMatch = {exactCommand.Name, exactCommand.Name, options = {
					name = exactCommand.Name;
					description = exactCommand.Description;
				}}
			end

			local acItems = {exactMatch}
			for _, cmd in pairs(Cmdr.Registry:GetCommandsAsStrings()) do
				if commandText:lower() == cmd:lower():sub(1, #commandText) and (exactMatch == nil or exactMatch[1] ~= commandText) then
					local commandObject = Cmdr.Registry:GetCommand(cmd)
					acItems[#acItems + 1] = {commandText, cmd, options = {
						name = commandObject.Name;
						description = commandObject.Description;
					}}
				end
			end

			return AutoComplete:Show(acItems)
		end

		Window:SetIsValidInput(false, "Invalid command. Use the help command to see all available commands.")
		AutoComplete:Hide()
	end

	Window:UpdateLabel()
	Window:UpdateWindowHeight()

	return {
		Window = Window;
		AutoComplete = AutoComplete;
	}
end


Prompt:
--[=[
	Extracts the locale from the name
	@param localeId string -- the defaultlocaleId
	@param dataTable table -- Data table to load from
	@return LocalizationTable
]=]

Response:
function JsonToLocalizationTable.loadTable(localeId, dataTable)
	local localizationTable = JsonToLocalizationTable.getOrCreateLocalizationTable()

	recurseAdd(localizationTable, localeId, "", dataTable)

	return localizationTable
end


Prompt: -- This script listens for RemoteEvents that will be called from the client ("Main" script)

Response: local Home = script.Parent


Prompt: --[[ The Module ]]

Response:
--
local BaseCamera = {}
BaseCamera.__index = BaseCamera

function BaseCamera.new()
	local self = setmetatable({}, BaseCamera)

	-- So that derived classes have access to this
	self.FIRST_PERSON_DISTANCE_THRESHOLD = FIRST_PERSON_DISTANCE_THRESHOLD

	self.gamepadSensitivity = 1
	self.cameraType = nil
	self.cameraMovementMode = nil

	self.lastCameraTransform = nil
	self.rotateInput = ZERO_VECTOR2
	self.userPanningCamera = false
	self.lastUserPanCamera = tick()

	self.humanoidRootPart = nil
	self.humanoidCache = {}

	-- Subject and position on last update call
	self.lastSubject = nil
	self.lastSubjectPosition = Vector3.new(0,5,0)

	-- These subject distance members refer to the nominal camera-to-subject follow distance that the camera
	-- is trying to maintain, not the actual measured value.
	-- The default is updated when screen orientation or the min/max distances change,
	-- to be sure the default is always in range and appropriate for the orientation.
	self.defaultSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
	self.currentSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)

	self.inFirstPerson = false
	self.inMouseLockedMode = false
	self.portraitMode = false
	self.isSmallTouchScreen = false

	-- Used by modules which want to reset the camera angle on respawn.
	self.resetCameraAngle = true

	self.enabled = false

	-- Input Event Connections
	self.inputBeganConn = nil
	self.inputChangedConn = nil
	self.inputEndedConn = nil

	self.startPos = nil
	self.lastPos = nil
	self.panBeginLook = nil

	self.panEnabled = true
	self.keyPanEnabled = true
	self.distanceChangeEnabled = true

	self.PlayerGui = nil

	self.cameraChangedConn = nil
	self.viewportSizeChangedConn = nil

	self.boundContextActions = {}

	-- VR Support
	self.shouldUseVRRotation = false
	self.VRRotationIntensityAvailable = false
	self.lastVRRotationIntensityCheckTime = 0
	self.lastVRRotationTime = 0
	self.vrRotateKeyCooldown = {}
	self.cameraTranslationConstraints = Vector3.new(1, 1, 1)
	self.humanoidJumpOrigin = nil
	self.trackingHumanoid = nil
	self.cameraFrozen = false
	self.subjectStateChangedConn = nil

	-- Gamepad support
	self.activeGamepad = nil
	self.gamepadPanningCamera = false
	self.lastThumbstickRotate = nil
	self.numOfSeconds = 0.7
	self.currentSpeed = 0
	self.maxSpeed = 6
	self.vrMaxSpeed = 4
	self.lastThumbstickPos = Vector2.new(0,0)
	self.ySensitivity = 0.65
	self.lastVelocity = nil
	self.gamepadConnectedConn = nil
	self.gamepadDisconnectedConn = nil
	self.currentZoomSpeed = 1.0
	self.L3ButtonDown = false
	self.dpadLeftDown = false
	self.dpadRightDown = false

	-- Touch input support
	self.isDynamicThumbstickEnabled = false
	self.fingerTouches = {}
	self.dynamicTouchInput = nil
	self.numUnsunkTouches = 0
	self.inputStartPositions = {}
	self.inputStartTimes = {}
	self.startingDiff = nil
	self.pinchBeginZoom = nil
	self.userPanningTheCamera = false
	self.touchActivateConn = nil

	-- Mouse locked formerly known as shift lock mode
	self.mouseLockOffset = ZERO_VECTOR3

	-- [[ NOTICE ]] --
	-- Initialization things used to always execute at game load time, but now these camera modules are instantiated
	-- when needed, so the code here may run well after the start of the game

	if player.Character then
		self:OnCharacterAdded(player.Character)
	end

	player.CharacterAdded:Connect(function(char)
		self:OnCharacterAdded(char)
	end)

	if self.cameraChangedConn then self.cameraChangedConn:Disconnect() end
	self.cameraChangedConn = workspace:GetPropertyChangedSignal("CurrentCamera"):Connect(function()
		self:OnCurrentCameraChanged()
	end)
	self:OnCurrentCameraChanged()

	if self.playerCameraModeChangeConn then self.playerCameraModeChangeConn:Disconnect() end
	self.playerCameraModeChangeConn = player:GetPropertyChangedSignal("CameraMode"):Connect(function()
		self:OnPlayerCameraPropertyChange()
	end)

	if self.minDistanceChangeConn then self.minDistanceChangeConn:Disconnect() end
	self.minDistanceChangeConn = player:GetPropertyChangedSignal("CameraMinZoomDistance"):Connect(function()
		self:OnPlayerCameraPropertyChange()
	end)

	if self.maxDistanceChangeConn then self.maxDistanceChangeConn:Disconnect() end
	self.maxDistanceChangeConn = player:GetPropertyChangedSignal("CameraMaxZoomDistance"):Connect(function()
		self:OnPlayerCameraPropertyChange()
	end)

	if self.playerDevTouchMoveModeChangeConn then self.playerDevTouchMoveModeChangeConn:Disconnect() end
	self.playerDevTouchMoveModeChangeConn = player:GetPropertyChangedSignal("DevTouchMovementMode"):Connect(function()
		self:OnDevTouchMovementModeChanged()
	end)
	self:OnDevTouchMovementModeChanged() -- Init

	if self.gameSettingsTouchMoveMoveChangeConn then self.gameSettingsTouchMoveMoveChangeConn:Disconnect() end
	self.gameSettingsTouchMoveMoveChangeConn = UserGameSettings:GetPropertyChangedSignal("TouchMovementMode"):Connect(function()
		self:OnGameSettingsTouchMovementModeChanged()
	end)
	self:OnGameSettingsTouchMovementModeChanged() -- Init

	UserGameSettings:SetCameraYInvertVisible()
	UserGameSettings:SetGamepadCameraSensitivityVisible()

	self.hasGameLoaded = game:IsLoaded()
	if not self.hasGameLoaded then
		self.gameLoadedConn = game.Loaded:Connect(function()
			self.hasGameLoaded = true
			self.gameLoadedConn:Disconnect()
			self.gameLoadedConn = nil
		end)
	end

	self:OnPlayerCameraPropertyChange()

	return self
end

function BaseCamera:GetModuleName()
	return "BaseCamera"
end

function BaseCamera:OnCharacterAdded(char)
	self.resetCameraAngle = self.resetCameraAngle or self:GetEnabled()
	self.humanoidRootPart = nil
	if UserInputService.TouchEnabled then
		self.PlayerGui = player:WaitForChild("PlayerGui")
		for _, child in ipairs(char:GetChildren()) do
			if child:IsA("Tool") then
				self.isAToolEquipped = true
			end
		end
		char.ChildAdded:Connect(function(child)
			if child:IsA("Tool") then
				self.isAToolEquipped = true
			end
		end)
		char.ChildRemoved:Connect(function(child)
			if child:IsA("Tool") then
				self.isAToolEquipped = false
			end
		end)
	end
end

function BaseCamera:GetHumanoidRootPart()
	if not self.humanoidRootPart then
		if player.Character then
			local humanoid = player.Character:FindFirstChildOfClass("Humanoid")
			if humanoid then
				self.humanoidRootPart = humanoid.RootPart
			end
		end
	end
	return self.humanoidRootPart
end

function BaseCamera:GetBodyPartToFollow(humanoid, isDead)
	-- If the humanoid is dead, prefer the head part if one still exists as a sibling of the humanoid
	if humanoid:GetState() == Enum.HumanoidStateType.Dead then
		local character = humanoid.Parent
		if character and character:IsA("Model") then
			return character:FindFirstChild("Head") or humanoid.RootPart
		end
	end

	return humanoid.RootPart
end

function BaseCamera:GetSubjectPosition()
	local result = self.lastSubjectPosition
	local camera = game.Workspace.CurrentCamera
	local cameraSubject = camera and camera.CameraSubject

	if cameraSubject then
		if cameraSubject:IsA("Humanoid") then
			local humanoid = cameraSubject
			local humanoidIsDead = humanoid:GetState() == Enum.HumanoidStateType.Dead

			if VRService.VREnabled and humanoidIsDead and humanoid == self.lastSubject then
				result = self.lastSubjectPosition
			else
				local bodyPartToFollow = humanoid.RootPart

				-- If the humanoid is dead, prefer their head part as a follow target, if it exists
				if humanoidIsDead then
					if humanoid.Parent and humanoid.Parent:IsA("Model") then
						bodyPartToFollow = humanoid.Parent:FindFirstChild("Head") or bodyPartToFollow
					end
				end

				if bodyPartToFollow and bodyPartToFollow:IsA("BasePart") then
					local heightOffset
					if humanoid.RigType == Enum.HumanoidRigType.R15 then
						if humanoid.AutomaticScalingEnabled then
							heightOffset = R15_HEAD_OFFSET
							if bodyPartToFollow == humanoid.RootPart then
								local rootPartSizeOffset = (humanoid.RootPart.Size.Y/2) - (HUMANOID_ROOT_PART_SIZE.Y/2)
								heightOffset = heightOffset + Vector3.new(0, rootPartSizeOffset, 0)
							end
						else
							heightOffset = R15_HEAD_OFFSET_NO_SCALING
						end
					else
						heightOffset = HEAD_OFFSET
					end

					if humanoidIsDead then
						heightOffset = ZERO_VECTOR3
					end

					result = bodyPartToFollow.CFrame.p + bodyPartToFollow.CFrame:vectorToWorldSpace(heightOffset + humanoid.CameraOffset)
				end
			end

		elseif cameraSubject:IsA("VehicleSeat") then
			local offset = SEAT_OFFSET
			if VRService.VREnabled then
				offset = VR_SEAT_OFFSET
			end
			result = cameraSubject.CFrame.p + cameraSubject.CFrame:vectorToWorldSpace(offset)
		elseif cameraSubject:IsA("SkateboardPlatform") then
			result = cameraSubject.CFrame.p + SEAT_OFFSET
		elseif cameraSubject:IsA("BasePart") then
			result = cameraSubject.CFrame.p
		elseif cameraSubject:IsA("Model") then
			if cameraSubject.PrimaryPart then
				result = cameraSubject:GetPrimaryPartCFrame().p
			else
				result = cameraSubject:GetModelCFrame().p
			end
		end
	else
		-- cameraSubject is nil
		-- Note: Previous RootCamera did not have this else case and let self.lastSubject and self.lastSubjectPosition
		-- both get set to nil in the case of cameraSubject being nil. This function now exits here to preserve the
		-- last set valid values for these, as nil values are not handled cases
		return
	end

	self.lastSubject = cameraSubject
	self.lastSubjectPosition = result

	return result
end

function BaseCamera:UpdateDefaultSubjectDistance()
	if self.portraitMode then
		self.defaultSubjectDistance = math.clamp(PORTRAIT_DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
	else
		self.defaultSubjectDistance = math.clamp(DEFAULT_DISTANCE, player.CameraMinZoomDistance, player.CameraMaxZoomDistance)
	end
end

function BaseCamera:OnViewportSizeChanged()
	local camera = game.Workspace.CurrentCamera
	local size = camera.ViewportSize
	self.portraitMode = size.X < size.Y
	self.isSmallTouchScreen = UserInputService.TouchEnabled and (size.Y < 500 or size.X < 700)

	self:UpdateDefaultSubjectDistance()
end


Prompt: --/ Initialization /--

Response: require(3472854229).start(script,config)


Prompt: --[[ Local Functions ]]

Response:
--
function MouseLockController:OnMouseLockToggled()
	self.isMouseLocked = not self.isMouseLocked

	if self.isMouseLocked then
		local cursorImageValueObj = script:FindFirstChild("CursorImage")
		if cursorImageValueObj and cursorImageValueObj:IsA("StringValue") and cursorImageValueObj.Value then
			self.savedMouseCursor = Mouse.Icon
			Mouse.Icon = cursorImageValueObj.Value
		else
			if cursorImageValueObj then
				cursorImageValueObj:Destroy()
			end
			cursorImageValueObj = Instance.new("StringValue")
			cursorImageValueObj.Name = "CursorImage"
			cursorImageValueObj.Value = DEFAULT_MOUSE_LOCK_CURSOR
			cursorImageValueObj.Parent = script
			self.savedMouseCursor = Mouse.Icon
			Mouse.Icon = DEFAULT_MOUSE_LOCK_CURSOR
		end
	else
		if self.savedMouseCursor then
			Mouse.Icon = self.savedMouseCursor
			self.savedMouseCursor = nil
		end
	end

	self.mouseLockToggledEvent:Fire()
end

function MouseLockController:DoMouseLockSwitch(name, state, input)
	if state == Enum.UserInputState.Begin then
		self:OnMouseLockToggled()
		return Enum.ContextActionResult.Sink
	end
	return Enum.ContextActionResult.Pass
end

function MouseLockController:BindContextActions()
	ContextActionService:BindActionAtPriority(CONTEXT_ACTION_NAME, function(name, state, input)
		return self:DoMouseLockSwitch(name, state, input)
	end, false, MOUSELOCK_ACTION_PRIORITY, unpack(self.boundKeys))
end

function MouseLockController:UnbindContextActions()
	ContextActionService:UnbindAction(CONTEXT_ACTION_NAME)
end

function MouseLockController:IsMouseLocked()
	return self.enabled and self.isMouseLocked
end

function MouseLockController:EnableMouseLock(enable)
	if enable ~= self.enabled then

		self.enabled = enable

		if self.enabled then
			-- Enabling the mode
			self:BindContextActions()
		else
			-- Disabling
			-- Restore mouse cursor
			if Mouse.Icon~="" then
				Mouse.Icon = ""
			end

			self:UnbindContextActions()

			-- If the mode is disabled while being used, fire the event to toggle it off
			if self.isMouseLocked then
				self.mouseLockToggledEvent:Fire()
			end

			self.isMouseLocked = false
		end

	end
end

return MouseLockController


Prompt:
--- Impulse the spring with a change in velocity
-- @param velocity The velocity to impulse with

Response:
function Spring:Impulse(velocity)
	self.Velocity = self.Velocity + velocity
end


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

Response:
local l__Players__1 = game:GetService("Players");
local v2 = require(script.Parent:WaitForChild("BaseCharacterController"));
local v3 = setmetatable({}, v2);
v3.__index = v3;
function v3.new()
	local v4 = setmetatable(v2.new(), v3);
	v4.isFollowStick = false;
	v4.thumbstickFrame = nil;
	v4.moveTouchObject = nil;
	v4.onTouchMovedConn = nil;
	v4.onTouchEndedConn = nil;
	v4.screenPos = nil;
	v4.stickImage = nil;
	v4.thumbstickSize = nil;
	return v4;
end;
local u1 = Vector3.new(0, 0, 0);
function v3.Enable(p1, p2, p3)
	if p2 == nil then
		return false;
	end;
	if p2 then
		local v5 = true;
	else
		v5 = false;
	end;
	p2 = v5;
	if p1.enabled == p2 then
		return true;
	end;
	p1.moveVector = u1;
	p1.isJumping = false;
	if p2 then
		if not p1.thumbstickFrame then
			p1:Create(p3);
		end;
		p1.thumbstickFrame.Visible = true;
	else
		p1.thumbstickFrame.Visible = false;
		p1:OnInputEnded();
	end;
	p1.enabled = p2;
end;
function v3.OnInputEnded(p4)
	p4.thumbstickFrame.Position = p4.screenPos;
	p4.stickImage.Position = UDim2.new(0, p4.thumbstickFrame.Size.X.Offset / 2 - p4.thumbstickSize / 4, 0, p4.thumbstickFrame.Size.Y.Offset / 2 - p4.thumbstickSize / 4);
	p4.moveVector = u1;
	p4.isJumping = false;
	p4.thumbstickFrame.Position = p4.screenPos;
	p4.moveTouchObject = nil;
end;
local l__UserInputService__2 = game:GetService("UserInputService");
local l__GuiService__3 = game:GetService("GuiService");
function v3.Create(p5, p6)
	if p5.thumbstickFrame then
		p5.thumbstickFrame:Destroy();
		p5.thumbstickFrame = nil;
		if p5.onTouchMovedConn then
			p5.onTouchMovedConn:Disconnect();
			p5.onTouchMovedConn = nil;
		end;
		if p5.onTouchEndedConn then
			p5.onTouchEndedConn:Disconnect();
			p5.onTouchEndedConn = nil;
		end;
	end;
	local v6 = math.min(p6.AbsoluteSize.x, p6.AbsoluteSize.y) <= 500;
	if v6 then
		local v7 = 70;
	else
		v7 = 120;
	end;
	p5.thumbstickSize = v7;
	p5.screenPos = v6 and UDim2.new(0, p5.thumbstickSize / 2 - 10, 1, -p5.thumbstickSize - 20) or UDim2.new(0, p5.thumbstickSize / 2, 1, -p5.thumbstickSize * 1.75);
	p5.thumbstickFrame = Instance.new("Frame");
	p5.thumbstickFrame.Name = "ThumbstickFrame";
	p5.thumbstickFrame.Active = true;
	p5.thumbstickFrame.Visible = false;
	p5.thumbstickFrame.Size = UDim2.new(0, p5.thumbstickSize, 0, p5.thumbstickSize);
	p5.thumbstickFrame.Position = p5.screenPos;
	p5.thumbstickFrame.BackgroundTransparency = 1;
	local v8 = Instance.new("ImageLabel");
	v8.Name = "OuterImage";
	v8.Image = "rbxasset://textures/ui/TouchControlsSheet.png";
	v8.ImageRectOffset = Vector2.new();
	v8.ImageRectSize = Vector2.new(220, 220);
	v8.BackgroundTransparency = 1;
	v8.Size = UDim2.new(0, p5.thumbstickSize, 0, p5.thumbstickSize);
	v8.Position = UDim2.new(0, 0, 0, 0);
	v8.Parent = p5.thumbstickFrame;
	p5.stickImage = Instance.new("ImageLabel");
	p5.stickImage.Name = "StickImage";
	p5.stickImage.Image = "rbxasset://textures/ui/TouchControlsSheet.png";
	p5.stickImage.ImageRectOffset = Vector2.new(220, 0);
	p5.stickImage.ImageRectSize = Vector2.new(111, 111);
	p5.stickImage.BackgroundTransparency = 1;
	p5.stickImage.Size = UDim2.new(0, p5.thumbstickSize / 2, 0, p5.thumbstickSize / 2);
	p5.stickImage.Position = UDim2.new(0, p5.thumbstickSize / 2 - p5.thumbstickSize / 4, 0, p5.thumbstickSize / 2 - p5.thumbstickSize / 4);
	p5.stickImage.ZIndex = 2;
	p5.stickImage.Parent = p5.thumbstickFrame;
	local u4 = nil;
	p5.thumbstickFrame.InputBegan:Connect(function(p7)
		if not (not p5.moveTouchObject) or p7.UserInputType ~= Enum.UserInputType.Touch or p7.UserInputState ~= Enum.UserInputState.Begin then
			return;
		end;
		p5.moveTouchObject = p7;
		p5.thumbstickFrame.Position = UDim2.new(0, p7.Position.x - p5.thumbstickFrame.Size.X.Offset / 2, 0, p7.Position.y - p5.thumbstickFrame.Size.Y.Offset / 2);
		u4 = Vector2.new(p5.thumbstickFrame.AbsolutePosition.x + p5.thumbstickFrame.AbsoluteSize.x / 2, p5.thumbstickFrame.AbsolutePosition.y + p5.thumbstickFrame.AbsoluteSize.y / 2);
		local v9 = Vector2.new(p7.Position.x - u4.x, p7.Position.y - u4.y);
	end);
	local function u5(p8)
		local v10 = p8 / (p5.thumbstickSize / 2);
		local l__magnitude__11 = v10.magnitude;
		if l__magnitude__11 < 0.05 then
			local v12 = Vector3.new();
		else
			local v13 = v10.unit * ((l__magnitude__11 - 0.05) / 0.95);
			v12 = Vector3.new(v13.x, 0, v13.y);
		end;
		p5.moveVector = v12;
	end;
	local function u6(p9)
		local v14 = Vector2.new(p9.x - u4.x, p9.y - u4.y);
		local l__magnitude__15 = v14.magnitude;
		local v16 = p5.thumbstickFrame.AbsoluteSize.x / 2;
		if p5.isFollowStick and v16 < l__magnitude__15 then
			local v17 = v14.unit * v16;
			p5.thumbstickFrame.Position = UDim2.new(0, p9.x - p5.thumbstickFrame.AbsoluteSize.x / 2 - v17.x, 0, p9.y - p5.thumbstickFrame.AbsoluteSize.y / 2 - v17.y);
		else
			v14 = v14.unit * math.min(l__magnitude__15, v16);
		end;
		p5.stickImage.Position = UDim2.new(0, v14.x + p5.stickImage.AbsoluteSize.x / 2, 0, v14.y + p5.stickImage.AbsoluteSize.y / 2);
	end;
	p5.onTouchMovedConn = l__UserInputService__2.TouchMoved:Connect(function(p10, p11)
		if p10 == p5.moveTouchObject then
			u4 = Vector2.new(p5.thumbstickFrame.AbsolutePosition.x + p5.thumbstickFrame.AbsoluteSize.x / 2, p5.thumbstickFrame.AbsolutePosition.y + p5.thumbstickFrame.AbsoluteSize.y / 2);
			u5((Vector2.new(p10.Position.x - u4.x, p10.Position.y - u4.y)));
			u6(p10.Position);
		end;
	end);
	p5.onTouchEndedConn = l__UserInputService__2.TouchEnded:Connect(function(p12, p13)
		if p12 == p5.moveTouchObject then
			p5:OnInputEnded();
		end;
	end);
	l__GuiService__3.MenuOpened:Connect(function()
		if p5.moveTouchObject then
			p5:OnInputEnded();
		end;
	end);
	p5.thumbstickFrame.Parent = p6;
end;
return v3;


Prompt: --Variables

Response:
local SeatInteractionCount = {}

local VehicleSeating = {}

local function getVehicleObject()
	return script.Parent.Parent
end

local function carjackingEnabled(obj)
	return obj:GetAttribute("AllowCarjacking")
end

local function getEffectsFolderFromSeat(seat)
	local parent = seat.Parent
	if parent:IsA("Model") then
		if parent:FindFirstChild("Effects") then
			return parent.Effects
		else
			return getEffectsFolderFromSeat(parent)
		end
	end
	return nil
end

local function playDoorSound(seat, sound)
	local sound = seat:FindFirstChild(sound.."Door")
	if sound then
		sound:Play()
	end
end


Prompt: --//sw

Response:
local sw = Instance.new("Motor", script.Parent.Parent.Misc.SW.SS)
sw.MaxVelocity = 0.167
sw.Part0 = script.Parent.SW
sw.Part1 = sw.Parent


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

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

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

ZoneModelName = "Big star" -- name the zone model

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


Prompt:
--		Humanoid:UnequipTools()
--		if tool then
--			Humanoid:EquipTool(tool)
--		end

Response:
		for i,v in pairs(Char:GetChildren()) do
			if v:IsA('Tool') then
				v.Parent = Backpack
			end
		end
		if tool then
			tool.Parent = Char
			tool.Unequipped:connect(function()
				wait()
				EquippedVal.Value = getSlotFromTool(Char:FindFirstChildOfClass('Tool'))
				--EquippedVal.Value = nil
			end)
		end

		if tool == nil then
			EquippedVal.Value = nil
		end
	end

	-- Takes Enum.KeyCode and gets string at end
	local function getKeyCodeName(keycode)
		keycode = tostring(keycode)
		local splitStrings = string.split(keycode,'.')
		return splitStrings[#splitStrings]
	end

	-- Equips whatever the Equipped Obj's value is
	EquippedVal.Changed:Connect(function()
		local equipSlot = EquippedVal.Value
		if equipSlot then
			equip(equipSlot.Value)
		else
			equip(nil)
		end
	end)

	-- ensure equipped items replicate when changed
	for i,v in pairs(SlotsFolder:GetChildren()) do
		v.Changed:connect(function()
			if EquippedVal.Value == v then
				wait() -- required to prevent slot duping
				equip(v.Value)
			end
		end)
	end

	-- Checks keyboard input
	UserInputService.InputBegan:Connect(function(input, gameProcessed)
		if not gameProcessed then -- Ensures user is not typing in TextBox
			-- Ensures user is using keybooard
			if input.UserInputType == Enum.UserInputType.Keyboard then
				-- Get the KeyCode and KeyCode's ending/name
				local keyPressed = input.KeyCode
				keyPressed = getKeyCodeName(keyPressed)
				-- Checks if there is a slot w/ the pressed key's name
				local slotRequested = SlotsFolder:FindFirstChild(keyPressed)
				if slotRequested then -- if there is such a slot
					-- if they're requesting the same slot
					if EquippedVal.Value == slotRequested then
						EquippedVal.Value = nil -- unequip the tool
					else
						EquippedVal.Value = slotRequested -- equip the tool
					end
				end
			end
		end
	end)

	return EquippedVal
end


Prompt:
--// No-opt connect Server>Client RemoteEvents to ensure they cannot be called
--// to fill the remote event queue.

Response:
local function emptyFunction()
	--intentially empty
end

local function GetObjectWithNameAndType(parentObject, objectName, objectType)
	for i, child in pairs(parentObject:GetChildren()) do
		if (child:IsA(objectType) and child.Name == objectName) then
			return child
		end
	end

	return nil
end

local function CreateIfDoesntExist(parentObject, objectName, objectType)
	local obj = GetObjectWithNameAndType(parentObject, objectName, objectType)
	if (not obj) then
		obj = Instance.new(objectType)
		obj.Name = objectName
		obj.Parent = parentObject
	end
	useEvents[objectName] = obj

	return obj
end


Prompt: --Suspension Placement--

Response:
local SFL = FL:Clone()
SFL.Name = "FL"
SFL.CanCollide = false
SFL.Parent = script.Parent.Parent
SFL.CFrame = SFL.CFrame + (Vector3.new(SFL.Size.X,SFL.Size.X,SFL.Size.X) * SFL.CFrame.upVector)
SFL.Attachment.Rotation = Vector3.new(0,0,90)

local SFR = FR:Clone()
SFR.Name = "FR"
SFR.CanCollide = false
SFR.Parent = script.Parent.Parent
SFR.CFrame = SFR.CFrame + (Vector3.new(SFL.Size.X,SFL.Size.X,SFL.Size.X) * SFR.CFrame.upVector)
SFR.Attachment.Rotation = Vector3.new(0,0,90)

local SRL = RL:Clone()
SRL.Name = "RL"
SRL.CanCollide = false
SRL.Parent = script.Parent.Parent
SRL.CFrame = SRL.CFrame + (Vector3.new(SFL.Size.X,SFL.Size.X,SFL.Size.X) * SRL.CFrame.upVector)
SRL.Attachment.Rotation = Vector3.new(0,0,90)

local SRR = RR:Clone()
SRR.Name = "RR"
SRR.CanCollide = false
SRR.Parent = script.Parent.Parent
SRR.CFrame = SRR.CFrame + (Vector3.new(SFL.Size.X,SFL.Size.X,SFL.Size.X) * SRR.CFrame.upVector)
SRR.Attachment.Rotation = Vector3.new(0,0,90)


Prompt:
-- Implements Javascript's `Array.prototype.reduce` as defined below
-- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce
-- TODO Luau: when Luau supports overloads, use them here so that reduceFn can correctly use T when initialValue (U) isn't supplied

Response:
return function<T, U>(array: Array<T>, callback: reduceFn<T, U>, initialValue: U?): U
	if _G.__DEV__ then
		if typeof(array) ~= "table" then
			error(string.format("Array.reduce called on %s", typeof(array)))
		end
		if typeof(callback) ~= "function" then
			error("callback is not a function")
		end
	end

	local length = #array

	local value: T | U
	local initial = 1

	if initialValue ~= nil then
		value = initialValue
	else
		initial = 2
		if length == 0 then
			error("reduce of empty array with no initial value")
		end
		value = array[1]
	end

	for i = initial, length do
		value = callback(value :: U, array[i], i, array)
	end

	return value :: U
end


Prompt:
--[[
	-- Original By Kip Turner, Copyright Roblox 2014
	-- Updated by Garnold to utilize the new PathfindingService API, 2017
	-- 2018 PlayerScripts Update - AllYourBlox
--]]


Prompt: --Made by Stickmasterluke

Response:
sp=script.Parent

damage=0						--  +/- 10%
damagewindow=1					--after clicking, how long does the player have to hit the opponent wioth their weapon to deal damage
swingrate=.65

clashsounds={91154405,91154446,91154471,91154503,91154521}
swooshsounds={89357340,89357340}
hitsounds={91154909,91154932,91154954}
anims={"Stab1","Stab2","LeftSlash"}

ready=false
equipped=false
rate=1/30
lastswing=0

function waitfor(a,b)
	while a:FindFirstChild(b)==nil do
		a.ChildAdded:wait()
	end
	return a:FindFirstChild(b)
end

reloading=waitfor(sp,"Reloading")
down=waitfor(sp,"MouseDown")
runanim=waitfor(sp,"RunAnim")
sparkles=waitfor(sp.Handle,"Sparkles")
debris=game:getService("Debris")
weaponhud=waitfor(sp,"WeaponHud")
weaponnametag=waitfor(weaponhud,"WeaponName")
guibar=waitfor(weaponhud,"Bar")
guibarfill=waitfor(guibar,"Fill")
weaponnametag.Text=sp.Name

function runsound(id,volume)
	local volume=volume or 1
	local sound=Instance.new("Sound")
	sound.Looped=false
	sound.Pitch=1
	sound.SoundId="http://www.roblox.com/asset/?id="..tostring(id)
	sound.PlayOnRemove=false
	sound.Volume=volume
	debris:AddItem(sound,3)
	sound.Parent=sp.Handle
	wait()
	sound:Play()
end

function billboard(pos,text,time,color)
	local pos=pos or Vector3.new(0,0,0)
	local text=text or "Hello World!"
	local time=time or 2
	local color=color or Color3.new(1,0,0)
	local pos=pos+Vector3.new(0,5,0)
	local ep=Instance.new("Part")
	ep.Name="Effect"
	ep.formFactor="Custom"
	ep.Size=Vector3.new(0,0,0)
	ep.TopSurface="Smooth"
	ep.BottomSurface="Smooth"
	ep.CFrame=CFrame.new(pos)
	ep.Anchored=true
	ep.CanCollide=false
	ep.Transparency=1
	local bb=Instance.new("BillboardGui")
	bb.Size=UDim2.new(3,0,3,0)
	bb.Adornee=ep
	local tl=Instance.new("TextLabel")
	tl.BackgroundTransparency=1
	tl.Size=UDim2.new(0,0,0,0)
	tl.Text=text
	tl.TextColor3=color
	tl.TextScaled=true
	tl.Font="ArialBold"

	tl.Parent=bb
	bb.Parent=ep
	debris:AddItem(ep,time+.1)
	ep.Parent=game.Workspace
	delay(0,function()
		local frames=time/rate
		for frame=1,frames do
			wait(rate)
			local percent=frame/frames
			ep.CFrame=CFrame.new(pos)+Vector3.new(0,5*percent,0)
			tl.TextTransparency=percent
		end
		ep:remove()
	end)
end

function makeblood(part)
	--[[
	if part then
		local b=Instance.new("Part")
		b.BrickColor=BrickColor.new("Bright red")
		b.formFactor="Custom"
		b.Transparency=math.random(0,1)*.5
		if math.random()<.5 then
			b.CanCollide=false
		else
			b.CanCollide=true
		end
		b.TopSurface="Smooth"
		b.BottomSurface="Smooth"
		b.Size=Vector3.new(.2*math.random(1,5),.2*math.random(1,5),.2*math.random(1,5))
		b.Velocity=part.Velocity+(Vector3.new((math.random()-.5),(math.random()-.5),(math.random()-.5))*30)
		b.RotVelocity=part.RotVelocity+(Vector3.new((math.random()-.5),(math.random()-.5),(math.random()-.5))*20)
		b.CFrame=part.CFrame*CFrame.new((math.random()-.5)*3,(math.random()-.5)*3,(math.random()-.5)*3)*CFrame.Angles(math.pi*2*math.random(),math.pi*2*math.random(),math.pi*2*math.random())
		debris:AddItem(b,math.random()*4)
		b.Parent=game.Workspace
	end
	--]]
end

sp.Handle.Touched:connect(function(hit)
	if ready and equipped and hit and hit.Parent~=nil and hit:IsDescendantOf(sp.Parent)==false and string.lower(string.sub(hit.Name,1,6))~="effect" and (tick()-lastswing)<=damagewindow then
		if hit:FindFirstChild("CanBlock") and sp.Handle:FindFirstChild("Blockable") then
			ready=false
			runsound(clashsounds[math.random(1,#clashsounds)])
			sparkles.Enabled=true
			delay(.2,function()
				sparkles.Enabled=false
			end)
			billboard(sp.Handle.Position,"Block",2,Color3.new(1,1,0))
		end
		local mh=sp.Parent:FindFirstChild("Humanoid")
		local eh=hit.Parent:FindFirstChild("Humanoid")
		local ra=sp.Parent:FindFirstChild("Right Arm")
		local plr=game.Players:GetPlayerFromCharacter(sp.Parent)
		if mh and eh and eh~=mh and mh.Health>0 and eh.Health>0 and ra and plr~=nil then
			if not plr.Neutral then
				local eplr=game.Players:GetPlayerFromCharacter(eh.Parent)
				if eplr~=nil and eplr.Neutral==false and eplr.TeamColor==plr.TeamColor then
					return	--No team killing
				end
			end
			ready=false
			for i,v in ipairs(eh:GetChildren()) do
				if v.Name=="creator" then
					v:remove()
				end
			end
			local creator=Instance.new("ObjectValue")
			creator.Name="creator"
			creator.Value=plr
			creator.Parent=eh
			debris:AddItem(creator,1)
			local localdamage=math.floor(damage*(.9+(math.random()*.2)))
			eh:TakeDamage(localdamage)
			billboard(hit.Position,"-"..tostring(localdamage))
			runsound(hitsounds[math.random(1,#hitsounds)])
			local bloodeffects=math.ceil(localdamage/10)
			for i=1,math.random(bloodeffects-1,bloodeffects+1) do
				--[[if math.random()<.5 then
					makeblood(sp.Handle)
				else]]
					makeblood(hit)
				--end
			end
		end
	end
end)

function Activate()
	if equipped and (tick()-lastswing)>=swingrate then
		ready=true
		reloading.Value=true

		runsound(swooshsounds[math.random(1,#swooshsounds)],.5)

		newanim=anims[math.random(1,#anims)]
		while newanim==runanim.Value do
			newanim=anims[math.random(1,#anims)]
		end
		runanim.Value=newanim

		lastswing=tick()
		updategui()

		wait(swingrate)

		reloading.Value=false
		if down.Value then
			Activate()
		end
	end
end

down.Changed:connect(function()
	if down.Value then
		Activate()
	end
end)

function updategui()
	local swingpercent=math.min((tick()-lastswing)/swingrate,1)
	if swingpercent<.5 then	--fade from red to yellow then to green
		guibarfill.BackgroundColor3=Color3.new(1,swingpercent*2,0)
	else
		guibarfill.BackgroundColor3=Color3.new(1-((swingpercent-.5)/.5),1,0)
	end
	guibarfill.Size=UDim2.new(swingpercent,0,1,0)
end

sp.Equipped:connect(function(mouse)
	lastswing=tick()
	updategui()

	reloading.Value=true
	ready=false
	equipped=true

	delay(0,function()		--HAAB (Hacking around a bug)
		local plr=game.Players:GetPlayerFromCharacter(sp.Parent)
		if plr~=nil then
			local plrgui=plr:FindFirstChild("PlayerGui")
			if plrgui~=nil and weaponhud~=nil then
				weaponhud.Parent=plrgui
				while equipped do
					updategui()
					wait(rate)
				end
			end
		end
	end)

	wait(swingrate)

	reloading.Value=false
	if down.Value then
		Activate()
	end
end)

sp.Unequipped:connect(function()
	ready=false
	equipped=false
	delay(0,function()	--HAAB
		weaponhud.Parent=sp
	end)
end)


Prompt: ----- Script -----

Response:
Button.Activated:Connect(function()
	Events.LolipopEvent:FireServer()
	Frame.Visible = false
end)


Prompt: --returns the wielding player of this tool

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

function Toss(direction)
	local OriginalWalkSpeed = Humanoid.WalkSpeed
	OriginalWalkSpeed = OriginalWalkSpeed
	Humanoid.WalkSpeed = 0
	local handlePos = Vector3.new(Tool.Handle.Position.X, 0, Tool.Handle.Position.Z)
	local spawnPos = Character.Head.Position
	spawnPos  = spawnPos + (direction * 5)
	Tool.Handle.Transparency = 1
	local Object = Tool.Handle:Clone()
	Object.Parent = workspace
	Object.Transparency = 0
	Object.Swing.Pitch = math.random(90, 110)/100
	Object.Swing:Play()
	Object.CanCollide = true
	Object.CFrame = Tool.Handle.CFrame
	Object.Velocity = (direction*AttackVelocity) + Vector3.new(0,AttackVelocity/7.5,0)
	local rand = 11.25
	Object.RotVelocity = Vector3.new(math.random(-rand,rand),math.random(-rand,rand),math.random(-rand,rand))
	Object:SetNetworkOwner(getPlayer())
	local ScriptClone = DamageScript:Clone()
	ScriptClone.FriendlyFire.Value = FriendlyFire
	ScriptClone.Damage.Value = AttackDamage
	ScriptClone.Parent = Object
	ScriptClone.Disabled = false
	local tag = Instance.new("ObjectValue")
	tag.Value = getPlayer()
	tag.Name = "creator"
	tag.Parent = Object
	Humanoid.WalkSpeed = OriginalWalkSpeed
	Tool:Destroy()
end

Remote.OnServerEvent:Connect(function(player, mousePosition)
	if not AttackAble then return end
	AttackAble = false
	if Humanoid and Humanoid.RigType == Enum.HumanoidRigType.R15 then
		Remote:FireClient(getPlayer(), "PlayAnimation", "Animation")
	end
	local targetPos = mousePosition.p
	local lookAt = (targetPos - Character.Head.Position).unit
	Toss(lookAt)
	LeftDown = true
end)

function onLeftUp()
	LeftDown = false
end

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

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


Prompt:
--[=[
	@within Plasma
	@function button
	@tag widgets
	@param label string -- The label for the checkbox
	@return ButtonWidgetHandle

	A text button.

	Returns a widget handle, which has the field:

	- `clicked`, a function you can call to check if the checkbox was clicked this frame

	![A button](https://i.eryn.io/2150/RobloxStudioBeta-iwRM0RMx.png)

	```lua
	Plasma.window("Button", function()
		if Plasma.button("button text"):clicked() then
			print("clicked!")
		end
	end)
	```
]=]

Response:
local Runtime = require(script.Parent.Parent.Runtime)
local Style = require(script.Parent.Parent.Style)
local create = require(script.Parent.Parent.create)

return Runtime.widget(function(text)
	local clicked, setClicked = Runtime.useState(false)
	local refs = Runtime.useInstance(function(ref)
		local style = Style.get()

		return create("TextButton", {
			[ref] = "button",
			BackgroundColor3 = style.bg3,
			BorderSizePixel = 0,
			Font = Enum.Font.SourceSans,
			Size = UDim2.new(0, 100, 0, 40),
			TextColor3 = style.textColor,
			AutomaticSize = Enum.AutomaticSize.X,
			TextSize = 21,

			create("UIPadding", {
				PaddingLeft = UDim.new(0, 10),
				PaddingRight = UDim.new(0, 10),
			}),

			create("UICorner"),

			Activated = function()
				setClicked(true)
			end,
		})
	end)

	local instance = refs.button

	instance.Text = text

	local handle = {
		clicked = function()
			if clicked then
				setClicked(false)
				return true
			end

			return false
		end,
	}

	return handle
end)


Prompt: --Services

Response:
local pathfindingService = game:GetService("PathfindingService")
local runService = game:GetService("RunService")

local modules = script.Parent
local core = require(modules.CoreModule)
local status = require(modules.Status)
local troubleshoot = require(modules.Troubleshoot)

local marine = script.Parent.Parent.Parent
local myHuman = marine.Humanoid
local myRoot = marine.HumanoidRootPart

local moveEvent = Instance.new("BindableEvent")
function movement.moveToFinished()
	local success = true
	local completed = false

    core.spawn(function()
        wait(1)
		if not completed then
	        success = false
	        moveEvent:Fire()
		end
    end)

    core.spawn(function()
        myHuman.MoveToFinished:Wait()
        moveEvent:Fire()
    end)

	moveEvent.Event:Wait()

	completed = true

    return success
end

local path = pathfindingService:CreatePath()
function movement.pathToLocation(target)
	if not target or not target.Parent then return end

	path:ComputeAsync(myRoot.Position, target.Position)

	if path.Status == Enum.PathStatus.NoPath then
		return
	end

	local waypoints = path:GetWaypoints()

	--Make sure that path is actually valid
	if waypoints[1] and core.checkDist(waypoints[1],myRoot) > 10 then
		runService.Heartbeat:Wait()
		movement.pathToLocation(target)
	end

	troubleshoot.visualizePath(path)

	for _,waypoint in ipairs(waypoints) do
		if waypoint.Action == Enum.PathWaypointAction.Jump then
			myHuman.Jump = true
		end
		myHuman:MoveTo(waypoint.Position)
		core.spawn(function()
			while myHuman.WalkToPoint.Y > myRoot.Position.Y - 1 do
				wait(0.1)
				myHuman.Jump = true
			end
		end)
		local moveSuccess = movement.moveToFinished()
		local dist = core.checkDist(myRoot,target)
		local canSee = core.checkSight(target)
		if not moveSuccess or not target.Parent or (dist < 30 and canSee) or status:get("currentTarget") ~= target then
			break
		elseif (core.checkSight(target) and target.Position.Y <= myRoot.Position.Y-5) then
			myHuman:MoveTo(myRoot.Position)
			break
		end
		if core.checkDist(target,waypoints[#waypoints]) > 30 then
			--movement.pathToLocation(target)
			break
		end
	end
end

function movement.walkRandom()
	local randX = math.random(-100,100)
	local randZ = math.random(-100,100)
	local goal = myRoot.Position + Vector3.new(randX, 0, randZ)
	local path = pathfindingService:CreatePath()
	path:ComputeAsync(myRoot.Position, goal)
	local waypoints = path:GetWaypoints()

	if path.Status == Enum.PathStatus.Success then
		for i,waypoint in ipairs(waypoints) do
			if waypoint.Action == Enum.PathWaypointAction.Jump then
				myHuman.Jump = true
			end
			myHuman:MoveTo(waypoint.Position)
			core.spawn(function()
				wait(0.5)
				if myHuman.WalkToPoint.Y > myRoot.Position.Y then
					myHuman.Jump = true
				end
			end)
			local moveSuccess = myHuman.MoveToFinished:Wait()
			if not moveSuccess or status:get("currentTarget") then
				break
			end
		end
	else
		wait(2)
	end
end


Prompt:
--[[

	This module script contains all the main animations. I put it into this script so it'll be easier to edit.

	Both arms are welded to a single brick called "animBase". This makes it easier to edit movement animations because you only have to
	edit the cframe of one brick instead of 2 arms.

	The idling, walking, and running animations have a Pos and a Rot component. The Pos component is the position of the weld and the Rot component
	is the rotation of the weld. They're vector3 values so the script can multiply each value by an alpha and add them together to make the smooth
	transitions possible

	The table directly below lets you know how each component of the Vector affects the movement of the weld so it's easier to edit

	This module also contains the reload animation which I moved here for easier editing. The animation function has a parameter S that contains all
	the functions and variables that are necessary to make the animation run

	HOW TO EDIT THE RELOAD ANIMATION:
		-Make sure each block of the animation is made into a separate function, it needs to be like this so if the reload animation needs to be stopped
		midway, the arms don't glitch out
		-Each animation piece should only have one wait command at the end of the function
		-Multiply every duration value, including the wait time values by the animSpeed. That way if you change the reload time, you won't have to change
		each individual time value for all the animation components

--]]

Response:
local Animations = {

	Reload = function(S) --This is the main reload animation. The parameter S contains all the variables and functions that are necessary for this animation
		--[[
			FUNCTION LIST_

				S.tweenJoint(Joint, newC0, newC1, Alpha, Duration) --This function tweens a joint to a given C0 and C1. The Alpha parameter is function
					that returns a number between 0 and 1 given an argument of a number between 0 and 90. The Duration is how fast the joint tweens. NOTE,
					you can put nil as an argument for the newC0 or newC1 parameter and the function won't tween that specific property of the weld. This
					is useful if you only want to mess with the C0 or C1 property of a weld.

				S.makeMagInvisible() --This function makes the mag invisible so it looks like the mag was removed

				S.makeMagVisible() --This function makes the mag visible again at whatever the previous transparency of the mag parts were

				S.isMagVisible() --This function returns a true or false value based on whether or not the mag is visible. This can be used to tell if
					the animation was stopped midway and where to restart the animation

				S.isMagEmpty() --This function returns a true or false value based on whether or not the mag is empty, meaning the ammo is 0. This can be
					used to decide if a chambering animation should play after the reload animation

				S.setNewMag() --This function sets the newMag variable in the clientMain to true which basically lets the script know that a new mag was
					put into the gun. This is used so that if the reload animation is broken after the new mag was put in but before the chambering animation
					then the script will simply play the chambering animation instead of putting in another mag

				S.isNewMag() --This function returns a true or false value based on whether or not the mag that is currently attached to the gun is a new
					mag. In order for it to be a new mag, it needs to have full ammo. Once you fire, the mag becomes an old mag

				S.createMag(Key) --This functions clones the Mag and puts it in a table with a Key parameter so you can access the mag in a separate
					function and it returns a Model containing the Mag and a table that contains the original mag bricks and the corresponding clone. NOTE,
					the mag bricks will be made non can collide

				S.getMag(Key) --This function gets a Mag from the mag table given a Key argument and it returns the model that the mag is contained in
					and the brick that all the other mag parts are welded to

				S.attachGripToHead() --This function detaches the grip from the right arm and attaches it to the Head. This is so you can make reload
					animations that require using the right arm to manipulate the gun in any way. The C0 of the grip is changed so the gun stays in the
					position that it was in before you detached the grip from the right arm.

				S.attachGripToArm() --This function detaches the grip from the Head and attaches it to the Arm. The C0 of the grip is changed so the gun
					stays in the position that it was in before you detached the grip from the head

				S.Sine(X) --This function is an Alpha function for the tweenJoint function. Given a number between 0 and 90, the function will return the
					sine of that number, which is a number between 0 and 1, which is used to tween a Joint with a Sine movement

				S.Linear(X) --This function is an Alpha function for the tweenJoint function. Given a number between 0 and 90, the function will return
					the number / 90, which is a number between 0 and 1, which is used to a tween a Joint with a Linear movement

			VARIABLE LIST_

				S.Handle --This variable is the Handle of gun

				S.LArm --This variable is the left arm

				S.RArm --This variable is the right arm

				S.LWeld --This variable is the left arm weld which is attached to the animBase

				S.RWeld --This variable is the right arm weld which is attached to the animBase

				S.LC0 --This variable is the cframe of the left arm joint with respect to the torso

				S.RC0 --This variable is the cframe of the right arm joint with respect to the torso

				S.Grip --This variable is the Grip weld which is attached to right arm

				S.gunIgnore --This variable is the gun ignore model which contains the fake arms and bullets and other stuff

				S.Cam --This variable is the player camera

				S.CF --This variable is the shortened form of CFrame.new which you can use instead of CFrame.new

				S.CFANG --This variable is the shortened form of CFrame.Angles which you can use instead of CFrame.Angles

				S.V3 --This variable is the shortened form of Vector3.new which you can use instead of Vector3.new

				S.RAD --This variable is the shortened form of math.rad which you can use instead of math.rad

				S.reloadTimeLoaded --This variable is the reload time for when the gun is loaded which you can use to modify how fast the reload
					animation runs

				S.reloadTimeEmpty --This variable is the reload time for when the gun is empty which you can use to modify how fast the reload
					animation runs
		--]]

		local W1 = nil
		local W2 = nil
		local animSpeed = S.isMagEmpty() and S.reloadTimeEmpty / 1.3 or S.reloadTimeLoaded / 0.9
		return {
			function()
				if (not S.isNewMag()) then
					if S.isMagVisible() then
						local Mag1, magTable1 = S.createMag("Mag1")

						Mag1.Parent = S.gunIgnore

						W1 = Instance.new("Weld")
						W1.Part0 = magTable1[1].magClone
						W1.Part1 = S.Handle
						W1.C0 = magTable1[1].Original.CFrame:toObjectSpace(S.Handle.CFrame)
						W1.Parent = magTable1[1].magClone

						S.tweenJoint(S.LWeld, nil, S.CF(-0.9, 2, -1.1) * S.CFANG(S.RAD(-15), 0, S.RAD(-25)), S.Sine, 0.2 * animSpeed)
						S.tweenJoint(S.RWeld, nil, S.CF(0.3, 0.2, -0.31) * S.CFANG(S.RAD(-12), 0, S.RAD(25)), S.Sine, 0.2 * animSpeed)
						S.tweenJoint(S.Grip, nil, S.CFANG(0, S.RAD(20), S.RAD(10)), S.Sine, 0.1 * animSpeed)
						wait(0.2 * animSpeed)
					end
				end
			end;

			function()
				if (not S.isNewMag()) then
					if S.isMagVisible() then
						S.makeMagInvisible()
						W1:Destroy()
						local Mag1, magTable1 = S.getMag("Mag1")
						magTable1[1].magClone.Velocity = S.Handle.Velocity + S.Handle.CFrame:vectorToWorldSpace(S.V3(0, -1, 0)) * 20

						S.tweenJoint(S.RWeld, nil, S.CF(0.3, 0.2, -0.5) * S.CFANG(S.RAD(-20), S.RAD(10), S.RAD(25)), S.Sine, 0.25 * animSpeed)
						S.tweenJoint(S.Grip, nil, S.CFANG(0, S.RAD(20), S.RAD(10)), S.Sine, 0.2 * animSpeed)
					else
						S.tweenJoint(S.RWeld, nil, S.CF(0.6, 0.2, -0.61) * S.CFANG(S.RAD(-12), S.RAD(20), S.RAD(25)), S.Sine, 0.2 * animSpeed)
						S.tweenJoint(S.Grip, nil, S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10)), S.Sine, 0.2 * animSpeed)
					end

					S.tweenJoint(S.LWeld, nil, S.CF(0, 0.5, 0) * S.CFANG(S.RAD(95), 0, S.RAD(-25)), S.Sine, 0.2 * animSpeed)

					wait(0.25 * animSpeed)
				end
			end;

			function()
				if (not S.isNewMag()) then
					local Mag1, magTable1 = S.getMag("Mag1")
					if Mag1 then Mag1:Destroy() end

					local Mag2, magTable2 = S.createMag("Mag2")

					Mag2.Parent = S.gunIgnore

					local LArmCF = S.LWeld.Part0.CFrame * S.LWeld.C0 * (S.CF(0.58, 1.63, -1.4) * S.CFANG(S.RAD(-22), S.RAD(20), S.RAD(-60))):inverse()
					local RArmCF = S.RWeld.Part0.CFrame * S.RWeld.C0 * (S.CF(0.6, 0.2, -0.61) * S.CFANG(S.RAD(-15), S.RAD(20), S.RAD(25))):inverse()
					local handleOffsetCF = S.RArm.CFrame:toObjectSpace(S.RArm.CFrame * S.Grip.C0 * (S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10))):inverse())
					local originalMagOffsetCF = S.Handle.CFrame:toObjectSpace(magTable2[1].Original.CFrame)
					local newMagC0 = LArmCF:toObjectSpace(RArmCF * handleOffsetCF * originalMagOffsetCF)

					W2 = Instance.new("Weld")
					W2.Part0 = S.LArm
					W2.Part1 = magTable2[1].magClone
					W2.C0 = newMagC0
					W2.Parent = magTable2[1].magClone

					S.tweenJoint(S.LWeld, nil, S.CF(0.55, 1, -2.4) * S.CFANG(S.RAD(-20), S.RAD(20), S.RAD(-60)), S.Sine, 0.2 * animSpeed)--0.25
					S.tweenJoint(S.RWeld, nil, S.CF(0.6, 0.2, -0.61) * S.CFANG(S.RAD(-12), S.RAD(20), S.RAD(25)), S.Sine, 0.2 * animSpeed)
					S.tweenJoint(S.Grip, nil, S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10)), S.Sine, 0.2 * animSpeed)
					wait(0.2 * animSpeed)
				end
			end;

			function()
				if (not S.isNewMag()) then
					S.tweenJoint(S.Grip, nil, S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10)), S.Sine, 0.15 * animSpeed)
					S.tweenJoint(S.LWeld, nil, S.CF(0.58, 1.63, -1.4) * S.CFANG(S.RAD(-22), S.RAD(20), S.RAD(-60)), S.Sine, 0.15 * animSpeed)--0.25
					S.tweenJoint(S.RWeld, nil, S.CF(0.6, 0.2, -0.61) * S.CFANG(S.RAD(-15), S.RAD(20), S.RAD(25)), S.Sine, 0.2 * animSpeed)

					wait(0.2 * animSpeed)
				end
			end;

			function()
				if (not S.isNewMag()) then
					local Mag1, _ = S.getMag("Mag1")
					local Mag2, _ = S.getMag("Mag2")
					S.makeMagVisible()
					S.setNewMag()
					if Mag1 then Mag1:Destroy() end
					Mag2:Destroy()
				end
			end;

			function()
				if S.isMagEmpty() then
					if S.isNewMag() then
						S.tweenJoint(S.Grip, nil, S.CFANG(S.RAD(-10), S.RAD(20), S.RAD(10)), S.Sine, 0.15 * animSpeed)
						S.tweenJoint(S.LWeld, nil, S.CF(0.58, 1.63, -1.4) * S.CFANG(S.RAD(-22), S.RAD(20), S.RAD(-60)), S.Sine, 0.15 * animSpeed)--0.25
						S.tweenJoint(S.RWeld, nil, S.CF(0.6, 0.2, -0.61) * S.CFANG(S.RAD(-15), S.RAD(20), S.RAD(25)), S.Sine, 0.2 * animSpeed)
					end
					S.tweenJoint(S.LWeld, nil, S.CF(0, 1.3, -0.55) * S.CFANG(S.RAD(-26), 0, 0), S.Sine, 0.2 * animSpeed)

					wait(0.2 * animSpeed)
				end
			end;

			function()
				if S.isMagEmpty() then
					S.tweenJoint(S.LWeld, nil, S.CF(0.4, 1.6, -0.55) * S.CFANG(S.RAD(-23), 0, S.RAD(-60)), S.Sine, 0.1 * animSpeed)

					wait(0.05 * animSpeed)
				end
			end;

			function()
				if S.isMagEmpty() then
					S.tweenJoint(S.RWeld, nil, S.CF(0.6, 0.2, -0.61) * S.CFANG(S.RAD(-15), S.RAD(20), S.RAD(20)), S.Sine, 0.05 * animSpeed)

					wait(0.15 * animSpeed)
				end
			end;
		}
	end;

	Cocking = function(S)

	end;

	Crawling = function(X, moveDirection, moveSpeed) --This is the animation for when you're crawling
		--[[
			The moveDirection gives you the angle at which your character is moving with respect to the way you're facing. So if you're
			moving to the right and you're facing forward then the moveDirection will give you an angle of -90. If you're moving backward
			and you're facing forward then the moveDirection will give you an angle of 180. I use this angle to adjust the crawling animation
			so that you're arms move in the direction that you're moving so it looks more realistic rather than the arms constantly moving forward

			The moveVelocity gives you how fast you're moving in the X-Z plane. It doesn't take your Y-velocity into account so if you're falling your
			moveVelocity will still be how fast you're moving horizontally. You can use this to adjust how fast the crawling animation runs so if you're
			moving really slow the animation will play slower
		--]]
		return {
			leftArm = CFrame.Angles( --This is what the cframe of the right arm will be when you're crawling
				0,
				math.rad(90),
				math.rad(-10)
			) * CFrame.new(
				math.sin(moveDirection) * (math.sin(X * 6) / 4) - 0.2,
				math.cos(moveDirection) * (math.sin(X * 6) / 2) - 0.1,
				math.max(math.cos(X * 6) / 4, 0) - 0.1
			) * CFrame.Angles(
				-math.max(math.cos(X * 6) / 4, 0),
				0,
				0
			);
			leftLeg = CFrame.new( --This is what the cframe of the left leg will be when you're crawling
				math.sin(moveDirection) * (-math.sin(X * 6) / 4) - 0.2,
				math.cos(moveDirection) * (math.sin(X * 6) / 2) + 0.3,
				math.max(math.cos(X * 6) / 4, 0) - 0.1
			):inverse() * CFrame.Angles(
				0,
				0,
				-math.rad(15) - math.cos(moveDirection) * (math.rad(15) * math.sin(X * 6))
			);
			rightArm = CFrame.Angles( --This is what the cframe of the left arm will be when you're crawling
				0,
				math.rad(-5),
				math.rad(10)
			) * CFrame.new(
				math.sin(moveDirection) * (-math.sin(X * 6) / 4) + 0.2,
				math.cos(moveDirection) * (-math.sin(X * 6) / 5) - 0.2,
				math.max(math.cos((X + math.rad(30)) * 6) / 10, 0) - 0.1
			) * CFrame.Angles(
				-math.max(math.cos((X + math.rad(30)) * 6) / 10, 0),
				0,
				0
			);
			rightLeg = CFrame.new( --This is what the cframe of the right leg will be when you're crawling
				math.sin(moveDirection) * (math.sin(X * 6) / 4) + 0.2,
				math.cos(moveDirection) * (-math.sin(X * 6) / 2) + 0.3,
				math.max(math.cos((X + math.rad(30)) * 6) / 4, 0) - 0.1
			):inverse() * CFrame.Angles(
				0,
				0,
				math.rad(15) - math.cos(moveDirection) * (math.rad(15) * math.sin(X * 6))
			);
			Grip = CFrame.Angles( --This is what the cframe of the grip will be when you're crawling
				math.max(math.cos((X + math.rad(30)) * 6) / 7, 0),
				math.rad(5),
				0
			);
			Camera = 1.5 * math.rad(math.cos((X + math.rad(30)) * 6)) + math.rad(0.5); --This is what the roll of the camera will be when you're crawling
		}
	end;

	Idling = { --This table holds the Idling animations

		unAimed = function(X) --This is the animation when the gun is not aimed
			return {
				Pos = Vector3.new(
					math.sin(X / 2) / 70, --Side to Side motion
					math.sin(X * 5 / 4) / 70, --Up and Down motion
					math.sin(X * 3 / 4) / 70 --Forward and backward motion
				);
				Rot = Vector3.new(
					0, --Pitch rotation
					0, --Yaw rotation
					0 --Roll rotation
				);
			}
		end;

		Aimed = function(X) --This is the animation when the gun is aimed
			return {
				Pos = Vector3.new(
					math.sin(X * 3 / 8) / 140,
					math.sin(X * 15 / 16) / 140,
					0
				);
				Rot = Vector3.new(
					0,
					0,
					0
				);
			}
		end;

	};

	Walking = { --This table holds the Walking animations

		unAimed = function(X) --This is the animation when the gun is not aimed
			return {
				Pos = Vector3.new(
					4 * math.sin(X * 4.5) / 50,
					1.5 * math.sin(X * 9) / 50,
					0
				);
				Rot = Vector3.new(
					0,
					0,
					math.rad(math.sin(X * 4.5)) * 2
				);
			}
		end;

		Aimed = function(X) --This is the animation when the gun is aimed
			return {
				Pos = Vector3.new(
					2 * math.sin(X * 3) / 150,
					0.75 * math.sin(X * 6) / 150,
					0
				);
				Rot = Vector3.new(
					0,
					0,
					math.rad(math.sin(X * 3)) / 3
				);
			}
		end;

	};

	Running = function(X) --This is the animation when the player is running
		return {
			Pos = Vector3.new(
				4 * math.sin(X * 4.5 * 1.5) / 30,
				1.5 * math.sin(X * 9 * 1.5) / 40 + 0.2,
				0
			);
			Rot = Vector3.new(
				0,
				-math.rad(math.sin(X * 4.5 * 1.5)) * 5 + math.rad(3),
				math.rad(math.sin(X * 4.5 * 1.5)) * 5
			);
		}
	end;

}

return Animations


Prompt: ---------------------------------------Function start here.

Response:
if (Tool.Enabled == false) then
return false
end--end for if!


Prompt: --//BRAKES//--

Response:
local FLDisk = Instance.new("Part")
FLDisk.Anchored = true
FLDisk.Name = "FLDisk"
FLDisk.TopSurface = Enum.SurfaceType.SmoothNoOutlines
FLDisk.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
FLDisk.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
FLDisk.BackSurface = Enum.SurfaceType.SmoothNoOutlines
FLDisk.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
FLDisk.RightSurface = Enum.SurfaceType.SmoothNoOutlines
FLDisk.Size = Vector3.new(0.4, ((FL.Size.Y)-0.7), ((FL.Size.Y)-0.7))
FLDisk.Parent = FL.Parent
FLDisk.Shape = "Cylinder"
FLDisk.CFrame = FL.CFrame + Vector3.new((FL.Size.Y/2),(FL.Size.Y/2),(FL.Size.Y/2))*rv
FLDisk.CFrame = FLDisk.CFrame * CFrame.Angles(math.rad(75), math.rad(0), math.rad(0))
FLDisk.Transparency = bv

local FRDisk = Instance.new("Part")
FRDisk.Anchored = true
FRDisk.Name = "FRDisk"
FRDisk.TopSurface = Enum.SurfaceType.SmoothNoOutlines
FRDisk.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
FRDisk.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
FRDisk.BackSurface = Enum.SurfaceType.SmoothNoOutlines
FRDisk.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
FRDisk.RightSurface = Enum.SurfaceType.SmoothNoOutlines
FRDisk.Size = Vector3.new(0.4, ((FR.Size.Y)-0.7), ((FR.Size.Y)-0.7))
FRDisk.Parent = FR.Parent
FRDisk.Shape = "Cylinder"
FRDisk.CFrame = FR.CFrame - Vector3.new((FR.Size.Y/2),(FR.Size.Y/2),(FR.Size.Y/2))*rv
FRDisk.CFrame = FRDisk.CFrame * CFrame.Angles(math.rad(75), math.rad(0), math.rad(0))
FRDisk.Transparency = bv

local RLDisk = Instance.new("Part")
RLDisk.Anchored = true
RLDisk.Name = "RLDisk"
RLDisk.TopSurface = Enum.SurfaceType.SmoothNoOutlines
RLDisk.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
RLDisk.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
RLDisk.BackSurface = Enum.SurfaceType.SmoothNoOutlines
RLDisk.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
RLDisk.RightSurface = Enum.SurfaceType.SmoothNoOutlines
RLDisk.Size = Vector3.new(0.4, ((RL.Size.Y)-0.7), ((RL.Size.Y)-0.7))
RLDisk.Parent = RL.Parent
RLDisk.Shape = "Cylinder"
RLDisk.CFrame = RL.CFrame + Vector3.new((RL.Size.Y/2),(RL.Size.Y/2),(RL.Size.Y/2))*rv
RLDisk.CFrame = RLDisk.CFrame * CFrame.Angles(math.rad(75), math.rad(0), math.rad(0))
RLDisk.Transparency = bv

local RRDisk = Instance.new("Part")
RRDisk.Anchored = true
RRDisk.Name = "RRDisk"
RRDisk.TopSurface = Enum.SurfaceType.SmoothNoOutlines
RRDisk.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
RRDisk.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
RRDisk.BackSurface = Enum.SurfaceType.SmoothNoOutlines
RRDisk.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
RRDisk.RightSurface = Enum.SurfaceType.SmoothNoOutlines
RRDisk.Size = Vector3.new(0.4, ((RR.Size.Y)-0.7), ((RR.Size.Y)-0.7))
RRDisk.Parent = RR.Parent
RRDisk.Shape = "Cylinder"
RRDisk.CFrame = RR.CFrame - Vector3.new((RR.Size.Y/2),(RR.Size.Y/2),(RR.Size.Y/2))*rv
RRDisk.CFrame = RRDisk.CFrame * CFrame.Angles(math.rad(75), math.rad(0), math.rad(0))
RRDisk.Transparency = bv

moveF = ((FRDisk.Size.Y/2)+0.08)
move = ((RRDisk.Size.Y/2)+0.08)
VRL = FLDisk.CFrame.lookVector

local FLPad = Instance.new("Part")
FLPad.Anchored = true
FLPad.Size = Vector3.new(.35,0.4,.2)
FLPad.Name = "Pad"
FLPad.CFrame = FLDisk.CFrame + Vector3.new(moveF, moveF, moveF)*VRL*.98
FLPad.Parent = LWm
FLPad.Transparency = bv

local UFLPad = Instance.new("Part")
UFLPad.Anchored = true
UFLPad.Size = Vector3.new(.35,0.4,.2)
UFLPad.Name = "UPad"
UFLPad.CFrame = FLDisk.CFrame + Vector3.new(moveF, moveF, moveF)*(VRL*-1)
UFLPad.Parent = LWm
UFLPad.Transparency = bv

local FRPad = Instance.new("Part")
FRPad.Anchored = true
FRPad.Size = Vector3.new(.35,0.4,.2)
FRPad.Name = "Pad"
FRPad.CFrame = FRDisk.CFrame + Vector3.new(moveF, moveF, moveF)*VRL*.98
FRPad.Parent = RWm
FRPad.Transparency = bv

local UFRPad = Instance.new("Part")
UFRPad.Anchored = true
UFRPad.Size = Vector3.new(.35,0.4,.2)
UFRPad.Name = "UPad"
UFRPad.CFrame = FRDisk.CFrame + Vector3.new(moveF, moveF, moveF)*(VRL*-1)
UFRPad.Parent = RWm
UFRPad.Transparency = bv

local RLPad = Instance.new("Part")
RLPad.Anchored = true
RLPad.Size = Vector3.new(.35,0.4,.2)
RLPad.Name = "Pad"
RLPad.Parent = suspRL
RLPad.CFrame = RLDisk.CFrame + Vector3.new(move, move, move)*VRL*.98
RLPad.Transparency = bv

local URLPad = Instance.new("Part")
URLPad.Anchored = true
URLPad.Size = Vector3.new(.35,0.4,.2)
URLPad.Name = "UPad"
URLPad.CFrame = RLDisk.CFrame + Vector3.new(move, move, move)*(VRL*-1)
URLPad.Parent = suspRL
URLPad.Transparency = bv

local RRPad = Instance.new("Part")
RRPad.Anchored = true
RRPad.Size = Vector3.new(.35,0.4,.2)
RRPad.Name = "Pad"
RRPad.Parent = suspRR
RRPad.CFrame = RRDisk.CFrame + Vector3.new(move, move, move)*VRL*.98
RRPad.Transparency = bv

local URRPad = Instance.new("Part")
URRPad.Anchored = true
URRPad.Size = Vector3.new(.35,0.4,.2)
URRPad.Name = "UPad"
URRPad.CFrame = RRDisk.CFrame + Vector3.new(move, move, move)*(VRL*-1)
URRPad.Parent = suspRR
URRPad.Transparency = bv

local hitboxF = Instance.new("Part")
local x = Vector3.new(FLDisk.Position.X - FRDisk.Position.X)
local z = Vector3.new(FLDisk.Position.Z - FRDisk.Position.Z)
local t = x + z
local tt = math.abs(t.X)
hitboxF.Size = Vector3.new(1, 2, tt+2)
hitboxF.Anchored = true
hitboxF.Parent = script.Parent.Parent
hitboxF.Rotation = FLDisk.Rotation
hitboxF.CFrame = CFrame.new(((FLDisk.Position + FRDisk.Position))/2)
hitboxF.CFrame = hitboxF.CFrame + Vector3.new(FL.Size.Y/1.15, FL.Size.Y/1.15, FL.Size.Y/1.15)*(lv*1)
hitboxF.CFrame = hitboxF.CFrame + Vector3.new(0.5, 0.5, 0.5)*(uv*1)
hitboxF.Transparency = 1
hitboxF.Name = "HitboxF"

local hitboxR = Instance.new("Part")
local x = Vector3.new(RLDisk.Position.X - RRDisk.Position.X)
local z = Vector3.new(RLDisk.Position.Z - RRDisk.Position.Z)
local t = x + z
local tt = math.abs(t.X)
hitboxR.Size = Vector3.new(1, 2, tt+2)
hitboxR.Anchored = true
hitboxR.Parent = script.Parent.Parent
hitboxR.Rotation = RLDisk.Rotation
hitboxR.CFrame = CFrame.new(((RLDisk.Position + RRDisk.Position))/2)
hitboxR.CFrame = hitboxR.CFrame + Vector3.new(RL.Size.Y/1.15, RL.Size.Y/1.15, RL.Size.Y/1.15)*(lv*-1)
hitboxR.CFrame = hitboxR.CFrame + Vector3.new(0.5, 0.5, 0.5)*(uv*1)
hitboxR.Transparency = 1
hitboxR.Name = "HitboxR"