Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --SynapseX Decompiler
- local p = game.Players.LocalPlayer
- local c = workspace:WaitForChild(p.Name)
- c:WaitForChild("Humanoid")
- c:WaitForChild("HumanoidRootPart")
- c:WaitForChild("Head")
- c:WaitForChild("Health")
- local data = p:WaitForChild("Data")
- local power = p:WaitForChild("power")
- local m = p:GetMouse()
- local busy = false
- local gui = p.PlayerGui.gui
- local hpbar = gui.hpbar
- local powerbar = gui.powerbar
- local beli = gui.beli
- local bounty = gui.bounty
- local boat = gui.boat
- local boatframe = boat.frame
- local weaponshop = gui.weaponshop
- local clothingshop = gui.clothingshop
- local crafting = gui.crafting
- local toolshop = gui.toolshop
- local foodshop = gui.foodshop
- local factionchange = gui.factionchange
- local learnskill = gui.learnskill
- local sellitem = gui.sellitem
- local help = gui.help
- local helpframe = gui.helpframe
- local stats = gui.stats
- local expbar = stats.lvl.expbar
- local muteost = gui.muteost
- local ic = gui.ic
- local shopcd = false
- local buydfgui = gui.buydf
- local removedfgui = gui.removedf
- local rerollracegui = gui.rerollrace
- local buydfrobux = gui.buydfrobux
- local boats = {
- {
- "rowboat",
- 100,
- 50,
- 40
- },
- {
- "ship",
- 8000,
- 300,
- 80
- }
- }
- local weapons = {
- swords = {
- {"Cutlass", 4000},
- {"Katana", 6000},
- {
- "DoubleCutlass",
- 12000
- },
- {
- "DoubleKatana",
- 15000
- },
- {
- "TripleKatana",
- 25000
- }
- },
- guns = {
- {"Flintlock", 8000},
- {"Rifle", 10000},
- {"Bazooka", 34000}
- }
- }
- function addcommas(num)
- local str = tostring(num)
- return #str % 3 == 0 and str:reverse():gsub("(%d%d%d)", "%1,"):reverse():sub(2) or str:reverse():gsub("(%d%d%d)", "%1,"):reverse()
- end
- c.Humanoid.HealthChanged:connect(function()
- hpbar.bar:TweenSize(UDim2.new(c.Humanoid.Health / c.Humanoid.MaxHealth, 0, 1, 0), "Out", "Quad", 1, true)
- hpbar.value.Text = c.Humanoid.Health .. "/" .. c.Humanoid.MaxHealth
- end)
- power.Changed:connect(function()
- 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)
- powerbar.value.Text = power.Value .. "/" .. math.floor(100 + data.str.Value * 2 + data.bounty.Value / 7000)
- end)
- local races = {
- "Human",
- "Fishman",
- "Mink",
- "Skypiean"
- }
- local factions = {"Pirate", "Marine"}
- local jobs = {
- "Chef",
- "Doctor",
- "Navigator",
- "Musician"
- }
- function statadds()
- for i, v in pairs(stats:GetChildren()) do
- if v:IsA("TextLabel") and v:FindFirstChild("add") then
- if data.sp.Value > 0 then
- v.add.Visible = true
- else
- v.add.Visible = false
- end
- end
- end
- end
- for i, v in pairs(stats:GetChildren()) do
- if v:IsA("TextLabel") and v:FindFirstChild("add") then
- v.add.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- if data.sp.Value > 0 then
- 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)
- end
- wait(0.15)
- busy = false
- end
- end)
- end
- end
- function updateguivalues()
- beli.Text = "BELI: " .. addcommas(data.beli.Value)
- bounty.Text = "BOUNTY: " .. addcommas(data.bounty.Value)
- if data.faction.Value == 1 then
- bounty.Text = "BOUNTY: " .. addcommas(data.bounty.Value)
- elseif data.faction.Value == 2 then
- bounty.Text = "RESPECT: " .. addcommas(data.bounty.Value)
- end
- stats.lvl.Text = "LVL: " .. data.lvl.Value
- if data.race.Value > 0 then
- stats.race.value.Text = races[data.race.Value]
- end
- if data.faction.Value > 0 then
- stats.faction.value.Text = factions[data.faction.Value]
- end
- if 0 < data.job.Value then
- stats.job.value.Text = jobs[data.job.Value]
- else
- stats.job.value.Text = "None"
- end
- stats.str.value.Text = data.str.Value
- stats.spe.value.Text = data.spe.Value
- stats.def.value.Text = data.def.Value
- stats.buso.value.Text = data.buso.Value
- stats.ken.value.Text = data.ken.Value
- stats.sp.value.Text = data.sp.Value
- expbar.bar:TweenSize(UDim2.new(data.exp.Value / (100 * data.lvl.Value), 0, 1, 0), "Out", "Quad", 0.4, true)
- expbar.value.Text = data.exp.Value .. "/" .. 100 * data.lvl.Value
- 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)
- powerbar.value.Text = power.Value .. "/" .. math.floor(100 + data.str.Value * 2 + data.bounty.Value / 7000)
- statadds()
- end
- for i, v in pairs(data:GetChildren()) do
- v.Changed:connect(function()
- updateguivalues()
- if v.Name == "exp" and v.Value >= 100 * data.lvl.Value then
- 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)
- end
- end)
- end
- p.ChildAdded:connect(function()
- if p:FindFirstChild("incombat") then
- ic.Visible = true
- else
- ic.Visible = false
- end
- end)
- p.ChildRemoved:connect(function()
- if p:FindFirstChild("incombat") then
- ic.Visible = true
- else
- ic.Visible = false
- end
- end)
- updateguivalues()
- local muted = false
- function muteosts()
- for i, v in pairs(workspace.osts:GetChildren()) do
- if v:IsA("Sound") then
- if muted == true then
- v.Volume = 0
- else
- v.Volume = 0.15
- end
- end
- end
- end
- muteost.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- if muted == false then
- muted = true
- muteost.Image = "http://www.roblox.com/asset/?id=166376578"
- else
- muted = false
- muteost.Image = "http://www.roblox.com/asset/?id=90821298"
- end
- muteosts()
- wait(0.3)
- busy = false
- end
- end)
- local boatguiremovewait = false
- c.Humanoid.Running:connect(function(speed)
- if guiremovewait == false and speed > 1 then
- boat.Visible = false
- weaponshop.Visible = false
- clothingshop.Visible = false
- toolshop.Visible = false
- foodshop.Visible = false
- learnskill.Visible = false
- buydfgui.Visible = false
- removedfgui.Visible = false
- rerollracegui.Visible = false
- sellitem.Visible = false
- factionchange.Visible = false
- if crafting.Visible == true then
- crafting.Visible = false
- crafting["1"].Text = ""
- crafting["2"].Text = ""
- crafting["3"].Text = ""
- end
- end
- end)
- if workspace.boats:FindFirstChild(p.Name .. "boat") == nil then
- boat.spawnboat.Text = "Spawn boat"
- else
- boat.spawnboat.Text = "Despawn boat"
- end
- function findnearboat()
- for i, v in pairs(workspace.boats:GetChildren()) do
- if v and v:FindFirstChild("base") and (v.base.CFrame.p - c.HumanoidRootPart.CFrame.p).magnitude < 100 then
- return v
- end
- end
- end
- boat.spawnboat.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- if data.boat.Value > 0 then
- if workspace.boats:FindFirstChild(p.Name .. "boat") == nil then
- local nearboat = findnearboat()
- if nearboat == nil then
- game.ReplicatedStorage.rems.boat:FireServer(1)
- boat.Visible = false
- boat.spawnboat.Text = "Despawn boat"
- else
- boat.spawnboat.Text = "Boat nearby"
- delay(2, function()
- boat.spawnboat.Text = "Spawn boat"
- end)
- end
- else
- game.ReplicatedStorage.rems.boat:FireServer(2)
- boat.spawnboat.Text = "Spawn boat"
- end
- wait(4)
- end
- busy = false
- end
- end)
- for i, v in pairs(boatframe:GetChildren()) do
- if v:IsA("TextButton") then
- v.cost.Text = addcommas(boats[tonumber(v.Name)][2]) .. " BELI"
- v.MouseEnter:connect(function()
- v.cost.Visible = true
- boat.hp.value.Text = boats[tonumber(v.Name)][3]
- boat.spe.value.Text = boats[tonumber(v.Name)][4]
- end)
- v.MouseLeave:connect(function()
- v.cost.Visible = false
- boat.hp.value.Text = "0"
- boat.spe.value.Text = "0"
- end)
- v.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- if data.boat.Value ~= tonumber(v.Name) and data.beli.Value >= boats[tonumber(v.Name)][2] then
- game.ReplicatedStorage.rems.boat:FireServer(3, tonumber(v.Name))
- local prevcolor = v.BackgroundColor3
- v.BackgroundColor3 = Color3.fromRGB(20, 210, 20)
- wait(1)
- v.BackgroundColor3 = prevcolor
- end
- busy = false
- end
- end)
- end
- end
- m.KeyDown:connect(function(key)
- key = key:lower()
- if busy == false and key == "m" then
- busy = true
- if stats.Visible == false then
- stats.Visible = true
- stats:TweenPosition(UDim2.new(0.776, 0, 0.275, 0), "Out", "Quad", 0.2, true)
- else
- stats:TweenPosition(UDim2.new(1, 0, 0.275, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- stats.Visible = false
- end
- wait(0.2)
- busy = false
- end
- end)
- for i, v in pairs(weaponshop:GetChildren()) do
- if v then
- if v:IsA("TextButton") then
- do
- local frame = weaponshop[v.Name .. "frame"]
- v.MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil and c:FindFirstChildWhichIsA("Tool") == nil then
- busy = true
- if frame.Visible == false then
- for i2, v2 in pairs(weaponshop:GetChildren()) do
- if v2:IsA("ScrollingFrame") then
- v2.Visible = false
- end
- end
- frame.Visible = true
- end
- wait(0.1)
- busy = false
- end
- end)
- end
- elseif v:IsA("ScrollingFrame") then
- for i2, v2 in pairs(v:GetChildren()) do
- if v2:IsA("TextButton") then
- v2.cost.Text = addcommas(weapons[v.shoptype.Value][tonumber(v2.Name)][2]) .. " BELI"
- v2.MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil and c:FindFirstChildWhichIsA("Tool") == nil then
- busy = true
- if data[string.sub(v.shoptype.Value, 1, -2)].Value ~= tonumber(v2.Name) then
- if data.beli.Value >= weapons[v.shoptype.Value][tonumber(v2.Name)][2] then
- 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")
- local prevcolor = v2.BackgroundColor3
- v2.BackgroundColor3 = Color3.fromRGB(20, 210, 20)
- wait(0.5)
- v2.BackgroundColor3 = prevcolor
- end
- else
- 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")
- local prevcolor = v2.BackgroundColor3
- v2.BackgroundColor3 = Color3.fromRGB(210, 20, 20)
- wait(0.5)
- v2.BackgroundColor3 = prevcolor
- end
- wait(0.3)
- busy = false
- end
- end)
- end
- end
- end
- end
- end
- clothingshop.clothing.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- clothingshop.clothingframe.Visible = true
- clothingshop.accessoriesframe.Visible = false
- clothingshop.characterframe.Visible = false
- wait(0.1)
- busy = false
- end
- end)
- clothingshop.accessories.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- clothingshop.accessoriesframe.Visible = true
- clothingshop.clothingframe.Visible = false
- clothingshop.characterframe.Visible = false
- wait(0.1)
- busy = false
- end
- end)
- clothingshop.character.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- clothingshop.characterframe.Visible = true
- clothingshop.clothingframe.Visible = false
- clothingshop.accessoriesframe.Visible = false
- wait(0.1)
- busy = false
- end
- end)
- local ct = {
- shirt = {
- data.shirt.Value,
- 8,
- 1
- },
- pants = {
- data.pants.Value,
- 3,
- 1
- },
- shoes = {
- data.shoes.Value,
- 4,
- 0
- },
- ac = {
- data.ac.Value,
- 5,
- 0
- },
- shirtc = {
- data.shirt.Value,
- 11,
- 1
- },
- pantsc = {
- data.pantsc.Value,
- 11,
- 1
- },
- shoesc = {
- data.shoesc.Value,
- 11,
- 1
- },
- acc = {
- data.acc.Value,
- 11,
- 1
- },
- hairc = {
- data.hairc.Value,
- 8,
- 1
- },
- skinc = {
- data.skinc.Value,
- 5,
- 1
- }
- }
- for i, v in pairs(clothingshop.clothingframe:GetChildren()) do
- if v:IsA("TextLabel") and v:FindFirstChild("<") and v:FindFirstChild(">") then
- v.Text = ct[v.Name][1]
- v["<"].MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- busy = true
- if ct[v.Name][1] > ct[v.Name][3] then
- ct[v.Name][1] = ct[v.Name][1] - 1
- v.Text = ct[v.Name][1]
- game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
- end
- wait(0.4)
- busy = false
- end
- end)
- v[">"].MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- busy = true
- if ct[v.Name][1] < ct[v.Name][2] then
- ct[v.Name][1] = ct[v.Name][1] + 1
- v.Text = ct[v.Name][1]
- game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
- end
- wait(0.4)
- busy = false
- end
- end)
- end
- end
- for i, v in pairs(clothingshop.characterframe:GetChildren()) do
- if v:IsA("TextLabel") and v:FindFirstChild("<") and v:FindFirstChild(">") then
- v.Text = ct[v.Name][1]
- v["<"].MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- busy = true
- if ct[v.Name][1] > ct[v.Name][3] then
- ct[v.Name][1] = ct[v.Name][1] - 1
- v.Text = ct[v.Name][1]
- game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
- end
- wait(0.4)
- busy = false
- end
- end)
- v[">"].MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- busy = true
- if ct[v.Name][1] < ct[v.Name][2] then
- ct[v.Name][1] = ct[v.Name][1] + 1
- v.Text = ct[v.Name][1]
- game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
- end
- wait(0.4)
- busy = false
- end
- end)
- end
- end
- for i, v in pairs(clothingshop.accessoriesframe:GetChildren()) do
- if v:IsA("TextLabel") and v:FindFirstChild("<") and v:FindFirstChild(">") then
- v.Text = ct[v.Name][1]
- v["<"].MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- busy = true
- if ct[v.Name][1] > ct[v.Name][3] then
- ct[v.Name][1] = ct[v.Name][1] - 1
- v.Text = ct[v.Name][1]
- game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
- end
- wait(0.4)
- busy = false
- end
- end)
- v[">"].MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- busy = true
- if ct[v.Name][1] < ct[v.Name][2] then
- ct[v.Name][1] = ct[v.Name][1] + 1
- v.Text = ct[v.Name][1]
- game.ReplicatedStorage.rems.custom:FireServer(v.Name, ct[v.Name][1])
- end
- wait(0.4)
- busy = false
- end
- end)
- end
- end
- local crafts = {
- Seashell = {
- "Metal parts",
- "Sky gem",
- "Impact dial"
- }
- }
- crafting["1"].MouseButton1Down:connect(function()
- local tool = c:FindFirstChildWhichIsA("Tool")
- if tool then
- crafting["1"].Text = tool.Name
- end
- end)
- crafting["2"].MouseButton1Down:connect(function()
- local tool = c:FindFirstChildWhichIsA("Tool")
- if tool then
- crafting["2"].Text = tool.Name
- end
- end)
- crafting["3"].MouseButton1Down:connect(function()
- local tool = c:FindFirstChildWhichIsA("Tool")
- if tool then
- crafting["3"].Text = tool.Name
- end
- end)
- crafting.craft.MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- local result = crafts[crafting["1"].Text][3]
- local part1 = p.Backpack:FindFirstChild(crafting["1"].Text)
- local part2 = p.Backpack:FindFirstChild(crafts[crafting["1"].Text][1])
- local part3 = p.Backpack:FindFirstChild(crafts[crafting["1"].Text][2])
- if part1 and part2 and part3 then
- crafting["1"].Text = ""
- crafting["2"].Text = ""
- crafting["3"].Text = ""
- game.ReplicatedStorage.rems.crafting:FireServer(part1, part2, part3, result)
- end
- end
- end)
- local tools = {
- Torch = 200,
- Pickaxe = 500,
- Snailphone = 300
- }
- for i, v in pairs(toolshop.frame:GetChildren()) do
- if v:IsA("TextButton") then
- v.cost.Text = tools[v.Name] .. " BELI"
- v.MouseEnter:connect(function()
- v.cost.Visible = true
- end)
- v.MouseLeave:connect(function()
- v.cost.Visible = false
- end)
- v.MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- busy = true
- if data.beli.Value >= tools[v.Name] then
- 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")
- end
- wait(0.1)
- busy = false
- end
- end)
- end
- end
- local foods = {
- Apple = 100,
- Orange = 200,
- Coconut = 200
- }
- for i, v in pairs(foodshop.frame:GetChildren()) do
- if v:IsA("TextButton") then
- v.cost.Text = foods[v.Name] .. " BELI"
- v.MouseEnter:connect(function()
- v.cost.Visible = true
- end)
- v.MouseLeave:connect(function()
- v.cost.Visible = false
- end)
- v.MouseButton1Down:connect(function()
- if busy == false and c.Humanoid:FindFirstChild("zoanffv") == nil then
- busy = true
- if data.beli.Value >= foods[v.Name] then
- 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")
- end
- wait(0.1)
- busy = false
- end
- end)
- end
- end
- if data.faction.Value == 1 then
- factionchange.change.Text = "Join marines"
- elseif data.faction.Value == 2 then
- factionchange.change.Text = "Leave marines"
- end
- factionchange.change.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- 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")
- factionchange.Visible = false
- wait(5)
- busy = false
- end
- end)
- local skillname
- local skills = {
- blackleg = {
- 12000,
- 25,
- 25,
- 20,
- "Black leg style"
- },
- fishmankarate = {
- 12000,
- 20,
- 20,
- 20,
- "Fishman karate"
- },
- oneswordstyle = {
- 12000,
- 25,
- 25,
- 10,
- "One sword style"
- },
- twoswordstyle = {
- 14000,
- 35,
- 25,
- 5,
- "Two sword style"
- },
- threeswordstyle = {
- 18000,
- 40,
- 30,
- 5,
- "Three sword style"
- }
- }
- learnskill.learn.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- 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
- 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")
- wait(2)
- end
- busy = false
- end
- end)
- local helps = {
- help1 = {
- "Tool controls: E,R,T,F,G(while tool equipped) = sword/combat skills or devil fruit abilities"
- },
- help2 = {
- "Rokushiki controls: double tap W = shave(6 spe) | double tap SPACE = sky walk(15 spe)"
- },
- help3 = {
- "Haki controls: B = armament haki | K = observation haki | hold H = conqueror haki"
- },
- help4 = {
- "Training: defeat mobs to gain exp and skill points(press M to see your stats)"
- },
- help5 = {
- "Crafting: some materials, if combined in the right sequence, can turn into a special tool/weapon(nothing available yet)"
- },
- help6 = {
- "If some guis don't work, use them without any tool equipped"
- }
- }
- help.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- if helpframe.Visible == false then
- helpframe.Visible = true
- end
- wait(0.3)
- busy = false
- end
- end)
- helpframe.close.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- helpframe.Visible = false
- wait(0.2)
- busy = false
- end
- end)
- helpframe[">"].MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- helpframe.title.Text = "HELP 2"
- helpframe.desc1.Text = helps.help4[1]
- helpframe.desc2.Text = helps.help5[1]
- helpframe.desc3.Text = helps.help6[1]
- helpframe["<"].Visible = true
- helpframe[">"].Visible = false
- wait(0.1)
- busy = false
- end
- end)
- helpframe["<"].MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- helpframe.title.Text = "HELP 1"
- helpframe.desc1.Text = helps.help1[1]
- helpframe.desc2.Text = helps.help2[1]
- helpframe.desc3.Text = helps.help3[1]
- helpframe["<"].Visible = false
- helpframe[">"].Visible = true
- wait(0.1)
- busy = false
- end
- end)
- local sellabletools = {
- Diamond = 800,
- Emerald = 400,
- Ruby = 600,
- Iron = 100,
- Gold = 500
- }
- function findselectedtool()
- local st
- for i, v in pairs(c:GetChildren()) do
- if v:IsA("Tool") then
- st = v
- end
- end
- return st
- end
- sellitem.sell.MouseEnter:connect(function()
- local selectedtool = findselectedtool()
- if selectedtool and sellabletools[selectedtool.Name] then
- sellitem.sell.value.Text = addcommas(sellabletools[selectedtool.Name]) .. " BELI"
- end
- sellitem.sell.value.Visible = true
- end)
- sellitem.sell.MouseLeave:connect(function()
- sellitem.sell.value.Text = "0 BELI"
- sellitem.sell.value.Visible = false
- end)
- sellitem.sell.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- local selectedtool = findselectedtool()
- if selectedtool and sellabletools[selectedtool.Name] then
- game.ReplicatedStorage.rems.shop:FireServer("sellitem", selectedtool)
- wait(0.4)
- end
- busy = false
- end
- end)
- for i, v in pairs(workspace.shops:GetChildren()) do
- if v:IsA("Part") then
- if v.Name == "boat" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and boat.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- boat.Visible = true
- end
- end)
- elseif v.Name == "weapon" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and weaponshop.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- weaponshop.Visible = true
- end
- end)
- elseif v.Name == "clothing" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and clothingshop.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- clothingshop.Visible = true
- end
- end)
- elseif v.Name == "food" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and foodshop.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- foodshop.Visible = true
- end
- end)
- elseif v.Name == "crafting" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and crafting.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- crafting.Visible = true
- end
- end)
- elseif v.Name == "tool" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and toolshop.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- toolshop.Visible = true
- end
- end)
- elseif v.Name == "faction" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and factionchange.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- factionchange.Visible = true
- end
- end)
- elseif v.Name == "skill" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and learnskill.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- skillname = v.skillname.Value
- learnskill.skill.Text = skills[skillname][5]
- learnskill.req.Text = "requirements: " .. addcommas(skills[skillname][1]) .. " Beli | " .. skills[skillname][2] .. " str | " .. skills[skillname][3] .. " spe | " .. skills[skillname][4] .. " def"
- learnskill.Visible = true
- end
- end)
- elseif v.Name == "sellitem" then
- v.Touched:connect(function(part)
- if part:IsA("BasePart") and part.Parent:FindFirstChild("Humanoid") and part.Parent.Name == p.Name and sellitem.Visible == false and shopcd == false then
- shopcd = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- delay(5, function()
- shopcd = false
- end)
- sellitem.Visible = true
- end
- end)
- end
- end
- end
- local MarketplaceService = game:GetService("MarketplaceService")
- local rerollrace = 466346401
- local buydf = 465844241
- local removedf = 465846368
- workspace.dps.buydf.ClickDetector.MouseClick:connect(function(p)
- if busy == false then
- busy = true
- buydfgui.Visible = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- wait(0.6)
- busy = false
- end
- end)
- workspace.dps.removedf.ClickDetector.MouseClick:connect(function(p)
- if busy == false then
- busy = true
- removedfgui.Visible = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- wait(0.6)
- busy = false
- end
- end)
- workspace.dps.rerollrace.ClickDetector.MouseClick:connect(function(p)
- if busy == false then
- busy = true
- rerollracegui.Visible = true
- guiremovewait = true
- delay(1.5, function()
- guiremovewait = false
- end)
- wait(0.6)
- busy = false
- end
- end)
- buydfrobux.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- game.ReplicatedStorage.rems.dps:FireServer("buydfrobux")
- wait(1)
- busy = false
- end
- end)
- buydfgui.buy.MouseButton1Down:connect(function()
- if busy == false and data.beli.Value >= 500000 then
- busy = true
- game.ReplicatedStorage.rems.dps:FireServer("buydf")
- buydfgui.Visible = false
- wait(1)
- busy = false
- end
- end)
- removedfgui.robux.MouseButton1Down:connect(function()
- if data.df.Value > 0 and busy == false then
- busy = true
- game.ReplicatedStorage.rems.dps:FireServer("removedfrobux")
- removedfgui.Visible = false
- wait(1)
- busy = false
- end
- end)
- removedfgui.beli.MouseButton1Down:connect(function()
- if data.df.Value > 0 and busy == false and data.beli.Value >= 300000 then
- busy = true
- game.ReplicatedStorage.rems.dps:FireServer("removedf")
- removedfgui.Visible = false
- wait(1)
- busy = false
- end
- end)
- rerollracegui.robux.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- game.ReplicatedStorage.rems.dps:FireServer("rerollracerobux")
- rerollracegui.Visible = false
- wait(1)
- busy = false
- end
- end)
- rerollracegui.beli.MouseButton1Down:connect(function()
- if busy == false and data.beli.Value >= 200000 then
- busy = true
- game.ReplicatedStorage.rems.dps:FireServer("rerollrace")
- rerollracegui.Visible = false
- wait(1)
- busy = false
- end
- end)
- stats.reset.MouseButton1Down:connect(function()
- if busy == false then
- busy = true
- local totalsps = data.str.Value + data.spe.Value + data.def.Value - 3
- if data.sp.Value == 0 and totalsps > 0 then
- game.ReplicatedStorage.rems.dps:FireServer("resetsp")
- wait(1)
- end
- busy = false
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement