friends script

Velibit · June 29, 2025
-- ✅ Full working script with UI, Auto Farm, Auto Buy, Invisibility

local Rayfield = loadstring(game:HttpGet('https://[Log in to view URL]'))()

local Window = Rayfield:CreateWindow({
   Name = "Милек's garden",
   Icon = 0,
   LoadingTitle = "Loading...",
   LoadingSubtitle = "by Veli",
   ShowText = "Милек hub",
   Theme = "Default",
   ToggleUIKeybind = "K",
   DisableRayfieldPrompts = false,
   DisableBuildWarnings = false,
   ConfigurationSaving = {
      Enabled = true,
      FolderName = nil,
      FileName = "idk man big man things"
   },
   Discord = {
      Enabled = false,
      Invite = "noinvitelink",
      RememberJoins = true
   },
   KeySystem = false,
   KeySettings = {
      Title = "Untitled",
      Subtitle = "Key System",
      Note = "No method of obtaining the key is provided",
      FileName = "Key",
      SaveKey = true,
      GrabKeyFromSite = false,
      Key = {"Hello"}
   }
})

local AutoTab = Window:CreateTab("Auto", nil)
local MiscTab = Window:CreateTab("Misc", nil)

-- Auto Farm Setup
local autofarmEnabled = false
local autofarmSpeed = 1
local autofarmThread = nil
local player = game.Players.LocalPlayer
local playerName = player.Name

local myGarden = workspace:WaitForChild("Gardens"):WaitForChild(playerName)

AutoTab:CreateDropdown({
	Name = "Auto Farm Speed",
	Options = {"Fast", "Medium", "Slow"},
	CurrentOption = "Medium",
	Flag = "AutoFarmSpeed",
	Callback = function(Option)
		if Option == "Fast" then autofarmSpeed = 0.2
		elseif Option == "Medium" then autofarmSpeed = 1
		elseif Option == "Slow" then autofarmSpeed = 2 end
	end,
})

AutoTab:CreateToggle({
	Name = "Auto Farm My Fully-Grown Fruits",
	CurrentValue = false,
	Flag = "AutoFarmToggle",
	Callback = function(Value)
		autofarmEnabled = Value
		if autofarmEnabled then
			autofarmThread = task.spawn(function()
				while autofarmEnabled do
					pcall(function()
						for _, obj in pairs(myGarden:GetDescendants()) do
							local fruit = obj:FindFirstChild("Fruit")
							if fruit and fruit:IsA("BasePart") and fruit.Size.Magnitude >= 3 then
								local prompt = obj:FindFirstChildWhichIsA("ProximityPrompt", true)
								if prompt then fireproximityprompt(prompt) end
								local click = obj:FindFirstChildWhichIsA("ClickDetector", true)
								if click then fireclickdetector(click) end
							end
						end
					end)
					task.wait(autofarmSpeed)
				end
			end)
		else
			if autofarmThread then
				task.cancel(autofarmThread)
				autofarmThread = nil
			end
		end
	end,
})

-- Auto Buy Fruits Setup
local autoBuyFruitsEnabled = false
local selectedFruits = {}
local autoBuyFruitsThread = nil

local allFruits = {
	"Apple", "Banana", "Orange", "Pineapple", "Peach", "Watermelon",
	"Lemon", "Mango", "Strawberry", "Grapes", "Dragonfruit", "Cherry"
}

AutoTab:CreateDropdown({
	Name = "Select Fruits to Auto-Buy",
	Options = allFruits,
	MultiSelection = true,
	CurrentOption = {},
	Flag = "SelectedFruits",
	Callback = function(Options)
		selectedFruits = Options
	end,
})

AutoTab:CreateToggle({
	Name = "Enable Auto Buy Selected Fruits",
	CurrentValue = false,
	Flag = "AutoBuyFruitsToggle",
	Callback = function(Value)
		autoBuyFruitsEnabled = Value
		if autoBuyFruitsEnabled then
			autoBuyFruitsThread = task.spawn(function()
				while autoBuyFruitsEnabled do
					pcall(function()
						for _, fruitModel in pairs(workspace:GetDescendants()) do
							if fruitModel:IsA("Model") and table.find(selectedFruits, fruitModel.Name) then
								local click = fruitModel:FindFirstChildOfClass("ClickDetector")
								if click then fireclickdetector(click) end
							end
						end
					end)
					task.wait(1.5)
				end
			end)
		else
			if autoBuyFruitsThread then
				task.cancel(autoBuyFruitsThread)
				autoBuyFruitsThread = nil
			end
		end
	end,
})

-- Invisibility
local RunService = game:GetService("RunService")
local UIS = game:GetService("UserInputService")
local character = player.Character or player.CharacterAdded:Wait()
local isInvisible = false

local function setInvisibility(state)
	isInvisible = state
	character = player.Character or player.CharacterAdded:Wait()
	for _, part in pairs(character:GetDescendants()) do
		if part:IsA("BasePart") then
			part.Transparency = state and 1 or 0
			part.CanCollide = not state
			if part:FindFirstChild("face") then
				part.face.Transparency = state and 1 or 0
			end
		elseif part:IsA("Decal") then
			part.Transparency = state and 1 or 0
		elseif part:IsA("Accessory") or part:IsA("Hat") then
			if part:FindFirstChild("Handle") then
				part.Handle.Transparency = state and 1 or 0
			end
		elseif part:IsA("BillboardGui") then
			part.Enabled = not state
		end
	end
end

MiscTab:CreateToggle({
	Name = "Invisibility",
	CurrentValue = false,
	Flag = "InvisibilityToggle",
	Callback = function(Value)
		setInvisibility(Value)
	end,
})

UIS.InputBegan:Connect(function(input, typing)
	if typing then return end
	if input.KeyCode == Enum.KeyCode.I then
		isInvisible = not isInvisible
		setInvisibility(isInvisible)
	end
end)

player.CharacterAdded:Connect(function(newChar)
	character = newChar
	if isInvisible then
		task.wait(1)
		setInvisibility(true)
	end
end)
Output

Comments

Please sign up or log in to contribute to the discussion.