Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 39.47 KB | None | 0 0
  1. --SynapseX Decompiler
  2. local p = game.Players.LocalPlayer
  3. local c = workspace:WaitForChild(p.Name)
  4. c:WaitForChild("Humanoid")
  5. c:WaitForChild("HumanoidRootPart")
  6. c:WaitForChild("Head")
  7. c:WaitForChild("Health")
  8. local data = p:WaitForChild("Data")
  9. local power = p:WaitForChild("power")
  10. local m = p:GetMouse()
  11. local busy = false
  12. local gui = p.PlayerGui.gui
  13. local hpbar = gui.hpbar
  14. local powerbar = gui.powerbar
  15. local beli = gui.beli
  16. local bounty = gui.bounty
  17. local boat = gui.boat
  18. local boatframe = boat.frame
  19. local weaponshop = gui.weaponshop
  20. local clothingshop = gui.clothingshop
  21. local crafting = gui.crafting
  22. local toolshop = gui.toolshop
  23. local foodshop = gui.foodshop
  24. local factionchange = gui.factionchange
  25. local learnskill = gui.learnskill
  26. local sellitem = gui.sellitem
  27. local help = gui.help
  28. local helpframe = gui.helpframe
  29. local stats = gui.stats
  30. local expbar = stats.lvl.expbar
  31. local muteost = gui.muteost
  32. local ic = gui.ic
  33. local shopcd = false
  34. local buydfgui = gui.buydf
  35. local removedfgui = gui.removedf
  36. local rerollracegui = gui.rerollrace
  37. local buydfrobux = gui.buydfrobux
  38. local boats = {
  39. {
  40. "rowboat",
  41. 100,
  42. 50,
  43. 40
  44. },
  45. {
  46. "ship",
  47. 8000,
  48. 300,
  49. 80
  50. }
  51. }
  52. local weapons = {
  53. swords = {
  54. {"Cutlass", 4000},
  55. {"Katana", 6000},
  56. {
  57. "DoubleCutlass",
  58. 12000
  59. },
  60. {
  61. "DoubleKatana",
  62. 15000
  63. },
  64. {
  65. "TripleKatana",
  66. 25000
  67. }
  68. },
  69. guns = {
  70. {"Flintlock", 8000},
  71. {"Rifle", 10000},
  72. {"Bazooka", 34000}
  73. }
  74. }
  75. function addcommas(num)
  76. local str = tostring(num)
  77. return #str % 3 == 0 and str:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or str:reverse():gsub("(%d%d%d)", "%1,"):reverse()
  78. end
  79. c.Humanoid.HealthChanged:connect(function()
  80. hpbar.bar:TweenSize(UDim2.new(c.Humanoid.Health / c.Humanoid.MaxHealth, 0, 1, 0), "Out", "Quad", 1, true)
  81. hpbar.value.Text = c.Humanoid.Health .. "/" .. c.Humanoid.MaxHealth
  82. end)
  83. power.Changed:connect(function()
  84. powerbar.bar:TweenSize(UDim2.new(power.Value / math.floor(100 + data.str.Value * 2 + data.bounty.Value / 7000), 0, 1, 0), "Out", "Quad", 1, true)
  85. powerbar.value.Text = power.Value .. "/" .. math.floor(100 + data.str.Value * 2 + data.bounty.Value / 7000)
  86. end)
  87. local races = {
  88. "Human",
  89. "Fishman",
  90. "Mink",
  91. "Skypiean"
  92. }
  93. local factions = {"Pirate", "Marine"}
  94. local jobs = {
  95. "Chef",
  96. "Doctor",
  97. "Navigator",
  98. "Musician"
  99. }
  100. function statadds()
  101. for i, v in pairs(stats:GetChildren()) do
  102. if v:IsA("TextLabel") and v:FindFirstChild("add") then
  103. if data.sp.Value > 0 then
  104. v.add.Visible = true
  105. else
  106. v.add.Visible = false
  107. end
  108. end
  109. end
  110. end
  111. for i, v in pairs(stats:GetChildren()) do
  112. if v:IsA("TextLabel") and v:FindFirstChild("add") then
  113. v.add.MouseButton1Down:connect(function()
  114. if busy == false then
  115. busy = true
  116. if data.sp.Value > 0 then
  117. game.ReplicatedStorage.rems.lvlup:FireServer("\224\180\184\224\180\184\224\181\141\224\180\168\224\181\135\224\180\185\224\180\130", 2, v.Name)
  118. end
  119. wait(0.15)
  120. busy = false
  121. end
  122. end)
  123. end
  124. end
  125. function updateguivalues()
  126. beli.Text = "BELI: " .. addcommas(data.beli.Value)
  127. bounty.Text = "BOUNTY: " .. addcommas(data.bounty.Value)
  128. if data.faction.Value == 1 then
  129. bounty.Text = "BOUNTY: " .. addcommas(data.bounty.Value)
  130. elseif data.faction.Value == 2 then
  131. bounty.Text = "RESPECT: " .. addcommas(data.bounty.Value)
  132. end
  133. stats.lvl.Text = "LVL: " .. data.lvl.Value
  134. if data.race.Value > 0 then
  135. stats.race.value.Text = races[data.race.Value]
  136. end
  137. if data.faction.Value > 0 then
  138. stats.faction.value.Text = factions[data.faction.Value]
  139. end
  140. if 0 < data.job.Value then
  141. stats.job.value.Text = jobs[data.job.Value]
  142. else
  143. stats.job.value.Text = "None"
  144. end
  145. stats.str.value.Text = data.str.Value
  146. stats.spe.value.Text = data.spe.Value
  147. stats.def.value.Text = data.def.Value
  148. stats.buso.value.Text = data.buso.Value
  149. stats.ken.value.Text = data.ken.Value
  150. stats.sp.value.Text = data.sp.Value
  151. expbar.bar:TweenSize(UDim2.new(data.exp.Value / (100 * data.lvl.Value), 0, 1, 0), "Out", "Quad", 0.4, true)
  152. expbar.value.Text = data.exp.Value .. "/" .. 100 * data.lvl.Value
  153. powerbar.bar:TweenSize(UDim2.new(power.Value / math.floor(100 + data.str.Value * 2 + data.bounty.Value / 7000), 0, 1, 0), "Out", "Quad", 1, true)
  154. powerbar.value.Text = power.Value .. "/" .. math.floor(100 + data.str.Value * 2 + data.bounty.Value / 7000)
  155. statadds()
  156. end
  157. for i, v in pairs(data:GetChildren()) do
  158. v.Changed:connect(function()
  159. updateguivalues()
  160. if v.Name == "exp" and v.Value >= 100 * data.lvl.Value then
  161. game.ReplicatedStorage.rems.lvlup:FireServer("\224\180\184\224\180\184\224\181\141\224\180\168\224\181\135\224\180\185\224\180\130", 1)
  162. end
  163. end)
  164. end
  165. p.ChildAdded:connect(function()
  166. if p:FindFirstChild("incombat") then
  167. ic.Visible = true
  168. else
  169. ic.Visible = false
  170. end
  171. end)
  172. p.ChildRemoved:connect(function()
  173. if p:FindFirstChild("incombat") then
  174. ic.Visible = true
  175. else
  176. ic.Visible = false
  177. end
  178. end)
  179. updateguivalues()
  180. local muted = false
  181. function muteosts()
  182. for i, v in pairs(workspace.osts:GetChildren()) do
  183. if v:IsA("Sound") then
  184. if muted == true then
  185. v.Volume = 0
  186. else
  187. v.Volume = 0.15
  188. end
  189. end
  190. end
  191. end
  192. muteost.MouseButton1Down:connect(function()
  193. if busy == false then
  194. busy = true
  195. if muted == false then
  196. muted = true
  197. muteost.Image = "http://www.roblox.com/asset/?id=166376578"
  198. else
  199. muted = false
  200. muteost.Image = "http://www.roblox.com/asset/?id=90821298"
  201. end
  202. muteosts()
  203. wait(0.3)
  204. busy = false
  205. end
  206. end)
  207. local boatguiremovewait = false
  208. c.Humanoid.Running:connect(function(speed)
  209. if guiremovewait == false and speed > 1 then
  210. boat.Visible = false
  211. weaponshop.Visible = false
  212. clothingshop.Visible = false
  213. toolshop.Visible = false
  214. foodshop.Visible = false
  215. learnskill.Visible = false
  216. buydfgui.Visible = false
  217. removedfgui.Visible = false
  218. rerollracegui.Visible = false
  219. sellitem.Visible = false
  220. factionchange.Visible = false
  221. if crafting.Visible == true then
  222. crafting.Visible = false
  223. crafting["1"].Text = ""
  224. crafting["2"].Text = ""
  225. crafting["3"].Text = ""
  226. end
  227. end
  228. end)
  229. if workspace.boats:FindFirstChild(p.Name .. "boat") == nil then
  230. boat.spawnboat.Text = "Spawn boat"
  231. else
  232. boat.spawnboat.Text = "Despawn boat"
  233. end
  234. function findnearboat()
  235. for i, v in pairs(workspace.boats:GetChildren()) do
  236. if v and v:FindFirstChild("base") and (v.base.CFrame.p - c.HumanoidRootPart.CFrame.p).magnitude < 100 then
  237. return v
  238. end
  239. end
  240. end
  241. boat.spawnboat.MouseButton1Down:connect(function()
  242. if busy == false then
  243. busy = true
  244. if data.boat.Value > 0 then
  245. if workspace.boats:FindFirstChild(p.Name .. "boat") == nil then
  246. local nearboat = findnearboat()
  247. if nearboat == nil then
  248. game.ReplicatedStorage.rems.boat:FireServer(1)
  249. boat.Visible = false
  250. boat.spawnboat.Text = "Despawn boat"
  251. else
  252. boat.spawnboat.Text = "Boat nearby"
  253. delay(2, function()
  254. boat.spawnboat.Text = "Spawn boat"
  255. end)
  256. end
  257. else
  258. game.ReplicatedStorage.rems.boat:FireServer(2)
  259. boat.spawnboat.Text = "Spawn boat"
  260. end
  261. wait(4)
  262. end
  263. busy = false
  264. end
  265. end)
  266. for i, v in pairs(boatframe:GetChildren()) do
  267. if v:IsA("TextButton") then
  268. v.cost.Text = addcommas(boats[tonumber(v.Name)][2]) .. " BELI"
  269. v.MouseEnter:connect(function()
  270. v.cost.Visible = true
  271. boat.hp.value.Text = boats[tonumber(v.Name)][3]
  272. boat.spe.value.Text = boats[tonumber(v.Name)][4]
  273. end)
  274. v.MouseLeave:connect(function()
  275. v.cost.Visible = false
  276. boat.hp.value.Text = "0"
  277. boat.spe.value.Text = "0"
  278. end)
  279. v.MouseButton1Down:connect(function()
  280. if busy == false then
  281. busy = true
  282. if data.boat.Value ~= tonumber(v.Name) and data.beli.Value >= boats[tonumber(v.Name)][2] then
  283. game.ReplicatedStorage.rems.boat:FireServer(3, tonumber(v.Name))
  284. local prevcolor = v.BackgroundColor3
  285. v.BackgroundColor3 = Color3.fromRGB(20, 210, 20)
  286. wait(1)
  287. v.BackgroundColor3 = prevcolor
  288. end
  289. busy = false
  290. end
  291. end)
  292. end
  293. end
  294. m.KeyDown:connect(function(key)
  295. key = key:lower()
  296. if busy == false and key == "m" then
  297. busy = true
  298. if stats.Visible == false then
  299. stats.Visible = true
  300. stats:TweenPosition(UDim2.new(0.776, 0, 0.275, 0), "Out", "Quad", 0.2, true)
  301. else
  302. stats:TweenPosition(UDim2.new(1, 0, 0.275, 0), "Out", "Quad", 0.2, true)
  303. wait(0.2)
  304. stats.Visible = false
  305. end
  306. wait(0.2)
  307. busy = false
  308. end
  309. end)
  310. for i, v in pairs(weaponshop:GetChildren()) do
  311. if v then
  312. if v:IsA("TextButton") then
  313. do
  314. local frame = weaponshop[v.Name .. "frame"]
  315. v.MouseButton1Down:connect(function()
  316. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil and c:FindFirstChildWhichIsA("Tool") == nil then
  317. busy = true
  318. if frame.Visible == false then
  319. for i2, v2 in pairs(weaponshop:GetChildren()) do
  320. if v2:IsA("ScrollingFrame") then
  321. v2.Visible = false
  322. end
  323. end
  324. frame.Visible = true
  325. end
  326. wait(0.1)
  327. busy = false
  328. end
  329. end)
  330. end
  331. elseif v:IsA("ScrollingFrame") then
  332. for i2, v2 in pairs(v:GetChildren()) do
  333. if v2:IsA("TextButton") then
  334. v2.cost.Text = addcommas(weapons[v.shoptype.Value][tonumber(v2.Name)][2]) .. " BELI"
  335. v2.MouseButton1Down:connect(function()
  336. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil and c:FindFirstChildWhichIsA("Tool") == nil then
  337. busy = true
  338. if data[string.sub(v.shoptype.Value, 1, -2)].Value ~= tonumber(v2.Name) then
  339. if data.beli.Value >= weapons[v.shoptype.Value][tonumber(v2.Name)][2] then
  340. game.ReplicatedStorage.rems.shop:FireServer(v.shoptype.Value, tonumber(v2.Name), weapons[v.shoptype.Value][tonumber(v2.Name)][2], "\224\180\184\224\180\184\224\181\141\224\180\168\224\181\135\224\180\185\224\180\130")
  341. local prevcolor = v2.BackgroundColor3
  342. v2.BackgroundColor3 = Color3.fromRGB(20, 210, 20)
  343. wait(0.5)
  344. v2.BackgroundColor3 = prevcolor
  345. end
  346. else
  347. game.ReplicatedStorage.rems.shop:FireServer(v.shoptype.Value, tonumber(v2.Name), weapons[v.shoptype.Value][tonumber(v2.Name)][2], "\224\180\184\224\180\184\224\181\141\224\180\168\224\181\135\224\180\185\224\180\130")
  348. local prevcolor = v2.BackgroundColor3
  349. v2.BackgroundColor3 = Color3.fromRGB(210, 20, 20)
  350. wait(0.5)
  351. v2.BackgroundColor3 = prevcolor
  352. end
  353. wait(0.3)
  354. busy = false
  355. end
  356. end)
  357. end
  358. end
  359. end
  360. end
  361. end
  362. clothingshop.clothing.MouseButton1Down:connect(function()
  363. if busy == false then
  364. busy = true
  365. clothingshop.clothingframe.Visible = true
  366. clothingshop.accessoriesframe.Visible = false
  367. clothingshop.characterframe.Visible = false
  368. wait(0.1)
  369. busy = false
  370. end
  371. end)
  372. clothingshop.accessories.MouseButton1Down:connect(function()
  373. if busy == false then
  374. busy = true
  375. clothingshop.accessoriesframe.Visible = true
  376. clothingshop.clothingframe.Visible = false
  377. clothingshop.characterframe.Visible = false
  378. wait(0.1)
  379. busy = false
  380. end
  381. end)
  382. clothingshop.character.MouseButton1Down:connect(function()
  383. if busy == false then
  384. busy = true
  385. clothingshop.characterframe.Visible = true
  386. clothingshop.clothingframe.Visible = false
  387. clothingshop.accessoriesframe.Visible = false
  388. wait(0.1)
  389. busy = false
  390. end
  391. end)
  392. local ct = {
  393. shirt = {
  394. data.shirt.Value,
  395. 8,
  396. 1
  397. },
  398. pants = {
  399. data.pants.Value,
  400. 3,
  401. 1
  402. },
  403. shoes = {
  404. data.shoes.Value,
  405. 4,
  406. 0
  407. },
  408. ac = {
  409. data.ac.Value,
  410. 5,
  411. 0
  412. },
  413. shirtc = {
  414. data.shirt.Value,
  415. 11,
  416. 1
  417. },
  418. pantsc = {
  419. data.pantsc.Value,
  420. 11,
  421. 1
  422. },
  423. shoesc = {
  424. data.shoesc.Value,
  425. 11,
  426. 1
  427. },
  428. acc = {
  429. data.acc.Value,
  430. 11,
  431. 1
  432. },
  433. hairc = {
  434. data.hairc.Value,
  435. 8,
  436. 1
  437. },
  438. skinc = {
  439. data.skinc.Value,
  440. 5,
  441. 1
  442. }
  443. }
  444. for i, v in pairs(clothingshop.clothingframe:GetChildren()) do
  445. if v:IsA("TextLabel") and v:FindFirstChild("<") and v:FindFirstChild(">") then
  446. v.Text = ct[v.Name][1]
  447. v["<"].MouseButton1Down:connect(function()
  448. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  449. busy = true
  450. if ct[v.Name][1] > ct[v.Name][3] then
  451. ct[v.Name][1] = ct[v.Name][1] - 1
  452. v.Text = ct[v.Name][1]
  453. game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
  454. end
  455. wait(0.4)
  456. busy = false
  457. end
  458. end)
  459. v[">"].MouseButton1Down:connect(function()
  460. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  461. busy = true
  462. if ct[v.Name][1] < ct[v.Name][2] then
  463. ct[v.Name][1] = ct[v.Name][1] + 1
  464. v.Text = ct[v.Name][1]
  465. game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
  466. end
  467. wait(0.4)
  468. busy = false
  469. end
  470. end)
  471. end
  472. end
  473. for i, v in pairs(clothingshop.characterframe:GetChildren()) do
  474. if v:IsA("TextLabel") and v:FindFirstChild("<") and v:FindFirstChild(">") then
  475. v.Text = ct[v.Name][1]
  476. v["<"].MouseButton1Down:connect(function()
  477. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  478. busy = true
  479. if ct[v.Name][1] > ct[v.Name][3] then
  480. ct[v.Name][1] = ct[v.Name][1] - 1
  481. v.Text = ct[v.Name][1]
  482. game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
  483. end
  484. wait(0.4)
  485. busy = false
  486. end
  487. end)
  488. v[">"].MouseButton1Down:connect(function()
  489. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  490. busy = true
  491. if ct[v.Name][1] < ct[v.Name][2] then
  492. ct[v.Name][1] = ct[v.Name][1] + 1
  493. v.Text = ct[v.Name][1]
  494. game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
  495. end
  496. wait(0.4)
  497. busy = false
  498. end
  499. end)
  500. end
  501. end
  502. for i, v in pairs(clothingshop.accessoriesframe:GetChildren()) do
  503. if v:IsA("TextLabel") and v:FindFirstChild("<") and v:FindFirstChild(">") then
  504. v.Text = ct[v.Name][1]
  505. v["<"].MouseButton1Down:connect(function()
  506. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  507. busy = true
  508. if ct[v.Name][1] > ct[v.Name][3] then
  509. ct[v.Name][1] = ct[v.Name][1] - 1
  510. v.Text = ct[v.Name][1]
  511. game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
  512. end
  513. wait(0.4)
  514. busy = false
  515. end
  516. end)
  517. v[">"].MouseButton1Down:connect(function()
  518. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  519. busy = true
  520. if ct[v.Name][1] < ct[v.Name][2] then
  521. ct[v.Name][1] = ct[v.Name][1] + 1
  522. v.Text = ct[v.Name][1]
  523. game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
  524. end
  525. wait(0.4)
  526. busy = false
  527. end
  528. end)
  529. end
  530. end
  531. local crafts = {
  532. Seashell = {
  533. "Metal parts",
  534. "Sky gem",
  535. "Impact dial"
  536. }
  537. }
  538. crafting["1"].MouseButton1Down:connect(function()
  539. local tool = c:FindFirstChildWhichIsA("Tool")
  540. if tool then
  541. crafting["1"].Text = tool.Name
  542. end
  543. end)
  544. crafting["2"].MouseButton1Down:connect(function()
  545. local tool = c:FindFirstChildWhichIsA("Tool")
  546. if tool then
  547. crafting["2"].Text = tool.Name
  548. end
  549. end)
  550. crafting["3"].MouseButton1Down:connect(function()
  551. local tool = c:FindFirstChildWhichIsA("Tool")
  552. if tool then
  553. crafting["3"].Text = tool.Name
  554. end
  555. end)
  556. crafting.craft.MouseButton1Down:connect(function()
  557. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  558. local result = crafts[crafting["1"].Text][3]
  559. local part1 = p.Backpack:FindFirstChild(crafting["1"].Text)
  560. local part2 = p.Backpack:FindFirstChild(crafts[crafting["1"].Text][1])
  561. local part3 = p.Backpack:FindFirstChild(crafts[crafting["1"].Text][2])
  562. if part1 and part2 and part3 then
  563. crafting["1"].Text = ""
  564. crafting["2"].Text = ""
  565. crafting["3"].Text = ""
  566. game.ReplicatedStorage.rems.crafting:FireServer(part1, part2, part3, result)
  567. end
  568. end
  569. end)
  570. local tools = {
  571. Torch = 200,
  572. Pickaxe = 500,
  573. Snailphone = 300
  574. }
  575. for i, v in pairs(toolshop.frame:GetChildren()) do
  576. if v:IsA("TextButton") then
  577. v.cost.Text = tools[v.Name] .. " BELI"
  578. v.MouseEnter:connect(function()
  579. v.cost.Visible = true
  580. end)
  581. v.MouseLeave:connect(function()
  582. v.cost.Visible = false
  583. end)
  584. v.MouseButton1Down:connect(function()
  585. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  586. busy = true
  587. if data.beli.Value >= tools[v.Name] then
  588. game.ReplicatedStorage.rems.shop:FireServer("tools", v.Name, tools[v.Name], "\224\180\184\224\180\184\224\181\141\224\180\168\224\181\135\224\180\185\224\180\130")
  589. end
  590. wait(0.1)
  591. busy = false
  592. end
  593. end)
  594. end
  595. end
  596. local foods = {
  597. Apple = 100,
  598. Orange = 200,
  599. Coconut = 200
  600. }
  601. for i, v in pairs(foodshop.frame:GetChildren()) do
  602. if v:IsA("TextButton") then
  603. v.cost.Text = foods[v.Name] .. " BELI"
  604. v.MouseEnter:connect(function()
  605. v.cost.Visible = true
  606. end)
  607. v.MouseLeave:connect(function()
  608. v.cost.Visible = false
  609. end)
  610. v.MouseButton1Down:connect(function()
  611. if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
  612. busy = true
  613. if data.beli.Value >= foods[v.Name] then
  614. game.ReplicatedStorage.rems.shop:FireServer("food", v.Name, foods[v.Name], "\224\180\184\224\180\184\224\181\141\224\180\168\224\181\135\224\180\185\224\180\130")
  615. end
  616. wait(0.1)
  617. busy = false
  618. end
  619. end)
  620. end
  621. end
  622. if data.faction.Value == 1 then
  623. factionchange.change.Text = "Join marines"
  624. elseif data.faction.Value == 2 then
  625. factionchange.change.Text = "Leave marines"
  626. end
  627. factionchange.change.MouseButton1Down:connect(function()
  628. if busy == false then
  629. busy = true
  630. game.ReplicatedStorage.rems.shop:FireServer("changefaction", nil, nil, "\224\180\184\224\180\184\224\181\141\224\180\168\224\181\135\224\180\185\224\180\130")
  631. factionchange.Visible = false
  632. wait(5)
  633. busy = false
  634. end
  635. end)
  636. local skillname
  637. local skills = {
  638. blackleg = {
  639. 12000,
  640. 25,
  641. 25,
  642. 20,
  643. "Black leg style"
  644. },
  645. fishmankarate = {
  646. 12000,
  647. 20,
  648. 20,
  649. 20,
  650. "Fishman karate"
  651. },
  652. oneswordstyle = {
  653. 12000,
  654. 25,
  655. 25,
  656. 10,
  657. "One sword style"
  658. },
  659. twoswordstyle = {
  660. 14000,
  661. 35,
  662. 25,
  663. 5,
  664. "Two sword style"
  665. },
  666. threeswordstyle = {
  667. 18000,
  668. 40,
  669. 30,
  670. 5,
  671. "Three sword style"
  672. }
  673. }
  674. learnskill.learn.MouseButton1Down:connect(function()
  675. if busy == false then
  676. busy = true
  677. if ic.Visible == false and data.beli.Value >= skills[skillname][1] and data.str.Value >= skills[skillname][2] and data.spe.Value >= skills[skillname][3] and data.def.Value >= skills[skillname][4] then
  678. game.ReplicatedStorage.rems.shop:FireServer("learnskill", skillname, nil, "\224\180\184\224\180\184\224\181\141\224\180\168\224\181\135\224\180\185\224\180\130")
  679. wait(2)
  680. end
  681. busy = false
  682. end
  683. end)
  684. local helps = {
  685. help1 = {
  686. "Tool controls: E,R,T,F,G(while tool equipped) = sword/combat skills or devil fruit abilities"
  687. },
  688. help2 = {
  689. "Rokushiki controls: double tap W = shave(6 spe) | double tap SPACE = sky walk(15 spe)"
  690. },
  691. help3 = {
  692. "Haki controls: B = armament haki | K = observation haki | hold H = conqueror haki"
  693. },
  694. help4 = {
  695. "Training: defeat mobs to gain exp and skill points(press M to see your stats)"
  696. },
  697. help5 = {
  698. "Crafting: some materials, if combined in the right sequence, can turn into a special tool/weapon(nothing available yet)"
  699. },
  700. help6 = {
  701. "If some guis don't work, use them without any tool equipped"
  702. }
  703. }
  704. help.MouseButton1Down:connect(function()
  705. if busy == false then
  706. busy = true
  707. if helpframe.Visible == false then
  708. helpframe.Visible = true
  709. end
  710. wait(0.3)
  711. busy = false
  712. end
  713. end)
  714. helpframe.close.MouseButton1Down:connect(function()
  715. if busy == false then
  716. busy = true
  717. helpframe.Visible = false
  718. wait(0.2)
  719. busy = false
  720. end
  721. end)
  722. helpframe[">"].MouseButton1Down:connect(function()
  723. if busy == false then
  724. busy = true
  725. helpframe.title.Text = "HELP 2"
  726. helpframe.desc1.Text = helps.help4[1]
  727. helpframe.desc2.Text = helps.help5[1]
  728. helpframe.desc3.Text = helps.help6[1]
  729. helpframe["<"].Visible = true
  730. helpframe[">"].Visible = false
  731. wait(0.1)
  732. busy = false
  733. end
  734. end)
  735. helpframe["<"].MouseButton1Down:connect(function()
  736. if busy == false then
  737. busy = true
  738. helpframe.title.Text = "HELP 1"
  739. helpframe.desc1.Text = helps.help1[1]
  740. helpframe.desc2.Text = helps.help2[1]
  741. helpframe.desc3.Text = helps.help3[1]
  742. helpframe["<"].Visible = false
  743. helpframe[">"].Visible = true
  744. wait(0.1)
  745. busy = false
  746. end
  747. end)
  748. local sellabletools = {
  749. Diamond = 800,
  750. Emerald = 400,
  751. Ruby = 600,
  752. Iron = 100,
  753. Gold = 500
  754. }
  755. function findselectedtool()
  756. local st
  757. for i, v in pairs(c:GetChildren()) do
  758. if v:IsA("Tool") then
  759. st = v
  760. end
  761. end
  762. return st
  763. end
  764. sellitem.sell.MouseEnter:connect(function()
  765. local selectedtool = findselectedtool()
  766. if selectedtool and sellabletools[selectedtool.Name] then
  767. sellitem.sell.value.Text = addcommas(sellabletools[selectedtool.Name]) .. " BELI"
  768. end
  769. sellitem.sell.value.Visible = true
  770. end)
  771. sellitem.sell.MouseLeave:connect(function()
  772. sellitem.sell.value.Text = "0 BELI"
  773. sellitem.sell.value.Visible = false
  774. end)
  775. sellitem.sell.MouseButton1Down:connect(function()
  776. if busy == false then
  777. busy = true
  778. local selectedtool = findselectedtool()
  779. if selectedtool and sellabletools[selectedtool.Name] then
  780. game.ReplicatedStorage.rems.shop:FireServer("sellitem", selectedtool)
  781. wait(0.4)
  782. end
  783. busy = false
  784. end
  785. end)
  786. for i, v in pairs(workspace.shops:GetChildren()) do
  787. if v:IsA("Part") then
  788. if v.Name == "boat" then
  789. v.Touched:connect(function(part)
  790. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and boat.Visible == false and shopcd == false then
  791. shopcd = true
  792. guiremovewait = true
  793. delay(1.5, function()
  794. guiremovewait = false
  795. end)
  796. delay(5, function()
  797. shopcd = false
  798. end)
  799. boat.Visible = true
  800. end
  801. end)
  802. elseif v.Name == "weapon" then
  803. v.Touched:connect(function(part)
  804. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and weaponshop.Visible == false and shopcd == false then
  805. shopcd = true
  806. guiremovewait = true
  807. delay(1.5, function()
  808. guiremovewait = false
  809. end)
  810. delay(5, function()
  811. shopcd = false
  812. end)
  813. weaponshop.Visible = true
  814. end
  815. end)
  816. elseif v.Name == "clothing" then
  817. v.Touched:connect(function(part)
  818. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and clothingshop.Visible == false and shopcd == false then
  819. shopcd = true
  820. guiremovewait = true
  821. delay(1.5, function()
  822. guiremovewait = false
  823. end)
  824. delay(5, function()
  825. shopcd = false
  826. end)
  827. clothingshop.Visible = true
  828. end
  829. end)
  830. elseif v.Name == "food" then
  831. v.Touched:connect(function(part)
  832. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and foodshop.Visible == false and shopcd == false then
  833. shopcd = true
  834. guiremovewait = true
  835. delay(1.5, function()
  836. guiremovewait = false
  837. end)
  838. delay(5, function()
  839. shopcd = false
  840. end)
  841. foodshop.Visible = true
  842. end
  843. end)
  844. elseif v.Name == "crafting" then
  845. v.Touched:connect(function(part)
  846. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and crafting.Visible == false and shopcd == false then
  847. shopcd = true
  848. guiremovewait = true
  849. delay(1.5, function()
  850. guiremovewait = false
  851. end)
  852. delay(5, function()
  853. shopcd = false
  854. end)
  855. crafting.Visible = true
  856. end
  857. end)
  858. elseif v.Name == "tool" then
  859. v.Touched:connect(function(part)
  860. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and toolshop.Visible == false and shopcd == false then
  861. shopcd = true
  862. guiremovewait = true
  863. delay(1.5, function()
  864. guiremovewait = false
  865. end)
  866. delay(5, function()
  867. shopcd = false
  868. end)
  869. toolshop.Visible = true
  870. end
  871. end)
  872. elseif v.Name == "faction" then
  873. v.Touched:connect(function(part)
  874. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and factionchange.Visible == false and shopcd == false then
  875. shopcd = true
  876. guiremovewait = true
  877. delay(1.5, function()
  878. guiremovewait = false
  879. end)
  880. delay(5, function()
  881. shopcd = false
  882. end)
  883. factionchange.Visible = true
  884. end
  885. end)
  886. elseif v.Name == "skill" then
  887. v.Touched:connect(function(part)
  888. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and learnskill.Visible == false and shopcd == false then
  889. shopcd = true
  890. guiremovewait = true
  891. delay(1.5, function()
  892. guiremovewait = false
  893. end)
  894. delay(5, function()
  895. shopcd = false
  896. end)
  897. skillname = v.skillname.Value
  898. learnskill.skill.Text = skills[skillname][5]
  899. learnskill.req.Text = "requirements: " .. addcommas(skills[skillname][1]) .. " Beli | " .. skills[skillname][2] .. " str | " .. skills[skillname][3] .. " spe | " .. skills[skillname][4] .. " def"
  900. learnskill.Visible = true
  901. end
  902. end)
  903. elseif v.Name == "sellitem" then
  904. v.Touched:connect(function(part)
  905. if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and sellitem.Visible == false and shopcd == false then
  906. shopcd = true
  907. guiremovewait = true
  908. delay(1.5, function()
  909. guiremovewait = false
  910. end)
  911. delay(5, function()
  912. shopcd = false
  913. end)
  914. sellitem.Visible = true
  915. end
  916. end)
  917. end
  918. end
  919. end
  920. local MarketplaceService = game:GetService("MarketplaceService")
  921. local rerollrace = 466346401
  922. local buydf = 465844241
  923. local removedf = 465846368
  924. workspace.dps.buydf.ClickDetector.MouseClick:connect(function(p)
  925. if busy == false then
  926. busy = true
  927. buydfgui.Visible = true
  928. guiremovewait = true
  929. delay(1.5, function()
  930. guiremovewait = false
  931. end)
  932. wait(0.6)
  933. busy = false
  934. end
  935. end)
  936. workspace.dps.removedf.ClickDetector.MouseClick:connect(function(p)
  937. if busy == false then
  938. busy = true
  939. removedfgui.Visible = true
  940. guiremovewait = true
  941. delay(1.5, function()
  942. guiremovewait = false
  943. end)
  944. wait(0.6)
  945. busy = false
  946. end
  947. end)
  948. workspace.dps.rerollrace.ClickDetector.MouseClick:connect(function(p)
  949. if busy == false then
  950. busy = true
  951. rerollracegui.Visible = true
  952. guiremovewait = true
  953. delay(1.5, function()
  954. guiremovewait = false
  955. end)
  956. wait(0.6)
  957. busy = false
  958. end
  959. end)
  960. buydfrobux.MouseButton1Down:connect(function()
  961. if busy == false then
  962. busy = true
  963. game.ReplicatedStorage.rems.dps:FireServer("buydfrobux")
  964. wait(1)
  965. busy = false
  966. end
  967. end)
  968. buydfgui.buy.MouseButton1Down:connect(function()
  969. if busy == false and data.beli.Value >= 500000 then
  970. busy = true
  971. game.ReplicatedStorage.rems.dps:FireServer("buydf")
  972. buydfgui.Visible = false
  973. wait(1)
  974. busy = false
  975. end
  976. end)
  977. removedfgui.robux.MouseButton1Down:connect(function()
  978. if data.df.Value > 0 and busy == false then
  979. busy = true
  980. game.ReplicatedStorage.rems.dps:FireServer("removedfrobux")
  981. removedfgui.Visible = false
  982. wait(1)
  983. busy = false
  984. end
  985. end)
  986. removedfgui.beli.MouseButton1Down:connect(function()
  987. if data.df.Value > 0 and busy == false and data.beli.Value >= 300000 then
  988. busy = true
  989. game.ReplicatedStorage.rems.dps:FireServer("removedf")
  990. removedfgui.Visible = false
  991. wait(1)
  992. busy = false
  993. end
  994. end)
  995. rerollracegui.robux.MouseButton1Down:connect(function()
  996. if busy == false then
  997. busy = true
  998. game.ReplicatedStorage.rems.dps:FireServer("rerollracerobux")
  999. rerollracegui.Visible = false
  1000. wait(1)
  1001. busy = false
  1002. end
  1003. end)
  1004. rerollracegui.beli.MouseButton1Down:connect(function()
  1005. if busy == false and data.beli.Value >= 200000 then
  1006. busy = true
  1007. game.ReplicatedStorage.rems.dps:FireServer("rerollrace")
  1008. rerollracegui.Visible = false
  1009. wait(1)
  1010. busy = false
  1011. end
  1012. end)
  1013. stats.reset.MouseButton1Down:connect(function()
  1014. if busy == false then
  1015. busy = true
  1016. local totalsps = data.str.Value + data.spe.Value + data.def.Value - 3
  1017. if data.sp.Value == 0 and totalsps > 0 then
  1018. game.ReplicatedStorage.rems.dps:FireServer("resetsp")
  1019. wait(1)
  1020. end
  1021. busy = false
  1022. end
  1023. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement