Advertisement
1zxyuuki

Fisch2

Oct 18th, 2024
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.34 KB | None | 0 0
  1. --[[
  2. WARNING: Heads up! This script has not been verified by ScriptBlox. Use at your own risk!
  3. ]]
  4. local Players = game:GetService('Players')
  5. local CoreGui = game:GetService('StarterGui')
  6. local ReplicatedStorage = game:GetService('ReplicatedStorage')
  7. local ContextActionService = game:GetService('ContextActionService')
  8. local VirtualInputManager = game:GetService('VirtualInputManager')
  9.  
  10. local LocalPlayer = Players.LocalPlayer
  11.  
  12. local Enabled = false
  13. local Rod = false
  14. local Casted = false
  15. local Progress = false
  16. local Finished = false
  17.  
  18. local Keybind = Enum.KeyCode.F
  19.  
  20. function ShowNotification(String)
  21. CoreGui:SetCore('SendNotification', {
  22. Title = 'Notification',
  23. Text = String,
  24. Duration = 1
  25. })
  26. end
  27.  
  28. function ToggleFarm(Name, State, Input)
  29. if State == Enum.UserInputState.Begin then
  30. Enabled = not Enabled
  31.  
  32. if not Enabled then
  33. Finished = false
  34. Progress = false
  35.  
  36. if Rod then
  37. Rod.events.reset:FireServer()
  38. end
  39. end
  40.  
  41. ShowNotification(`Status: {Enabled}`)
  42. end
  43. end
  44.  
  45. LocalPlayer.Character.ChildAdded:Connect(function(Child)
  46. if Child:IsA('Tool') and Child.Name:lower():find('rod') then
  47. Rod = Child
  48. end
  49. end)
  50.  
  51. LocalPlayer.Character.ChildRemoved:Connect(function(Child)
  52. if Child == Rod then
  53. Enabled = false
  54. Finished = false
  55. Progress = false
  56. Rod = nil
  57. end
  58. end)
  59.  
  60. LocalPlayer.PlayerGui.DescendantAdded:Connect(function(Descendant)
  61. if Descendant.Name == 'button' and Descendant.Parent.Name == 'safezone' then
  62. task.wait(0.1)
  63. local ButtonPosition, ButtonSize = Descendant.AbsolutePosition, Descendant.AbsoluteSize
  64.  
  65. VirtualInputManager:SendMouseButtonEvent(ButtonPosition.X + (ButtonSize.X / 2), ButtonPosition.Y + (ButtonSize.Y / 2), Enum.UserInputType.MouseButton1.Value, true, LocalPlayer.PlayerGui, 1)
  66. VirtualInputManager:SendMouseButtonEvent(ButtonPosition.X + (ButtonSize.X / 2), ButtonPosition.Y + (ButtonSize.Y / 2), Enum.UserInputType.MouseButton1.Value, false, LocalPlayer.PlayerGui, 1)
  67. elseif Descendant.Name == 'playerbar' and Descendant.Parent.Name == 'bar' then
  68. Finished = true
  69.  
  70. task.wait(1.5)
  71.  
  72. print('spamming now!')
  73.  
  74. while Finished do
  75. ReplicatedStorage.events.reelfinished:FireServer(100, true)
  76. task.wait(0.3)
  77. end
  78. end
  79. end)
  80.  
  81. LocalPlayer.PlayerGui.DescendantRemoving:Connect(function(Descendant)
  82. if Descendant.Name == 'reel' then
  83. Finished = false
  84. Progress = false
  85. workspace.world.npcs['Marc Merchant'].merchant.sellall:InvokeServer()
  86. end
  87. end)
  88.  
  89. coroutine.wrap(function()
  90. while true do
  91. if Enabled and not Progress then
  92. if Rod then
  93. Progress = true
  94. task.wait(0.5)
  95. Rod.events.reset:FireServer()
  96. Rod.events.cast:FireServer(100.5)
  97. end
  98. end
  99.  
  100. task.wait()
  101. end
  102. end)()
  103.  
  104. local NewRod = LocalPlayer.Character:FindFirstChildWhichIsA('Tool')
  105.  
  106. if NewRod and NewRod.Name:lower():find('rod') then
  107. Rod = NewRod
  108. end
  109.  
  110. ContextActionService:BindAction('ToggleFarm', ToggleFarm, false, Keybind)
  111. ShowNotification(`Press '{Keybind.Name}' to enable/disable`)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement