local TweenService = game:GetService("TweenService")
local ContextActionService = game:GetService("ContextActionService")
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local StarterGui = game:GetService("StarterGui")

local ClientSettings = ReplicatedStorage.ClientSettings.Controls
local Particles = ReplicatedStorage.Resources
local Beam = Particles.Particles.Beam:Clone()
local Outlines = Particles.Outlines

local Player = Players.LocalPlayer
local PlayerGui = Player.PlayerGui
local UI = PlayerGui.UI
local Values = Player.Character:WaitForChild("Values")

local Fetch = nil
local HoldingKey = false
local HoldTime = 5
local HoldTimer = 0
local Closest_part = nil
local Holding = nil
local Executing = false
local Carrying = false
local Seeking = false
local Hidden = false

local TimerValue = UI.Gameplay.ReviveFrame.Progress
local SeekValue = UI.Gameplay.SeekFrame.Progress

local Settings = Player.Character:WaitForChild("Settings")

local Checks = true

repeat task.wait(.5) until Player.Character:FindFirstChild("Humanoid") and Player.Character:FindFirstChild("Torso")
local Humanoid = Player.Character:FindFirstChild("Humanoid")

local AnimationInstance = Instance.new("Animation")
AnimationInstance.AnimationId = "rbxassetid://17668406629"
AnimationInstance.Parent = workspace.Debris
local CarryIdleAnimation = Humanoid:LoadAnimation(AnimationInstance)
AnimationInstance:Destroy()

local function FetchWeapon(PlayerModel)
	if PlayerModel:FindFirstChild("Fists") then
		return "Fists"
	elseif PlayerModel:FindFirstChild("Pipe") then
		return "Pipe"
	elseif PlayerModel:FindFirstChild("Zweihander") then
		return "Zweihander"
	end
end

local function IsHuman(PlayerModel)
	if Carrying then return false end
	return not Checks or PlayerModel.Parent == workspace.GameSettings.Humans
end

local function IsSeeker(PlayerModel)
	if Carrying then return false end
	return not Checks or PlayerModel.Parent == workspace.GameSettings.Seekers
end

local function InitiateRevive(PlayerModel, State, Fetch)
	ReplicatedStorage.Remotes.Interact:FireServer(PlayerModel, State, Fetch)
end

local function CanRevive()
	return not Checks and Values.CurrentAbility.Value == "Healer"
end

local function CanFinish()
	if Carrying then return false end
	local Weapon = FetchWeapon(Player.Character)
	--return Weapon and UI.Gameplay.Interact.Damage.Visible and IsSeeker(Player.Character)
end

local function CanSeek()
	return not Checks or UI.Gameplay.Interact.Seek.Visible
end

local function CanCarry()
	return not Checks or UI.Gameplay.Interact.Seek.Visible
end

local function FaceEachOther(P1, P2)
	local Direction = (P2.Position - P1.Position).unit
	local Angle = math.atan2(Direction.X, Direction.Z)
	local Rotation = CFrame.new(P1.Position) * CFrame.Angles(0, math.rad(180 + math.deg(Angle)), 0)
	TweenService:Create(P1, TweenInfo.new(0.5, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {CFrame = Rotation}):Play()
end

local function UpdateInteractFrames(Frame)
	local interactFrames = UI.Gameplay.Interact:GetChildren()
	for _, frame in interactFrames do
		if frame:IsA("Frame") then
			frame.Visible = false
		end
	end
	if Frame then
		UI.Gameplay.Interact[Frame].Visible = true
	end
end

local function OnKeyPress(actionName, inputState, inputObject)
	if inputState == Enum.UserInputState.Begin then
		if not Closest_part then
			return
		end

		if Closest_part and Closest_part:FindFirstChild("Settings") then
			local Downed = Closest_part.Settings:FindFirstChild("Downed").Value
			local Health = Closest_part:FindFirstChild("Humanoid").Health

			if Downed and Health > 1 then

				-- Revive

				if actionName == "Revive" and not HoldingKey then
					if CanRevive() then 
						Hidden = true
						HoldingKey = true
						HoldTimer = tick() + HoldTime
						Holding = "Revive"
						InitiateRevive(Closest_part, "Outline")
						FaceEachOther(Player.Character.HumanoidRootPart, Closest_part.HumanoidRootPart)
					end

					-- Finish

				elseif actionName == "Finish" then
					if CanFinish() and IsHuman(Player.Character) and not Executing then
						return
					end
					Executing = true
					Hidden = true
					FaceEachOther(Player.Character.HumanoidRootPart, Closest_part.HumanoidRootPart)
					InitiateRevive(Closest_part, "Finish", FetchWeapon(Player.Character))
					task.wait(7)
					Executing = false
				end
			end

			if actionName == "Carry" then
				if Closest_part and not Seeking then
					Carrying = true
					Humanoid:UnequipTools()
					StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, false)
					local Carry = ReplicatedStorage.Remotes.Carry:InvokeServer(Closest_part)
					Hidden = true

					if Carry[1] == true then
						CarryIdleAnimation:Play()
						Carrying = true
						UpdateInteractFrames("Carry")
						UI.Gameplay.Interact.Carry.ToolName.Text = "DROP"
					else
						CarryIdleAnimation:Stop()
						Carrying = false
						UpdateInteractFrames(nil)
						UI.Gameplay.Interact.Carry.ToolName.Text = "CARRY"
					end

					Settings.Carrying:GetPropertyChangedSignal("Value"):Connect(function()
						if not Settings.Carrying.Value then
							if CarryIdleAnimation.IsPlaying then
								CarryIdleAnimation:Stop()
								Carrying = false
								UpdateInteractFrames(nil)
								UI.Gameplay.Interact.Carry.ToolName.Text = "CARRY"
							end
						end
					end)
				end
			end

			-- Seek

			if actionName == "Seek" then
				if IsSeeker(Player.Character) then
					if Settings.Carrying.Value or Settings.Crouching.Value or Settings.Downed.Value or Settings.Carried.Value then
						return
					end
					Seeking = true
					Hidden = true
					HoldingKey = true
					HoldTimer = tick() + HoldTime
					Holding = "Seek"
					InitiateRevive(Closest_part, "SeekOutline")
					Player.Character.Humanoid:UnequipTools()
					UpdateInteractFrames("Seek")
				end
			end
		end
	end
end

local function OnKeyRelease(actionName, inputState, inputObject)
	if inputState == Enum.UserInputState.End then
		Hidden = false
		if actionName == "Revive" and Closest_part then
			HoldingKey = false
			InitiateRevive(Closest_part, "OutlineRemove")
		elseif actionName == "Seek" and Closest_part then
			HoldingKey = false
			InitiateRevive(Closest_part, "OutlineRemove")
		end
	end
end

-- all hopes up this will work :D
ContextActionService:BindAction("Revive", OnKeyPress, false, Enum.KeyCode[ClientSettings.Revive.Value])
ContextActionService:BindAction("Finish", OnKeyPress, false, Enum.KeyCode[ClientSettings.Finish.Value])
ContextActionService:BindAction("Carry", OnKeyPress, false, Enum.KeyCode[ClientSettings.Carry.Value])
ContextActionService:BindAction("Seek", OnKeyPress, false, Enum.KeyCode.G)
ContextActionService:BindAction("ReviveRelease", OnKeyRelease, false, Enum.KeyCode[ClientSettings.Revive.Value])
ContextActionService:BindAction("SeekRelease", OnKeyRelease, false, Enum.KeyCode.G)

