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

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
