Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Services
- local Players = game:GetService("Players")
- local RunService = game:GetService("RunService")
- local Workspace = game:GetService("Workspace")
- -- Player setup
- local player = Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local bodyPart = character:WaitForChild("Body")
- -- Variables
- local isCollecting = false
- local collectDelay = 0.1 -- Default collect delay
- local isHidingTemplatePoints = false -- Toggle state for hiding TemplatePoints
- -- GUI Setup
- local ScreenGui = Instance.new("ScreenGui")
- local Frame = Instance.new("Frame")
- local UICorner = Instance.new("UICorner")
- local UIListLayout = Instance.new("UIListLayout")
- local ToggleButton = Instance.new("TextButton")
- local DelayBox = Instance.new("TextBox")
- local StatusLabel = Instance.new("TextLabel")
- local WarningLabel = Instance.new("TextLabel")
- local RecommendationLabel = Instance.new("TextLabel")
- local HidePointsButton = Instance.new("TextButton")
- local INFYieldButton = Instance.new("TextButton")
- ScreenGui.Parent = player:WaitForChild("PlayerGui")
- ScreenGui.Name = "CollectGui"
- Frame.Size = UDim2.new(0, 400, 0, 500)
- Frame.Position = UDim2.new(0.5, -200, 0.5, -250)
- Frame.BackgroundColor3 = Color3.fromRGB(30, 30, 30)
- Frame.BorderSizePixel = 0
- Frame.Parent = ScreenGui
- Frame.Active = true
- Frame.Draggable = true
- UICorner.CornerRadius = UDim.new(0, 10) -- Rounded corners
- UICorner.Parent = Frame
- UIListLayout.Parent = Frame
- UIListLayout.SortOrder = Enum.SortOrder.LayoutOrder
- UIListLayout.Padding = UDim.new(0, 10)
- UIListLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIListLayout.VerticalAlignment = Enum.VerticalAlignment.Center
- local function createButton(text, color, parent)
- local button = Instance.new("TextButton")
- button.Size = UDim2.new(0, 300, 0, 50)
- button.BackgroundColor3 = color
- button.Text = text
- button.TextScaled = true
- button.Font = Enum.Font.SourceSansBold -- Match the "Status" font
- button.TextColor3 = Color3.fromRGB(255, 255, 255)
- button.Parent = parent
- local buttonUICorner = Instance.new("UICorner")
- buttonUICorner.CornerRadius = UDim.new(0, 10) -- Rounded corners for button
- buttonUICorner.Parent = button
- return button
- end
- ToggleButton = createButton("Start Collecting", Color3.fromRGB(100, 200, 100), Frame)
- DelayBox = Instance.new("TextBox", Frame)
- DelayBox.Size = UDim2.new(0, 300, 0, 50)
- DelayBox.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
- DelayBox.PlaceholderText = "Enter collect delay (seconds)"
- DelayBox.Text = ""
- DelayBox.TextScaled = true
- DelayBox.Font = Enum.Font.SourceSansBold -- Match the "Status" font
- DelayBox.TextColor3 = Color3.fromRGB(0, 0, 0)
- DelayBox.ClearTextOnFocus = true
- local delayBoxUICorner = Instance.new("UICorner")
- delayBoxUICorner.CornerRadius = UDim.new(0, 10)
- delayBoxUICorner.Parent = DelayBox
- StatusLabel.Size = UDim2.new(0, 300, 0, 50)
- StatusLabel.BackgroundTransparency = 1
- StatusLabel.TextColor3 = Color3.fromRGB(255, 255, 255)
- StatusLabel.Text = "Status: Stopped"
- StatusLabel.TextScaled = true
- StatusLabel.Font = Enum.Font.SourceSansBold -- Match font
- StatusLabel.Parent = Frame
- WarningLabel.Size = UDim2.new(0, 300, 0, 40)
- WarningLabel.BackgroundTransparency = 1
- WarningLabel.TextColor3 = Color3.fromRGB(255, 100, 100)
- WarningLabel.Text = "Warning: Unequip all tools before using!"
- WarningLabel.TextScaled = true
- WarningLabel.Font = Enum.Font.SourceSansBold -- Match font
- WarningLabel.Parent = Frame
- RecommendationLabel.Size = UDim2.new(0, 300, 0, 40)
- RecommendationLabel.BackgroundTransparency = 1
- RecommendationLabel.TextColor3 = Color3.fromRGB(150, 200, 255)
- RecommendationLabel.Text = "Recommended: Use the default fish 'Fish'"
- RecommendationLabel.TextScaled = true
- RecommendationLabel.Font = Enum.Font.SourceSansBold -- Match font
- RecommendationLabel.Parent = Frame
- HidePointsButton = createButton("Hide TemplatePoints", Color3.fromRGB(150, 150, 200), Frame)
- INFYieldButton = createButton("INF Yield", Color3.fromRGB(200, 150, 150), Frame)
- -- Function to process all MeshParts
- local function collectAllFishFood()
- for _, item in ipairs(Workspace:GetDescendants()) do
- if item:IsA("MeshPart") and (item.Name == "FoodCircle" or item.Name == "FishFood") then
- local touchInterest = item:FindFirstChildWhichIsA("TouchTransmitter")
- if touchInterest then
- firetouchinterest(bodyPart, item, 0)
- firetouchinterest(bodyPart, item, 1)
- end
- end
- end
- end
- -- Toggle Button functionality
- ToggleButton.MouseButton1Click:Connect(function()
- isCollecting = not isCollecting
- ToggleButton.Text = isCollecting and "Stop Collecting" or "Start Collecting"
- StatusLabel.Text = isCollecting and "Status: Running" or "Status: Stopped"
- while isCollecting do
- collectAllFishFood()
- task.wait(collectDelay)
- end
- end)
- -- Delay Box functionality
- DelayBox.FocusLost:Connect(function(enterPressed)
- if enterPressed then
- local newDelay = tonumber(DelayBox.Text)
- if newDelay and newDelay > 0 then
- collectDelay = newDelay
- DelayBox.Text = ""
- else
- DelayBox.Text = "Invalid input"
- end
- end
- end)
- -- Hide/Show TemplatePoints toggle functionality
- HidePointsButton.MouseButton1Click:Connect(function()
- isHidingTemplatePoints = not isHidingTemplatePoints
- HidePointsButton.Text = isHidingTemplatePoints and "Show TemplatePoints" or "Hide TemplatePoints"
- for _, guiObject in ipairs(player.PlayerGui.CoreUI:GetDescendants()) do
- if guiObject:IsA("Frame") and guiObject.Name == "TemplatePoints" then
- guiObject.Visible = not isHidingTemplatePoints
- end
- end
- end)
- -- INF Yield button functionality
- INFYieldButton.MouseButton1Click:Connect(function()
- loadstring(game:HttpGet("https://raw.githubusercontent.com/EdgeIY/infiniteyield/master/source"))()
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement