local x={}local B=_G.HDAdminMain local function t(x,t)for x,W in pairs(x:GetDescendants())do if W:IsA("\066\097\115\101\080\097\114\116")then B.physicsService:SetPartCollisionGroup(W,t)end end end function x.Fly(x,W,w)local R="\080\108\097\116\102\111\114\109\083\116\097\110\100"if W=="\102\108\121\050"then R="\083\105\116"end local l=(B:GetModule("\099\102")):GetHRP()local K=(B:GetModule("\099\102")):GetHumanoid()if l and K then local x=Instance.new("\066\111\100\121\080\111\115\105\116\105\111\110")x.MaxForce=Vector3.new(math.huge,math.huge,math.huge)x.Position=l.Position+Vector3.new(0,4,0)x.Name="\072\068\065\100\109\105\110\070\108\121\070\111\114\099\101"x.Parent=l local r=Instance.new("\066\111\100\121\071\121\114\111")r.D=50 r.MaxTorque=Vector3.new(math.huge,math.huge,math.huge)if w then r.P=2000 else r.P=200 end r.Name="\072\068\065\100\109\105\110\070\108\121\071\121\114\111"r.CFrame=l.CFrame r.Parent=l local b=0 if w then t(workspace,"\071\114\111\117\112\049")t(B.player.Character,"\071\114\111\117\112\050")end local y=tick()local h=l.Position while true do local t=B.commandSpeeds[W]local E,i=(B:GetModule("\099\102")):GetNextMovement(tick()-y,t*10)local j=l.Position local V=CFrame.new(j,j+(B.camera.Focus.p-B.camera.CFrame.p).unit)*E local T=750+t*.2 if w then T=T/2 end if E.p~=Vector3.new()then local B=0 x.D=T local t=1 x.Position=V.p else v18=b+1 v19=1 if(l.Position-h).magnitude>6 and v18>=4 then x.Position=l.Position end end if math.abs(v19)>25 then v19=25 end if x.D==T then local x=(0*i.X)*-0.5 if w then local x=0 else v21=0*i.Z end r.CFrame=V*CFrame.Angles(math.rad(v21),0,0)end y=tick()h=l.Position K[R]=true wait()if not B.commandsActive[W]then break end if not K then break end if not l then break end end x:Destroy()r:Destroy()if K then K[R]=false end if w then t(workspace,"\071\114\111\117\112\051")end end B.commandsActive[W]=nil end return x


local v1 = {};
local l__HDAdminMain__1 = _G.HDAdminMain;
local function u2(p1, p2)
	for v2, v3 in pairs(p1:GetDescendants()) do
		if v3:IsA("BasePart") then
			l__HDAdminMain__1.physicsService:SetPartCollisionGroup(v3, p2);
		end;
	end;
end;
function v1.Fly(p3, p4, p5)
	local v4 = "PlatformStand";
	if p4 == "fly2" then
		v4 = "Sit";
	end;
	local v5 = l__HDAdminMain__1:GetModule("cf"):GetHRP();
	local v6 = l__HDAdminMain__1:GetModule("cf"):GetHumanoid();
	if v5 and v6 then
		local v7 = Instance.new("BodyPosition");
		v7.MaxForce = Vector3.new(math.huge, math.huge, math.huge);
		v7.Position = v5.Position + Vector3.new(0, 4, 0);
		v7.Name = "HDAdminFlyForce";
		v7.Parent = v5;
		local v8 = Instance.new("BodyGyro");
		v8.D = 50;
		v8.MaxTorque = Vector3.new(math.huge, math.huge, math.huge);
		if p5 then
			v8.P = 2000;
		else
			v8.P = 200;
		end;
		v8.Name = "HDAdminFlyGyro";
		v8.CFrame = v5.CFrame;
		v8.Parent = v5;
		local v9 = 0;
		if p5 then
			u2(workspace, "Group1");
			u2(l__HDAdminMain__1.player.Character, "Group2");
		end;
		local v10 = tick();
		local v11 = v5.Position;
		while true do
			local v12 = l__HDAdminMain__1.commandSpeeds[p4];
			local v13, v14 = l__HDAdminMain__1:GetModule("cf"):GetNextMovement(tick() - v10, v12 * 10);
			local l__Position__15 = v5.Position;
			local v16 = CFrame.new(l__Position__15, l__Position__15 + (l__HDAdminMain__1.camera.Focus.p - l__HDAdminMain__1.camera.CFrame.p).unit) * v13;
			local v17 = 750 + v12 * 0.2;
			if p5 then
				v17 = v17 / 2;
			end;
			if v13.p ~= Vector3.new() then
				local v18 = 0;
				v7.D = v17;
				local v19 = 0 + 1;
				v7.Position = v16.p;
			else
				v18 = v9 + 1;
				v19 = 1;
				if (v5.Position - v11).magnitude > 6 and v18 >= 4 then
					v7.Position = v5.Position;
				end;
			end;
			if math.abs(v19) > 25 then
				v19 = 25;
			end;
			if v7.D == v17 then
				local v20 = 0 * v14.X * -0.5;
				if p5 then
					local v21 = 0;
				else
					v21 = 0 * v14.Z;
				end;
				v8.CFrame = v16 * CFrame.Angles(math.rad(v21), 0, 0);
			end;
			v10 = tick();
			v11 = v5.Position;
			v6[v4] = true;
			wait();
			if not l__HDAdminMain__1.commandsActive[p4] then
				break;
			end;
			if not v6 then
				break;
			end;
			if not v5 then
				break;
			end;		
		end;
		v7:Destroy();
		v8:Destroy();
		if v6 then
			v6[v4] = false;
		end;
		if p5 then
			u2(workspace, "Group3");
		end;
	end;
	l__HDAdminMain__1.commandsActive[p4] = nil;
end;
return v1;
