get paid to paste

---Customizable variables---

local key = "H"

---Main Variables---

local plr = game:GetService("Players")["LocalPlayer"]
local PathfindingService = game:GetService("PathfindingService")
local Locations = {"Pharaoh's Dunes","Ancient Shores","Shadow Isles","Eruption Island","Port Jackson"}
local ScriptOn = false

---Function Prototypes---

function BubbleCheck() end;
function FishingGame() end;
function SellCheck() end;
function Click() end;
function Notif(Text) end;

---Main Code---

function main(act, state, obj)
    if state == Enum.UserInputState.Begin then
        if ScriptOn then
            ScriptOn = false
            Notif("Script is now off")
        else
            ScriptOn = true
            Notif("Script is now on")
        end
        while ScriptOn do
            if not plr.Backpack:FindFirstChild("Rod",true) then
                --SellCheck() --Currently w.i.p (kinda)
                Click()
                local CharTool = plr.Character:FindFirstChildOfClass("Tool")
                if CharTool and CharTool["Bobbers"]["Bobber"].Transparency ~= 1 then
                    BubbleCheck()
                    Click()
                    FishingGame()
                end
            end
            wait()
        end
    end
end

---CAS Setup---

local CAS = game:GetService("ContextActionService")
CAS:UnbindAction("BoundAction")
CAS:BindAction("BoundAction", main, false, Enum.KeyCode[key])

---Flushed out function prototypes---

function BubbleCheck()
    local Good = false
    repeat
        wait()
        local CharTool = plr.Character:FindFirstChildOfClass("Tool")
        if CharTool then
            local Bober = CharTool["Bobbers"]["Bobber"]
            repeat wait() until #plr["PlayerGui"]["FishBubbles"]:GetChildren() >= 2 or not ScriptOn or Bober.Transparency == 1
            Good = true
        end
    until not ScriptOn or Good
    return
end

function FishingGame()
    Game = plr["PlayerGui"]["Fishing"]["Bar"]["Contents"]
    repeat wait() until Game.Line.Visible or not ScriptOn
    while ScriptOn and Game.Parent.Visible and Game.Line.Visible do
        Game = plr["PlayerGui"]["Fishing"]["Bar"]["Contents"]
        if Game.Line.Position.X.Scale < .5 then
            Click()
            wait()
        end
        if not Game.Parent.Visible then
            break
        end
        wait()
    end
    return
end

function SellCheck()
    local T = plr["PlayerGui"]["Inventory"]["Frame"]["XboxControls"]["BagSlotsLeft"]["Amount"].Text
    local C,M = tonumber(string.match(T,"(%d+)/")),tonumber(string.match(T,"/(%d+)"))
    if C >= M - 1 then
        local lowest = 1e9
        local low
        local Char = plr.Character
        local root = Char:FindFirstChild("HumanoidRootPart")
        for i,v in pairs(Locations) do
            local Caster = game.Workspace[v]:FindFirstChild("Caster")
            if Caster and (Caster.HumanoidRootPart.Position - root.Position).Magnitude < lowest then
                lowest = (Caster.HumanoidRootPart.Position - root.Position).Magnitude
                low = Caster
            end
        end
        if low then
            local path = PathfindingService:CreatePath({["AgentRadius"] = 2})
            path:ComputeAsync(root.Position, low.HumanoidRootPart.Position + Vector3.new(10,0,0))
            waypoints = {}
            local waypoints = path:GetWaypoints()
            for _, waypoint in pairs(waypoints) do
                Char.Humanoid:MoveTo(waypoint.Position)
                local Reach = Char.Humanoid.MoveToFinished:Wait()
                while not Reach or not ScriptOn do
                    Char.Humanoid:MoveTo(waypoint.Position)
                    Char.Humanoid.MoveToFinished:Wait()
                end
            end
            waypoints = {}
        end
    end
    return
end

function Click()
    if not pcall(function()
        Input.LeftClick()
    end) then
        syn_mouse1click()
    end
end

function Notif(Text)
    game.StarterGui:SetCore("SendNotification",{
        Title = "Notification";
        Text = Text;
    })
end

Pasted: Sep 10, 2021, 7:08:25 am
Views: 106