Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- params : ...
- wait(1)
- local Player = game.Players.LocalPlayer
- local mouse = Player:GetMouse()
- local gui = script.Parent:WaitForChild("GameGui")
- local menugui = gui:WaitForChild("MenuGui")
- local gmgui = script.Parent:WaitForChild("GMConsole")
- local gsre = game.ReplicatedStorage:WaitForChild("GlobalSave")
- if not workspace.CurrentCamera:FindFirstChild("HBGuis") then
- local HBFolder = Instance.new("Folder", workspace.CurrentCamera)
- end
- HBFolder.Name = "HBGuis"
- for _,v in pairs(HBFolder:GetChildren()) do
- v:Destroy()
- end
- Player.CanLoadCharacterAppearance = false
- repeat
- wait()
- until Player.Character
- Player.Character:WaitForChild("Head")
- Player.Character:WaitForChild("Torso")
- assets = game.ReplicatedStorage:WaitForChild("BuildAssets"):InvokeServer()
- local PlayerStats = Player:WaitForChild("PlayerStats")
- local tweenAPI = require(game.ReplicatedStorage:WaitForChild("TweenCFrame"))
- local Module3D = require(game.ReplicatedStorage:WaitForChild("Module3D"))
- local dataoriginal = menugui.Menus.Data.Image
- local playeroriginal = menugui.Menus.Player.Image
- local playersoriginal = menugui.Menus.Players.Image
- local messageoriginal = menugui.Menus.Message.Image
- local settingsoriginal = menugui.Menus.Settings.Image
- local skillspos = gui.Skills.Position
- local playerpos = gui.Player.Position
- local invpos = gui.Inventory.Position
- local respos = gui.Resources.Position
- local settingspos = gui.Settings.Position
- local ForceModal = script.Parent.ForceModal.Frame.TextButton
- local gmOldCameraCF, gmOldCameraFocus, proxitem = nil, nil, nil
- print("Things set")
- local hbsize = gui.Health.AbsoluteSize
- gui.Health.Size = UDim2.new(0, hbsize.Y * 9.931, 0, hbsize.Y)
- local mgsize = menugui.AbsoluteSize
- menugui.Size = UDim2.new(0, mgsize.Y * 0.96969696969697, 0, mgsize.Y)
- local mgpos = menugui.AbsolutePosition
- menugui.Position = menugui.Position - UDim2.new(0, mgsize.Y * 0.96969696969697 / 2, 1, 0)
- print("Gui Sizes Set")
- local CanZSwitch = true
- stamina = gui:WaitForChild("Stamina")
- stamina.Value = PlayerStats:WaitForChild("MaxStamina").Value
- workspace.CurrentCamera.FieldOfView = 70
- local lastjump = 0
- local human = Player.Character:WaitForChild("Humanoid")
- human.WalkSpeed = 18
- local swimming = false
- human.Running:connect(function()
- swimming = false
- end)
- human.Swimming:connect(function()
- swimming = true
- end)
- human.Changed:connect(function(prop)
- if prop == "Jump" and not swimming then
- if math.abs(tick() - lastjump) < 1.5 or stamina.Value < 10 then
- human.Jump = false
- else
- lastjump = tick()
- stamina.Value = stamina.Value - 10
- end
- end
- end)
- neededExp = function(lvl)
- lvl = lvl - 1
- local total = 9
- for i = 1, lvl do
- total = total + 6 * (i + 1)
- end
- return total
- end
- local menuopen = false
- local menumoving = false
- local menutoggledclose = false
- local menutoggledopen = false
- local consuming = false
- local sprinting = false
- local sprintdeb = false
- local sprintdeb2 = false
- local ordefault = Color3.new(0.29411764705882, 0.29411764705882, 0.29411764705882)
- local orhover = Color3.new(0.066666666666667, 0.56470588235294, 1)
- local infoimg = "rbxassetid://231761206"
- local guildinfo = {}
- local groupservice = game:GetService("GroupService")
- if PlayerStats.Guild.Value ~= 0 then
- guildinfo = groupservice:GetGroupInfoAsync(PlayerStats.Guild.Value)
- menugui.InfoImage.Image = guildinfo.EmblemUrl
- else
- menugui.InfoImage.Image = infoimg
- end
- print("Got past guild check")
- _G.Fishing = false
- if not _G.LastFishingTick then
- _G.LastFishingTick = 0
- end
- FishingCooldown = 300
- craftingnow = false
- _G.CraftingVictory = nil
- usingswordskill = false
- Notification = function(Header, Text, Image, Timed)
- Image = tostring(Image)
- local New = game.ReplicatedStorage:WaitForChild("Notification"):Clone()
- New.Frame.Header.Text = Header
- New.Frame:FindFirstChild("Text").Text = Text
- New.Frame.Image.Image = "rbxassetid://" .. (Image:find("invpics") == 1 and invpics[Image:sub(8)] or Image)
- if not Timed then
- local Debounce = false
- do
- New.Frame.Ok.MouseButton1Click:connect(function()
- if Debounce then
- return
- end
- Debounce = true
- gui.ClickSound:Play()
- New.Frame.Ok.Button:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- New.Frame.Ok.Button:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
- New.Frame:TweenPosition((UDim2.new(0.25, 0, -0.4, 0)), nil, nil, 0.25, true)
- wait(0.25)
- New:Destroy()
- end)
- end
- else
- do
- New.Frame.Ok.Visible = false
- New.Parent = Player.PlayerGui
- New.Frame:TweenPosition((UDim2.new(0.2, 0, 0.4, 0)), ni, nil, 0.25, true)
- delay(0.25, function()
- if Timed then
- wait(Timed)
- New.Frame:TweenPosition((UDim2.new(0.25, 0, -0.4, 0)), nil, nil, 0.25, true)
- wait(0.25)
- New:Destroy()
- end
- end)
- end
- end
- end
- findDuelShow = function(player)
- for _,v in pairs(workspace:children()) do
- if v.Name == "DuelShow" and (v.Player1.Value == player or v.Player2.Value == player) then
- return v
- end
- end
- end
- FixCamera = function()
- local cam = workspace.CurrentCamera
- cam.CameraType = "Custom"
- cam.CameraSubject = Player.Character.Humanoid
- end
- clearFrames = function()
- for _,v in pairs(menugui.Frames:GetChildren()) do
- v.Visible = false
- end
- end
- clearMidFrames = function()
- for _,v in pairs(menugui.MidFrames:GetChildren()) do
- v.Visible = false
- end
- end
- Explode = function(Divider, Text)
- if Text == "" or type(Text) ~= "string" then
- return {""}
- end
- if Divider == "" or type(Divider) ~= "string" then
- return {Text}
- end
- local Position, Words = 0, {}
- for Start,Stop in function()
- return string.find(Text, Divider, Position, true)
- end
- do
- table.insert(Words, string.sub(Text, Position, Start - 1))
- Position = Stop + 1
- end
- table.insert(Words, string.sub(Text, Position))
- return Words
- end
- RemoveItem = function(item, amount)
- game.ReplicatedStorage:WaitForChild("RemoveItem"):InvokeServer(item, amount)
- end
- getTable = function()
- local divider = ","
- local text = PlayerStats.Inventory.Value
- local stuff = Explode(divider, text)
- return stuff
- end
- getcount = function(tab, item)
- local number = 0
- for i,v in pairs(tab) do
- if v == item then
- number = number + 1
- end
- end
- return number
- end
- weldit = function(what, where, colorit, colorref, attach)
- local hm = what:clone()
- hm.Parent = where.Parent
- local C = hm:GetChildren()
- for i = 1, #C do
- if C[i]:IsA("BasePart") then
- local W = Instance.new("Weld")
- W.Part0 = hm.Middle
- W.Part1 = C[i]
- local CJ = CFrame.new(hm.Middle.Position)
- local C0 = hm.Middle.CFrame:inverse() * CJ
- local C1 = C[i].CFrame:inverse() * CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = hm.Middle
- end
- do
- do
- local Y = Instance.new("Weld")
- Y.Part0 = where
- Y.Part1 = hm.Middle
- Y.C0 = CFrame.new(0, 0, 0)
- Y.Parent = Y.Part0
- -- DECOMPILER ERROR at PC59: LeaveBlock: unexpected jumping out DO_STMT
- end
- end
- end
- local h = hm:GetChildren()
- for i = 1, #h do
- h[i].Anchored = false
- h[i].CanCollide = false
- if colorit == true and h[i].Name == "ColorPart" then
- h[i].BrickColor = BrickColor.new(colorref)
- end
- end
- end
- createHB = function(Plr, IsPlayer, OptOverhead, IsBoss)
- local HB = nil
- if not IsBoss then
- HB = game.ReplicatedStorage:WaitForChild("HBModel"):clone()
- else
- HB = game.ReplicatedStorage:WaitForChild("HBModelBoss"):clone()
- end
- HB.Name = Plr
- local ActualPlr = nil
- if IsPlayer then
- ActualPlr = game.Players:FindFirstChild(Plr)
- if ActualPlr then
- if ActualPlr:GetRankInGroup(3534864) >= 252 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Game-Master] " .. Plr
- else
- if ActualPlr:GetRankInGroup(3534864) == 120 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Dev-Assistant] " .. Plr
- else
- if ActualPlr:GetRankInGroup(3534864) == 100 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Developer] " .. Plr
- else
- if ActualPlr:GetRankInGroup(3534864) == 90 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Head-Administrator] " .. Plr
- else
- if ActualPlr:GetRankInGroup(3534864) == 80 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Administrator] " .. Plr
- else
- if ActualPlr:GetRankInGroup(3534864) == 70 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Manager] " .. Plr
- else
- if ActualPlr:GetRankInGroup(3534864) == 60 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Clothing-Designer] " .. Plr
- else
- if ActualPlr:GetRankInGroup(3534864) == 50 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Moderator] " .. Plr
- else
- if ActualPlr:GetRankInGroup(3534864) == 40 then
- HB.GuiPart.SurfaceGui.TextLabel.Text = "[Contributor] " .. Plr
- else
- HB.GuiPart.SurfaceGui.TextLabel.Text = Plr
- end
- end
- end
- end
- end
- end
- end
- end
- end
- if ActualPlr:WaitForChild("PlayerStats").Guild.Value ~= 0 then
- HB.GuiPart.SurfaceGui.IL.Image = groupservice:GetGroupInfoAsync(ActualPlr.PlayerStats.Guild.Value).EmblemUrl
- end
- Instance.new("IntValue", HB).Name = "IsPlayer"
- end
- else
- HB.GuiPart.SurfaceGui.TextLabel.Text = OptOverhead and OptOverhead or Plr
- end
- local hm = HB
- local C = hm:GetChildren()
- for i = 1, #C do
- if C[i]:IsA("BasePart") then
- local W = Instance.new("Weld")
- W.Part0 = hm.GuiPart
- W.Part1 = C[i]
- local CJ = CFrame.new(hm.GuiPart.Position)
- local C0 = hm.GuiPart.CFrame:inverse() * CJ
- local C1 = C[i].CFrame:inverse() * CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = hm.GuiPart
- end
- end
- local h = hm:GetChildren()
- for i = 1, #h do
- if h[i]:IsA("BasePart") then
- h[i].Anchored = false
- h[i].CanCollide = false
- end
- end
- local HW = Instance.new("Weld")
- HW.Name = "HeadWeld"
- HW.Parent = HB.GuiPart
- HB.Parent = HBFolder
- print("Made HB for " .. Plr)
- return HB
- end
- szfloors = {1, 10, 20, 30, 40, 50, 65, 76, 84, 95}
- checkSafeZone = function()
- for i,v in pairs(szfloors) do
- if workspace.GameLoader.Options.Floor.Value == v then
- return true
- end
- end
- return false
- end
- _G.Zone = "Field"
- if checkSafeZone() == true then
- _G.Zone = "Town"
- else
- _G.Zone = "Field"
- end
- if workspace.GameLoader.Options:FindFirstChild("Amb") then
- gui.Amb.SoundId = game.ReplicatedStorage:WaitForChild("Soundtrack")[workspace.GameLoader.Options.Amb.Value].SoundId
- gui.Amb.Pitch = game.ReplicatedStorage.Soundtrack[workspace.GameLoader.Options.Amb.Value].Pitch
- gui.Amb:Play()
- end
- UpdateCharacter = function()
- game.ReplicatedStorage:WaitForChild("UpdateChar"):InvokeServer()
- end
- swordequipped = false
- local idleanim = Player.Character.Humanoid:LoadAnimation(script.Idle)
- local skillanim = Player.Character.Humanoid:LoadAnimation(script.SkillReady)
- swordaction = false
- swordsounds = script.SwordSounds:GetChildren()
- candamage = false
- SwordConnect = function()
- local sword = Player.Character:WaitForChild("Sword")
- sword.Middle.Touched:connect(function(hit)
- if candamage and hit.Parent:FindFirstChild("Humanoid") then
- candamage = false
- local victim = game.Players:GetPlayerFromCharacter(hit.Parent)
- if victim then
- local myopponent = Player.Character:FindFirstChild("DuelOpponent")
- local hisopponent = victim.Character:FindFirstChild("DuelOpponent")
- local nodamage = victim.Character:FindFirstChild("NoDamage")
- if nodamage or ((myopponent and not hisopponent) or myopponent or hisopponent) then
- return
- end
- if myopponent and hisopponent and myopponent.Value == victim and hisopponent.Value == Player then
- game.ReplicatedStorage:WaitForChild("DamagePlayer"):FireServer(victim, usingswordskill)
- else
- if not hit.Parent:FindFirstChild("SZ") and victim.PlayerStats.Level.Value >= 10 and PlayerStats.Level.Value >= 10 then
- game.ReplicatedStorage:WaitForChild("DamagePlayer"):FireServer(victim, usingswordskill)
- end
- end
- else
- do
- game.ReplicatedStorage:WaitForChild("DamageMob"):FireServer(hit.Parent.Humanoid, usingswordskill)
- end
- end
- end
- end)
- end
- SwordConnect()
- SwordSkill = function()
- if Player.Character.Sword and swordequipped and not swordaction then
- local asset = assets[Player.PlayerStats.Weapon.Value]
- if not asset then
- return
- end
- local module = script.SwordSkills[asset.Value]:FindFirstChild(Player.PlayerStats.CurrentSkill.Value)
- if not module then
- return
- end
- local data = require(module)
- local skillrequirement = data.RequiredSkillLevel
- local order = data.AnimationOrder
- local cost = data.RequiredAP
- if Player.PlayerStats[asset.Value .. "Skill"].Value < skillrequirement then
- return
- end
- if gui.AP.Value < cost then
- return
- end
- swordaction = true
- gui.AP.Value = gui.AP.Value - cost
- skillanim:Play()
- game.ReplicatedStorage:WaitForChild("SSEffect"):InvokeServer(module.Name)
- wait(1)
- swordaction = false
- end
- end
- currentlyclashing = false
- clashfolder = nil
- game.ReplicatedStorage:WaitForChild("GlobalM").OnClientEvent:connect(function(Content)
- local msg = string.sub(Content[2], 11, string.len(Content[2]))
- local truemessage = Content[1] .. " : " .. msg
- local Gui = game.Lighting:WaitForChild("AnnouncementGui"):Clone()
- Gui.Parent = Player.PlayerGui
- Gui.Frame.Announcement.Text = truemessage
- Gui.Frame:TweenSizeAndPosition(UDim2.new(1, 0, 0.25, 0), UDim2.new(0, 0, 0.375, 0), "In", "Quad", 0.6)
- wait(5.6)
- Gui:remove()
- end)
- game.ReplicatedStorage:WaitForChild("InitClashing).OnClientEvent:connect(function(Folder)
- local myownvalue = Folder:WaitForChild(Player.Name)
- currentlyclashing = true
- swordaction = true
- clashfolder = Folder
- local gui = game.ReplicatedStorage:WaitForChild("Clash"):Clone()
- gui.Parent = Player.PlayerGui
- wait(3)
- gui:remove()
- local folder2 = nil
- for _,folder2value in pairs(Folder:GetChildren()) do
- if folder2value.Name ~= Player.Name then
- folder2 = folder2value
- end
- end
- if folder2.Value < Folder:WaitForChild(Player.Name).Value then
- game.ReplicatedStorage:WaitForChild("InitClashing"):FireServer(3, Folder, folder2.Name)
- end
- clashfolder = nil
- swordaction = false
- currentlyclashing = false
- end)
- game.ReplicatedStorage:WaitForChild("SSEffect).OnClientInvoke = function()
- skillanim:Stop()
- local WeldPing = game.ReplicatedStorage:WaitForChild("ChangeWeld")
- local asset = assets[Player.PlayerStats.Weapon.Value]
- local module = script.SwordSkills[asset.Value]:FindFirstChild(Player.PlayerStats.CurrentSkill.Value)
- local order = require(module).AnimationOrder
- candamage = true
- usingswordskill = true
- for _,v in pairs(order) do
- local name = v.Anim
- local waittime = v.Wait
- local speedmult = v.Speed
- local pick = math.random(1, #swordsounds)
- local newsound = script.SwordSounds[swordsounds[pick].Name]:clone()
- newsound.Parent = Player.Character.Sword.Middle
- newsound:Play()
- local baseanim = script.SwordSlashes[asset.Value][name]
- WeldPing:FireServer(baseanim.Grip.Value, "Right Arm")
- local newanim = Player.Character.Humanoid:LoadAnimation(baseanim)
- newanim:Play(nil, nil, speedmult)
- wait(waittime)
- newanim:Stop()
- newsound:remove()
- wait(0.1)
- end
- if assets[PlayerStats.Weapon.Value].Value == "One-Handed" then
- WeldPing:FireServer("One-Handed Held", "Right Arm")
- else
- if assets[PlayerStats.Weapon.Value].Value == "Rapier" then
- WeldPing:FireServer("One-Handed Held", "Right Arm")
- else
- if assets[PlayerStats.Weapon.Value].Value == "Dagger" then
- WeldPing:FireServer("Dagger Held", "Right Arm")
- else
- if assets[PlayerStats.Weapon.Value].Value == "Two-Handed" then
- WeldPing:FireServer("Two-Handed Held", "Right Arm")
- end
- end
- end
- end
- idleanim:Play()
- candamage = false
- usingswordskill = false
- end
- InviteFrame = gui:WaitForChild("PartyInvite)
- Mates = gui:WaitForChild("Parties)
- Func = game.ReplicatedStorage:WaitForChild("PartyFunc)
- Party = Player:WaitForChild("Party)
- Decals = {236915531, 234370726, 236915425, 234370700}
- Near = {}
- Range = 50
- HealthConnections = {}
- UpdateNear = function()
- Near = {}
- for _,v in pairs(game.Players:GetPlayers()) do
- if v and v.Parent and v.Name ~= Player.Name and v.Character and v.Character:FindFirstChild("Humanoid") and v.Character.Humanoid.Health > 0 and v.Character:FindFirstChild("Torso") and v.Character.Torso.CFrame.p - Player.Character.Torso.CFrame.p.magnitude <= Range then
- table.insert(Near, v)
- end
- end
- end
- listNear = function()
- UpdateNear()
- for _,v in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
- do
- if v.Name ~= "Base" then
- do
- v:remove()
- -- DECOMPILER ERROR at PC16: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC16: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- local count = 0
- for i,v in pairs(Near) do
- local newb = menugui.Frames.Playerlist.List.Base:clone()
- newb.Parent = menugui.Frames.Playerlist.List
- newb.Name = v.Name
- newb.Text = v.Name
- newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * count, 0)
- newb.Visible = true
- count = count + 1
- end
- for _,v in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
- v.MouseEnter:connect(function()
- gui.AltSound:Play()
- for _,b in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
- if b ~= v then
- b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end
- end
- end)
- v.Buttons.MouseLeave:connect(function()
- v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end)
- v.MouseButton1Down:connect(function()
- for _,b in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
- if b ~= v then
- b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- else
- b:TweenPosition(UDim2.new(-1, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end
- end
- gui.ClickSound:Play()
- end)
- v.Buttons.Party.MouseButton1Down:connect(function()
- Func:InvokeServer("Invite", game.Players[v.Name])
- gui.ClickSound:Play()
- v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end)
- v.Buttons.Msg.MouseButton1Down:connect(function()
- end)
- v.Buttons.Duel.MouseButton1Down:connect(function()
- game.ReplicatedStorage.DuelEvent:FireServer("InvitePlayer", game.Players[v.Name])
- gui.ClickSound:Play()
- v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end)
- end
- end
- SetupBar = function(Who)
- for i = 1, 3 do
- local Person = Mates:FindFirstChild(i)
- if Person.PlayerName.Text == "" and Who.Character and Who.Character:FindFirstChild("Humanoid") then
- Person.PlayerName.Text = Who.Name
- Person.Visible = true
- break
- end
- end
- end
- UpdateMemberGui = function()
- for i = 1, 3 do
- local Person = Mates:WaitForChild(i)
- Person:WaitForChild("PlayerName").Text = ""
- Person.Visible = false
- end
- for _,v in pairs(game.Players:GetPlayers()) do
- if v.Name ~= Player.Name and v:FindFirstChild("Party") and v.Party.Value == Party.Value and Party.Value ~= "" then
- SetupBar(v)
- end
- end
- end
- Party.Changed:connect(function(New)
- end)
- local YesButton = InviteFrame:WaitForChild("Options):WaitForChild("Yes)
- local NoButton = InviteFrame:WaitForChild("Options"):WaitForChild("No")
- YesButton.MouseEnter:connect(function()
- YesButton.Image = "rbxassetid://236915530"
- end)
- YesButton.MouseLeave:connect(function()
- YesButton.Image = "rbxassetid://234370725"
- end)
- NoButton.MouseEnter:connect(function()
- NoButton.Image = "rbxassetid://236915424"
- end)
- NoButton.MouseLeave:connect(function()
- NoButton.Image = "rbxassetid://234370699"
- end)
- menugui.Frames.Party.LeaveParty.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- Func:InvokeServer("LeaveParty")
- UpdateMemberGui()
- menugui.Frames.Party.Visible = false
- end)
- menugui.Frames.Map.Frame.FloorNumber.Text = "Floor " .. tostring(workspace.GameLoader.Options.Floor.Value) .. " | " .. workspace.GameLoader.Options.FloorName.Value
- if workspace.GameLoader.Options:FindFirstChild("Map) then
- menugui.Frames.Map.Frame.ImageLabel.Image = "rbxassetid://" .. workspace.GameLoader.Options.Map.Value
- end
- UpdateMemberGui()
- Func.OnClientInvoke = function(...)
- local Args = {...}
- if Args[1] == "UpdateMember" and type(Args[2]) == "userdata" and Args[2].ClassName == "Player" then
- local Who = Args[2]
- do
- for i = 1, 3 do
- local Person = Mates:FindFirstChild(i)
- if Person.PlayerName.Text == Who.Name then
- return
- end
- end
- UpdateMemberGui()
- end
- else
- do
- if Args[1] == "MemberLeft" and type(Args[2]) == "userdata" and Args[2].ClassName == "Player" then
- UpdateMemberGui()
- else
- if Args[1] == "InviteFrom" and type(Args[2]) == "userdata" and Args[2].ClassName == "Player" then
- if InviteFrame.Visible then
- return
- end
- local Inviter = Args[2]
- local Content = InviteFrame:WaitForChild("Content")
- Content.Text = Inviter.Name .. " has invited you to a party."
- InviteFrame.Visible = true
- local Options = InviteFrame:WaitForChild("Options")
- local Yes = Options:WaitForChild("Yes")
- local No = Options:WaitForChild("No")
- local Response = 0
- local Start = tick()
- local Conn1 = Yes.MouseButton1Click:connect(function()
- Response = true
- end)
- local Conn2 = No.MouseButton1Click:connect(function()
- Response = false
- end)
- repeat
- wait()
- until Response ~= 0 or tick() - Start >= 10
- Conn1:disconnect()
- Conn2:disconnect()
- InviteFrame.Visible = false
- return Response
- end
- end
- end
- end
- end
- menugui.Frames.Trade.Frame.Confirm.MouseButton1Down:connect(function()
- local guy = menugui.Frames.Trade.Frame.ID.Text
- if game.Players:FindFirstChild(guy) and game.Players[guy].Trader.Value == "None" then
- local v = "Send"
- game.ReplicatedStorage.TradeInvite:FireServer(v, guy)
- end
- end)
- invpics = {["One-Handed"] = "207992005", Shield = "207991969", Outfit = "207991704", Material = "221160251", Consumable = "268373481", Dagger = "297542870", ["Two-Handed"] = "297542959", Rapier = "297542991", UpperHeadwear = "207991803", LowerHeadwear = "207991803"}
- local invfilter = "Equipment"
- local unknownicon = "rbxassetid://329366684"
- do
- local invindex = 1
- listInv = function(filter, keepscrollpos)
- if not keepscrollpos then
- invindex = 1
- end
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if v.Name ~= "Base" then
- v:remove()
- end
- end
- local count = 0
- do
- local list = getTable()
- menugui.Frames.Inventory.Count.Text = tostring(#list) .. "/200"
- for i,v in pairs(list) do
- if assets[v] then
- if assets[v].Value ~= "Material" and assets[v].Value ~= "Consumable" and filter == "Equipment" then
- local newb = menugui.Frames.Inventory.List.Base:clone()
- newb.Parent = menugui.Frames.Inventory.List
- newb.Name = v
- if not assets[v].LVL then
- local itemstat = assets[v].Skill
- end
- if assets[v].LVL then
- newb.TextLabel.Text = "[ LVL " .. itemstat.Value .. " ] " .. v
- else
- newb.TextLabel.Text = "[ SKILL " .. itemstat.Value .. " ] " .. v
- end
- newb.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
- newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * count, 0)
- newb.Visible = true
- count = count + 1
- else
- do
- if filter == "Items" and (assets[v].Value == "Material" or assets[v].Value == "Consumable") then
- if not menugui.Frames.Inventory.List:FindFirstChild(v) then
- local newb = menugui.Frames.Inventory.List.Base:clone()
- newb.Parent = menugui.Frames.Inventory.List
- newb.Name = v
- newb.TextLabel.Text = v
- newb.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
- newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * (count), 0)
- newb.Visible = true
- count = count + 1
- else
- do
- menugui.Frames.Inventory.List:FindFirstChild(v).TextLabel.Text = v .. " x" .. tostring(getcount(list, v))
- do
- local newb = menugui.Frames.Inventory.List.Base:clone()
- newb.Parent = menugui.Frames.Inventory.List
- newb.Name = v
- newb.TextLabel.Text = v
- newb.Icon.Image = unknownicon
- newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * (count), 0)
- newb.Visible = true
- count = count + 1
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_ELSE_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_ELSE_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- end
- end
- end
- end
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if v.Name == PlayerStats.Outfit.Value then
- v.BackgroundColor3 = orhover
- local newval = Instance.new("StringValue", v)
- newval.Name = "Equipped"
- break
- end
- end
- do
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if v.Name == PlayerStats.Weapon.Value then
- v.BackgroundColor3 = orhover
- local newval = Instance.new("StringValue", v)
- newval.Name = "Equipped"
- break
- end
- end
- do
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if v.Name == PlayerStats.UpperHeadwear.Value then
- v.BackgroundColor3 = orhover
- local newval = Instance.new("StringValue", v)
- newval.Name = "Equipped"
- break
- end
- end
- do
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if v.Name == PlayerStats.LowerHeadwear.Value then
- v.BackgroundColor3 = orhover
- local newval = Instance.new("StringValue", v)
- newval.Name = "Equipped"
- break
- end
- end
- do
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if v.Name == PlayerStats.Shield.Value then
- v.BackgroundColor3 = orhover
- local newval = Instance.new("StringValue", v)
- newval.Name = "Equipped"
- break
- end
- end
- do
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- v.Position = v.Position - UDim2.new(0, 0, 0.125 * (invindex - 1), 0)
- v.MouseEnter:connect(function()
- gui.AltSound:Play()
- for _,b in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if b ~= v then
- b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end
- end
- end)
- v.Buttons.MouseLeave:connect(function()
- v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end)
- v.MouseButton1Down:connect(function()
- for _,b in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if b ~= v then
- b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- else
- b:TweenPosition(UDim2.new(-1, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end
- end
- gui.ClickSound:Play()
- end)
- v.Buttons.E.MouseButton1Down:connect(function()
- local item = assets[v.Name]
- if item then
- EqItem(v.Name)
- else
- gui.Err:Play()
- end
- end)
- v.Buttons.Dr.MouseButton1Down:connect(function()
- DrItem(v.Name)
- end)
- v.Buttons.De.MouseButton1Down:connect(function()
- DItem(v.Name)
- end)
- v.Buttons.I.MouseButton1Down:connect(function()
- inspect(v.Name)
- end)
- end
- end
- end
- end
- end
- end
- end
- end
- listSwordSkills = function()
- for _,v in pairs(menugui.Frames.Skills.List:GetChildren()) do
- if v.Name ~= "Base" then
- v:remove()
- end
- end
- local Unlocked = {}
- do
- for _,v in pairs(script.SwordSkills:children()) do
- for _,x in pairs(v:children()) do
- local data = require(x)
- if data.RequiredSkillLevel <= Player.PlayerStats[v.Name .. "Skill"].Value then
- table.insert(Unlocked, data)
- end
- end
- end
- local count = 0
- for i,v in pairs(Unlocked) do
- local newb = menugui.Frames.Skills.List.Base:clone()
- newb.Parent = menugui.Frames.Skills.List
- newb.Name = v.SkillName
- newb.Text = v.SkillName
- newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * count, 0)
- if v.SkillName == PlayerStats.CurrentSkill.Value then
- newb.BackgroundColor3 = orhover
- end
- newb.Icon.Image = "rbxassetid://" .. invpics[v.WeaponType]
- newb.Visible = true
- count = count + 1
- end
- for _,v in pairs(menugui.Frames.Skills.List:GetChildren()) do
- v.MouseEnter:connect(function()
- gui.AltSound:Play()
- for _,b in pairs(menugui.Frames.Skills.List:GetChildren()) do
- if b ~= v then
- b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end
- end
- end)
- v.Buttons.MouseLeave:connect(function()
- v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end)
- v.MouseButton1Down:connect(function()
- for _,b in pairs(menugui.Frames.Skills.List:GetChildren()) do
- if b ~= v then
- b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- else
- b:TweenPosition(UDim2.new(-1, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end
- end
- gui.ClickSound:Play()
- end)
- v.Buttons.Set.MouseButton1Down:connect(function()
- game.ReplicatedStorage:WaitForChild("ChangeSS"):InvokeServer(v.Name)
- gui.ClickSound:Play()
- listSwordSkills()
- end)
- end
- end
- end
- modapp = function(type, item)
- game.ReplicatedStorage:WaitForChild("ModApp"):InvokeServer(type, item)
- end
- EqItem = function(item)
- if assets[item].Value == "Outfit" then
- if assets[item].LVL.Value <= PlayerStats.Level.Value then
- modapp("Outfit", item)
- UpdateCharacter()
- SwordConnect()
- listInv(invfilter, true)
- gui.Bag:Play()
- else
- gui.Err:Play()
- end
- else
- if assets[item].Value == "One-Handed" or assets[item].Value == "Rapier" or assets[item].Value == "Dagger" or assets[item].Value == "Two-Handed" then
- if assets[item].Skill.Value <= PlayerStats[assets[item].Value .. "Skill"].Value then
- modapp("Weapon", item)
- UpdateCharacter()
- SwordConnect()
- gui.Bag:Play()
- listInv(invfilter, true)
- else
- gui.Err:Play()
- end
- else
- if assets[item].Value == "UpperHeadwear" then
- if PlayerStats.UpperHeadwear.Value ~= item then
- if assets[item].LVL.Value <= PlayerStats.Level.Value then
- modapp("UpperHeadwear", item)
- UpdateCharacter()
- SwordConnect()
- listInv(invfilter, true)
- gui.Bag:Play()
- else
- gui.Err:Play()
- end
- else
- modapp("UpperHeadwear", "")
- UpdateCharacter()
- SwordConnect()
- listInv(invfilter, true)
- end
- else
- if assets[item].Value == "LowerHeadwear" then
- if PlayerStats.LowerHeadwear.Value ~= item then
- if assets[item].LVL.Value <= PlayerStats.Level.Value then
- modapp("LowerHeadwear", item)
- UpdateCharacter()
- SwordConnect()
- listInv(invfilter, true)
- gui.Bag:Play()
- else
- gui.Err:Play()
- end
- else
- modapp("LowerHeadwear", "")
- UpdateCharacter()
- SwordConnect()
- listInv(invfilter, true)
- end
- else
- if assets[item].Value == "Shield" then
- if PlayerStats.Shield.Value ~= item then
- if assets[item].LVL.Value <= PlayerStats.Level.Value then
- modapp("Shield", item)
- UpdateCharacter()
- SwordConnect()
- listInv(invfilter, true)
- gui.Bag:Play()
- else
- gui.Err:Play()
- end
- else
- modapp("Shield", "")
- UpdateCharacter()
- SwordConnect()
- listInv(invfilter, true)
- end
- else
- if assets[item].Value == "Consumable" and not consuming and not findDuelShow(Player) then
- consuming = item
- for _,b in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
- end
- local anim = Player.Character.Humanoid:LoadAnimation(script.EatDrink)
- anim:Play()
- game.ReplicatedStorage.UseConsumable:InvokeServer(item)
- listInv(invfilter, true)
- anim:Stop()
- idleanim:Play()
- consuming = false
- end
- end
- end
- end
- end
- end
- end
- DrItem = function(item)
- if PlayerStats.DualWeapon.Value == item then
- item = "None"
- end
- if item == "None" or assets[item].Value == "One-Handed" and Player.PlayerStats["One-HandedSkill"].Value >= 250 then
- if item == "None" or assets[item].Skill.Value <= PlayerStats[assets[item].Value .. "Skill"].Value then
- game.ReplicatedStorage:WaitForChild("UpdateDualWeapon"):FireServer(item)
- UpdateCharacter()
- SwordConnect()
- gui.Bag:Play()
- listInv(invfilter, true)
- else
- gui.Err:Play()
- end
- end
- end
- DItem = function(item)
- if item == consuming then
- return
- end
- if PlayerStats.Outfit.Value ~= item and PlayerStats.Weapon.Value ~= item and PlayerStats.UpperHeadwear.Value ~= item and PlayerStats.LowerHeadwear.Value ~= item and PlayerStats.Shield.Value ~= item and (not assets[item] or not assets[item].Bound) then
- RemoveItem(item)
- else
- local stuff = getTable()
- if getcount(stuff, item) >= 2 then
- RemoveItem(item)
- end
- end
- do
- listInv(invfilter, true)
- gui.Bag:Play()
- end
- end
- inspect = function(item)
- local it = assets[item]
- if it then
- gui.Inspect.TL.Text = item
- gui.Inspect.Type.Text = it.Value
- gui.Inspect.Worth.Text = "Worth: " .. it.Worth.Value .. " Col"
- if it.LVL then
- gui.Inspect.Level.Text = "Level: " .. tostring(it.LVL.Value)
- else
- if it.Skill then
- gui.Inspect.Level.Text = "Skill: " .. tostring(it.Skill.Value)
- else
- gui.Inspect.Level.Text = ""
- end
- end
- if it.DMG then
- gui.Inspect.D.Text = "ATK: " .. tostring(it.DMG.Value)
- else
- if it.DEF then
- gui.Inspect.D.Text = "DEF: " .. tostring(it.DEF.Value)
- else
- gui.Inspect.D.Text = ""
- end
- end
- gui.Inspect.Icon.Image = "rbxassetid://" .. invpics[it.Value]
- gui.Inspect.Visible = true
- end
- end
- gui.Inspect.Done.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- gui.Inspect.Done.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- gui.Inspect.Done.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
- gui.Inspect.Visible = false
- end)
- for _,v in pairs(menugui.Menus:GetChildren()) do
- do
- if v:IsA("ImageButton") then
- do
- v.MouseEnter:connect(function()
- if menuopen then
- gui.AltSound:Play()
- v.Image = v.Value.Value
- end
- end)
- v.MouseLeave:connect(function()
- if v.Name == "Players" then
- v.Image = playersoriginal
- else
- if v.Name == "Player" then
- v.Image = playeroriginal
- else
- if v.Name == "Data" then
- v.Image = dataoriginal
- else
- if v.Name == "Message" then
- v.Image = messageoriginal
- else
- if v.Name == "Settings" then
- v.Image = settingsoriginal
- end
- end
- end
- end
- end
- end)
- v.MouseButton1Down:connect(function()
- if menuopen == true and not menumoving then
- clearFrames()
- clearMidFrames()
- gui.ClickSound:Play()
- menugui.Menus:TweenPosition(UDim2.new(0, 0, 0.1, 0), "Out", "Quad", 0.2, true)
- menugui.InfoImage:TweenPosition(UDim2.new(-0.35, 0, 0.15, 0), "Out", "Quad", 0.2, true)
- menugui.MidFrames[v.Name].Visible = true
- end
- end)
- -- DECOMPILER ERROR at PC642: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC642: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- for _,v in pairs(menugui.MidFrames:GetChildren()) do
- do
- for _,c in pairs(v:GetChildren()) do
- if c:IsA("TextButton") then
- c.MouseButton1Down:connect(function()
- if menugui.Frames:FindFirstChild(c.Name) then
- gui.ClickSound:Play()
- clearFrames()
- menugui.Frames[c.Name].Visible = true
- if c.Name == "Playerlist" then
- listNear()
- else
- if c.Name == "Skills" then
- listSwordSkills()
- end
- end
- else
- gui.ClickSound:Play()
- clearFrames()
- if c.Name == "Items" then
- listInv("Items")
- invfilter = "Items"
- menugui.Frames.Inventory.Visible = true
- else
- if c.Name == "Equipment" then
- listInv("Equipment")
- invfilter = "Equipment"
- menugui.Frames.Inventory.Visible = true
- end
- end
- end
- end)
- c.MouseEnter:connect(function()
- c.BackgroundColor3 = orhover
- gui.AltSound:Play()
- end)
- c.MouseLeave:connect(function()
- c.BackgroundColor3 = ordefault
- end)
- end
- end
- end
- end
- menugui.Frames.Inventory.Up.MouseButton1Down:connect(function()
- if invindex > 1 then
- invindex = invindex - 1
- else
- return
- end
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if v.Name ~= "Base" then
- v.Position = v.Position + UDim2.new(0, 0, 0.125, 0)
- end
- end
- gui.AltSound:Play()
- end)
- menugui.Frames.Inventory.Down.MouseButton1Down:connect(function()
- invindex = invindex + 1
- for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
- if v.Name ~= "Base" then
- v.Position = v.Position - UDim2.new(0, 0, 0.125, 0)
- end
- end
- gui.AltSound:Play()
- end)
- menugui.Frames.Playerlist.Up.MouseButton1Down:connect(function()
- for _,v in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
- if v.Name ~= "Base" then
- v.Position = v.Position + UDim2.new(0, 0, 0.125, 0)
- end
- end
- gui.AltSound:Play()
- end)
- menugui.Frames.Playerlist.Down.MouseButton1Down:connect(function()
- for _,v in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
- if v.Name ~= "Base" then
- v.Position = v.Position - UDim2.new(0, 0, 0.125, 0)
- end
- end
- gui.AltSound:Play()
- end)
- menugui.Frames.Skills.Up.MouseButton1Down:connect(function()
- for _,v in pairs(menugui.Frames.Skills.List:GetChildren()) do
- if v.Name ~= "Base" then
- v.Position = v.Position + UDim2.new(0, 0, 0.125, 0)
- end
- end
- gui.AltSound:Play()
- end)
- menugui.Frames.Skills.Down.MouseButton1Down:connect(function()
- for _,v in pairs(menugui.Frames.Skills.List:GetChildren()) do
- if v.Name ~= "Base" then
- v.Position = v.Position - UDim2.new(0, 0, 0.125, 0)
- end
- end
- gui.AltSound:Play()
- end)
- guildgui = menugui.Frames.Guild.Frame
- MPService = game:GetService("MarketplaceService)
- guildgui.Confirm.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- guildgui.Confirm.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- guildgui.Confirm.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
- if Player:IsInGroup(tonumber(guildgui.ID.Text)) then
- MPService:PromptProductPurchase(Player, 107631719)
- game.ReplicatedStorage.GuildUpdate:FireServer(tonumber(guildgui.ID.Text))
- end
- end)
- local tradegui = menugui.Frames.Trade.Frame
- tradegui.Confirm.MouseButton1Down:connect(function()
- end)
- repeat
- wait()
- until _G.CustomMouse
- local customMouse = _G.CustomMouse
- game.ReplicatedStorage:WaitForChild("NotificationEvent").OnClientEvent:connect(function(Header, Text, Image, Timed)
- Notification(Header, Text, Image, Timed)
- end)
- local craftmode = gui:WaitForChild("CraftMode)
- local crafting = gui:WaitForChild("Crafting")
- local inputs = crafting:WaitForChild("Inputs")
- local boxes = crafting:WaitForChild("Boxes)
- local products = crafting:WaitForChild("Products")
- local dropdown = crafting:WaitForChild("Dropdown")
- do
- local craftbutton = crafting:WaitForChild("Craft")
- local close = crafting:WaitForChild("Close")
- local inventory = (PlayerStats:WaitForChild("Inventory))
- local selectedcraft = nil
- local craftdebounce = false
- getInventoryTable = function(noEquipped)
- local full = Explode(",", inventory.Value)
- local filtered = {}
- if not noEquipped then
- return full
- else
- for _,v in pairs(full) do
- local origcount = getcount(full, v)
- local newcount = getcount(filtered, v)
- if (PlayerStats.Outfit.Value:lower() ~= v:lower() and PlayerStats.Weapon.Value:lower() ~= v:lower()) or origcount > 1 and newcount + 1 < origcount then
- table.insert(filtered, v)
- end
- end
- return filtered
- end
- end
- tableToString = function(tab)
- return table.concat(tab, ",")
- end
- findBox = function(item)
- for _,v in pairs(boxes:children()) do
- if v.Item.Value == item then
- return v
- end
- end
- return false
- end
- listInputs = function()
- local tab = getInventoryTable(true)
- for _,v in pairs(inputs:children()) do
- if v.Name ~= "Base" then
- v:Remove()
- end
- end
- inputs.CanvasSize = UDim2.new(0, 0, 0, 50 * #tab)
- local amounts = {}
- do
- local index = 1
- for i,v in pairs(tab) do
- if assets[v] then
- if inputs:FindFirstChild(v) then
- amounts[v] = amounts[v] + 1
- inputs[v].Text = v .. " x" .. amounts[v]
- else
- if not findBox(v) then
- local new = inputs.Base:Clone()
- new.Visible = true
- new.Name = v
- new.Text = v
- new.Position = UDim2.new(0, 0, 0, 50 * (index - 1))
- new.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
- if inputs.AbsoluteWindowSize.Y < inputs.CanvasSize.Y.Offset then
- new.Size = UDim2.new(1, -13, 0, 50)
- else
- new.Size = UDim2.new(1, 0, 0, 50)
- end
- new.MouseButton1Click:connect(function()
- for i = 1, 4 do
- local current = boxes["Box" .. i]
- if current.Item.Value == "" then
- current.Item.Value = v
- selectedcraft = nil
- craftbutton.BackgroundTransparency = 0.75
- craftbutton.TextTransparency = 0.5
- listInputs()
- updateBoxes()
- listProducts()
- break
- end
- end
- end)
- new.Parent = inputs
- amounts[v] = 1
- index = index + 1
- end
- end
- end
- end
- end
- end
- updateBoxes = function()
- for i,v in pairs(boxes:children()) do
- local val = v.Item.Value
- if val ~= "" then
- local tab = getInventoryTable(true)
- local count = getcount(tab, val)
- if count > 0 then
- v.Text = val .. " x" .. count
- else
- v.Text = ""
- v.Item.Value = ""
- end
- else
- do
- do
- v.Text = ""
- -- DECOMPILER ERROR at PC30: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC30: LeaveBlock: unexpected jumping out IF_ELSE_STMT
- -- DECOMPILER ERROR at PC30: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- for i = 1, 4 do
- local current = boxes["Box" .. i]
- if current.Item.Value == "" then
- for x = i + 1, 4 do
- local prev = boxes["Box" .. x - 1]
- local this = boxes["Box" .. x]
- prev.Text = this.Text
- prev.Item.Value = this.Item.Value
- end
- end
- end
- end
- listProducts = function()
- local inv = getInventoryTable(true)
- local tab = {}
- for _,v in pairs(game.ReplicatedStorage.CraftingRecipes:children()) do
- do
- if v.CraftType.Value == craftmode.Value then
- local okay = true
- for _,needed in pairs(v:children()) do
- if needed.Name ~= "CraftType" and needed.Name ~= "CraftingSkill" and (not findBox(needed.Name) or getcount(inv, needed.Name) < needed.Value) then
- okay = false
- break
- end
- end
- do
- if v.CraftType.Value ~= "Smeltering" and PlayerStats[v.CraftType.Value .. "Skill"].Value < v.CraftingSkill.Value then
- okay = false
- end
- if okay then
- do
- table.insert(tab, {v, true})
- -- DECOMPILER ERROR at PC72: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC72: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- -- DECOMPILER ERROR at PC72: LeaveBlock: unexpected jumping out DO_STMT
- end
- end
- for _,v in pairs(game.ReplicatedStorage.CraftingRecipes:children()) do
- if v.CraftType.Value == craftmode.Value then
- local okay = true
- for _,needed in pairs(v:children()) do
- if needed.Name ~= "CraftType" and needed.Name ~= "CraftingSkill" and (not findBox(needed.Name) or getcount(inv, needed.Name) < needed.Value) then
- okay = false
- break
- end
- end
- do
- do
- if v.CraftType.Value ~= "Smeltering" and PlayerStats[v.CraftType.Value .. "Skill"].Value < v.CraftingSkill.Value then
- okay = false
- end
- if not okay then
- table.insert(tab, {v, false})
- end
- -- DECOMPILER ERROR at PC142: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC142: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC142: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- for _,v in pairs(products:children()) do
- if v.Name ~= "Base" then
- v:Remove()
- end
- end
- products.CanvasSize = UDim2.new(0, 0, 0, 50 * #tab)
- for i,v in pairs(tab) do
- local new = products.Base:Clone()
- new.Visible = true
- new.Name = v[1].Name
- new.Text = v[1].Name
- new.Position = UDim2.new(0, 0, 0, 50 * (i - 1))
- if products.AbsoluteWindowSize.Y < products.CanvasSize.Y.Offset then
- new.Size = UDim2.new(1, -13, 0, 50)
- else
- new.Size = UDim2.new(1, 0, 0, 50)
- end
- new.MouseEnter:connect(function()
- dropdown.Desc.Text = v[1].Value
- dropdown.CraftingSkill.Text = v[1].CraftType.Value .. "Skill: " .. v[1].CraftingSkill.Value
- local need = {}
- for _,needed in pairs(v[1]:children()) do
- if needed.Name ~= "CraftType" and needed.Name ~= "CraftingSkill" then
- table.insert(need, needed.Value .. " " .. needed.Name)
- end
- end
- dropdown.Required.Text = "Required: " .. table.concat(need, ", ")
- end)
- new.MouseMoved:connect(function(x, y)
- dropdown.Position = UDim2.new(0, x - crafting.AbsolutePosition.X, 0, y - crafting.AbsolutePosition.Y)
- dropdown.Visible = true
- end)
- new.MouseLeave:connect(function()
- dropdown.Visible = false
- end)
- new.MouseButton1Click:connect(function()
- if v[2] then
- selectedcraft = v[1].Name
- craftbutton.BackgroundTransparency = 0.5
- craftbutton.TextTransparency = 0
- listProducts()
- end
- end)
- if not v[2] then
- new.BackgroundTransparency = 0.75
- new.TextStrokeTransparency = 1
- new.TextTransparency = 0.7
- new.Icon.ImageTransparency = 0.8
- if selectedcraft == v[1].Name then
- selectedcraft = nil
- craftbutton.BackgroundTransparency = 0.75
- craftbutton.TextTransparency = 0.5
- end
- end
- if selectedcraft == v[1].Name then
- new.BackgroundColor3 = orhover
- end
- new.Parent = products
- end
- end
- for i,v in pairs(boxes:children()) do
- v.MouseButton1Click:connect(function()
- v.Item.Value = ""
- updateBoxes()
- listInputs()
- listProducts()
- end)
- end
- craftbutton.MouseButton1Click:connect(function()
- if craftdebounce then
- return
- end
- if not selectedcraft then
- return
- end
- craftdebounce = true
- local recipe = game.ReplicatedStorage.CraftingRecipes:FindFirstChild(selectedcraft)
- if recipe.CraftType.Value ~= "Smeltering" then
- game.ReplicatedStorage:WaitForChild("CraftingStart"):InvokeServer()
- repeat
- wait()
- until _G.CraftingVictory ~= nil
- else
- _G.CraftingVictory = true
- end
- local SkillName = recipe.CraftType.Value .. "Skill"
- game.ReplicatedStorage:WaitForChild("CraftingEnded"):InvokeServer(SkillName, recipe.Name, _G.CraftingVictory)
- listInputs()
- updateBoxes()
- listProducts()
- wait(1)
- _G.CraftingVictory = nil
- craftdebounce = false
- end)
- close.MouseButton1Click:connect(function()
- crafting.Visible = false
- craftingnow = false
- Player.Character.Humanoid.WalkSpeed = 18
- end)
- crafting.Changed:connect(function(property)
- if property == "Visible" then
- listInputs()
- listProducts()
- end
- end)
- listInputs()
- listProducts()
- gui.Crafting.Changed:connect(function(property)
- if property == "Visible" and gui.Crafting.Visible then
- craftingnow = true
- end
- end)
- inside = Player:WaitForChild("Inside)
- ginterior = Player:WaitForChild("Interior)
- local phomeinterior = ""
- exitinterior = function()
- workspace.CurrentCamera.CameraType = "Custom"
- workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character
- if workspace:FindFirstChild(ginterior.Value) then
- workspace:FindFirstChild(ginterior.Value):remove()
- end
- if workspace:FindFirstChild("Ext-" .. phomeinterior) then
- for _,v in pairs(workspace:FindFirstChild("Ext-" .. phomeinterior):GetChildren()) do
- v.Transparency = 0
- end
- end
- do
- phomeinterior = ""
- inside.Value = false
- ginterior.Value = ""
- game.ReplicatedStorage.IntValuesChanged:FireServer(false, "")
- Player.Character.Humanoid.WalkSpeed = 18
- end
- end
- if ginterior.Value ~= "" then
- exitinterior()
- end
- loadinterior = function(interiormodel, owner)
- local model = game.ReplicatedStorage.Interiors:FindFirstChild(interiormodel):clone()
- model.Parent = workspace
- model.Name = interiormodel
- local ownervalue = Instance.new("StringValue", model)
- ownervalue.Name = "Owner"
- ownervalue.Value = owner
- phomeinterior = interiormodel
- inside.Value = true
- ginterior.Value = interiormodel
- game.ReplicatedStorage.IntValuesChanged:FireServer(true, interiormodel)
- workspace.CurrentCamera.CameraType = "Custom"
- workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character
- if workspace:FindFirstChild("Ext-" .. ginterior.Value) then
- for _,v in pairs(workspace:FindFirstChild("Ext-" .. ginterior.Value):GetChildren()) do
- v.Transparency = 1
- end
- end
- do
- return model
- end
- end
- local shopitem = ""
- do
- local shopping = false
- local shopmode = true
- makeBuyList = function()
- for _,v in pairs(gui.Shop.List.F:GetChildren()) do
- if v.Name ~= "Base" then
- v:remove()
- end
- end
- local count = 0
- do
- local list = game.ReplicatedStorage:WaitForChild("GetBuyList"):InvokeServer(proxitem.Id.Value)
- gui.Shop.List.F.CanvasSize = UDim2.new(0, 0, 0, gui.Shop.List.F.Base.Size.Y.Offset * #list)
- for _,v in pairs(list) do
- if assets[v] then
- local newb = gui.Shop.List.F.Base:clone()
- newb.Parent = gui.Shop.List.F
- newb.Name = v
- newb.Text = v
- newb.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
- newb.Position = UDim2.new(0, 0, 0, newb.Size.Y.Offset * count)
- newb.Visible = true
- count = count + 1
- end
- end
- for _,v in pairs(gui.Shop.List.F:children()) do
- if v.Name ~= "Base" then
- v.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- shopitem = v.Name
- shopmode = true
- gui.Shop.Confirm.Visible = true
- gui.Shop.Confirm.TextLabel.Text = "Confirm Purchase of " .. v.Name .. " for " .. tostring(assets[v.Name].Worth.Value) .. " Col:"
- if assets[v.Name].Badge then
- gui.Shop.Confirm.TextLabel.Text = gui.Shop.Confirm.TextLabel.Text .. " [BADGE]"
- end
- if assets[v.Name].Pass then
- gui.Shop.Confirm.TextLabel.Text = gui.Shop.Confirm.TextLabel.Text .. " [PASS]"
- end
- if assets[v.Name].Group then
- gui.Shop.Confirm.TextLabel.Text = gui.Shop.Confirm.TextLabel.Text .. " [GROUP]"
- end
- end)
- end
- end
- end
- end
- makeSellList = function()
- for _,v in pairs(gui.Shop.List.F:GetChildren()) do
- if v.Name ~= "Base" then
- v:remove()
- end
- end
- local count = 0
- do
- local list = getTable()
- gui.Shop.List.F.CanvasSize = UDim2.new(0, 0, 0, gui.Shop.List.F.Base.Size.Y.Offset * #list)
- for i,v in pairs(list) do
- if assets[v] and not assets[v].Bound then
- local newb = gui.Shop.List.F.Base:clone()
- newb.Parent = gui.Shop.List.F
- newb.Name = v
- newb.Text = v
- newb.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
- newb.Position = UDim2.new(0, 0, 0, newb.Size.Y.Offset * count)
- newb.Visible = true
- count = count + 1
- end
- end
- for _,v in pairs(gui.Shop.List.F:children()) do
- if v.Name ~= "Base" then
- v.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- shopitem = v.Name
- shopmode = false
- gui.Shop.Confirm.Visible = true
- gui.Shop.Confirm.TextLabel.Text = "Confirm Sale of " .. v.Name .. " for " .. math.ceil(assets[v.Name].Worth.Value / 2) .. " Col:"
- end)
- end
- end
- end
- end
- gui.Shop.List.Buy.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- gui.Shop.List.Buy.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- gui.Shop.List.Buy.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
- makeBuyList()
- end)
- gui.Shop.List.Sell.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- gui.Shop.List.Sell.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- gui.Shop.List.Sell.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
- makeSellList()
- end)
- gui.Shop.Confirm.Cancel.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- gui.Shop.Confirm.Cancel.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- gui.Shop.Confirm.Cancel.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
- gui.Shop.Confirm.Visible = false
- end)
- local shopselldeb = false
- gui.Shop.Confirm.Ok.MouseButton1Down:connect(function()
- if shopselldeb then
- return
- end
- shopselldeb = true
- if shopitem ~= "" then
- if game.ReplicatedStorage:WaitForChild("ShopTransfer"):InvokeServer(shopmode, shopitem) == true then
- gui.ClickSound:Play()
- gui.Shop.Confirm.Ok.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- gui.Shop.Confirm.Ok.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
- gui.Shop.Confirm.Visible = false
- if shopmode == true then
- makeBuyList()
- else
- makeSellList()
- end
- else
- gui.Err:Play()
- end
- end
- shopselldeb = false
- end)
- local entering = false
- do
- local dialogdeb = false
- local WeldPing = game.ReplicatedStorage:WaitForChild("ChangeWeld")
- local WeldPing2 = game.ReplicatedStorage:WaitForChild("ChangeWeld2")
- local ad = game.ReplicatedStorage.GuiPart:clone()
- local activeModel = Module3D:Attach3D(Player.PlayerGui:WaitForChild("MenuAdorn").BG, ad)
- getOwnerList = function(interior)
- for _,v in pairs(gui.Homes.F:GetChildren()) do
- if v.Name ~= "Base" then
- v:remove()
- end
- end
- local count = 0
- local list = game.Players:GetPlayers()
- do
- gui.Homes.F.CanvasSize = UDim2.new(0, 0, 0, gui.Homes.F.Base.Size.Y.Scale * #list)
- for _,v in pairs(list) do
- if v.PlayerStats.Home.Value == interior and v.Name ~= Player.Name then
- local Privacy = v.PlayerStats.PlayerHomePrivacy
- -- DECOMPILER ERROR at PC104: Unhandled construct in 'MakeBoolean' P3
- if Privacy.Value == "Everyone" or ((Privacy.Value == "Friends" and Player:IsFriendsWith(v.userId)) or Privacy.Value ~= "Party" or Player.Party.Value ~= v.Party.Value or Privacy.Value ~= "Guild" or PlayerStats.Guild.Value ~= v.PlayerStats.Guild.Value or PlayerStats.Guild.Value ~= 0) then
- local newb = gui.Homes.F.Base:clone()
- newb.Parent = gui.Homes.F
- newb.Name = v.Name
- newb.Text = v.Name .. "\'s Home"
- newb.Position = UDim2.new(0, 0, 0, newb.Size.Y.Offset * count)
- newb.Visible = true
- count = count + 1
- end
- end
- end
- local debounce = false
- for _,v in pairs(gui.Homes.F:children()) do
- if v.Name ~= "Base" and v.Name ~= Player.Name then
- v.MouseButton1Down:connect(function()
- if debounce then
- return
- end
- debounce = true
- entering = true
- gui.ClickSound:Play()
- local home = loadinterior(game.Players[v.Name].PlayerStats.Home.Value, Player.Name)
- home.Name = v.Name .. "\'s Home"
- print(home.Name)
- inside.Value = true
- ginterior.Value = home.Name
- game.ReplicatedStorage.IntValuesChanged:FireServer(true, home.Name)
- gui.Homes.Visible = false
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.5, true)
- local inside = Instance.new("StringValue", Player.Character)
- inside.Name = "Inside"
- wait(1)
- Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
- Player.Character.Humanoid.WalkSpeed = 18
- wait(1)
- entering = false
- end)
- end
- end
- end
- end
- gui.Homes.Cancel.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- local cam = workspace.CurrentCamera
- cam.CameraType = "Custom"
- cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
- gui.Homes.Visible = false
- Player.Character.Humanoid.WalkSpeed = 18
- end)
- gui.Homes.Enter.MouseButton1Down:connect(function()
- if gui.Homes.Enter.TextLabel.Text == "Buy" then
- if game.ReplicatedStorage:WaitForChild("BuyPH"):InvokeServer(proxitem.Interior.Value) == true then
- gui.ClickSound:Play()
- gui.Homes.Enter.TextLabel.Text = "Enter"
- else
- gui.Err:Play()
- end
- else
- entering = true
- gui.Homes.Visible = false
- local cam = workspace.CurrentCamera
- cam.CameraType = "Custom"
- cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
- gui.ClickSound:Play()
- local home = loadinterior(proxitem.Interior.Value, Player.Name)
- home.Name = Player.Name .. "\'s Home"
- inside.Value = true
- ginterior.Value = home.Name
- game.ReplicatedStorage.IntValuesChanged:FireServer(true, home.Name)
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.5, true)
- local inside = Instance.new("StringValue", Player.Character)
- inside.Name = "Inside"
- wait(1)
- Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
- Player.Character.Humanoid.WalkSpeed = 18
- wait(1)
- entering = false
- end
- end)
- Editor = gui.Barber
- hairs = game.ReplicatedStorage:WaitForChild("Char).Hair:GetChildren()
- eyecolors = game.ReplicatedStorage.Char.EyeColor:GetChildren()
- haircolors = {"Bright blue", "Bright orange", "Bright red", "Cool yellow", "Cyan", "Dark orange", "Dark stone grey", "Earth green", "Light reddish violet", "Medium green", "Medium red", "Medium stone grey", "Nougat", "Pastel light blue", "Pastel violet", "Pink", "Really black", "Reddish brown", "Sand red", "White", "Brown", "Dirt brown", "Dark taupe", "Really black", "Black", "Dark stone grey", "Smoky grey", "Ghost grey", "Institutional white", "Sand red", "Bright red", "Crimson", "Carnation pink", "Salmon", "Pastel orange", "Mulberry", "Lilac", "Sunrise", "Pastel yellow", " Cool yellow", "Daisy orange", "Bright blue", "Steel blue", "Cyan", "Deep orange", "Br.yellowish orange", "Bright yellow", "Dark green", "Moss", "Hot pink", "Really red", "Lime green", "Really blue", "New Yeller"}
- skincolors = {"Brown", "Light orange", "Nougat", "Pastel brown"}
- hairindex = 1
- eyeindex = 1
- haircolorindex = 1
- skinindex = 1
- hairindex2 = 1
- BarberDevProduct = 107631798
- hairindex = tonumber(PlayerStats.HairStyle.Value:match("%d+"))
- hairindex2 = tonumber(PlayerStats.HairStyle2.Value:match("%d+"))
- for i,v in pairs(eyecolors) do
- if v.Name == PlayerStats.EyeColor.Value then
- eyeindex = i
- break
- end
- end
- do
- for i,v in pairs(haircolors) do
- if v == PlayerStats.HairColor.Value then
- haircolorindex = i
- break
- end
- end
- do
- for i,v in pairs(skincolors) do
- if v == PlayerStats.Skin.Value then
- skinindex = i
- break
- end
- end
- do
- preview = function()
- UpdateCharacter()
- Editor.Hair.Text = PlayerStats.HairStyle.Value:upper()
- Editor.Hair2.Text = PlayerStats.HairStyle2.Value:upper()
- Editor.Eyes.Text = PlayerStats.EyeColor.Value:upper() .. " EYES"
- Editor.HairColor.Text = "HAIR COLOR: " .. PlayerStats.HairColor.Value:upper()
- Editor.SkinColor.Text = "SKIN COLOR: " .. PlayerStats.Skin.Value:upper()
- end
- for _,b in pairs(Editor:GetChildren()) do
- if b:IsA("TextButton") then
- b.MouseButton1Down:connect(function()
- gui.ClickSound:Play()
- b.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
- wait(0.2)
- b.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
- end)
- end
- end
- ChangeApp = function(stat, val)
- game.ReplicatedStorage:WaitForChild("ChangeApp"):InvokeServer(stat, val)
- end
- Editor.HairUp.MouseButton1Down:connect(function()
- if hairindex < #hairs then
- hairindex = hairindex + 1
- else
- hairindex = 1
- end
- ChangeApp("HairStyle", "Hair " .. hairindex)
- preview()
- end)
- Editor.HairDown.MouseButton1Down:connect(function()
- if hairindex > 1 then
- hairindex = hairindex - 1
- else
- hairindex = #hairs
- end
- ChangeApp("HairStyle", "Hair " .. hairindex)
- preview()
- end)
- Editor.HairUp2.MouseButton1Down:connect(function()
- if hairindex2 < #hairs then
- hairindex2 = hairindex2 + 1
- else
- hairindex2 = 1
- end
- ChangeApp("HairStyle2", "Hair " .. hairindex2)
- preview()
- end)
- Editor.HairDown2.MouseButton1Down:connect(function()
- if hairindex2 > 1 then
- hairindex2 = hairindex2 - 1
- else
- hairindex2 = #hairs
- end
- ChangeApp("HairStyle2", "Hair " .. hairindex2)
- preview()
- end)
- Editor.EyeUp.MouseButton1Down:connect(function()
- if eyeindex < #eyecolors then
- eyeindex = eyeindex + 1
- else
- eyeindex = 1
- end
- ChangeApp("EyeColor", eyecolors[eyeindex].Name)
- preview()
- end)
- Editor.EyeDown.MouseButton1Down:connect(function()
- if eyeindex > 1 then
- eyeindex = eyeindex - 1
- else
- eyeindex = #eyecolors
- end
- ChangeApp("EyeColor", eyecolors[eyeindex].Name)
- preview()
- end)
- Editor.HairColorUp.MouseButton1Down:connect(function()
- if haircolorindex < #haircolors then
- haircolorindex = haircolorindex + 1
- else
- haircolorindex = 1
- end
- ChangeApp("HairColor", haircolors[haircolorindex])
- preview()
- end)
- Editor.HairColorDown.MouseButton1Down:connect(function()
- if haircolorindex > 1 then
- haircolorindex = haircolorindex - 1
- else
- haircolorindex = #haircolors
- end
- ChangeApp("HairColor", haircolors[haircolorindex])
- preview()
- end)
- Editor.SkinColorUp.MouseButton1Down:connect(function()
- if skinindex < #skincolors then
- skinindex = skinindex + 1
- else
- skinindex = 1
- end
- ChangeApp("Skin", skincolors[skinindex])
- preview()
- end)
- Editor.SkinColorDown.MouseButton1Down:connect(function()
- if skinindex > 1 then
- skinindex = skinindex - 1
- else
- skinindex = #skincolors
- end
- ChangeApp("Skin", skincolors[skinindex])
- preview()
- end)
- Editor.Done.MouseButton1Down:connect(function()
- Player.Character.Humanoid.WalkSpeed = 18
- Editor.Visible = false
- ChangeApp("CharMade", true)
- UpdateCharacter()
- end)
- if Player.Character:FindFirstChild("SZ) then
- _G.Zone = "Town"
- end
- gmgui.Changed:connect(function(property)
- end)
- local ChatService = game:GetService("Chat)
- local blockanim = (Player.Character.Humanoid:LoadAnimation(script.Block))
- local usanim = nil
- local idleanim2 = Player.Character.Humanoid:LoadAnimation(script.DualIdle)
- onKeyDown = function(key)
- key = key:lower()
- if key == "q" and Player.Character.Sword then
- if swordequipped == false and not swordaction and not menutoggledopen and not menuopen and not Player.Character.Humanoid.Sit then
- swordaction = true
- if assets[PlayerStats.Weapon.Value].Value == "One-Handed" or assets[PlayerStats.Weapon.Value].Value == "Rapier" then
- WeldPing:FireServer("One-Handed Held", "Right Arm")
- else
- if assets[PlayerStats.Weapon.Value].Value == "Dagger" then
- WeldPing:FireServer("Dagger Held", "Right Arm")
- else
- if assets[PlayerStats.Weapon.Value].Value == "Two-Handed" then
- WeldPing:FireServer("Two-Handed Held", "Right Arm")
- end
- end
- end
- if PlayerStats.DualWeapon.Value ~= "None" and assets[PlayerStats.DualWeapon.Value].Value == "One-Handed" and assets[PlayerStats.Weapon.Value].Value == "One-Handed" and PlayerStats["One-HandedSkill"].Value >= 250 then
- WeldPing2:FireServer("One-Handed Held", "Left Arm")
- end
- -- DECOMPILER ERROR at PC158: Unhandled construct in 'MakeBoolean' P3
- if (assets[PlayerStats.Weapon.Value].Value == "One-Handed" and not game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 1127853488) and not Player.Character:FindFirstChild("Sword2")) or assets[PlayerStats.Weapon.Value].Value == "Dagger" then
- usanim = Player.Character.Humanoid:LoadAnimation(script.Unsheath)
- else
- if assets[PlayerStats.Weapon.Value].Value == "Two-Handed" or game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 1127853488) and assets[PlayerStats.Weapon.Value].Value ~= "Rapier" and assets[PlayerStats.Weapon.Value].Value ~= "Dagger" and not Player.Character:FindFirstChild("Sword2") then
- usanim = Player.Character.Humanoid:LoadAnimation(script.Unsheath2)
- else
- if PlayerStats.DualWeapon.Value ~= "None" and assets[PlayerStats.Weapon.Value].Value == "One-Handed" and assets[PlayerStats.DualWeapon.Value].Value == "One-Handed" and Player.Character:FindFirstChild("Sword2") then
- usanim = Player.Character.Humanoid:LoadAnimation(script.DualUnsheath)
- end
- end
- end
- usanim:Play()
- local usc = script.Parent.US:clone()
- do
- usc.Parent = Player.Character.Sword.Middle
- usc:Play()
- wait(0.5)
- usanim:Stop()
- usc:remove()
- if assets[PlayerStats.Weapon.Value].Value == "One-Handed" and Player.Character:FindFirstChild("Sword2") and assets[PlayerStats.DualWeapon.Value].Value == "One-Handed" then
- idleanim2:Play()
- else
- idleanim:Play()
- end
- swordequipped = true
- swordaction = false
- end
- else
- do
- if swordequipped == true and not swordaction then
- swordaction = true
- local sc = script.Parent.S:clone()
- sc.Parent = Player.Character.Sword.Middle
- sc:Play()
- if assets[PlayerStats.Weapon.Value].Value == "One-Handed" and Player.Character:FindFirstChild("Sword2") and assets[PlayerStats.DualWeapon.Value].Value == "One-Handed" then
- idleanim2:Stop()
- else
- idleanim:Stop()
- end
- if (assets[PlayerStats.Weapon.Value].Value == "One-Handed" and not game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 1127853488)) or assets[PlayerStats.Weapon.Value].Value == "Rapier" then
- WeldPing:FireServer("One-Handed Sheath", "Torso")
- else
- if assets[PlayerStats.Weapon.Value].Value == "Dagger" then
- WeldPing:FireServer("Dagger Sheath", "Torso")
- else
- if assets[PlayerStats.Weapon.Value].Value == "Two-Handed" or ((game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 1127853488) and assets[PlayerStats.Weapon.Value].Value ~= "Rapier") or PlayerStats["One-HandedSkill"].Value >= 250) then
- WeldPing:FireServer("Two-Handed Sheath", "Torso")
- end
- end
- end
- if assets[PlayerStats.Weapon.Value].Value == "One-Handed" and Player.Character:FindFirstChild("Sword2") and assets[PlayerStats.DualWeapon.Value].Value == "One-Handed" then
- WeldPing2:FireServer("Two-Handed Sheath2", "Torso")
- end
- wait(0.2)
- sc:remove()
- swordequipped = false
- idleanim:Stop()
- swordaction = false
- end
- do
- if key == "c" and currentlyclashing and clashfolder ~= nil then
- game.ReplicatedStorage:WaitForChild("InitClashing"):FireServer(2, clashfolder[Player.Name])
- end
- if key == "e" then
- if not swordaction and swordequipped then
- swordaction = true
- blockanim:Play()
- game.ReplicatedStorage:WaitForChild("BlockValue"):FireServer(true)
- else
- if swordaction and swordequipped then
- swordaction = false
- blockanim:Stop()
- game.ReplicatedStorage:WaitForChild("BlockValue"):FireServer(false)
- end
- end
- else
- if key == "f" then
- SwordSkill()
- else
- -- DECOMPILER ERROR at PC557: Unhandled construct in 'MakeBoolean' P1
- if key == "x" and proxitem ~= nil then
- if proxitem.Name == "Sign" then
- gui.ClickSound:Play()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.25, true)
- wait(0.25)
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
- ChatService:Chat(proxitem.ProxBase, proxitem.Text.Value, "Blue")
- else
- if proxitem.Name == "Barber" then
- gui.ClickSound:Play()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.25, true)
- wait(0.25)
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
- Player.Character.Humanoid.WalkSpeed = 0
- Editor.Visible = true
- preview()
- else
- if proxitem.Name == "Fishing" and not _G.Fishing and FishingCooldown <= math.abs(tick() - _G.LastFishingTick) then
- _G.Fishing = true
- gui.ClickSound:Play()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.25, true)
- wait(0.25)
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
- game.ReplicatedStorage.FishingGame:Clone().Parent = Player.PlayerGui
- else
- if proxitem.Name == "TeleportDoor" and not entering then
- Player.Character.Humanoid.WalkSpeed = 0
- gui.ClickSound:Play()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.25, true)
- delay(0.25, function()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
- end)
- if Player.Character:FindFirstChild("Inside) then
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- gui.Music:Stop()
- Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
- exitinterior()
- Player.Character.Inside:remove()
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
- entering = false
- else
- loadinterior(proxitem.Interior.Value, Player.Nam)
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
- local inside = Instance.new("StringValue", Player.Characte)
- inside.Name = "Inside"
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
- entering = false
- end
- do
- Player.Character.Humanoid.WalkSpeed = 18
- if proxitem.Name == "Merchant" and not menutoggledopen and not menuopen then
- gui.Shop.Confirm.Visible = false
- gui.ClickSound:Play()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
- delay(0.25, function()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
- end)
- if not shopping then
- makeBuyList()
- gui.Shop.Visible = true
- shopping = true
- else
- gui.Shop.Visible = false
- shopping = false
- end
- else
- if proxitem.Name == "PlayerHome" and not entering then
- gui.ClickSound:Play()
- Player.Character.Humanoid.WalkSpeed = 0
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
- delay(0.25, function()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
- end)
- if Player.Character:FindFirstChild("Inside) then
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
- exitinterior()
- Player.Character.Inside:remove()
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
- Player.Character.Humanoid.WalkSpeed = 18
- wait(1)
- entering = false
- else
- workspace.CurrentCamera.CameraType = "Scriptable"
- workspace.CurrentCamera:Interpolate(proxitem.One.CFram, proxitem.Two.CFrame, 0.5)
- gui.Homes.Visible = true
- gui.Homes.TL.Text = proxitem.Interior.Value
- if Player.PlayerStats.Home.Value == proxitem.Interior.Value then
- gui.Homes.Enter.TextLabel.Text = "Enter"
- else
- gui.Homes.Enter.TextLabel.Text = "Buy"
- end
- gui.Homes.Preview.Image = proxitem.Preview.Value
- gui.Homes.Col.Text = "Col: " .. tostring(proxitem.Col.Value)
- getOwnerList(proxitem.Interior.Value)
- end
- else
- if proxitem.Name == "Door" and not entering then
- Player.Character.Humanoid.WalkSpeed = 0
- gui.ClickSound:Play()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
- delay(0.25, function()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
- end)
- if proxitem.Place.Value ~= "Dungeon" and proxitem.Place.Value ~= "Boss" then
- if Player.Character:FindFirstChild("Inside) then
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- gui.Music:Stop()
- Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
- Player.Character.Inside:remove()
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
- entering = false
- else
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
- local inside = Instance.new("StringValue", Player.Characte)
- inside.Name = "Inside"
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
- entering = false
- end
- else
- do
- if proxitem.Place.Value == "Dungeon" then
- if Player.Character:FindFirstChild("Dungeon) then
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- gui.Music:Stop()
- Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
- Player.Character.Dungeon:remove()
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
- _G.Zone = "Field"
- entering = false
- else
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
- local inside = Instance.new("StringValue", Player.Characte)
- inside.Name = "Dungeon"
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
- _G.Zone = "Dungeon"
- entering = false
- end
- else
- do
- if proxitem.Place.Value == "Boss" then
- if Player.Character:FindFirstChild("Boss) then
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- gui.Music:Stop()
- Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
- Player.Character.Boss:remove()
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
- _G.Zone = "Dungeon"
- entering = false
- else
- entering = true
- gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
- wait(1)
- Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
- local inside = Instance.new("StringValue", Player.Characte)
- inside.Name = "Boss"
- gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
- _G.Zone = "Boss"
- entering = false
- end
- end
- do
- Player.Character.Humanoid.WalkSpeed = 18
- if proxitem.Name == "Smithing" and not menutoggledopen and not menuopen and not Player.PlayerGui:FindFirstChild("CraftingGame) then
- gui.ClickSound:Play()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
- delay(0.25, function()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
- end)
- craftmode.Value = "Smithing"
- gui.Crafting.Visible = true
- Player.Character.Humanoid.WalkSpeed = 0
- else
- if proxitem.Name == "NPCDialog" and not dialogdeb and not gui.Dialog.Visible then
- dialogdeb = true
- gui.ClickSound:Play()
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
- wait(0.25)
- Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.25, true)
- local cam = workspace.CurrentCamera
- local dialog = proxitem:WaitForChild("Dialog")
- local camPart2 = proxitem:WaitForChild("CameraLook")
- local oldCF = cam.CoordinateFrame
- local oldFocus = cam.Focus
- Player.Character.Humanoid.WalkSpeed = 0
- Instance.new("IntValue", Player.Character).Name = "NoLockOn"
- repeat
- wait()
- until cam.CameraType ~= "Scriptable"
- cam.CameraType = "Scriptable"
- cam:Interpolate(CFrame.new((Player.Character.Head.Position + camPart2.Position) / 2), camPart2.CFrame, 1)
- local holder = gui.Dialog
- local scroll = holder.Options.Scroll
- local base = scroll.Base
- local endDialog = function()
- holder.Visible = false
- holder.Talk.Text = ""
- for _,v in pairs(scroll:children()) do
- if v.Name ~= "Base" then
- v:Remove()
- end
- end
- cam:Interpolate(oldCF, oldFocus, 1)
- wait(1)
- Player.Character.Humanoid.WalkSpeed = 18
- if Player.Character:FindFirstChild("NoLockOn") then
- Player.Character.NoLockOn:Remove()
- end
- cam.CameraType = "Custom"
- cam.CameraSubject = Player.Character.Humanoid
- end
- local getChoices = function(obj)
- for _,v in pairs(scroll:children()) do
- if v.Name ~= "Base" then
- v:Remove()
- end
- end
- local tab = obj:children()
- do
- scroll.CanvasSize = UDim2.new(0, 0, 0, 20 * #tab)
- local choicedebounce = false
- for i,v in pairs(tab) do
- local new = base:Clone()
- new.Visible = true
- new.Name = v.Name
- new.Text = v.UserDialog
- new.Position = UDim2.new(0, 0, 0, 20 * (i - 1))
- new.MouseButton1Click:connect(function()
- if choicedebounce then
- return
- end
- choicedebounce = true
- if v:FindFirstChild("QuestStart") then
- endDialog()
- else
- getChoices(v)
- end
- end)
- new.Parent = scroll
- end
- local goodbye = base:Clone()
- goodbye.Visible = true
- goodbye.Name = "DialogChoice"
- goodbye.Text = obj.GoodbyeDialog
- goodbye.Position = UDim2.new(0, 0, 0, 20 * #tab)
- goodbye.MouseButton1Click:connect(function()
- if choicedebounce then
- return
- end
- choicedebounce = true
- endDialog()
- end)
- goodbye.Parent = scroll
- if obj.Name ~= "Dialog" or not obj.InitialPrompt then
- local text = obj.ResponseDialog
- end
- for i = 1, #text, 2 do
- if choicedebounce then
- return
- end
- holder.Talk.Text = text:sub(1, i)
- gui.TXTSound:Play()
- wait()
- end
- holder.Talk.Text = text
- end
- end
- holder.Visible = true
- dialogdeb = false
- getChoices(dialog)
- else
- do
- do
- if proxitem.Name == "GMConsole" then
- local cam = workspace.CurrentCamera
- if gmgui.Adornee then
- gmgui.Adornee = nil
- gmgui.Close:Play()
- gmgui.Ambience:Stop()
- Player.CameraMode = 0
- ForceModal.Modal = false
- Player.Character.Humanoid.WalkSpeed = 18
- wait(0.)
- cam:Interpolate(gmOldCameraCF, gmOldCameraFocus, 0.25)
- wait(0.)
- FixCamera()
- else
- gmgui.Adornee = proxitem.MainScreen
- gmgui.Open:Play()
- gmgui.Ambience:Play()
- gmOldCameraCF = cam.CoordinateFrame
- gmOldCameraFocus = cam.Focus
- Player.CameraMode = 1
- ForceModal.Modal = true
- Player.Character.Humanoid.WalkSpeed = 0
- cam.CameraType = "Scriptable"
- cam:Interpolate(CFrame.new(proxitem.CameraStart.Position, proxitem.MainScreen.Position), CFrame.new(proxitem.MainScreen.Position), 0.25)
- end
- for _,v in pairs(proxitem:children() do
- if v:FindFirstChild("Decal) and (not gmgui.Adornee or not 0.25) then
- do
- v.Decal.Transparency = v.Name ~= "Screen" or 1
- -- DECOMPILER ERROR at PC1902: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC1902: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- if key:byte() == 9 and not swordaction and not shopping and not craftingnow then
- if menutoggledopen then
- menutoggledclose = true
- menutoggledopen = false
- menuopen = true
- else
- if menutoggledclose then
- menutoggledopen = true
- menutoggledclose = false
- menuopen = false
- end
- end
- if menuopen == false and not swordequipped and not swordaction and not shopping and not craftingnow then
- menutoggledopen = true
- menutoggledclose = false
- activeModel:SetActive(tru)
- gui.Up:Play()
- clearFrames()
- clearMidFrames()
- menugui.InfoImage.Visible = true
- menugui.Menus.Position = UDim2.new(0., 0, 0.1, 0)
- menugui.InfoImage.Position = UDim2.new(0.0, 0, 0.15, 0)
- menugui:TweenPosition(UDim2.new(menugui.Position.X.Scale, menugui.Position.X.Offset, 0.5, -(mgsize.Y / 2), "Out", "Quad", 0.075, true)
- coroutine.resume(coroutine.create(function()
- for i = 1, 35 do
- if menutoggledclose or workspace.CurrentCamera.m.GuiPart.Transparency <= 0.65 then
- workspace.CurrentCamera.m.GuiPart.Transparency = 0.65
- return
- end
- workspace.CurrentCamera.m.GuiPart.Transparency = workspace.CurrentCamera.m.GuiPart.Transparency - 0.01
- wait(0.01)
- end
- end))
- gui.Switch.Modal = true
- clearFrames()
- menugui.InfoImage.PName.Text = Player.Name:upper()
- menugui.InfoImage.Col.Text = "Col: " .. PlayerStats.Col.Value
- if PlayerStats.Guild.Value ~= 0 then
- guildinfo = groupservice:GetGroupInfoAsync(PlayerStats.Guild.Valu)
- menugui.InfoImage.Image = guildinfo.EmblemUrl
- else
- menugui.InfoImage.Image = infoimg
- end
- menuopen = true
- menutoggledopen = false
- end
- menutoggledclose = true
- menutoggledopen = false
- menuopen = false
- clearFrames()
- gui.Switch.Modal = false
- gui.Down:Play()
- menugui:TweenPosition(UDim2.new(menugui.Position.X.Scale, menugui.Position.X.Offset, -1, 0, "Out", "Quad", 1, true)
- for i = 1, 35 do
- if menutoggledopen or workspace.CurrentCamera.m.GuiPart.Transparency >= 1 then
- workspace.CurrentCamera.m.GuiPart.Transparency = 1
- return
- end
- workspace.CurrentCamera.m.GuiPart.Transparency = workspace.CurrentCamera.m.GuiPart.Transparency + 0.01
- wait(0.01)
- end
- workspace.CurrentCamera.m.GuiPart.Transparency = 1
- activeModel:SetActive(fals)
- menuopen = false
- menutoggledclose = false
- else
- if key:byte() == 48 and not sprinting and not sprintdeb and not Player.Character.Humanoid.Sit and Player.Character.Humanoid.WalkSpeed > 0 and stamina.Value >= 10 then
- sprinting = true
- sprintdeb = true
- local SprintSpeed = 28
- local SprintFOV = 85
- for i = workspace.CurrentCamera.FieldOfView, SprintFOV, 2 do
- if not sprinting then
- return
- end
- workspace.CurrentCamera.FieldOfView = i
- wait()
- end
- if not sprinting then
- return
- end
- workspace.CurrentCamera.FieldOfView = SprintFOV
- Player.Character.Humanoid.WalkSpeed = SprintSpeed
- while sprinting and not Player.Character.Humanoid.Sit and Player.Character.Humanoid.WalkSpeed == SprintSpeed and stamina.Value > 0 do
- wait(0.1)
- if not sprinting or Player.Character.Humanoid.Sit or Player.Character.Humanoid.WalkSpeed ~= SprintSpeed or stamina.Value == 0 then
- KeyUp(key)
- return
- end
- stamina.Value = stamina.Value - 1
- end
- KeyUp(key)
- else
- do
- if key == "z" and Player.Party.Value ~= "" and CanZSwitch then
- CanZSwitch = false
- local Head = Player.Character.Head
- local Torso = Player.Character.Torso
- game.ReplicatedStorage:WaitForChild("ZSwitching"):FireServer(true)
- game:service("Chat"):Chat(Head, "Switch!", "Blue")
- local Vel = Instance.new("BodyVelocity")
- Vel.P = 1000
- Vel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- Vel.Velocity = Torso.CFrame.lookVector * -100
- Vel.Parent = Torso
- coroutine.resume(coroutine.create(function()
- while Vel.Parent and wait() do
- local Start = Torso.Position
- local End = Start + Torso.CFrame.lookVector * -5
- local Ray = Ray.new(Start, Start - End.unit * 5)
- local Obj, Pos = workspace:FindPartOnRayWithIgnoreList(Ray, {Player.Character}, false, true)
- if Obj then
- Vel:Remove()
- Torso.Velocity = Vector3.new()
- Torso.RotVelocity = Vector3.new()
- end
- end
- end))
- delay(0.2, function()
- Vel:Remove()
- end)
- game.ReplicatedStorage:WaitForChild("ZSwitching):FireServer(fals)
- Mates.Switch.Bar:TweenSize((UDim2.new(0, 0, , ), nil, nil, 0., tru)
- wait(0.2)
- for i = 1, 30 do
- wait()
- Mates.Switch.Bar:TweenSize((UDim2.new(i / 30, 0, 1, 0), nil, nil, 0.2, true)
- end
- CanZSwitch = true
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- end
- mouse.KeyDown:connect(onKeyDown)
- KeyUp = function(key)
- key = key:lower()
- if key:byte() == 48 and sprinting and not sprintdeb2 then
- sprinting = false
- sprintdeb2 = true
- if Player.Character.Humanoid.WalkSpeed > 0 then
- Player.Character.Humanoid.WalkSpeed = 18
- end
- for i = workspace.CurrentCamera.FieldOfView, 70, -2 do
- workspace.CurrentCamera.FieldOfView = i
- wait()
- end
- workspace.CurrentCamera.FieldOfView = 70
- sprintdeb = false
- sprintdeb2 = false
- end
- end
- mouse.KeyUp:connect(KeyUp)
- slashing = false
- slash = function()
- if Player.Character:FindFirstChild("Sword") and not Player.Character:FindFirstChild("Sword2") and not swordaction then
- swordaction = true
- local pick = math.random(1, #swordsounds)
- local pick2 = math.random(1, #script.SwordSlashes[assets[PlayerStats.Weapon.Value].Value]:GetChildren())
- local newsound = script.SwordSounds[swordsounds[pick].Name]:clone()
- newsound.Parent = Player.Character.Sword.Middle
- newsound:Play()
- local newanim = Player.Character.Humanoid:LoadAnimation(script.SwordSlashes[assets[PlayerStats.Weapon.Value].Value]:GetChildren()[pick2])
- newanim:Play()
- local gripparent = script.SwordSlashes[assets[PlayerStats.Weapon.Value].Value]:GetChildren()[pick2]
- local swordtype = assets[PlayerStats.Weapon.Value].Value
- WeldPing:FireServer(gripparent.Grip.Value, "Right Arm")
- wait(0.6)
- if swordtype ~= "Rapier" then
- WeldPing:FireServer(swordtype .. " Held", "Right Arm")
- else
- WeldPing:FireServer("One-Handed Held", "Right Arm")
- end
- newanim:Stop()
- newsound:remove()
- swordaction = false
- else
- do
- if Player.Character:FindFirstChild("Sword") and Player.Character:FindFirstChild("Sword2") and PlayerStats.DualWeapon.Value ~= "None" and PlayerStats["One-HandedSkill"].Value >= 250 and not swordaction then
- swordaction = true
- game.ReplicatedStorage:WaitForChild("InitClashing"):FireServer()
- local pick = math.random(1, #swordsounds)
- local pick2 = math.random(1, #script.SwordSlashes["Dual-Handed"]:GetChildren())
- local newsound = script.SwordSounds[swordsounds[pick].Name]:clone()
- newsound.Parent = Player.Character.Sword.Middle
- newsound:Play()
- local newanim = Player.Character.Humanoid:LoadAnimation(script.SwordSlashes["Dual-Handed"]:GetChildren()[pick2])
- newanim:Play()
- wait(0.6)
- newanim:Stop()
- newsound:remove()
- swordaction = false
- end
- end
- end
- end
- selecteditem = nil
- selectedpickup = nil
- mouse.Button1Down:connect(function()
- if not candamage and not slashing and swordequipped then
- slashing = true
- candamage = true
- slash()
- slashing = false
- candamage = false
- end
- local igpclone = game.ReplicatedStorage.ItemGuiPart:clone()
- local hit, pos = customMouse.getTarget(32, {Player.Character}, false)
- if not hit or not pos then
- return
- end
- if (hit.Name == "Base" or hit.Name == "Middle") and hit.Parent.Name == "ItemPickup" then
- if workspace.CurrentCamera:FindFirstChild("ItemGuiPart") then
- Player.PlayerGui.ItemGui.Adornee = nil
- workspace.CurrentCamera.ItemGuiPart:remove()
- end
- selecteditem = hit.Parent.Item.Value
- selectedpickup = hit.Parent
- igpclone.Parent = workspace
- igpclone.CFrame = CFrame.new(hit.Position + Vector3.new(0, 3.5, 0), workspace.CurrentCamera.CoordinateFrame.p)
- igpclone.Parent = workspace.CurrentCamera
- if hit.Parent:FindFirstChild("Col") then
- hit.Parent.Col.Value = assets[hit.Parent.Item.Value].Worth.Value
- end
- Player.PlayerGui.ItemGui.Adornee = igpclone
- Player.PlayerGui.ItemGui.Back.NL.Text = hit.Parent.Item.Value
- Player.PlayerGui.ItemGui.Back.Owner.Text = "Owner: Server"
- if hit.Parent:FindFirstChild("Col") then
- Player.PlayerGui.ItemGui.Back.TakeL.Text = "Buy For " .. tostring(hit.Parent.Col.Value) .. " Col"
- Player.PlayerGui.ItemGui.Back.Take.Visible = false
- Player.PlayerGui.ItemGui.Back.Buy.Visible = true
- end
- end
- end)
- ig = Player.PlayerGui.ItemGui
- ig.Back.Buy.MouseButton1Down:connect(function()
- if game.ReplicatedStorage:WaitForChild("ShopTransfer"):InvokeServer(true, selectedpickup.Item.Value) == true then
- selectedpickup = nil
- selecteditem = nil
- if workspace.CurrentCamera:FindFirstChild("ItemGuiPart") then
- workspace.CurrentCamera.ItemGuiPart:remove()
- end
- gui.Bag:Play()
- else
- gui.Err:Play()
- selectedpickup = nil
- if workspace.CurrentCamera:FindFirstChild("ItemGuiPart") then
- workspace.CurrentCamera.ItemGuiPart:remove()
- end
- end
- end)
- ig.Back.Inspect.MouseButton1Down:connect(function()
- if selectedpickup ~= nil then
- inspect(selectedpickup.Item.Value)
- end
- end)
- findThingWithinDistance = function(distance)
- for _,v in pairs(workspace.Interactions:GetChildren()) do
- if v:FindFirstChild("ProxBase") and not Player.Character:FindFirstChild("Inside") and Player.Character.Torso.CFrame.p - v.ProxBase.CFrame.p.magnitude <= distance then
- proxitem = v
- return v
- end
- if v:FindFirstChild("ProxBase") and Player.Character:FindFirstChild("Inside") and Player.Character.Torso.CFrame.p - v.ProxBase.CFrame.p.magnitude <= distance then
- proxitem = v
- return v
- end
- if v:FindFirstChild("ProxBase2") and Player.Character:FindFirstChild("Inside") and Player.Character.Torso.CFrame.p - v.ProxBase2.CFrame.p.magnitude <= distance then
- proxitem = v
- return v
- end
- if v:FindFirstChild("ProxBase2") and Player.Character:FindFirstChild("Dungeon") and _G.Zone == "Dungeon" and Player.Character.Torso.CFrame.p - v.ProxBase2.CFrame.p.magnitude <= distance then
- proxitem = v
- return v
- end
- if v:FindFirstChild("ProxBase2") and Player.Character:FindFirstChild("Boss") and _G.Zone == "Boss" and Player.Character.Torso.CFrame.p - v.ProxBase2.CFrame.p.magnitude <= distance then
- proxitem = v
- return v
- end
- end
- return false
- end
- local level = PlayerStats.Level
- local exp = PlayerStats.EXP
- local StatsEvent = game.ReplicatedStorage:WaitForChild("StatsEvent")
- local StatsCache = {}
- ProtectStats = function(Plr, Folder)
- if not StatsCache[Plr] then
- StatsCache[Plr] = {}
- end
- for _,v in pairs(Folder:children()) do
- do
- StatsCache[Plr][v.Name] = v.Value
- v.Changed:connect(function(value)
- if value ~= StatsCache[Plr][v.Name] then
- v.Value = StatsCache[Plr][v.Name]
- end
- end)
- end
- end
- end
- StatsEvent.OnClientEvent:connect(function(...)
- local Args = {...}
- if Args[1] == "UpdateStat" then
- local Affected = Args[2]
- local Name = Args[3]
- local Value = Args[4]
- if not StatsCache[Affected] then
- StatsCache[Affected] = {}
- end
- StatsCache[Affected][Name] = Value
- if Affected:FindFirstChild("PlayerStats") and Affected.PlayerStats:FindFirstChild(Name) then
- Affected.PlayerStats[Name].Value = Value
- end
- if Affected == Player then
- if Name == "Level" then
- gui.LevelSound:Play()
- else
- if Name:find("Skill") then
- listSwordSkills()
- else
- if Name == "Inventory" then
- listInv(invfilter, true)
- end
- end
- end
- end
- if Name == "PlayerHomePrivacy" and gui.Homes.Visible and proxitem and proxitem:FindFirstChild("Interior") then
- getOwnerList(proxitem.Interior.Value)
- end
- end
- end)
- game.Players.ChildAdded:connect(function(child)
- if child:IsA("Player") then
- ProtectStats(child, child:WaitForChild("PlayerStats"))
- end
- end)
- coroutine.resume(coroutine.create(function()
- for _,v in pairs(game.Players:GetPlayers()) do
- ProtectStats(v, v:WaitForChild("PlayerStats"))
- end
- end))
- game.ReplicatedStorage:WaitForChild("PurchaseMade).OnClientEvent:connect(function(...)
- local Args = {...}
- if Args[1] == "Barber" then
- Player.Character.Humanoid.WalkSpeed = 0
- Editor.Visible = true
- preview()
- end
- end)
- game.ReplicatedStorage:WaitForChild("LootDrop).OnClientEvent:connect(function(...)
- local Args = {...}
- if Args[1] == "ShowLoot" then
- local Exp = Args[2]
- do
- local Col = Args[3]
- local Amount = Args[4]
- local Part = game.ReplicatedStorage:WaitForChild("LootGuiPart"):Clone()
- local Back = Part.SurfaceGui.Back
- if MPService:PlayerOwnsAsset(Player, 1149834979) then
- Exp = Exp * 2
- end
- Back.Exp.Text = Exp
- Back.Col.Text = Col
- Back.Items.Text = Amount
- local Torso = Player.Character.Torso
- local Pos = Torso.CFrame + Torso.CFrame.lookVector * 3.p
- Part.CFrame = CFrame.new(Pos, workspace.CurrentCamera.CoordinateFrame.p)
- Part.Parent = workspace
- delay(4, function()
- Part:Destroy()
- end)
- while Part and Part.Parent and wait() do
- Part.CFrame = CFrame.new(Pos, workspace.CurrentCamera.CoordinateFrame.)
- end
- end
- end
- end)
- game.ReplicatedStorage:WaitForChild("StopSound).OnClientEvent:connect(function(Sound)
- if type(Sound) == "userdata" then
- Sound:Stop()
- else
- if type(Sound) == "table" then
- for _,v in pairs(Sound) do
- v:Stop()
- end
- end
- end
- end)
- game.ReplicatedStorage:WaitForChild("StaminaUpdate).OnClientEvent:connect(function(Arg)
- if Arg == "SetToFull" then
- stamina.Value = PlayerStats:WaitForChild("MaxStamina").Value
- end
- end)
- local StatusEffectImages = {Paralysis = "rbxassetid://330727828", Poison = "rbxassetid://172815017", Bleeding = ""}
- local ActiveEffects = {}
- UpdateStatusEffects = function()
- local Amount = #gui.Health.Effects:children()
- for i = 1, Amount do
- gui.Health.Effects[i].Image = ""
- end
- local Index = 1
- for Type,Active in pairs(ActiveEffects) do
- if Active then
- gui.Health.Effects[Index].Image = StatusEffectImages[Type]
- Index = Index + 1
- end
- end
- end
- game.ReplicatedStorage:WaitForChild("StatusEffect").OnClientEvent:connect(function(Mode, Type)
- ActiveEffects[Type] = ((Mode ~= "Add" or Mode == "Remove") and false)
- if Mode == "Add" then
- if Type == "Poison" then
- Player.Character.HealthRegen.Toggle:FireServer(false)
- elseif Type == "Bleeding" then
- Player.Character.HealthRegen.Toggle:FireServer(false)
- end
- elseif Mode == "Remove" then
- if Type == "Paralysis" then
- human.PlatformStand = false
- elseif Type == "Poison" and not ActiveEffects.Bleeding then
- Player.Character.HealthRegen.Toggle:FireServer(true)
- elseif Type == "Bleeding" and not ActiveEffects.Poison then
- Player.Character.HealthRegen.Toggle:FireServer(true)
- end
- end
- UpdateStatusEffects()
- -- DECOMPILER ERROR: 8 unprocessed JMP targets
- end)
- human.Changed:connect(function(prop)
- if prop == "PlatformStand" and ActiveEffects.Paralysis then
- human.PlatformStand = true
- end
- end)
- local Mobs = workspace:WaitForChild("Mobs)
- local SelectBar = function(Num, Player, Parts)
- do
- local Multiple = not Parts or Parts > 5
- for _,v in pairs(HBFolder[Player]:children()) do
- local Number = tonumber(v.Name)
- if Number then
- if Number == Num then
- v.Transparency = 0
- elseif not Multiple or (Number % 5 == 0 or not 0) then
- do
- v.Transparency = Number >= Num or 1
- if Num < Number then
- v.Transparency = 1
- end
- -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_ELSE_STMT
- -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- -- DECOMPILER ERROR: 8 unprocessed JMP targets
- end
- end
- RepImages = {"rbxassetid://318393081", "rbxassetid://318393143", "rbxassetid://318393179"}
- MatProg = gui.Collecting
- Mat = workspace:WaitForChild("Materials")
- OreInterval = 5
- TreeInterval = 10
- PlantInterval = 1
- MatDebounce = false
- for _,v in pairs(Mat:GetChildren()) do
- if #Mat:GetChildren() ~= 0 then
- v.C.D.MouseClick:connect(function()
- if v.Owner.Value == "" and v.Core.Transparency == 0 and not MatDebounce then
- MatDebounce = true
- Player.Character.Humanoid.WalkSpeed = 0
- game.ReplicatedStorage.ClaimMaterial:FireServer(v.Id.Value)
- local interval = 0
- local sound = nil
- if v:FindFirstChild("Ore") then
- interval = OreInterval
- sound = gui.Mining
- else
- if v:FindFirstChild("Tree") then
- interval = TreeInterval
- sound = gui.Chopping
- else
- interval = PlantInterval
- sound = gui.End
- end
- end
- MatProg.Visible = true
- MatProg.TextLabel.Text = "Obtaining " .. v.Name .. "..."
- MatProg.Progress.Bar:TweenSize(UDim2.new(1, 0, 1, 0), "Out", "Quad", interval, true)
- sound:Play()
- wait(interval)
- game.ReplicatedStorage.ToggleMaterial:FireServer(v.Id.Value)
- sound:Stop()
- gui.Bag:Play()
- MatProg.Progress.Bar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Quad", 0.5, true)
- MatProg.TextLabel.Text = "Obtained " .. v.Name .. "!"
- wait(0.5)
- MatProg.Visible = false
- Player.Character.Humanoid.WalkSpeed = 18
- MatDebounce = false
- end
- end)
- end
- end
- local OptionsDeb = {}
- local PassiveModePass = 1114443847
- local PartyInviteFilter = {"All", "Friends", "None"}
- local PlayerHomePrivacy = {"Everyone", "Friends", "Party", "Guild", "Locked"}
- for _,v in pairs(menugui.Frames.Options.Frame:children()) do
- if v:IsA("TextButton") then
- OptionsDeb[v] = false
- v.MouseButton1Click:connect(function()
- if OptionsDeb[v] then
- return
- end
- OptionsDeb[v] = true
- gui.ClickSound:Play()
- if v.Name == "ToggleHair" then
- game.ReplicatedStorage:WaitForChild("ChangeOption"):InvokeServer("HairStatus", not PlayerStats.HairStatus.Value)
- UpdateCharacter()
- else
- if v.Name == "TogglePassive" then
- if not MPService:PlayerOwnsAsset(Player, PassiveModePass) then
- MPService:PromptPurchase(Player, PassiveModePass)
- wait(0.5)
- OptionsDeb[v] = false
- return
- end
- if not checkSafeZone() or _G.Zone ~= "Town" then
- Notification("Option Change Failed", "You must be in a safezone to change your passive mode.", "rbxassetid://268373553", nil)
- wait(0.5)
- OptionsDeb[v] = false
- return
- end
- game.ReplicatedStorage:WaitForChild("ChangeOption"):InvokeServer("PassiveMode", not PlayerStats.PassiveMode.Value)
- UpdateCharacter()
- else
- if v.Name == "PartyInviteFilter" then
- local Current = PlayerStats.PartyInviteFilter.Value
- for i,v in pairs(PartyInviteFilter) do
- if Current:lower() == v:lower() then
- if not PartyInviteFilter[i + 1] then
- local New = PartyInviteFilter[1]
- end
- game.ReplicatedStorage:WaitForChild("ChangeOption"):InvokeServer("PartyInviteFilter", New)
- break
- end
- end
- else
- do
- if v.Name == "PlayerHomePrivacy" then
- local Current = PlayerStats.PlayerHomePrivacy.Value
- for i,v in pairs(PlayerHomePrivacy) do
- if Current:lower() == v:lower() then
- if not PlayerHomePrivacy[i + 1] then
- local New = PlayerHomePrivacy[1]
- end
- game.ReplicatedStorage:WaitForChild("ChangeOption"):InvokeServer("PlayerHomePrivacy", New)
- break
- end
- end
- end
- do
- wait(0.5)
- OptionsDeb[v] = false
- end
- end
- end
- end
- end
- end)
- end
- end
- Player.Character.Humanoid.Died:connect(function()
- if ginterior.Value ~= "" then
- exitinterior()
- end
- inside.Value = false
- ginterior.Value = ""
- game.ReplicatedStorage.IntValuesChanged:FireServer(false, "")
- if checkSafeZone() == true then
- _G.Zone = "Town"
- else
- _G.Zone = "Field"
- end
- if workspace.CurrentCamera:FindFirstChild("m") then
- workspace.CurrentCamera.m:Destroy()
- end
- end)
- Player.PlayerGui.GameGui.TradeInvite.Options.No.MouseButton1Down:connect(function()
- local v = "Reset"
- game.ReplicatedStorage.TradeInvite:FireServer(v)
- end)
- while 1 do
- wait(0.025)
- if Player.Trader.Value ~= "None" then
- local man = game.Players:GetPlayerByUserId(Player.Trader.Valu)
- Player.PlayerGui.GameGui.TradeInvite.Content.Text = man.Name .. " has invited you trade."
- Player.PlayerGui.GameGui.TradeInvite.Visible = true
- else
- do
- Player.PlayerGui.GameGui.TradeInvite.Visible = false
- gui.Health.Health.Ring.Rotation = gui.Health.Health.Ring.Rotation + 1
- if findThingWithinDistance(8) then
- local thing = proxitem
- if thing.Name == "Sign" then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Read Sign"
- end
- if thing.Name == "Merchant" then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Speak to Merchant"
- end
- if thing.Name == "Barber" then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Change Character"
- end
- if thing.Name == "Door" then
- if Player.Character:FindFirstChild("Inside) then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase2
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Place.Value
- else
- if Player.Character:FindFirstChild("Dungeon) and _G.Zone == "Dungeon" then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase2
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Place.Value
- else
- if Player.Character:FindFirstChild("Boss) and _G.Zone == "Boss" then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase2
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Place.Value
- else
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Enter " .. thing.Place.Value
- end
- end
- end
- end
- if thing.Name == "PlayerHome" then
- if Player.Character:FindFirstChild("Inside) then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase2
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Interior.Value
- else
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Enter " .. thing.Interior.Value
- end
- end
- if thing.Name == "GuildHome" and Player.PlayerStats.Guild.Value == thing.Guild.Value then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- if Player.Character:FindFirstChild("Inside) then
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Interior.Value
- else
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Enter " .. thing.Interior.Value
- end
- end
- if thing.Name == "TeleportDoor" then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- if Player.Character:FindFirstChild("Inside) then
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Interior.Value
- else
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Enter " .. thing.Interior.Value
- end
- end
- if thing.Name == "Smithing" then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Blacksmithing"
- end
- if thing.Name == "Fishing" and not _G.Fishing then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = FishingCooldown <= math.abs(tick() - _G.LastFishingTic) and "Start Fishing" or "5 minute cooldown"
- end
- if thing.Name == "NPCDialog" then
- if not gui.Dialog.Visible then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = thing.InteractText.Value
- else
- Player.PlayerGui.InteractionGui.Adornee = nil
- end
- end
- if thing.Name == "GMConsole" then
- Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
- Player.PlayerGui.InteractionGui.Base.TextLabel.Text = not gmgui.Adornee and "Open GM Console" or "Close GM Console"
- end
- else
- do
- Player.PlayerGui.InteractionGui.Adornee = nil
- proxitem = nil
- shopping = false
- gui.Shop.Visible = false
- do
- if gui.Homes.Visible then
- local cam = workspace.CurrentCamera
- cam.CameraType = "Custom"
- cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
- gui.Homes.Visible = false
- Player.Character.Humanoid.WalkSpeed = 18
- end
- if workspace.CurrentCamera:FindFirstChild("ItemGuiPart) then
- workspace.CurrentCamera.ItemGuiPart.CFrame = CFrame.new(workspace.CurrentCamera.ItemGuiPart.Positio, workspace.CurrentCamera.CoordinateFrame.p)
- end
- gui.Health.NameLabel.Text = string.upper(Player.Nam) .. " | HP:" .. math.floor(Player.Character.Humanoid.Health) .. "/" .. Player.Character.Humanoid.MaxHealth
- menugui.InfoImage.Col.Text = "Col: " .. tostring(PlayerStats.Col.Valu)
- menugui.InfoImage.Exp.Text = "EXP: " .. tostring(exp.Valu) .. "/" .. tostring(neededExp(level.Value))
- menugui.InfoImage.Level.Text = "Level: " .. tostring(level.Valu)
- gui.Health.AP.TextLabel.Text = "AP - " .. tostring(gui.AP.Valu) .. "/300"
- gui.Health.AP.Bar.Size = UDim2.new(gui.AP.Value / 30, , 1, 0)
- gui.Health.Stamina.TextLabel.Text = "Stamina - " .. gui.Stamina.Value .. "/" .. PlayerStats.MaxStamina.Value
- gui.Health.Stamina.Bar.Size = UDim2.new(gui.Stamina.Value / PlayerStats.MaxStamina.Valu, , 1, 0)
- if not RepImages[PlayerStats.Rep.Value + 1] then
- gui.Health.Rep.Image = RepImages[1]
- gui.Health.PassiveMode.Visible = PlayerStats.PassiveMode.Value
- if Player.Character:FindFirstChild("BlockValue) and Player.Character.BlockValue.Value and (not swordequipped or not swordaction) then
- game.ReplicatedStorage:WaitForChild("BlockValue):FireServer(fals)
- end
- for i = 1, 3 do
- local Person = Mates:FindFirstChild(i)
- if Person.PlayerName.Text ~= "" then
- local Find = game.Players:FindFirstChild(Person.PlayerName.Tex)
- if Find and Find.Character and Find.Character:FindFirstChild("Humanoid") then
- local Human = Find.Character.Humanoid
- Person.Health.Base:TweenPosition(UDim2.new(Human.Health / Human.MaxHealth - 1, 0, 0, 0), "Out", "Quad", 0.1, true, nil)
- Person.Health.Base.Bar:TweenPosition(UDim2.new(1 - Human.Health / Human.MaxHealth, 0, 0, 0), "Out", "Quad", 0.1, true, nil)
- if Human.Health <= Human.MaxHealth * 0.3 then
- Person.Health.Base.Bar.ImageColor3 = Color3.new(1, 0, 0)
- else
- if Human.MaxHealth * 0.3 < Human.Health and Human.Health < Human.MaxHealth * 0.7 then
- Person.Health.Base.Bar.ImageColor3 = Color3.new(1, 0.66666666666667, 0)
- else
- if Human.MaxHealth * 0.7 <= Human.Health then
- Person.Health.Base.Bar.ImageColor3 = Color3.new(1, 1, 1)
- end
- end
- end
- end
- end
- end
- if Party.Value ~= "" then
- Mates.Switch.Visible = true
- else
- Mates.Switch.Visible = false
- end
- for _,v in pairs(game.Players:GetPlayers()) do
- if v:FindFirstChild("PlayerStats) and v.Character and v.Character:FindFirstChild("Head) and v.Character:FindFirstChild("Humanoid) and 0 < v.Character.Humanoid.Health and v.Character.Parent ~= game.Lighting and (HBFolder:FindFirstChild(v.Nam)) == nil and v.Name ~= Player.Name then
- local HB = createHB(v.Name, tru)
- local HW = HB.GuiPart.HeadWeld
- HW.Part0 = v.Character.Head
- HW.Part1 = HB.GuiPart
- end
- end
- for _,v in pairs(Mobs:GetChildren()) do
- local IsBoss = (v:FindFirstChild("IsBoss) and false)
- local HB = createHB(v.Nam, false, v.Mob.Value, IsBoss)
- HB.Rep.BrickColor = BrickColor.new("Really red")
- local HW = HB.GuiPart.HeadWeld
- HW.Part0 = v.Head
- HW.Part1 = HB.GuiPart
- end
- for _,h in pairs(HBFolder:GetChildren()) do
- local plr = game.Players:FindFirstChild(h.Nam)
- if h:FindFirstChild("GuiPart") and h.GuiPart:FindFirstChild("HeadWeld") then
- if plr and h:FindFirstChild("IsPlayer") then
- local stats = plr:FindFirstChild("PlayerStats")
- if stats and plr.Character and plr.Character:FindFirstChild("Head") and plr.Character:FindFirstChild("Humanoid") and 0 < plr.Character.Humanoid.Health and plr.Character.Parent ~= game.Lighting then
- local hpos = plr.Character.Head.Position
- local CJ = CFrame.new(hpos)
- local New = CFrame.new(hpos + Vector3.new(0.4, 2.4, 0), workspace.CurrentCamera.CoordinateFrame.p)
- h.GuiPart.HeadWeld.C0 = plr.Character.Head.CFrame:inverse() * CJ
- h.GuiPart.HeadWeld.C1 = New:inverse() * CJ
- local hum = plr.Character.Humanoid
- local hp = hum.Health
- local max = hum.MaxHealth
- local percent = hp / max * 100
- if 0 <= percent and percent < 20 then
- SelectBar(1, h.Name)
- elseif 20 <= percent and percent < 40 then
- SelectBar(2, h.Name)
- elseif 40 <= percent and percent < 60 then
- SelectBar(3, h.Name)
- elseif 60 <= percent and percent < 80 then
- SelectBar(4, h.Name)
- elseif 80 <= percent then
- SelectBar(5, h.Name)
- end
- if (stats.Rep.Value ~= 0 or not "Lime green") and (stats.Rep.Value ~= 1 or not "Deep orange") then
- do
- do
- h.Rep.BrickColor = BrickColor.new(not stats:FindFirstChild("Rep") or "Really red")
- if stats:FindFirstChild("PassiveMode") then
- h.GuiPart2.PassiveMode.ImageLabel.Visible = stats.PassiveMode.Value
- end
- h:Destroy()
- do
- do
- local mob = Mobs:FindFirstChild(h.Name)
- if mob and mob:FindFirstChild("Head") and mob:FindFirstChild("Humanoid") and 0 < mob.Humanoid.Health then
- local hpos = mob.Head.Position
- local CJ = CFrame.new(hpos)
- local New = CFrame.new(hpos + Vector3.new(0.4, 2.4, 0), workspace.CurrentCamera.CoordinateFrame.p)
- h.GuiPart.HeadWeld.C0 = mob.Head.CFrame:inverse() * CJ
- h.GuiPart.HeadWeld.C1 = New:inverse() * CJ
- local hum = mob.Humanoid
- local hp = hum.Health
- local max = hum.MaxHealth
- local percent = hp / max * 100
- local bars = nil
- if mob:FindFirstChild("IsBoss") then
- bars = 3
- else
- bars = 1
- end
- local parts = 100 / (5 * bars)
- local nextpercent = 0
- for i = 1, 5 * bars do
- nextpercent = nextpercent + parts
- local current = nextpercent - parts
- if 100 - parts <= percent then
- SelectBar(5 * bars, h.Name, 5 * bars)
- break
- elseif current <= percent and percent < nextpercent then
- SelectBar(i, h.Name, 5 * bars)
- end
- end
- else
- h:Destroy()
- end
- h:Destroy()
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC2990: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- end
- end
- end
- end
- end
- for _,v in pairs(menugui.Frames.Stats.Frame:children()) do
- if v:IsA("TextLabel) and PlayerStats:FindFirstChild(v.Nam) then
- local Stat = PlayerStats[v.Name]
- v.Text = v.Name .. " | " .. Stat.Value .. (v.Name:find("Skill") and "/500" or "")
- end
- end
- for _,c in pairs(game.Players:GetChildren()) do
- -- DECOMPILER ERROR at PC3095: Unhandled construct in 'MakeBoolean' P1
- if c ~= game.Players.LocalPlayer and c:FindFirstChild("Inside) and c.Inside.Value == true and c:WaitForChild("Interior).Value ~= ginterior.Value and c.Character and c.Character.Parent ~= game.Lighting then
- c.Character.Torso.CFrame = CFrame.new(math.random(100, 50000), math.random(10000, 50000), math.random(100, 50000))
- c.Character.Parent = game.Lighting
- end
- if c.Character and c.Character.Parent ~= workspace then
- c.Character.Parent = workspace
- c.Character:MakeJoints()
- end
- if c.Character and c.Character.Parent ~= workspace then
- c.Character.Parent = workspace
- c.Character:MakeJoints()
- end
- end
- menugui.Frames.Options.Frame.ToggleHair.TextLabel.Text = "Hair [" .. (PlayerStats.HairStatus.Value and "ON" or "OFF") .. "]"
- menugui.Frames.Options.Frame.TogglePassive.TextLabel.Text = "Passive Mode [" .. (PlayerStats.PassiveMode.Value and "ON" or "OFF") .. "]"
- menugui.Frames.Options.Frame.PartyInviteFilter.TextLabel.Text = "Party Invite Filter [" .. PlayerStats.PartyInviteFilter.Value:upper() .. "]"
- menugui.Frames.Options.Frame.PlayerHomePrivacy.TextLabel.Text = "Player Home Privacy [" .. PlayerStats.PlayerHomePrivacy.Value:upper() .. "]"
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out IF_THEN_STMT
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out IF_ELSE_STMT
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out IF_STMT
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out DO_STMT
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out IF_ELSE_STMT
- -- DECOMPILER ERROR at PC3209: LeaveBlock: unexpected jumping out IF_STMT
- end
- end
- end
- end
- end
- end
- end
- end
- -- DECOMPILER ERROR: 31 unprocessed JMP targets
- end
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement