4524452

Fisch

Dec 18th, 2024 (edited)
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.66 KB | None | 0 0
  1. -- i learned how to make clean code so now you guys cant call me skids for sus looking code 😜
  2.  
  3. local FischAPI = {}
  4.  
  5. local VIM = game:GetService("VirtualInputManager")
  6.  
  7. local VI = {}
  8.  
  9. local Options = {
  10. AutoShake = false,
  11. AutoMinigame = false, --Later version
  12. AutoMinigameBlatant = false,
  13. AutoCast = false,
  14. PerfectCast = false, --Later version
  15. WebhookURL = "",
  16. WebhookNotifications = false,
  17. FloatOnWater = false,
  18. Lock = false,
  19. MegaladonHunting = false,
  20. }
  21.  
  22. local Internal = {
  23. AutoMinigameDownPerUp = 2,
  24. AutoMinigameDownPerUpInternal = AutoMinigameDownPerUp,
  25. Timer = 301,
  26. FloatPart = nil,
  27. LockedPosition = nil,
  28. MegaladonPosition = nil,
  29. Megaladon = false,
  30. MegHuntPlat = nil,
  31. MegHuntPos = nil
  32. }
  33.  
  34. local Utils = {}
  35.  
  36. local UI = {}
  37.  
  38. local CalibrationData = {}
  39.  
  40. local FischUser = {}
  41.  
  42. local NEVERLOSE = loadstring(game:HttpGet("https://raw.githubusercontent.com/IayZBoy/TrollScripts/main/randomuilib.lua"))()
  43.  
  44. local Notification = NEVERLOSE.Notification();
  45.  
  46. NEVERLOSE:Theme("dark")
  47.  
  48. --UI
  49.  
  50. for Setting, Value in pairs(Options) do
  51. if Value == false then
  52. UI[Setting] = function(Val)
  53. Options[Setting] = Val
  54. end
  55. end
  56. end
  57.  
  58. function UI.Initialize()
  59. --UI
  60.  
  61. local Windows = NEVERLOSE:AddWindow("Nexam Hub","Nexam Hub - Fisch - V0.0.3 - discord.gg/nexam")
  62.  
  63. local FishingTab = Windows:AddTab("Fishing", "earth")
  64.  
  65. local Interactions = Windows:AddTab("Interactions", "list")
  66.  
  67. local AreaTeleportsTab = Windows:AddTab("Area Teleports", "earth")
  68.  
  69. local MegaladonHunting = Windows:AddTab("Megaladon Hunting", "earth")
  70.  
  71. local WebhookTab = Windows:AddTab("Webhook", "list")
  72.  
  73. local MechanicsSection = FishingTab:AddSection("Mechanics", "left")
  74.  
  75. local Convenience = FishingTab:AddSection("Convenience", "left")
  76.  
  77. local CreditsSection = FishingTab:AddSection("Credits", "right")
  78.  
  79. local Teleports = AreaTeleportsTab:AddSection("Teleports", "left")
  80.  
  81. local Actions = Interactions:AddSection("Actions", "left")
  82.  
  83. local WebhookSection = WebhookTab:AddSection("Webhook", "left")
  84.  
  85. Actions:AddButton("Sell All", FischUser.Sell)
  86.  
  87. Convenience:AddToggle("Float On Water", false, UI.FloatOnWater)
  88.  
  89. Convenience:AddLabel("Turn ON to walk around and choose spot.")
  90.  
  91. Convenience:AddLabel("Turn OFF to choose your position.")
  92.  
  93. Convenience:AddToggle("Lock Position", false, function(v) Internal.LockedPosition = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  94. UI.Lock(v) end)
  95.  
  96. MechanicsSection:AddToggle("Auto Shake", false, UI.AutoShake)
  97.  
  98. MechanicsSection:AddToggle("Auto Reel (Blatant)", false, UI.AutoMinigameBlatant)
  99.  
  100. MechanicsSection:AddToggle("Auto Cast", false, UI.AutoCast)
  101.  
  102. WebhookSection:AddButton(
  103. "Set Webhook URL",
  104. function()
  105. NEVERLOSE:KeySystem(
  106. "Webhook URL - Put URL as key and click Submit to set it.",
  107. "",
  108. function(URL)
  109. Options.WebhookURL = URL
  110. Notification:Notify("info", "Set Webhook Successfully", "Set webhook to "..URL, 5)
  111. return true
  112. end
  113. ):Callback(function()end)
  114. end
  115. )
  116.  
  117. WebhookSection:AddToggle(
  118. "Send Webhook Notifications",
  119. false,
  120. UI.WebhookNotifications
  121. )
  122.  
  123. for Place, Position in pairs(CalibrationData.Positions) do
  124. Teleports:AddButton(
  125. "Teleport to "..Place,
  126. function()
  127. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Position
  128. end
  129. )
  130. end
  131.  
  132. local MegHunt = MegaladonHunting:AddSection("Hunting", "left")
  133.  
  134. local HuntOrNo = MegHunt:AddToggle("Hunt Megaladon", false, UI.MegaladonHunting)
  135.  
  136. MegHunt:AddLabel("If a Megaladon is spotted within the server,")
  137. MegHunt:AddLabel("it will override all options and")
  138. MegHunt:AddLabel("hunt for it.")
  139. MegHunt:AddLabel("It will go back to normal once you or someone else")
  140. MegHunt:AddLabel("has caught it.")
  141.  
  142. Actions:AddButton("Open/Close Boat UI", function()
  143. FischUser.OpenBoatUI()
  144. end)
  145.  
  146. CreditsSection:AddLabel("Fisch Nexam Hub Script by dynamicarrays")
  147. CreditsSection:AddButton(
  148. "Discord",
  149. function()
  150. setclipboard("discord.gg/nexam")
  151. end
  152. )
  153.  
  154. local AbundanceZoneSection = FishingTab:AddSection("Abundances", "right")
  155.  
  156. local Ab = {}
  157.  
  158. local Ab2 = {}
  159.  
  160. local Choice = nil
  161.  
  162. local LabeledChance = nil
  163.  
  164. local AbundanceChoice = AbundanceZoneSection:AddDropdown("Abundances", Ab, "Loading", function(D)
  165. LabeledChance:Text("Chance: "..tostring(Ab2[D].Chance).."%")
  166. Choice = Ab2[D]
  167. end)
  168.  
  169. LabeledChance = AbundanceZoneSection:AddLabel("Chance: 0%")
  170.  
  171. local GotoAbundance = AbundanceZoneSection:AddButton("Go to Abundance", function()
  172. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(Choice.Position.X, 137.77, Choice.Position.Z)
  173. end)
  174.  
  175. local FishRadarPlaces = {}
  176.  
  177. local I = 0
  178.  
  179. while I < 100 do
  180. I = I + 1
  181. FishingTab:AddSection("Scrolling Space", "right")
  182. end
  183.  
  184. while task.wait(5) do
  185. local Places = FischAPI.GetAllAbundanceZones()
  186. Ab2 = Places
  187. Ab = {}
  188. local FoundMeg = false
  189. for Fish, Info in pairs(Ab2) do
  190. if string.match(Fish, "Megalodon") then
  191. Internal.Megaladon = true
  192. FoundMeg = true
  193. Internal.MegaladonPosition = Info.Position
  194. end
  195. table.insert(Ab, Fish)
  196. end
  197. if FoundMeg == false then
  198. Internal.Megaladon = false
  199. Internal.MegaladonPosition = nil
  200. pcall(function()
  201. Internal.MegHuntPlat:Destroy()
  202. end)
  203. end
  204. AbundanceChoice:Refresh(Ab)
  205. end
  206. end
  207.  
  208. --Utils
  209.  
  210. function Utils.Overlap(gui1, gui2)
  211. local gui1_topLeft = gui1.AbsolutePosition
  212. local gui1_bottomRight = gui1_topLeft + gui1.AbsoluteSize
  213.  
  214. local gui2_topLeft = gui2.AbsolutePosition
  215. local gui2_bottomRight = gui2_topLeft + gui2.AbsoluteSize
  216.  
  217. return ((gui1_topLeft.x < gui2_bottomRight.x and gui1_bottomRight.x > gui2_topLeft.x) and (gui1_topLeft.y < gui2_bottomRight.y and gui1_bottomRight.y > gui2_topLeft.y))
  218. end
  219.  
  220. function Utils.SendWebhookData(Link, Text)
  221. local DataForm = Text
  222. local maxLength = 1950
  223. local chunks = {}
  224. local HttpService = game:GetService("HttpService")
  225.  
  226. while #DataForm > 0 do
  227. local chunk = DataForm:sub(1, maxLength)
  228. if #DataForm > maxLength then
  229. local lastNewline = chunk:match(".*\n()")
  230. if lastNewline then
  231. chunk = DataForm:sub(1, lastNewline - 1)
  232. end
  233. end
  234. table.insert(chunks, chunk)
  235. DataForm = DataForm:sub(#chunk + 1)
  236. end
  237.  
  238. for i, chunk in chunks do
  239. local data = {
  240. content = chunk
  241. }
  242.  
  243. request({
  244. Url = Link,
  245. Method = "POST",
  246. Headers = {
  247. ["Content-Type"] = "application/json"
  248. },
  249. Body = HttpService:JSONEncode(data)
  250. })
  251. end
  252. end
  253.  
  254. --VI
  255.  
  256. VI.State = false
  257.  
  258. function VI.ClickUI(ui)
  259. local x = ui.AbsolutePosition.X + (ui.AbsoluteSize.X / 2)
  260. local y = ui.AbsolutePosition.Y + (ui.AbsoluteSize.Y / 2)
  261. VIM:SendMouseButtonEvent(x, y, 0, true, game, 0)
  262. task.wait(0.05)
  263. VIM:SendMouseButtonEvent(x, y, 0, false, game, 0)
  264. end
  265.  
  266. function VI.Down(ui)
  267. VI.State = true
  268. local x = ui.AbsolutePosition.X + (ui.AbsoluteSize.X / 2)
  269. local y = ui.AbsolutePosition.Y + (ui.AbsoluteSize.Y / 2)
  270. VIM:SendMouseButtonEvent(x, y, 0, true, game, 0)
  271. end
  272.  
  273. function VI.Up(ui)
  274. VI.State = false
  275. local x = ui.AbsolutePosition.X + (ui.AbsoluteSize.X / 2)
  276. local y = ui.AbsolutePosition.Y + (ui.AbsoluteSize.Y / 2)
  277. VIM:SendMouseButtonEvent(x, y, 0, false, game, 0)
  278. end
  279.  
  280. --API
  281.  
  282. function FischAPI.TapShake()
  283. local ShakeGUI = game:GetService("Players").LocalPlayer.PlayerGui:FindFirstChild("shakeui")
  284. local Target = ShakeGUI.safezone.button
  285. local GuiService = game:GetService("GuiService")
  286.  
  287. GuiService.SelectedObject = Target
  288.  
  289. VIM:SendKeyEvent(true, Enum.KeyCode.Return, false, nil)
  290.  
  291. task.wait(0.005)
  292.  
  293. VIM:SendKeyEvent(false, Enum.KeyCode.Return, false, nil)
  294. end
  295.  
  296. function FischAPI.InstantReel()
  297. game:GetService("ReplicatedStorage").events.reelfinished:FireServer(100, true)
  298. end
  299.  
  300. function FischAPI.Cast()
  301. game.Players.LocalPlayer.Character[CalibrationData.FishingRod].events.cast:FireServer(100,1)
  302. end
  303.  
  304. function FischAPI.GetAllAbundanceZones()
  305. local Abundances = {}
  306. for i, Zone in pairs(game:GetService("Workspace").zones.fishing:GetChildren()) do
  307. local Info = {}
  308. if Zone:FindFirstChild("Abundance") then
  309. if Zone:FindFirstChild("Abundance"):FindFirstChild("Chance") then
  310. Info.Chance = Zone.Abundance.Chance.Value
  311. else
  312. Info.Chance = 1
  313. end
  314. Info.Position = Zone.Position
  315. if Abundances[Zone.Abundance.Value] == nil then
  316. Abundances[Zone.Abundance.Value] = Info
  317. elseif Abundances[Zone.Abundance.Value].Chance < Info.Chance then
  318. Abundances[Zone.Abundance.Value] = Info
  319. end
  320. end
  321. end
  322. return Abundances
  323. end
  324.  
  325. function FischAPI.SellAll()
  326. workspace.world.npcs["Marc Merchant"].merchant.sellall:InvokeServer()
  327. end
  328.  
  329. function FischAPI.InitializePossibleDetections(Power)
  330. --This is just for guidement, don't use this function lol
  331. game:GetService("ReplicatedStorage").modules.fishing.rodresources.events.cast:FireServer(Power,1)
  332. end
  333.  
  334. function FischAPI.DetermineClickActionMinigame()
  335.  
  336. end
  337.  
  338. function FischAPI.GetFish()
  339. local Text = "Items/Fish:\n"
  340. for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
  341. Text=Text..v.Name.."\n"
  342. end
  343. return Text
  344. end
  345.  
  346. --User
  347.  
  348. function FischUser.Sell()
  349. FischAPI.SellAll()
  350. end
  351.  
  352. function FischUser.AutoShake()
  353. FischAPI.TapShake()
  354. end
  355.  
  356. function FischUser.OpenBoatUI()
  357. game:GetService("Players").LocalPlayer.PlayerGui.hud.safezone.shipwright.Visible = not game:GetService("Players").LocalPlayer.PlayerGui.hud.safezone.shipwright.Visible
  358. end
  359.  
  360. function FischUser.LockPosition()
  361. if Internal.Megaladon == true then
  362. if Options.MegaladonHunting == true then
  363. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Internal.MegHuntPos
  364. return
  365. end
  366. end
  367. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Internal.LockedPosition
  368. end
  369.  
  370. function FischUser.FloatOnWater()
  371. pcall(function()
  372. Internal.FloatPart:Destroy()
  373. end)
  374. Internal.FloatPart = Instance.new("Part", workspace)
  375. Internal.FloatPart.Anchored = true
  376. Internal.FloatPart.Size = Vector3.new(10,1,10)
  377. Internal.FloatPart.Position = Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X, 133.77, game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z)
  378. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X, 150, game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z)
  379. end
  380.  
  381. function FischUser.AutoMinigame()
  382. local action = FischAPI.DetermineClickActionMinigame()
  383. local PlayerBar = game:GetService("Players").LocalPlayer.PlayerGui.reel.bar.playerbar
  384. if action == true then
  385. if VI.State == false then
  386. VI.Down(PlayerBar)
  387. end
  388. else
  389. if VI.State == true then
  390. VI.Up(PlayerBar)
  391. end
  392. end
  393. end
  394.  
  395. function FischUser.SecondUpdateWebhook()
  396. local a, b = pcall(function()
  397. Internal.Timer = Internal.Timer + 1
  398. if Internal.Timer >= 300 then
  399. Internal.Timer = 0
  400. local Data = FischAPI.GetFish()
  401. Utils.SendWebhookData(Options.WebhookURL, Data)
  402. Notification.new({
  403. Title = "Webhook Notification Sent",
  404. Description = "The next webhook notification is in 5 minutes.",
  405. Duration = 5,
  406. Icon = "rbxassetid://8997385628"
  407. })
  408. end
  409. end)
  410. print(a, b)
  411. end
  412.  
  413. function FischUser.AutoCast()
  414. FischAPI.Cast()
  415. end
  416.  
  417. function FischUser.AutoReel()
  418. FischAPI.InstantReel()
  419. end
  420.  
  421. function FischUser.StepLoop()
  422. if Options.FloatOnWater == true then
  423. pcall(function()
  424. FischUser.FloatOnWater()
  425. end)
  426. end
  427. if Options.AutoShake == true then
  428. pcall(function()
  429. FischUser.AutoShake()
  430. end)
  431. end
  432. if Options.AutoMinigameBlatant == true then
  433. pcall(function()
  434. FischUser.AutoReel()
  435. end)
  436. end
  437. end
  438.  
  439. function FischUser.MegaladonHuntInstant()
  440. if Internal.Megaladon == true then
  441. if Internal.MegHuntPlat then
  442. return
  443. end
  444. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(Internal.MegaladonPosition.X, 150.77, Internal.MegaladonPosition.Z)
  445. Internal.MegHuntPlat = Instance.new("Part", workspace)
  446. Internal.MegHuntPlat.Anchored = true
  447. Internal.MegHuntPlat.Size = Vector3.new(10,1,10)
  448. Internal.MegHuntPlat.Position = Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X, 133.77, game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z)
  449. game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X, 150, game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z)
  450. task.wait(5)
  451. Internal.MegHuntPos = game.Players.LocalPlayer.Character.HumanoidRootPart.Position
  452. end
  453. end
  454.  
  455. function FischUser.Heartbeat()
  456. if Options.MegaladonHunting == true then
  457. FischUser.MegaladonHuntInstant()
  458. end
  459. end
  460.  
  461. function FischUser.OneStep()
  462.  
  463. end
  464.  
  465. function FischUser.Relaxed1Sec()
  466. if Options.WebhookNotifications == true then
  467. pcall(function()
  468. FischUser.SecondUpdateWebhook()
  469. end)
  470. end
  471. if Options.AutoCast == true then
  472. pcall(function()
  473. if Options.Lock == true then
  474. FischUser.LockPosition()
  475. end
  476. FischUser.AutoCast()
  477. end)
  478. end
  479. end
  480.  
  481. function FischUser.Initialize()
  482. spawn(function()
  483. game:GetService("RunService").RenderStepped:Connect(function()
  484. FischUser.Heartbeat()
  485. end)
  486. end)
  487. spawn(function()
  488. FischUser.OneStep()
  489. end)
  490. spawn(function()
  491. while task.wait(0.005) do
  492. pcall(function()
  493. FischUser.StepLoop()
  494. end)
  495. end
  496. end)
  497. spawn(function()
  498. while task.wait(1) do
  499. FischUser.Relaxed1Sec()
  500. end
  501. end)
  502. end
  503.  
  504. Notification:Notify(
  505. "info",
  506. "Calibration",
  507. "Please make sure to follow all the steps listed.",
  508. 5
  509. )
  510. Notification:Notify(
  511. "info",
  512. "Calibration",
  513. "Ensure that you are in the spawn area before executing the script. Equip your fishing rod.",
  514. 5
  515. )
  516. task.wait(5)
  517. while true do
  518. local a, b = pcall(function()
  519. local CreateError = {}
  520. for i, v in pairs(game.Players.LocalPlayer.Character:GetChildren()) do
  521. if v:IsA("Tool") then
  522. CalibrationData.FishingRod = v.Name
  523. end
  524. end
  525. CalibrationData.Positions = {}
  526. for i, v in pairs(game:GetService("Workspace").zones.player:GetChildren()) do
  527. CalibrationData.Positions[v.Name] = v.Position
  528. end
  529. if CalibrationData.FishingRod == nil then
  530. local E = CreateError[1]+1
  531. end
  532. end)
  533. if a == false then
  534. Notification:Notify(
  535. "warning",
  536. "Calibration Error",
  537. "Something went wrong with your calibration. Make sure to complete all the tasks listed. Will attempt to recalibrate in 5 seconds...",
  538. 5
  539. )
  540. Notification:Notify(
  541. "info",
  542. "Calibration",
  543. "Ensure that you are in the spawn area before executing the script. Equip your fishing rod.",
  544. 5
  545. )
  546. task.wait(5)
  547. else
  548. Notification:Notify(
  549. "info",
  550. "Calibration Successful",
  551. "Now loading script...",
  552. 5
  553. )
  554. task.wait(5)
  555. FischUser.Initialize()
  556. UI.Initialize()
  557. break
  558. end
  559. end
Advertisement
Add Comment
Please, Sign In to add comment