RunService.Heartbeat:Connect(function()
	if Player.Character.Settings.Downed.Value or Player.Character.Data.Protected.Value then return end

	if HoldingKey then
		local Elapsed = math.max(0, HoldTime - (HoldTimer - tick()))
		local Progress = (Elapsed / HoldTime) * 5
		Progress = math.min(Progress, 5) 
		if Holding == "Revive" then
			TimerValue.Value = Progress
		else
			SeekValue.Value = Progress
		end

		if Progress >= 5 then
			if Holding == "Revive" then
				PlayerGui.UI.Visual.Vignette.ImageColor3 = Color3.fromRGB(0, 255, 127)
				PlayerGui.UI.Visual.WhiteFlash.BackgroundColor3 = Color3.fromRGB(0, 255, 127)
				InitiateRevive(Closest_part, "Revive")
			else
				PlayerGui.UI.Visual.Vignette.ImageColor3 = Color3.fromRGB(85, 0, 255)
				InitiateRevive(Closest_part, "Seek")
				UpdateInteractFrames(nil)
			end
			HoldingKey = false 
			TimerValue.Value = 0
			TweenService:Create(workspace.CurrentCamera, TweenInfo.new(0.4, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut, 0, true), {FieldOfView = 80}):Play()
			TweenService:Create(PlayerGui.UI.Visual.Vignette, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {ImageTransparency = 0}):Play()
			task.wait(1.5)
			TweenService:Create(PlayerGui.UI.Visual.Vignette, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {ImageTransparency = 1}):Play()
			TweenService:Create(PlayerGui.UI.Visual.WhiteFlash, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), {BackgroundTransparency = 1}):Play()
		end
	else
		TimerValue.Value = 0
		SeekValue.Value = 0
		Seeking = false
	end

	local Player_position = Player.Character.Torso.Position

	for _, PlayerModel in workspace.GameSettings.Humans:GetChildren() do
		if PlayerModel:IsA("Model") and PlayerModel:FindFirstChild("Humanoid") and PlayerModel:FindFirstChild("Torso") then
			if PlayerModel.Name == Player.Name then return end
			if Player.Character.Values.Glory.Value then return end
			local TargetChracter = PlayerModel
			local Data = TargetChracter:WaitForChild("Data")
			local Downed = TargetChracter.Settings:FindFirstChild("Downed")
			local Stunned = TargetChracter.Values:FindFirstChild("Stunned")
			local Torso_position = TargetChracter.Torso.Position

			if (Torso_position - Player_position).Magnitude < 8 then
				if Downed and Downed.Value and not Data.Protected.Value then
					--print(TargetChracter.Name)
					UI.Gameplay.Interact.Visible = Downed.Value
					Closest_part = TargetChracter
					if Values.CurrentAbility.Value == "Healer" then
						UI.Gameplay.Interact.Revive.Visible = true
					else
						UI.Gameplay.Interact.Revive.Visible = false
					end

					--UI.Gameplay.Interact.Damage.Visible = IsSeeker(Player.Character)
					UI.Gameplay.Interact.Seek.Visible = IsSeeker(Player.Character)
					UI.Gameplay.Interact.Carry.Visible = not Hidden
				end
			else
				if Closest_part == TargetChracter then
					Closest_part = nil
					UI.Gameplay.Interact.Visible = false
					--UI.Gameplay.Interact.Damage.Visible = false
					UI.Gameplay.Interact.Seek.Visible = false
					UI.Gameplay.Interact.Carry.Visible = false
					UI.Gameplay.Interact.Revive.Visible = false
					InitiateRevive(Closest_part, "OutlineRemove")
				end
			end

			if Downed then
				Downed:GetPropertyChangedSignal("Value"):Connect(function()
					if not Downed.Value then
						UI.Gameplay.Interact.Visible = false
						Closest_part = nil
					end
				end)
			end
		end
	end

	if Closest_part then
		UI.Gameplay.Interact.Visible = true
		if Values.CurrentAbility.Value == "Healer" then
			UI.Gameplay.Interact.Revive.Visible = Closest_part.Humanoid.Health > 1 and CanRevive() and IsHuman(Player.Character)
		else
			UI.Gameplay.Interact.Revive.Visible = false
		end

		--UI.Gameplay.Interact.Damage.Visible = CanFinish()
		UI.Gameplay.Interact.Seek.Visible = IsSeeker(Player.Character)
	else
		UI.Gameplay.Interact.Visible = false
	end

	if not Closest_part or (Closest_part and (Player_position - Closest_part.Torso.Position).Magnitude >= 8) then
		HoldingKey = false
	end
end)

UserInputService.InputBegan:Connect(function(key,nottyping)
	if key.KeyCode == Enum.KeyCode.G then
		if nottyping then
			print("Pressed E And Not Typing!")
		end
	end
end)

game.Players.LocalPlayer.Character:WaitForChild("Humanoid").Died:Connect(function()
	task.wait(1)
	script:Destroy()
end)

game.Players.LocalPlayer.OnTeleport:Connect(function(State)
	if State == Enum.TeleportState.Started then
		script:Destroy()
	end
end)

please add the seek mechanic to the UserInputService.InputBegan; just give me that piece of code instead of the whole script.