コンテンツへスキップ
動作中

Cool Gym Game autofarm Xeno supported

CLclarkdevlinorg1 閲覧数Universal2026年7月26日
共有
Cool Gym Game autofarm Xeno supported

スクリプトコード

Lua
-- Cool gym autofarm - Walking System + Auto Clean

local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local root = character:WaitForChild("HumanoidRootPart")

local autoFarm = false

local ScreenGui = Instance.new("ScreenGui")
ScreenGui.ResetOnSpawn = false
ScreenGui.Parent = player:WaitForChild("PlayerGui")

local Frame = Instance.new("Frame")
Frame.Size = UDim2.new(0, 290, 0, 180)
Frame.Position = UDim2.new(0.76, 0, 0.1, 0)
Frame.BackgroundColor3 = Color3.fromRGB(20, 20, 20)
Frame.BorderSizePixel = 0
Frame.Parent = ScreenGui

local Title = Instance.new("TextLabel")
Title.Size = UDim2.new(1, 0, 0, 40)
Title.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
Title.Text = "Cool Gym Auto Farm v10"
Title.TextColor3 = Color3.new(1,1,1)
Title.Font = Enum.Font.GothamBold
Title.TextSize = 16
Title.Parent = Frame

local ToggleBtn = Instance.new("TextButton")
ToggleBtn.Size = UDim2.new(0.85, 0, 0, 55)
ToggleBtn.Position = UDim2.new(0.075, 0, 0.32, 0)
ToggleBtn.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
ToggleBtn.Text = "START AUTO FARM"
ToggleBtn.TextColor3 = Color3.new(1,1,1)
ToggleBtn.Font = Enum.Font.GothamBold
ToggleBtn.TextSize = 16
ToggleBtn.Parent = Frame

local Status = Instance.new("TextLabel")
Status.Size = UDim2.new(1, 0, 0, 40)
Status.Position = UDim2.new(0, 0, 0.7, 0)
Status.BackgroundTransparency = 1
Status.Text = "Status: OFF"
Status.TextColor3 = Color3.fromRGB(255, 80, 80)
Status.Font = Enum.Font.Gotham
Status.TextSize = 14
Status.Parent = Frame

local function updateButton()
	if autoFarm then
		ToggleBtn.Text = "STOP AUTO FARM"
		ToggleBtn.BackgroundColor3 = Color3.fromRGB(0, 170, 0)
		Status.Text = "Searching for mess..."
		Status.TextColor3 = Color3.fromRGB(0, 255, 100)
	else
		ToggleBtn.Text = "START AUTO FARM"
		ToggleBtn.BackgroundColor3 = Color3.fromRGB(170, 0, 0)
		Status.Text = "Status: OFF"
		Status.TextColor3 = Color3.fromRGB(255, 80, 80)
	end
end

local function refreshCharacter()
	character = player.Character or player.CharacterAdded:Wait()
	humanoid = character:WaitForChild("Humanoid")
	root = character:WaitForChild("HumanoidRootPart")
end

local function isMessObject(obj)
	if not obj:IsA("BasePart") then return false end

	local name = obj.Name:lower()

	return name == "mess1"
		or name:find("water")
		or name:find("bottle")
		or name:find("puddle")
		or name:find("spill")
		or name:find("liquid")
end

local function findClosestMess()
	local closest = nil
	local shortest = math.huge

	for _, obj in ipairs(workspace:GetDescendants()) do
		if isMessObject(obj) then
			local dist = (root.Position - obj.Position).Magnitude

			if dist < shortest and dist < 150 then
				shortest = dist
				closest = obj
			end
		end
	end

	return closest
end

local function walkToPart(part)
	if not part or not part:IsDescendantOf(workspace) then
		return false
	end

	local reached = false
	local finished = false

	humanoid:MoveTo(part.Position)

	local conn
	conn = humanoid.MoveToFinished:Connect(function(success)
		reached = success
		finished = true
	end)

	local startTime = tick()

	while autoFarm and humanoid.Health > 0 and not finished do
		if not part:IsDescendantOf(workspace) then
			break
		end

		if tick() - startTime > 8 then
			break
		end

		task.wait(0.1)
	end

	if conn then
		conn:Disconnect()
	end

	return reached
end

local function cleanMess(mess)
	if not mess or not mess:IsDescendantOf(workspace) then return end

	root.CFrame = CFrame.lookAt(root.Position, mess.Position)

	local prompt = mess:FindFirstChildOfClass("ProximityPrompt")

	if not prompt and mess.Parent then
		prompt = mess.Parent:FindFirstChildOfClass("ProximityPrompt")
	end

	if prompt then
		fireproximityprompt(prompt, 2.5)
	end
end

ToggleBtn.MouseButton1Click:Connect(function()
	autoFarm = not autoFarm
	updateButton()

	if autoFarm then
		refreshCharacter()

		while autoFarm and humanoid.Health > 0 do
			local closest = findClosestMess()

			if closest then
				Status.Text = "Walking to: " .. closest.Name

				local reached = walkToPart(closest)

				if reached and autoFarm then
					Status.Text = "Cleaning: " .. closest.Name
					cleanMess(closest)
					task.wait(0.6)
				else
					Status.Text = "Could not reach mess"
					task.wait(0.5)
				end
			else
				humanoid:Move(Vector3.new(0, 0, 0), false)
				Status.Text = "No mess found..."
				task.wait(1)
			end
		end
	else
		if humanoid then
			humanoid:Move(Vector3.new(0, 0, 0), false)
		end
	end
end)

説明

you need to zoom out to make this script work

コメント (0)

会話に参加するにはログインしてください

  • 最初のコメントを投稿しましょう。

よくある質問

Cool Gym Game autofarm Xeno supportedスクリプトはどう使いますか?
上のスクリプトコードをコピーし、Robloxエグゼキューターを開いて貼り付け、ゲーム中に実行を押してください。スクリプトが実行されると、機能が即座に有効になります。
Cool Gym Game autofarm Xeno supportedスクリプトは無料ですか?
はい。このスクリプトは無料でコピー&使用できます。キーシステムを使用している場合は、リンクから無料でキーを取得してください。
Cool Gym Game autofarm Xeno supportedスクリプトの使用は安全ですか?
ソースコード全体がこのページに表示されるので、実行前に内容を正確に確認できます。信頼できるエグゼキューターを使用し、スクリプトの使用はRobloxの利用規約に違反するため、自己責任で使用してください。
Cool Gym Game autofarm Xeno supportedに対応するエグゼキューターは?
このスクリプトはほとんどの人気Robloxエグゼキューターで動作します。お使いのデバイス向けの信頼できる無料または有料エグゼキューターを見つけるには、エグゼキューターページをご覧ください。