Geavin

Kaitun electric wing shit

Oct 19th, 2026
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 33.70 KB | None | 0 0
  1. -- Electric Wing Kaitun By Gleavin
  2. local env = (getgenv and getgenv()) or _G
  3. env.PF_Gen = (env.PF_Gen or 0) + 1
  4. local GEN = env.PF_Gen
  5. local function Running() return env.PF_Gen == GEN end
  6.  
  7. -- Clipboard
  8. pcall(function()
  9. local copy = setclipboard or toclipboard or set_clipboard or (Clipboard and Clipboard.set)
  10. if copy then copy("https://discord.gg/uzYhnjCXxF") end
  11. end)
  12.  
  13. repeat task.wait() until game:IsLoaded() and game:GetService("Players").LocalPlayer
  14.  
  15. local Players = game:GetService("Players")
  16. local RunService = game:GetService("RunService")
  17. local RS = game:GetService("ReplicatedStorage")
  18. local VirtualUser = game:GetService("VirtualUser")
  19. local LocalPlayer = Players.LocalPlayer
  20.  
  21. -- Config
  22. local BUY_POS = Vector3.new(-16924.388671875, 11.139923095703125, 433.4230041503906)
  23. local TWEEN_SPEED = 275
  24. local BOAT_SPEED = 250
  25. local BOAT_BOOST_HEIGHT = 300
  26. local BOAT_CLIMB_SPEED = 250
  27. local BOAT_BOOST_TIME = 8
  28. local BoostUntil = 0
  29. local PIRANHA_RANGE = 1500
  30. local FAST_ATTACK_MODE = "2"
  31. local BoatFindRange = 5000
  32. local BOAT_REBOARD_RANGE = 150
  33. local TS_SKIP_RADIUS = 200
  34. local TS_DANGER = 220
  35. local TS_DODGE_Y = 300
  36. local SailArriveDist = 40
  37. local CruiseWP_A = CFrame.new(-44541.7617, 30.0003204, -1244.8584)
  38. local CruiseWP_B = CFrame.new(-90000, 30.0003204, -1244.8584)
  39.  
  40. -- Remotes
  41. local Remote = RS:FindFirstChild("Remotes")
  42. local CommF = Remote and Remote:WaitForChild("CommF_", 10)
  43.  
  44. local AbandonedBoats = setmetatable({}, { __mode = "k" })
  45. local Fighting = false
  46.  
  47. local function Parts()
  48. local char = LocalPlayer.Character
  49. if not char then return nil, nil, nil end
  50. return char, char:FindFirstChild("HumanoidRootPart"), char:FindFirstChildOfClass("Humanoid")
  51. end
  52.  
  53. local function IsAlive()
  54. local _, hrp, hum = Parts()
  55. return hrp ~= nil and hum ~= nil and hum.Health > 0
  56. end
  57.  
  58. -- Anti AFK
  59. LocalPlayer.Idled:Connect(function()
  60. pcall(function()
  61. VirtualUser:Button2Down(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
  62. task.wait(1)
  63. VirtualUser:Button2Up(Vector2.new(0, 0), workspace.CurrentCamera.CFrame)
  64. end)
  65. end)
  66.  
  67. -- Simulation Radius
  68. task.spawn(function()
  69. while Running() do
  70. pcall(function()
  71. if type(sethiddenproperty) == "function" then
  72. sethiddenproperty(LocalPlayer, "SimulationRadius", math.huge)
  73. else
  74. LocalPlayer.SimulationRadius = math.huge
  75. end
  76. end)
  77. task.wait(1)
  78. end
  79. end)
  80.  
  81. local function NoClip()
  82. local char = LocalPlayer.Character
  83. if not char then return end
  84. for _, p in ipairs(char:GetDescendants()) do
  85. if p:IsA("BasePart") then p.CanCollide = false end
  86. end
  87. end
  88.  
  89. -- Tween
  90. local function MoveTo(getGoal, stopCheck, timeout)
  91. local t0 = os.clock()
  92. timeout = timeout or 60
  93. while Running() and os.clock() - t0 < timeout do
  94. local _, hrp, hum = Parts()
  95. if not hrp or not hum or hum.Health <= 0 then return false end
  96. if stopCheck and stopCheck() then return false end
  97. local goal = getGoal()
  98. if not goal then return false end
  99. local delta = goal.Position - hrp.Position
  100. local dist = delta.Magnitude
  101. if dist <= 2 then
  102. hrp.CFrame = goal
  103. hrp.AssemblyLinearVelocity = Vector3.zero
  104. hrp.AssemblyAngularVelocity = Vector3.zero
  105. return true
  106. end
  107. local dt = RunService.Heartbeat:Wait() or (1 / 60)
  108. local _, hrp2 = Parts()
  109. if not hrp2 then return false end
  110. local step = math.min(dist, TWEEN_SPEED * dt)
  111. hrp2.CFrame = CFrame.new(hrp2.Position + delta.Unit * step) * (hrp2.CFrame - hrp2.CFrame.Position)
  112. hrp2.AssemblyLinearVelocity = Vector3.zero
  113. hrp2.AssemblyAngularVelocity = Vector3.zero
  114. NoClip()
  115. end
  116. return false
  117. end
  118.  
  119. -- Seat
  120. local function Unseat()
  121. for _ = 1, 3 do
  122. local char, hrp, hum = Parts()
  123. if not hum or (not hum.Sit and hum.SeatPart == nil) then return true end
  124. pcall(function()
  125. local seat = hum.SeatPart
  126. if seat and seat.Parent then
  127. local Weld = seat:FindFirstChild("SeatWeld")
  128. local p1 = Weld and Weld.Part1
  129. if Weld and ((not p1) or (p1:IsA("BasePart") and p1:IsDescendantOf(char))) then
  130. Weld:Destroy()
  131. end
  132. end
  133. hum.Sit = false
  134. hum.PlatformStand = false
  135. end)
  136. if hrp then
  137. pcall(function() hrp.CFrame = hrp.CFrame + Vector3.new(0, 10, 0) end)
  138. end
  139. local s = os.clock()
  140. while os.clock() - s < 2 do
  141. local _, _, h2 = Parts()
  142. if not h2 or (not h2.Sit and h2.SeatPart == nil) then return true end
  143. pcall(function() h2.Sit = false end)
  144. task.wait(0.2)
  145. end
  146. end
  147. return false
  148. end
  149.  
  150. -- Sit Logic
  151. local SNAP_RANGE = 150
  152.  
  153. local function BoardSeat(seat, timeout)
  154. local t0 = os.clock()
  155. timeout = timeout or 20
  156. while Running() and IsAlive() and os.clock() - t0 < timeout do
  157. if not seat or not seat.Parent then return false end
  158. local _, hrp, hum = Parts()
  159. if hum.SeatPart == seat then return true end
  160. if hum.SeatPart ~= nil then
  161. Unseat()
  162. task.wait(0.1)
  163. end
  164.  
  165. local dist = (seat.Position - hrp.Position).Magnitude
  166. if dist > SNAP_RANGE then
  167. -- Logic #1
  168. MoveTo(function()
  169. if seat and seat.Parent then return seat.CFrame end
  170. return nil
  171. end, function()
  172. local _, h2, hm = Parts()
  173. if not h2 or not seat or not seat.Parent then return true end
  174. return hm.SeatPart ~= nil or (seat.Position - h2.Position).Magnitude <= SNAP_RANGE
  175. end, 30)
  176. else
  177. -- Logic #2
  178. local s0 = os.clock()
  179. while Running() and IsAlive() and seat.Parent and os.clock() - s0 < 1.5 do
  180. local _, h3, hm3 = Parts()
  181. if not h3 then break end
  182. if hm3.SeatPart == seat then return true end
  183. h3.CFrame = seat.CFrame
  184. h3.AssemblyLinearVelocity = Vector3.zero
  185. h3.AssemblyAngularVelocity = Vector3.zero
  186. NoClip()
  187. RunService.Heartbeat:Wait()
  188. end
  189. end
  190. end
  191. local _, _, hum = Parts()
  192. return hum ~= nil and hum.SeatPart == seat
  193. end
  194.  
  195. -- Boat
  196. local function BoatOwnerMatch(boat)
  197. local Owner = boat and boat:FindFirstChild("Owner")
  198. if not Owner then return false end
  199. if Owner.Value == LocalPlayer then return true end
  200. if tostring(Owner.Value) == LocalPlayer.Name then return true end
  201. return false
  202. end
  203.  
  204. local function IsBoatDead(boat)
  205. if not boat then return false end
  206. local Humanoid = boat:FindFirstChild("Humanoid")
  207. if Humanoid then
  208. if Humanoid:IsA("ValueBase") then
  209. local ok, v = pcall(function() return Humanoid.Value end)
  210. if ok and v ~= nil then return v <= 0 end
  211. elseif Humanoid:IsA("Humanoid") then
  212. return Humanoid.Health <= 0
  213. end
  214. end
  215. local Health = boat:FindFirstChild("Health")
  216. if Health and Health:IsA("ValueBase") then
  217. local ok2, v2 = pcall(function() return Health.Value end)
  218. if ok2 and v2 ~= nil then return v2 <= 0 end
  219. end
  220. return false
  221. end
  222.  
  223. local function GetOwnBoat(maxRange)
  224. maxRange = maxRange or BoatFindRange
  225. local boats = workspace:FindFirstChild("Boats")
  226. if not boats then return nil, nil end
  227. local _, hrp = Parts()
  228. if not hrp then return nil, nil end
  229. for _, boat in ipairs(boats:GetChildren()) do
  230. if BoatOwnerMatch(boat) and not AbandonedBoats[boat] and not IsBoatDead(boat) then
  231. local seat = boat:FindFirstChild("VehicleSeat")
  232. if seat and seat.Position.Y >= 0 then
  233. if (seat.Position - hrp.Position).Magnitude <= maxRange then
  234. return boat, seat
  235. end
  236. end
  237. end
  238. end
  239. return nil, nil
  240. end
  241.  
  242. local function BoatBroken(boat, seat)
  243. local reason
  244. if not boat or not boat.Parent then reason = "boat removed"
  245. elseif not seat or not seat.Parent then reason = "seat removed"
  246. elseif IsBoatDead(boat) then reason = "boat health <= 0"
  247. elseif seat.Position.Y < 0 then reason = "seat Y < 0 (" .. tostring(seat.Position.Y) .. ")" end
  248. if reason then
  249. if reason ~= env.PF_LastReason then
  250. env.PF_LastReason = reason
  251. warn("[PiranhaFarm] boat broken -> " .. reason)
  252. end
  253. return true
  254. end
  255. env.PF_LastReason = nil
  256. return false
  257. end
  258.  
  259. local function WaitForOwnBoat(t)
  260. local s = os.clock()
  261. while Running() and os.clock() - s < t do
  262. local b, st = GetOwnBoat()
  263. if b and st then return b, st end
  264. task.wait(0.05)
  265. end
  266. return nil, nil
  267. end
  268.  
  269. -- Boat NoClip
  270. local NC_Boat, NC_Parts, NC_Conns = nil, {}, {}
  271. local function StopBoatNoClip()
  272. for _, c in ipairs(NC_Conns) do pcall(function() c:Disconnect() end) end
  273. NC_Conns, NC_Parts, NC_Boat = {}, {}, nil
  274. end
  275. local function BoatNoClip(boat, force)
  276. if not boat or not boat.Parent then return end
  277. if NC_Boat == boat and not force then return end
  278. StopBoatNoClip()
  279. NC_Boat = boat
  280. for _, p in ipairs(boat:GetDescendants()) do
  281. if p:IsA("BasePart") then NC_Parts[#NC_Parts + 1] = p end
  282. end
  283. NC_Conns[#NC_Conns + 1] = boat.DescendantAdded:Connect(function(d)
  284. if d:IsA("BasePart") then NC_Parts[#NC_Parts + 1] = d end
  285. end)
  286. NC_Conns[#NC_Conns + 1] = RunService.Stepped:Connect(function()
  287. if not Running() or not boat.Parent then
  288. StopBoatNoClip()
  289. return
  290. end
  291. for i = #NC_Parts, 1, -1 do
  292. local p = NC_Parts[i]
  293. if p.Parent then
  294. if p.CanCollide then p.CanCollide = false end
  295. else
  296. table.remove(NC_Parts, i)
  297. end
  298. end
  299. end)
  300. end
  301.  
  302. -- Destory Rocks
  303. task.spawn(function()
  304. while Running() do
  305. pcall(function()
  306. local rocks = workspace:FindFirstChild("Rocks")
  307. if rocks then rocks:Destroy() end
  308. end)
  309. task.wait(0.5)
  310. end
  311. end)
  312.  
  313. -- Helper
  314. local function AbandonOwnBoats()
  315. local boats = workspace:FindFirstChild("Boats")
  316. if not boats then return end
  317. for _, boat in ipairs(boats:GetChildren()) do
  318. if BoatOwnerMatch(boat) then
  319. AbandonedBoats[boat] = true
  320. end
  321. end
  322. end
  323.  
  324. -- Boat
  325. local BOAT_NAME = "Guardian"
  326.  
  327. -- Location
  328. local function GoBuyBoat()
  329. local _, _, hum = Parts()
  330. if hum and (hum.Sit or hum.SeatPart ~= nil) then Unseat() end
  331.  
  332. AbandonOwnBoats()
  333.  
  334. local ok = MoveTo(function() return CFrame.new(BUY_POS) end, nil, 90)
  335. if not ok then return nil, nil end
  336. if not CommF then return nil, nil end
  337.  
  338. -- Buy Boat
  339. local function Buy()
  340. task.spawn(function()
  341. pcall(function() CommF:InvokeServer("BuyBoat", BOAT_NAME) end)
  342. end)
  343. end
  344. Buy()
  345. local t0 = os.clock()
  346. local lastBuy = os.clock()
  347. while Running() and IsAlive() and os.clock() - t0 < 10 do
  348. local b, st = GetOwnBoat()
  349. if b and st then
  350. BoatNoClip(b, true)
  351. return b, st
  352. end
  353. if os.clock() - lastBuy >= 1.5 then
  354. lastBuy = os.clock()
  355. Buy()
  356. end
  357. task.wait(0.03)
  358. end
  359. return nil, nil
  360. end
  361.  
  362. -- Sailing
  363. local CruiseToB = true
  364. local CruiseCheckPos, CruiseCheckAt = nil, 0
  365.  
  366. local function SailStep(boat, seat)
  367. local _, hrp = Parts()
  368. if not hrp then return end
  369. local dt = RunService.Heartbeat:Wait() or (1 / 60)
  370. local pos = hrp.Position
  371. local target = CruiseToB and CruiseWP_B or CruiseWP_A
  372. local zone = target.Position
  373. local flat = Vector3.new(zone.X - pos.X, 0, zone.Z - pos.Z)
  374. local dist = flat.Magnitude
  375. if dist <= SailArriveDist then
  376. CruiseToB = not CruiseToB
  377. target = CruiseToB and CruiseWP_B or CruiseWP_A
  378. zone = target.Position
  379. flat = Vector3.new(zone.X - pos.X, 0, zone.Z - pos.Z)
  380. dist = flat.Magnitude
  381. end
  382.  
  383. -- Logic #1
  384. if os.clock() - CruiseCheckAt >= 15 then
  385. if CruiseCheckPos and Vector3.new(pos.X - CruiseCheckPos.X, 0, pos.Z - CruiseCheckPos.Z).Magnitude < 200 then
  386. Unseat()
  387. task.wait(0.3)
  388. if seat.Parent then BoardSeat(seat, 10) end
  389. CruiseCheckPos = nil
  390. else
  391. CruiseCheckPos = pos
  392. end
  393. CruiseCheckAt = os.clock()
  394. end
  395.  
  396. if dist < 0.5 then return end
  397. local np = pos + flat.Unit * math.min(dist, BOAT_SPEED * dt)
  398. if os.clock() < BoostUntil then
  399. -- Logic #2
  400. local y = pos.Y + math.clamp(BOAT_BOOST_HEIGHT - pos.Y, -BOAT_CLIMB_SPEED * dt, BOAT_CLIMB_SPEED * dt)
  401. pcall(function()
  402. hrp.CFrame = CFrame.lookAt(Vector3.new(np.X, y, np.Z),
  403. Vector3.new(np.X, y, np.Z - 1), Vector3.new(0, 1, 0))
  404. hrp.AssemblyLinearVelocity = Vector3.zero
  405. end)
  406. else
  407. -- Logic #3
  408. pcall(function()
  409. local vy = hrp.AssemblyLinearVelocity.Y
  410. hrp.CFrame = CFrame.new(np.X, pos.Y, np.Z) * (hrp.CFrame - hrp.CFrame.Position)
  411. hrp.AssemblyLinearVelocity = Vector3.new(0, vy, 0)
  412. end)
  413. end
  414. end
  415.  
  416. -- Piranha
  417. local function MobAlive(Mob)
  418. if not Mob or not Mob.Parent then return false end
  419. local Health = Mob:FindFirstChild("Health")
  420. if Health and Health:IsA("ValueBase") and Health.Value <= 0 then return false end
  421. local Humanoid = Mob:FindFirstChildOfClass("Humanoid")
  422. if Humanoid and Humanoid.Health <= 0 then return false end
  423. return (Health ~= nil and Health:IsA("ValueBase")) or (Humanoid ~= nil)
  424. end
  425.  
  426. local function MobRoot(Mob)
  427. if not Mob then return nil end
  428. return Mob:FindFirstChild("HumanoidRootPart")
  429. or Mob:FindFirstChild("RootPart")
  430. or Mob.PrimaryPart
  431. or Mob:FindFirstChild("Head")
  432. or Mob:FindFirstChildWhichIsA("BasePart", true)
  433. end
  434.  
  435. -- Terrorshark Skip
  436. local function TerrorsharkNear(pos, radius)
  437. local Enemies = workspace:FindFirstChild("Enemies")
  438. if not Enemies then return nil end
  439. for _, Mob in ipairs(Enemies:GetChildren()) do
  440. if Mob.Name == "Terrorshark" and MobAlive(Mob) then
  441. local root = MobRoot(Mob)
  442. if root and (root.Position - pos).Magnitude <= radius then
  443. return Mob, root
  444. end
  445. end
  446. end
  447. return nil
  448. end
  449.  
  450. local function FindPiranha(maxDist)
  451. local Enemies = workspace:FindFirstChild("Enemies")
  452. local _, hrp = Parts()
  453. if not Enemies or not hrp then return nil end
  454. local best, bestD = nil, maxDist or PIRANHA_RANGE
  455. for _, Mob in ipairs(Enemies:GetChildren()) do
  456. if Mob.Name == "Piranha" and MobAlive(Mob) then
  457. local root = MobRoot(Mob)
  458. if root and not TerrorsharkNear(root.Position, TS_SKIP_RADIUS) then
  459. local d = (root.Position - hrp.Position).Magnitude
  460. if d <= bestD then
  461. best, bestD = Mob, d
  462. end
  463. end
  464. end
  465. end
  466. return best
  467. end
  468.  
  469. -- Haki
  470. local function HakiAuto()
  471. local char = LocalPlayer.Character
  472. if char and CommF and not char:FindFirstChild("HasBuso") then
  473. pcall(function() CommF:InvokeServer("Buso") end)
  474. end
  475. end
  476.  
  477. -- Equip
  478. local function EquipSword()
  479. local char, _, hum = Parts()
  480. if not char or not hum then return end
  481. local tool = char:FindFirstChildOfClass("Tool")
  482. if tool and tool.ToolTip == "Sword" then return end
  483. for _, v in ipairs(LocalPlayer.Backpack:GetChildren()) do
  484. if v:IsA("Tool") and v.ToolTip == "Sword" then
  485. hum:EquipTool(v)
  486. break
  487. end
  488. end
  489. end
  490.  
  491. -- Fast Attack
  492. local AttackNet, AttackRegisterAttack, AttackRegisterHit, AttackSeedRemote = nil, nil, nil, nil
  493. local AttackObfuscatedRemote, AttackObfuscatedId = nil, nil
  494. local AttackSeedCache, AttackSeedAt = nil, 0
  495.  
  496. local function Attack_Clone(inst)
  497. if typeof(cloneref) == "function" then return cloneref(inst) end
  498. return inst
  499. end
  500.  
  501. local function Attack_CaptureRemote(R)
  502. if R and R:IsA("RemoteEvent") and R:GetAttribute("Id") then
  503. AttackObfuscatedRemote = R
  504. AttackObfuscatedId = R:GetAttribute("Id")
  505. end
  506. end
  507.  
  508. do
  509. for _, name in ipairs({ "Util", "Common", "Remotes", "Assets", "FX" }) do
  510. local folder = RS:FindFirstChild(name)
  511. if folder then
  512. for _, child in ipairs(folder:GetChildren()) do Attack_CaptureRemote(child) end
  513. folder.ChildAdded:Connect(function(child) Attack_CaptureRemote(child) end)
  514. end
  515. end
  516. end
  517.  
  518. local function Attack_EnsureRemotes()
  519. if not AttackNet then
  520. local modules = RS:FindFirstChild("Modules")
  521. AttackNet = modules and modules:FindFirstChild("Net")
  522. end
  523. if not AttackNet then return false end
  524. if not AttackRegisterAttack then
  525. AttackRegisterAttack = AttackNet:FindFirstChild("RE/RegisterAttack") or AttackNet:FindFirstChild("RegisterAttack")
  526. end
  527. if not AttackRegisterHit then
  528. AttackRegisterHit = AttackNet:FindFirstChild("RE/RegisterHit") or AttackNet:FindFirstChild("RegisterHit")
  529. end
  530. if not AttackSeedRemote then
  531. AttackSeedRemote = AttackNet:FindFirstChild("seed")
  532. end
  533. return AttackRegisterAttack ~= nil and AttackRegisterHit ~= nil
  534. end
  535.  
  536. local function Attack_GetSeed()
  537. local now = os.clock()
  538. if AttackSeedCache and (now - AttackSeedAt) < 1 then return AttackSeedCache end
  539. if AttackSeedRemote then
  540. local ok, seed = pcall(function() return AttackSeedRemote:InvokeServer() end)
  541. if ok and seed then
  542. AttackSeedCache = seed
  543. AttackSeedAt = now
  544. return seed
  545. end
  546. end
  547. return AttackSeedCache or 1
  548. end
  549.  
  550. -- Hit List
  551. local function Attack_BuildHitList(origin)
  552. local hitList = {}
  553. local Enemies = workspace:FindFirstChild("Enemies")
  554. if not Enemies then return hitList end
  555. for _, model in ipairs(Enemies:GetChildren()) do
  556. if model.Name == "Piranha" then
  557. local root = model:FindFirstChild("HumanoidRootPart")
  558. local hum = model:FindFirstChild("Humanoid")
  559. if root and hum and hum.Health > 0 and (root.Position - origin).Magnitude <= 60 then
  560. for _, part in ipairs(model:GetChildren()) do
  561. if part:IsA("BasePart") then
  562. hitList[#hitList + 1] = { model, part }
  563. end
  564. end
  565. end
  566. end
  567. end
  568. return hitList
  569. end
  570.  
  571. local function Attack_Auto()
  572. local char, hrp, hum = Parts()
  573. if not char or not hrp or not hum or hum.Health <= 0 then return end
  574. local tool = char:FindFirstChildOfClass("Tool")
  575. if not tool then return end
  576. local WT = tool:GetAttribute("WeaponType")
  577. if WT ~= "Melee" and WT ~= "Sword" then return end
  578. if not Attack_EnsureRemotes() then return end
  579. local hitList = Attack_BuildHitList(hrp.Position)
  580. if #hitList == 0 then return end
  581. pcall(function()
  582. local okNet, netApi = pcall(function() return require(AttackNet) end)
  583. if okNet and netApi and netApi.RemoteEvent then
  584. pcall(netApi.RemoteEvent, netApi, "RegisterHit", true)
  585. end
  586. AttackRegisterAttack:FireServer()
  587. local primaryModel = hitList[1][1]
  588. local head = primaryModel and primaryModel:FindFirstChild("Head")
  589. if not head then return end
  590. if FAST_ATTACK_MODE == "1" then
  591. AttackRegisterHit:FireServer(head, hitList)
  592. else
  593. AttackRegisterHit:FireServer(head, hitList, {}, tostring(LocalPlayer.UserId):sub(2, 4) ..
  594. tostring(coroutine.running()):sub(11, 15))
  595. end
  596. if AttackObfuscatedRemote and AttackObfuscatedId then
  597. local key = math.floor(workspace:GetServerTimeNow() / 10 % 10) + 1
  598. local encName = string.gsub("RE/RegisterHit", ".", function(c)
  599. return string.char(bit32.bxor(string.byte(c), key))
  600. end)
  601. local encId = bit32.bxor(AttackObfuscatedId + 909090, Attack_GetSeed() * 2)
  602. Attack_Clone(AttackObfuscatedRemote):FireServer(encName, encId, head, hitList)
  603. end
  604. end)
  605. end
  606.  
  607. -- Attack Loop
  608. task.spawn(function()
  609. while Running() do
  610. if Fighting then
  611. pcall(Attack_Auto)
  612. end
  613. task.wait(0.05)
  614. end
  615. end)
  616.  
  617. -- FightPiranha
  618. local function FightPiranha(Mob)
  619. local _, _, hum = Parts()
  620. if hum and (hum.Sit or hum.SeatPart ~= nil) then Unseat() end
  621. Fighting = true
  622. local t0 = os.clock()
  623. while Running() and IsAlive() and MobAlive(Mob) and os.clock() - t0 < 120 do
  624. local root = MobRoot(Mob)
  625. local _, hrp = Parts()
  626. if not root or not hrp then break end
  627.  
  628. -- Logic #1
  629. if TerrorsharkNear(hrp.Position, TS_DANGER) then
  630. Fighting = false
  631. local d0 = os.clock()
  632. while Running() and IsAlive() and os.clock() - d0 < 8 do
  633. local _, h = Parts()
  634. if not h then break end
  635. if not TerrorsharkNear(h.Position, TS_DANGER * 1.5) then break end
  636. local dt2 = RunService.Heartbeat:Wait() or (1 / 60)
  637. local up = Vector3.new(h.Position.X, math.max(h.Position.Y, TS_DODGE_Y), h.Position.Z)
  638. local dv = up - h.Position
  639. local dd = dv.Magnitude
  640. if dd > 1 then
  641. h.CFrame = CFrame.new(h.Position + dv.Unit * math.min(dd, TWEEN_SPEED * dt2))
  642. end
  643. h.AssemblyLinearVelocity = Vector3.zero
  644. h.AssemblyAngularVelocity = Vector3.zero
  645. NoClip()
  646. end
  647. return
  648. end
  649.  
  650. local goal = root.Position + Vector3.new(0, 40, 0)
  651. local delta = goal - hrp.Position
  652. local dist = delta.Magnitude
  653. local dt = RunService.Heartbeat:Wait() or (1 / 60)
  654. local _, hrp2 = Parts()
  655. if not hrp2 then break end
  656. if dist <= 3 then
  657. hrp2.CFrame = CFrame.new(goal)
  658. else
  659. hrp2.CFrame = CFrame.new(hrp2.Position + delta.Unit * math.min(dist, TWEEN_SPEED * dt))
  660. end
  661. hrp2.AssemblyLinearVelocity = Vector3.zero
  662. hrp2.AssemblyAngularVelocity = Vector3.zero
  663. NoClip()
  664. EquipSword()
  665. HakiAuto()
  666. end
  667. Fighting = false
  668. end
  669.  
  670. -- Kill Piranha
  671. local function ClearPiranhas(maxTime)
  672. local t0 = os.clock()
  673. while Running() and IsAlive() and os.clock() - t0 < (maxTime or 90) do
  674. local p = FindPiranha(PIRANHA_RANGE)
  675. if not p then break end
  676. FightPiranha(p)
  677. task.wait(0.1)
  678. end
  679. Fighting = false
  680. end
  681.  
  682. -- Reset Logic
  683. local function ResetCharacter()
  684. Fighting = false
  685. local oldChar, _, hum = Parts()
  686. pcall(function() if hum then hum.Health = 0 end end)
  687. pcall(function() if oldChar then oldChar:BreakJoints() end end)
  688. local t0 = os.clock()
  689. repeat
  690. task.wait(0.25)
  691. local c, h, hm = Parts()
  692. until (c and c ~= oldChar and h and hm and hm.Health > 0) or os.clock() - t0 > 20 or not Running()
  693. task.wait(1)
  694. end
  695.  
  696. -- Main Cycle
  697. local function Cycle()
  698. -- Logic #1
  699. while Running() and not IsAlive() do task.wait(0.3) end
  700. if not Running() then return end
  701.  
  702. local justBought = false
  703. local boat, seat = GetOwnBoat(BOAT_REBOARD_RANGE)
  704. if not boat then
  705. boat, seat = GoBuyBoat()
  706. if not boat then
  707. task.wait(1)
  708. return
  709. end
  710. justBought = true
  711. end
  712.  
  713. BoatNoClip(boat, true)
  714.  
  715. if not BoardSeat(seat, 20) then
  716. return
  717. end
  718.  
  719. -- Logic #2
  720. if justBought then
  721. BoostUntil = os.clock() + BOAT_BOOST_TIME
  722. end
  723.  
  724. CruiseCheckPos, CruiseCheckAt = nil, os.clock()
  725.  
  726. -- Logic #3
  727. while Running() do
  728. if not IsAlive() then return end
  729.  
  730. if BoatBroken(boat, seat) then
  731. AbandonedBoats[boat] = true
  732. ClearPiranhas(90)
  733. ResetCharacter()
  734. return
  735. end
  736.  
  737. local p = FindPiranha(PIRANHA_RANGE)
  738. if p then
  739. FightPiranha(p)
  740. if not IsAlive() then return end
  741. if BoatBroken(boat, seat) then
  742. -- Logic #4
  743. else
  744. local _, _, hum = Parts()
  745. if not hum or hum.SeatPart ~= seat then
  746. if not BoardSeat(seat, 20) then return end
  747. end
  748. CruiseCheckPos, CruiseCheckAt = nil, os.clock()
  749. end
  750. else
  751. local _, _, hum = Parts()
  752. if hum and hum.SeatPart ~= seat then
  753. if not BoardSeat(seat, 15) then return end
  754. end
  755. HakiAuto()
  756. BoatNoClip(boat)
  757. SailStep(boat, seat)
  758. end
  759. end
  760. end
  761.  
  762. -- UI
  763. task.spawn(function()
  764. local okUI, errUI = pcall(function()
  765. local Players = game:GetService("Players")
  766. local UIS = game:GetService("UserInputService")
  767. local parent = (gethui and gethui()) or game:GetService("CoreGui")
  768. if not pcall(function() return parent.Name end) then
  769. parent = Players.LocalPlayer:WaitForChild("PlayerGui")
  770. end
  771. if parent:FindFirstChild("BBGGlassUI") then parent.BBGGlassUI:Destroy() end
  772.  
  773. local gui = Instance.new("ScreenGui")
  774. gui.Name = "BBGGlassUI"
  775. gui.ResetOnSpawn = false
  776. gui.Parent = parent
  777.  
  778. local function corner(o, r) local c = Instance.new("UICorner", o) c.CornerRadius = r return c end
  779. local function stroke(o, th, a, b, c)
  780. local s = Instance.new("UIStroke", o)
  781. s.Color = Color3.new(1, 1, 1)
  782. s.Thickness = th or 1
  783. s.ApplyStrokeMode = Enum.ApplyStrokeMode.Border
  784. local sg = Instance.new("UIGradient", s)
  785. sg.Rotation = 45
  786. sg.Transparency = NumberSequence.new({
  787. NumberSequenceKeypoint.new(0, a or 0.15),
  788. NumberSequenceKeypoint.new(0.5, b or 0.85),
  789. NumberSequenceKeypoint.new(1, c or 0.4),
  790. })
  791. return s
  792. end
  793. local function gloss(o, r, z, strength)
  794. local f = Instance.new("Frame")
  795. f.Name = "Gloss"
  796. f.Size = UDim2.fromScale(1, 1)
  797. f.BackgroundColor3 = Color3.new(1, 1, 1)
  798. f.BorderSizePixel = 0
  799. f.ZIndex = z
  800. f.Parent = o
  801. corner(f, r)
  802. local g = Instance.new("UIGradient", f)
  803. g.Rotation = 90
  804. g.Transparency = NumberSequence.new({
  805. NumberSequenceKeypoint.new(0, strength),
  806. NumberSequenceKeypoint.new(0.45, 0.96),
  807. NumberSequenceKeypoint.new(1, 1),
  808. })
  809. return f
  810. end
  811.  
  812. -- Container
  813. local main = Instance.new("Frame")
  814. main.Name = "Main"
  815. main.AnchorPoint = Vector2.new(0.5, 0.5)
  816. main.Position = UDim2.fromScale(0.5, 0.5)
  817. main.Size = UDim2.fromOffset(230, 230)
  818. main.BackgroundTransparency = 1
  819. main.Parent = gui
  820.  
  821. -- Scale
  822. local scale = Instance.new("UIScale", main)
  823. scale.Scale = 0.78
  824.  
  825. -- Glass Layer
  826. local glass = Instance.new("Frame")
  827. glass.Name = "Glass"
  828. glass.Size = UDim2.fromScale(1, 1)
  829. glass.BackgroundColor3 = Color3.new(1, 1, 1)
  830. glass.BackgroundTransparency = 0.45
  831. glass.BorderSizePixel = 0
  832. glass.Active = true
  833. glass.ZIndex = 1
  834. glass.Parent = main
  835. corner(glass, UDim.new(0, 28))
  836. stroke(glass, 1.6, 0.05, 0.85, 0.35)
  837.  
  838. local gg = Instance.new("UIGradient", glass)
  839. gg.Rotation = 60
  840. gg.Color = ColorSequence.new({
  841. ColorSequenceKeypoint.new(0, Color3.fromRGB(150, 155, 172)),
  842. ColorSequenceKeypoint.new(0.5, Color3.fromRGB(60, 63, 78)),
  843. ColorSequenceKeypoint.new(1, Color3.fromRGB(28, 30, 40)),
  844. })
  845. gg.Transparency = NumberSequence.new({
  846. NumberSequenceKeypoint.new(0, 0.3),
  847. NumberSequenceKeypoint.new(1, 0.55),
  848. })
  849.  
  850. gloss(main, UDim.new(0, 28), 2, 0.8)
  851.  
  852. -- Icon
  853. local logo = Instance.new("ImageLabel")
  854. logo.Name = "Logo"
  855. logo.AnchorPoint = Vector2.new(0.5, 0)
  856. logo.Position = UDim2.new(0.5, 0, 0, 16)
  857. logo.Size = UDim2.fromOffset(60, 60)
  858. logo.BackgroundColor3 = Color3.new(1, 1, 1)
  859. logo.BackgroundTransparency = 0.85
  860. logo.Image = "rbxassetid://104418583710842"
  861. logo.ScaleType = Enum.ScaleType.Crop
  862. logo.ZIndex = 5
  863. logo.Parent = main
  864. corner(logo, UDim.new(1, 0))
  865. stroke(logo, 2, 0.1, 0.6, 0.3)
  866.  
  867. -- Subtitle
  868. local title = Instance.new("TextLabel")
  869. title.Name = "Title"
  870. title.BackgroundTransparency = 1
  871. title.Position = UDim2.new(0, 0, 0, 82)
  872. title.Size = UDim2.new(1, 0, 0, 26)
  873. title.Font = Enum.Font.GothamBold
  874. title.Text = "BBG Panel"
  875. title.TextSize = 20
  876. title.TextColor3 = Color3.new(1, 1, 1)
  877. title.ZIndex = 5
  878. title.Parent = main
  879.  
  880. -- Status
  881. local box = Instance.new("Frame")
  882. box.Name = "StatBox"
  883. box.AnchorPoint = Vector2.new(0.5, 0)
  884. box.Position = UDim2.new(0.5, 0, 0, 120)
  885. box.Size = UDim2.fromOffset(156, 90)
  886. box.BackgroundColor3 = Color3.fromRGB(15, 15, 20)
  887. box.BackgroundTransparency = 0.5
  888. box.BorderSizePixel = 0
  889. box.ZIndex = 5
  890. box.Parent = main
  891. corner(box, UDim.new(0, 18))
  892. stroke(box, 1.2, 0.2, 0.85, 0.5)
  893. gloss(box, UDim.new(0, 18), 5, 0.88)
  894.  
  895. local value = Instance.new("TextLabel")
  896. value.Name = "Value"
  897. value.BackgroundTransparency = 1
  898. value.Position = UDim2.new(0, 0, 0, 10)
  899. value.Size = UDim2.new(1, 0, 0, 36)
  900. value.Font = Enum.Font.GothamBold
  901. value.Text = "0"
  902. value.TextSize = 28
  903. value.TextColor3 = Color3.new(1, 1, 1)
  904. value.ZIndex = 7
  905. value.Parent = box
  906.  
  907. local label = Instance.new("TextLabel")
  908. label.Name = "Label"
  909. label.BackgroundTransparency = 1
  910. label.Position = UDim2.new(0, 0, 0, 52)
  911. label.Size = UDim2.new(1, 0, 0, 22)
  912. label.Font = Enum.Font.Gotham
  913. label.Text = "Electric Wings"
  914. label.TextSize = 13
  915. label.TextColor3 = Color3.fromRGB(220, 223, 233)
  916. label.ZIndex = 7
  917. label.Parent = box
  918.  
  919. -- Draggable
  920. local dragging, dragStart, startPos
  921. glass.InputBegan:Connect(function(i)
  922. if i.UserInputType == Enum.UserInputType.MouseButton1 or i.UserInputType == Enum.UserInputType.Touch then
  923. dragging, dragStart, startPos = true, i.Position, main.Position
  924. i.Changed:Connect(function()
  925. if i.UserInputState == Enum.UserInputState.End then dragging = false end
  926. end)
  927. end
  928. end)
  929. UIS.InputChanged:Connect(function(i)
  930. if dragging and (i.UserInputType == Enum.UserInputType.MouseMovement or i.UserInputType == Enum.UserInputType.Touch) then
  931. local d = i.Position - dragStart
  932. main.Position = UDim2.new(startPos.X.Scale, startPos.X.Offset + d.X, startPos.Y.Scale, startPos.Y.Offset + d.Y)
  933. end
  934. end)
  935.  
  936. -- Electric Wing Counter
  937. local RS = game:GetService("ReplicatedStorage")
  938. local TweenService = game:GetService("TweenService")
  939. local ELECTRIC_WING_ID = "552"
  940. local REFRESH = 2
  941.  
  942. local getAll
  943. local function getCount()
  944. local ok, count = pcall(function()
  945. if not getAll then
  946. local net = RS:WaitForChild("Modules", 5):WaitForChild("Net", 5)
  947. getAll = net:WaitForChild("RF/GetAllItemValues", 5)
  948. end
  949. local items = getAll:InvokeServer()
  950. if type(items) ~= "table" then return nil end
  951. local total = 0
  952. for _, item in ipairs(items) do
  953. if type(item) == "table" and tostring(item.ItemId) == ELECTRIC_WING_ID
  954. and tostring(item.Key) == "Quantity" then
  955. total = tonumber(item.Value) or 0
  956. end
  957. end
  958. return total
  959. end)
  960. if ok then return count end
  961. return nil
  962. end
  963.  
  964. local last
  965. task.spawn(function()
  966. while gui.Parent and Running() do
  967. local c = getCount()
  968. if c ~= nil and c ~= last then
  969. last = c
  970. value.Text = tostring(c)
  971. value.TextSize = 36
  972. TweenService:Create(value, TweenInfo.new(0.25), {TextSize = 28}):Play()
  973. end
  974. task.wait(REFRESH)
  975. end
  976. end)
  977.  
  978. -- Value Update
  979. _G.BBG_SetValue = function(v) value.Text = tostring(v) end
  980.  
  981. end)
  982. if not okUI then warn("[PiranhaFarm UI] " .. tostring(errUI)) end
  983. end)
  984.  
  985. task.spawn(function()
  986. while Running() do
  987. local ok, err = pcall(Cycle)
  988. if not ok then warn("[PiranhaFarm] " .. tostring(err)) end
  989. task.wait(0.5)
  990. end
  991. end)
  992.  
  993. print("[Tafuta kazi] started")
Advertisement
Add Comment
Please, Sign In to add comment