Advertisement
iiFlamez

Untitled

Nov 6th, 2017
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 120.98 KB | None | 0 0
  1. -- params : ...
  2.  
  3. wait(1)
  4. local Player = game.Players.LocalPlayer
  5. local mouse = Player:GetMouse()
  6. local gui = script.Parent:WaitForChild("GameGui")
  7. local menugui = gui:WaitForChild("MenuGui")
  8. local gmgui = script.Parent:WaitForChild("GMConsole")
  9. local gsre = game.ReplicatedStorage:WaitForChild("GlobalSave")
  10. if not workspace.CurrentCamera:FindFirstChild("HBGuis") then
  11. local HBFolder = Instance.new("Folder", workspace.CurrentCamera)
  12. end
  13. HBFolder.Name = "HBGuis"
  14. for _,v in pairs(HBFolder:GetChildren()) do
  15. v:Destroy()
  16. end
  17. Player.CanLoadCharacterAppearance = false
  18. repeat
  19. wait()
  20. until Player.Character
  21. Player.Character:WaitForChild("Head")
  22. Player.Character:WaitForChild("Torso")
  23. assets = game.ReplicatedStorage:WaitForChild("BuildAssets"):InvokeServer()
  24. local PlayerStats = Player:WaitForChild("PlayerStats")
  25. local tweenAPI = require(game.ReplicatedStorage:WaitForChild("TweenCFrame"))
  26. local Module3D = require(game.ReplicatedStorage:WaitForChild("Module3D"))
  27. local dataoriginal = menugui.Menus.Data.Image
  28. local playeroriginal = menugui.Menus.Player.Image
  29. local playersoriginal = menugui.Menus.Players.Image
  30. local messageoriginal = menugui.Menus.Message.Image
  31. local settingsoriginal = menugui.Menus.Settings.Image
  32. local skillspos = gui.Skills.Position
  33. local playerpos = gui.Player.Position
  34. local invpos = gui.Inventory.Position
  35. local respos = gui.Resources.Position
  36. local settingspos = gui.Settings.Position
  37. local ForceModal = script.Parent.ForceModal.Frame.TextButton
  38. local gmOldCameraCF, gmOldCameraFocus, proxitem = nil, nil, nil
  39. print("Things set")
  40. local hbsize = gui.Health.AbsoluteSize
  41. gui.Health.Size = UDim2.new(0, hbsize.Y * 9.931, 0, hbsize.Y)
  42. local mgsize = menugui.AbsoluteSize
  43. menugui.Size = UDim2.new(0, mgsize.Y * 0.96969696969697, 0, mgsize.Y)
  44. local mgpos = menugui.AbsolutePosition
  45. menugui.Position = menugui.Position - UDim2.new(0, mgsize.Y * 0.96969696969697 / 2, 1, 0)
  46. print("Gui Sizes Set")
  47. local CanZSwitch = true
  48. stamina = gui:WaitForChild("Stamina")
  49. stamina.Value = PlayerStats:WaitForChild("MaxStamina").Value
  50. workspace.CurrentCamera.FieldOfView = 70
  51. local lastjump = 0
  52. local human = Player.Character:WaitForChild("Humanoid")
  53. human.WalkSpeed = 18
  54. local swimming = false
  55. human.Running:connect(function()
  56. swimming = false
  57. end)
  58. human.Swimming:connect(function()
  59. swimming = true
  60. end)
  61. human.Changed:connect(function(prop)
  62. if prop == "Jump" and not swimming then
  63. if math.abs(tick() - lastjump) < 1.5 or stamina.Value < 10 then
  64. human.Jump = false
  65. else
  66. lastjump = tick()
  67. stamina.Value = stamina.Value - 10
  68. end
  69. end
  70. end)
  71. neededExp = function(lvl)
  72. lvl = lvl - 1
  73. local total = 9
  74. for i = 1, lvl do
  75. total = total + 6 * (i + 1)
  76. end
  77. return total
  78. end
  79.  
  80. local menuopen = false
  81. local menumoving = false
  82. local menutoggledclose = false
  83. local menutoggledopen = false
  84. local consuming = false
  85. local sprinting = false
  86. local sprintdeb = false
  87. local sprintdeb2 = false
  88. local ordefault = Color3.new(0.29411764705882, 0.29411764705882, 0.29411764705882)
  89. local orhover = Color3.new(0.066666666666667, 0.56470588235294, 1)
  90. local infoimg = "rbxassetid://231761206"
  91. local guildinfo = {}
  92. local groupservice = game:GetService("GroupService")
  93. if PlayerStats.Guild.Value ~= 0 then
  94. guildinfo = groupservice:GetGroupInfoAsync(PlayerStats.Guild.Value)
  95. menugui.InfoImage.Image = guildinfo.EmblemUrl
  96. else
  97. menugui.InfoImage.Image = infoimg
  98. end
  99. print("Got past guild check")
  100. _G.Fishing = false
  101. if not _G.LastFishingTick then
  102. _G.LastFishingTick = 0
  103. end
  104. FishingCooldown = 300
  105. craftingnow = false
  106. _G.CraftingVictory = nil
  107. usingswordskill = false
  108. Notification = function(Header, Text, Image, Timed)
  109. Image = tostring(Image)
  110. local New = game.ReplicatedStorage:WaitForChild("Notification"):Clone()
  111. New.Frame.Header.Text = Header
  112. New.Frame:FindFirstChild("Text").Text = Text
  113. New.Frame.Image.Image = "rbxassetid://" .. (Image:find("invpics") == 1 and invpics[Image:sub(8)] or Image)
  114. if not Timed then
  115. local Debounce = false
  116. do
  117. New.Frame.Ok.MouseButton1Click:connect(function()
  118. if Debounce then
  119. return
  120. end
  121. Debounce = true
  122. gui.ClickSound:Play()
  123. New.Frame.Ok.Button:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  124. wait(0.2)
  125. New.Frame.Ok.Button:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
  126. New.Frame:TweenPosition((UDim2.new(0.25, 0, -0.4, 0)), nil, nil, 0.25, true)
  127. wait(0.25)
  128. New:Destroy()
  129. end)
  130. end
  131. else
  132. do
  133. New.Frame.Ok.Visible = false
  134. New.Parent = Player.PlayerGui
  135. New.Frame:TweenPosition((UDim2.new(0.2, 0, 0.4, 0)), ni, nil, 0.25, true)
  136. delay(0.25, function()
  137. if Timed then
  138. wait(Timed)
  139. New.Frame:TweenPosition((UDim2.new(0.25, 0, -0.4, 0)), nil, nil, 0.25, true)
  140. wait(0.25)
  141. New:Destroy()
  142. end
  143. end)
  144. end
  145. end
  146. end
  147.  
  148. findDuelShow = function(player)
  149. for _,v in pairs(workspace:children()) do
  150. if v.Name == "DuelShow" and (v.Player1.Value == player or v.Player2.Value == player) then
  151. return v
  152. end
  153. end
  154. end
  155.  
  156. FixCamera = function()
  157. local cam = workspace.CurrentCamera
  158. cam.CameraType = "Custom"
  159. cam.CameraSubject = Player.Character.Humanoid
  160. end
  161.  
  162. clearFrames = function()
  163. for _,v in pairs(menugui.Frames:GetChildren()) do
  164. v.Visible = false
  165. end
  166. end
  167.  
  168. clearMidFrames = function()
  169. for _,v in pairs(menugui.MidFrames:GetChildren()) do
  170. v.Visible = false
  171. end
  172. end
  173.  
  174. Explode = function(Divider, Text)
  175. if Text == "" or type(Text) ~= "string" then
  176. return {""}
  177. end
  178. if Divider == "" or type(Divider) ~= "string" then
  179. return {Text}
  180. end
  181. local Position, Words = 0, {}
  182. for Start,Stop in function()
  183. return string.find(Text, Divider, Position, true)
  184. end
  185. do
  186. table.insert(Words, string.sub(Text, Position, Start - 1))
  187. Position = Stop + 1
  188. end
  189. table.insert(Words, string.sub(Text, Position))
  190. return Words
  191. end
  192.  
  193. RemoveItem = function(item, amount)
  194. game.ReplicatedStorage:WaitForChild("RemoveItem"):InvokeServer(item, amount)
  195. end
  196.  
  197. getTable = function()
  198. local divider = ","
  199. local text = PlayerStats.Inventory.Value
  200. local stuff = Explode(divider, text)
  201. return stuff
  202. end
  203.  
  204. getcount = function(tab, item)
  205. local number = 0
  206. for i,v in pairs(tab) do
  207. if v == item then
  208. number = number + 1
  209. end
  210. end
  211. return number
  212. end
  213.  
  214. weldit = function(what, where, colorit, colorref, attach)
  215. local hm = what:clone()
  216. hm.Parent = where.Parent
  217. local C = hm:GetChildren()
  218. for i = 1, #C do
  219. if C[i]:IsA("BasePart") then
  220. local W = Instance.new("Weld")
  221. W.Part0 = hm.Middle
  222. W.Part1 = C[i]
  223. local CJ = CFrame.new(hm.Middle.Position)
  224. local C0 = hm.Middle.CFrame:inverse() * CJ
  225. local C1 = C[i].CFrame:inverse() * CJ
  226. W.C0 = C0
  227. W.C1 = C1
  228. W.Parent = hm.Middle
  229. end
  230. do
  231. do
  232. local Y = Instance.new("Weld")
  233. Y.Part0 = where
  234. Y.Part1 = hm.Middle
  235. Y.C0 = CFrame.new(0, 0, 0)
  236. Y.Parent = Y.Part0
  237. -- DECOMPILER ERROR at PC59: LeaveBlock: unexpected jumping out DO_STMT
  238.  
  239. end
  240. end
  241. end
  242. local h = hm:GetChildren()
  243. for i = 1, #h do
  244. h[i].Anchored = false
  245. h[i].CanCollide = false
  246. if colorit == true and h[i].Name == "ColorPart" then
  247. h[i].BrickColor = BrickColor.new(colorref)
  248. end
  249. end
  250. end
  251.  
  252. createHB = function(Plr, IsPlayer, OptOverhead, IsBoss)
  253. local HB = nil
  254. if not IsBoss then
  255. HB = game.ReplicatedStorage:WaitForChild("HBModel"):clone()
  256. else
  257. HB = game.ReplicatedStorage:WaitForChild("HBModelBoss"):clone()
  258. end
  259. HB.Name = Plr
  260. local ActualPlr = nil
  261. if IsPlayer then
  262. ActualPlr = game.Players:FindFirstChild(Plr)
  263. if ActualPlr then
  264. if ActualPlr:GetRankInGroup(3534864) >= 252 then
  265. HB.GuiPart.SurfaceGui.TextLabel.Text = "[Game-Master] " .. Plr
  266. else
  267. if ActualPlr:GetRankInGroup(3534864) == 120 then
  268. HB.GuiPart.SurfaceGui.TextLabel.Text = "[Dev Assistant] " .. Plr
  269. else
  270. if ActualPlr:GetRankInGroup(3534864) == 100 then
  271. HB.GuiPart.SurfaceGui.TextLabel.Text = "[Developer] " .. Plr
  272. else
  273. if ActualPlr:GetRankInGroup(3534864) == 90 then
  274. HB.GuiPart.SurfaceGui.TextLabel.Text = "[Head-Administrator] " .. Plr
  275. else
  276. if ActualPlr:GetRankInGroup(3534864) == 80 then
  277. HB.GuiPart.SurfaceGui.TextLabel.Text = "[Administrator] " .. Plr
  278. else
  279. if ActualPlr:GetRankInGroup(3534864) == 70 then
  280. HB.GuiPart.SurfaceGui.TextLabel.Text = "[Manager] " .. Plr
  281. else
  282. if ActualPlr:GetRankInGroup(3534864) == 50 then
  283. HB.GuiPart.SurfaceGui.TextLabel.Text = "[Moderator] " .. Plr
  284. else
  285. HB.GuiPart.SurfaceGui.TextLabel.Text = Plr
  286. end
  287. end
  288. end
  289. end
  290. end
  291. end
  292. end
  293. if ActualPlr:WaitForChild("PlayerStats").Guild.Value ~= 0 then
  294. HB.GuiPart.SurfaceGui.IL.Image = groupservice:GetGroupInfoAsync(ActualPlr.PlayerStats.Guild.Value).EmblemUrl
  295. end
  296. Instance.new("IntValue", HB).Name = "IsPlayer"
  297. end
  298. else
  299. HB.GuiPart.SurfaceGui.TextLabel.Text = OptOverhead and OptOverhead or Plr
  300. end
  301. local hm = HB
  302. local C = hm:GetChildren()
  303. for i = 1, #C do
  304. if C[i]:IsA("BasePart") then
  305. local W = Instance.new("Weld")
  306. W.Part0 = hm.GuiPart
  307. W.Part1 = C[i]
  308. local CJ = CFrame.new(hm.GuiPart.Position)
  309. local C0 = hm.GuiPart.CFrame:inverse() * CJ
  310. local C1 = C[i].CFrame:inverse() * CJ
  311. W.C0 = C0
  312. W.C1 = C1
  313. W.Parent = hm.GuiPart
  314. end
  315. end
  316. local h = hm:GetChildren()
  317. for i = 1, #h do
  318. if h[i]:IsA("BasePart") then
  319. h[i].Anchored = false
  320. h[i].CanCollide = false
  321. end
  322. end
  323. local HW = Instance.new("Weld")
  324. HW.Name = "HeadWeld"
  325. HW.Parent = HB.GuiPart
  326. HB.Parent = HBFolder
  327. print("Made HB for " .. Plr)
  328. return HB
  329. end
  330.  
  331. szfloors = {1, 10, 20, 30, 40, 50, 65, 76, 84, 95}
  332. checkSafeZone = function()
  333. for i,v in pairs(szfloors) do
  334. if workspace.GameLoader.Options.Floor.Value == v then
  335. return true
  336. end
  337. end
  338. return false
  339. end
  340.  
  341. _G.Zone = "Field"
  342. if checkSafeZone() == true then
  343. _G.Zone = "Town"
  344. else
  345. _G.Zone = "Field"
  346. end
  347. if workspace.GameLoader.Options:FindFirstChild("Amb") then
  348. gui.Amb.SoundId = game.ReplicatedStorage:WaitForChild("Soundtrack")[workspace.GameLoader.Options.Amb.Value].SoundId
  349. gui.Amb.Pitch = game.ReplicatedStorage.Soundtrack[workspace.GameLoader.Options.Amb.Value].Pitch
  350. gui.Amb:Play()
  351. end
  352. UpdateCharacter = function()
  353. game.ReplicatedStorage:WaitForChild("UpdateChar"):InvokeServer()
  354. end
  355.  
  356. swordequipped = false
  357. local idleanim = Player.Character.Humanoid:LoadAnimation(script.Idle)
  358. local skillanim = Player.Character.Humanoid:LoadAnimation(script.SkillReady)
  359. swordaction = false
  360. swordsounds = script.SwordSounds:GetChildren()
  361. candamage = false
  362. SwordConnect = function()
  363. local sword = Player.Character:WaitForChild("Sword")
  364. sword.Middle.Touched:connect(function(hit)
  365. if candamage and hit.Parent:FindFirstChild("Humanoid") then
  366. candamage = false
  367. local victim = game.Players:GetPlayerFromCharacter(hit.Parent)
  368. if victim then
  369. local myopponent = Player.Character:FindFirstChild("DuelOpponent")
  370. local hisopponent = victim.Character:FindFirstChild("DuelOpponent")
  371. local nodamage = victim.Character:FindFirstChild("NoDamage")
  372. if nodamage or ((myopponent and not hisopponent) or myopponent or hisopponent) then
  373. return
  374. end
  375. if myopponent and hisopponent and myopponent.Value == victim and hisopponent.Value == Player then
  376. game.ReplicatedStorage:WaitForChild("DamagePlayer"):FireServer(victim, usingswordskill)
  377. else
  378. if not hit.Parent:FindFirstChild("SZ") and victim.PlayerStats.Level.Value >= 10 and PlayerStats.Level.Value >= 10 then
  379. game.ReplicatedStorage:WaitForChild("DamagePlayer"):FireServer(victim, usingswordskill)
  380. end
  381. end
  382. else
  383. do
  384. game.ReplicatedStorage:WaitForChild("DamageMob"):FireServer(hit.Parent.Humanoid, usingswordskill)
  385. end
  386. end
  387. end
  388. end)
  389. end
  390.  
  391. SwordConnect()
  392. SwordSkill = function()
  393. if Player.Character.Sword and swordequipped and not swordaction then
  394. local asset = assets[Player.PlayerStats.Weapon.Value]
  395. if not asset then
  396. return
  397. end
  398. local module = script.SwordSkills[asset.Value]:FindFirstChild(Player.PlayerStats.CurrentSkill.Value)
  399. if not module then
  400. return
  401. end
  402. local data = require(module)
  403. local skillrequirement = data.RequiredSkillLevel
  404. local order = data.AnimationOrder
  405. local cost = data.RequiredAP
  406. if Player.PlayerStats[asset.Value .. "Skill"].Value < skillrequirement then
  407. return
  408. end
  409. if gui.AP.Value < cost then
  410. return
  411. end
  412. swordaction = true
  413. gui.AP.Value = gui.AP.Value - cost
  414. skillanim:Play()
  415. game.ReplicatedStorage:WaitForChild("SSEffect"):InvokeServer(module.Name)
  416. wait(1)
  417. swordaction = false
  418. end
  419. end
  420.  
  421. currentlyclashing = false
  422. clashfolder = nil
  423. game.ReplicatedStorage:WaitForChild("InitClashing").OnClientEvent:connect(function(Folder)
  424. Player.Character.Humanoid.WalkSpeed = 0
  425. local myownvalue = Folder:WaitForChild(Player.Name)
  426. currentlyclashing = true
  427. swordaction = true
  428. clashfolder = Folder
  429. local gui = game.ReplicatedStorage:WaitForChild("Clash"):Clone()
  430. gui.Parent = Player.PlayerGui
  431. wait(3)
  432. gui:remove()
  433. local folder2 = nil
  434. for _,folder2value in pairs(Folder:GetChildren()) do
  435. if folder2value.Name ~= Player.Name then
  436. folder2 = folder2value
  437. end
  438. end
  439. if folder2.Value < Folder:WaitForChild(Player.Name).Value then
  440. game.ReplicatedStorage:WaitForChild("InitClashing"):FireServer(3, Folder, folder2.Name)
  441. end
  442. clashfolder = nil
  443. swordaction = false
  444. currentlyclashing = false
  445. Player.Character.Humanoid.WalkSpeed = 16
  446. end)
  447. game.ReplicatedStorage:WaitForChild("SSEffect).OnClientInvoke = function()
  448. skillanim:Stop()
  449. local WeldPing = game.ReplicatedStorage:WaitForChild("ChangeWeld")
  450. local asset = assets[Player.PlayerStats.Weapon.Value]
  451. local module = script.SwordSkills[asset.Value]:FindFirstChild(Player.PlayerStats.CurrentSkill.Value)
  452. local order = require(module).AnimationOrder
  453. candamage = true
  454. usingswordskill = true
  455. for _,v in pairs(order) do
  456. local name = v.Anim
  457. local waittime = v.Wait
  458. local speedmult = v.Speed
  459. local pick = math.random(1, #swordsounds)
  460. local newsound = script.SwordSounds[swordsounds[pick].Name]:clone()
  461. newsound.Parent = Player.Character.Sword.Middle
  462. newsound:Play()
  463. local baseanim = script.SwordSlashes[asset.Value][name]
  464. WeldPing:FireServer(baseanim.Grip.Value, "Right Arm")
  465. local newanim = Player.Character.Humanoid:LoadAnimation(baseanim)
  466. newanim:Play(nil, nil, speedmult)
  467. wait(waittime)
  468. newanim:Stop()
  469. newsound:remove()
  470. wait(0.1)
  471. end
  472. if assets[PlayerStats.Weapon.Value].Value == "One-Handed" then
  473. WeldPing:FireServer("One-Handed Held", "Right Arm")
  474. else
  475. if assets[PlayerStats.Weapon.Value].Value == "Rapier" then
  476. WeldPing:FireServer("One-Handed Held", "Right Arm")
  477. else
  478. if assets[PlayerStats.Weapon.Value].Value == "Dagger" then
  479. WeldPing:FireServer("Dagger Held", "Right Arm")
  480. else
  481. if assets[PlayerStats.Weapon.Value].Value == "Two-Handed" then
  482. WeldPing:FireServer("Two-Handed Held", "Right Arm")
  483. end
  484. end
  485. end
  486. end
  487. idleanim:Play()
  488. candamage = false
  489. usingswordskill = false
  490. end
  491.  
  492. InviteFrame = gui:WaitForChild("PartyInvite)
  493. Mates = gui:WaitForChild("Parties)
  494. Func = game.ReplicatedStorage:WaitForChild("PartyFunc)
  495. Party = Player:WaitForChild("Party)
  496. Decals = {236915531, 234370726, 236915425, 234370700}
  497. Near = {}
  498. Range = 50
  499. HealthConnections = {}
  500. UpdateNear = function()
  501. Near = {}
  502. for _,v in pairs(game.Players:GetPlayers()) do
  503. 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
  504. table.insert(Near, v)
  505. end
  506. end
  507. end
  508.  
  509. listNear = function()
  510. UpdateNear()
  511. for _,v in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
  512. do
  513. if v.Name ~= "Base" then
  514. do
  515. v:remove()
  516. -- DECOMPILER ERROR at PC16: LeaveBlock: unexpected jumping out IF_THEN_STMT
  517.  
  518. -- DECOMPILER ERROR at PC16: LeaveBlock: unexpected jumping out IF_STMT
  519.  
  520. end
  521. end
  522. end
  523. end
  524. local count = 0
  525. for i,v in pairs(Near) do
  526. local newb = menugui.Frames.Playerlist.List.Base:clone()
  527. newb.Parent = menugui.Frames.Playerlist.List
  528. newb.Name = v.Name
  529. newb.Text = v.Name
  530. newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * count, 0)
  531. newb.Visible = true
  532. count = count + 1
  533. end
  534. for _,v in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
  535. v.MouseEnter:connect(function()
  536. gui.AltSound:Play()
  537. for _,b in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
  538. if b ~= v then
  539. b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  540. end
  541. end
  542. end)
  543. v.Buttons.MouseLeave:connect(function()
  544. v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  545. end)
  546. v.MouseButton1Down:connect(function()
  547. for _,b in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
  548. if b ~= v then
  549. b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  550. else
  551. b:TweenPosition(UDim2.new(-1, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  552. end
  553. end
  554. gui.ClickSound:Play()
  555. end)
  556. v.Buttons.Party.MouseButton1Down:connect(function()
  557. Func:InvokeServer("Invite", game.Players[v.Name])
  558. gui.ClickSound:Play()
  559. v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  560. end)
  561. v.Buttons.Msg.MouseButton1Down:connect(function()
  562. end)
  563. v.Buttons.Duel.MouseButton1Down:connect(function()
  564. game.ReplicatedStorage.DuelEvent:FireServer("InvitePlayer", game.Players[v.Name])
  565. gui.ClickSound:Play()
  566. v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  567. end)
  568. end
  569. end
  570.  
  571. SetupBar = function(Who)
  572. for i = 1, 3 do
  573. local Person = Mates:FindFirstChild(i)
  574. if Person.PlayerName.Text == "" and Who.Character and Who.Character:FindFirstChild("Humanoid") then
  575. Person.PlayerName.Text = Who.Name
  576. Person.Visible = true
  577. break
  578. end
  579. end
  580. end
  581.  
  582. UpdateMemberGui = function()
  583. for i = 1, 3 do
  584. local Person = Mates:WaitForChild(i)
  585. Person:WaitForChild("PlayerName").Text = ""
  586. Person.Visible = false
  587. end
  588. for _,v in pairs(game.Players:GetPlayers()) do
  589. if v.Name ~= Player.Name and v:FindFirstChild("Party") and v.Party.Value == Party.Value and Party.Value ~= "" then
  590. SetupBar(v)
  591. end
  592. end
  593. end
  594.  
  595. Party.Changed:connect(function(New)
  596. end)
  597. local YesButton = InviteFrame:WaitForChild("Options):WaitForChild("Yes)
  598. local NoButton = InviteFrame:WaitForChild("Options"):WaitForChild("No")
  599. YesButton.MouseEnter:connect(function()
  600. YesButton.Image = "rbxassetid://236915530"
  601. end)
  602. YesButton.MouseLeave:connect(function()
  603. YesButton.Image = "rbxassetid://234370725"
  604. end)
  605. NoButton.MouseEnter:connect(function()
  606. NoButton.Image = "rbxassetid://236915424"
  607. end)
  608. NoButton.MouseLeave:connect(function()
  609. NoButton.Image = "rbxassetid://234370699"
  610. end)
  611. menugui.Frames.Party.LeaveParty.MouseButton1Down:connect(function()
  612. gui.ClickSound:Play()
  613. Func:InvokeServer("LeaveParty")
  614. UpdateMemberGui()
  615. menugui.Frames.Party.Visible = false
  616. end)
  617. menugui.Frames.Map.Frame.FloorNumber.Text = "Floor " .. tostring(workspace.GameLoader.Options.Floor.Value) .. " | " .. workspace.GameLoader.Options.FloorName.Value
  618. if workspace.GameLoader.Options:FindFirstChild("Map) then
  619. menugui.Frames.Map.Frame.ImageLabel.Image = "rbxassetid://" .. workspace.GameLoader.Options.Map.Value
  620. end
  621. UpdateMemberGui()
  622. Func.OnClientInvoke = function(...)
  623. local Args = {...}
  624. if Args[1] == "UpdateMember" and type(Args[2]) == "userdata" and Args[2].ClassName == "Player" then
  625. local Who = Args[2]
  626. do
  627. for i = 1, 3 do
  628. local Person = Mates:FindFirstChild(i)
  629. if Person.PlayerName.Text == Who.Name then
  630. return
  631. end
  632. end
  633. UpdateMemberGui()
  634. end
  635. else
  636. do
  637. if Args[1] == "MemberLeft" and type(Args[2]) == "userdata" and Args[2].ClassName == "Player" then
  638. UpdateMemberGui()
  639. else
  640. if Args[1] == "InviteFrom" and type(Args[2]) == "userdata" and Args[2].ClassName == "Player" then
  641. if InviteFrame.Visible then
  642. return
  643. end
  644. local Inviter = Args[2]
  645. local Content = InviteFrame:WaitForChild("Content")
  646. Content.Text = Inviter.Name .. " has invited you to a party."
  647. InviteFrame.Visible = true
  648. local Options = InviteFrame:WaitForChild("Options")
  649. local Yes = Options:WaitForChild("Yes")
  650. local No = Options:WaitForChild("No")
  651. local Response = 0
  652. local Start = tick()
  653. local Conn1 = Yes.MouseButton1Click:connect(function()
  654. Response = true
  655. end)
  656. local Conn2 = No.MouseButton1Click:connect(function()
  657. Response = false
  658. end)
  659. repeat
  660. wait()
  661. until Response ~= 0 or tick() - Start >= 10
  662. Conn1:disconnect()
  663. Conn2:disconnect()
  664. InviteFrame.Visible = false
  665. return Response
  666. end
  667. end
  668. end
  669. end
  670. end
  671.  
  672. invpics = {["One-Handed"] = "207992005", Shield = "207991969", Outfit = "207991704", Material = "221160251", Consumable = "268373481", Dagger = "297542870", ["Two-Handed"] = "297542959", Rapier = "297542991", Headwear = "207991803"}
  673. local invfilter = "Equipment"
  674. local unknownicon = "rbxassetid://329366684"
  675. do
  676. local invindex = 1
  677. listInv = function(filter, keepscrollpos)
  678. if not keepscrollpos then
  679. invindex = 1
  680. end
  681. for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  682. if v.Name ~= "Base" then
  683. v:remove()
  684. end
  685. end
  686. local count = 0
  687. do
  688. local list = getTable()
  689. menugui.Frames.Inventory.Count.Text = tostring(#list) .. "/200"
  690. for i,v in pairs(list) do
  691. if assets[v] then
  692. if assets[v].Value ~= "Material" and assets[v].Value ~= "Consumable" and filter == "Equipment" then
  693. local newb = menugui.Frames.Inventory.List.Base:clone()
  694. newb.Parent = menugui.Frames.Inventory.List
  695. newb.Name = v
  696. if not assets[v].LVL then
  697. local itemstat = assets[v].Skill
  698. end
  699. if assets[v].LVL then
  700. newb.TextLabel.Text = "[ LVL " .. itemstat.Value .. " ] " .. v
  701. else
  702. newb.TextLabel.Text = "[ SKILL " .. itemstat.Value .. " ] " .. v
  703. end
  704. newb.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
  705. newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * count, 0)
  706. newb.Visible = true
  707. count = count + 1
  708. else
  709. do
  710. if filter == "Items" and (assets[v].Value == "Material" or assets[v].Value == "Consumable") then
  711. if not menugui.Frames.Inventory.List:FindFirstChild(v) then
  712. local newb = menugui.Frames.Inventory.List.Base:clone()
  713. newb.Parent = menugui.Frames.Inventory.List
  714. newb.Name = v
  715. newb.TextLabel.Text = v
  716. newb.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
  717. newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * (count), 0)
  718. newb.Visible = true
  719. count = count + 1
  720. else
  721. do
  722. menugui.Frames.Inventory.List:FindFirstChild(v).TextLabel.Text = v .. " x" .. tostring(getcount(list, v))
  723. do
  724. local newb = menugui.Frames.Inventory.List.Base:clone()
  725. newb.Parent = menugui.Frames.Inventory.List
  726. newb.Name = v
  727. newb.TextLabel.Text = v
  728. newb.Icon.Image = unknownicon
  729. newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * (count), 0)
  730. newb.Visible = true
  731. count = count + 1
  732. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out DO_STMT
  733.  
  734. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  735.  
  736. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_STMT
  737.  
  738. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_THEN_STMT
  739.  
  740. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_STMT
  741.  
  742. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out DO_STMT
  743.  
  744. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  745.  
  746. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_STMT
  747.  
  748. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_THEN_STMT
  749.  
  750. -- DECOMPILER ERROR at PC226: LeaveBlock: unexpected jumping out IF_STMT
  751.  
  752. end
  753. end
  754. end
  755. end
  756. end
  757. end
  758. end
  759. end
  760. for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  761. if v.Name == PlayerStats.Outfit.Value then
  762. v.BackgroundColor3 = orhover
  763. local newval = Instance.new("StringValue", v)
  764. newval.Name = "Equipped"
  765. break
  766. end
  767. end
  768. do
  769. for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  770. if v.Name == PlayerStats.Weapon.Value then
  771. v.BackgroundColor3 = orhover
  772. local newval = Instance.new("StringValue", v)
  773. newval.Name = "Equipped"
  774. break
  775. end
  776. end
  777. do
  778. for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  779. if v.Name == PlayerStats.Headwear.Value then
  780. v.BackgroundColor3 = orhover
  781. local newval = Instance.new("StringValue", v)
  782. newval.Name = "Equipped"
  783. break
  784. end
  785. end
  786. do
  787. for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  788. if v.Name == PlayerStats.Shield.Value then
  789. v.BackgroundColor3 = orhover
  790. local newval = Instance.new("StringValue", v)
  791. newval.Name = "Equipped"
  792. break
  793. end
  794. end
  795. do
  796. for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  797. v.Position = v.Position - UDim2.new(0, 0, 0.125 * (invindex - 1), 0)
  798. v.MouseEnter:connect(function()
  799. gui.AltSound:Play()
  800. for _,b in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  801. if b ~= v then
  802. b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  803. end
  804. end
  805. end)
  806. v.Buttons.MouseLeave:connect(function()
  807. v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  808. end)
  809. v.MouseButton1Down:connect(function()
  810. for _,b in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  811. if b ~= v then
  812. b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  813. else
  814. b:TweenPosition(UDim2.new(-1, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  815. end
  816. end
  817. gui.ClickSound:Play()
  818. end)
  819. v.Buttons.E.MouseButton1Down:connect(function()
  820. local item = assets[v.Name]
  821. if item then
  822. EqItem(v.Name)
  823. else
  824. gui.Err:Play()
  825. end
  826. end)
  827. v.Buttons.Dr.MouseButton1Down:connect(function()
  828. DrItem(v.Name)
  829. end)
  830. v.Buttons.De.MouseButton1Down:connect(function()
  831. DItem(v.Name)
  832. end)
  833. v.Buttons.I.MouseButton1Down:connect(function()
  834. inspect(v.Name)
  835. end)
  836. end
  837. end
  838. end
  839. end
  840. end
  841. end
  842. end
  843.  
  844. listSwordSkills = function()
  845. for _,v in pairs(menugui.Frames.Skills.List:GetChildren()) do
  846. if v.Name ~= "Base" then
  847. v:remove()
  848. end
  849. end
  850. local Unlocked = {}
  851. do
  852. for _,v in pairs(script.SwordSkills:children()) do
  853. for _,x in pairs(v:children()) do
  854. local data = require(x)
  855. if data.RequiredSkillLevel <= Player.PlayerStats[v.Name .. "Skill"].Value then
  856. table.insert(Unlocked, data)
  857. end
  858. end
  859. end
  860. local count = 0
  861. for i,v in pairs(Unlocked) do
  862. local newb = menugui.Frames.Skills.List.Base:clone()
  863. newb.Parent = menugui.Frames.Skills.List
  864. newb.Name = v.SkillName
  865. newb.Text = v.SkillName
  866. newb.Position = UDim2.new(0, 0, newb.Size.Y.Scale * count, 0)
  867. if v.SkillName == PlayerStats.CurrentSkill.Value then
  868. newb.BackgroundColor3 = orhover
  869. end
  870. newb.Icon.Image = "rbxassetid://" .. invpics[v.WeaponType]
  871. newb.Visible = true
  872. count = count + 1
  873. end
  874. for _,v in pairs(menugui.Frames.Skills.List:GetChildren()) do
  875. v.MouseEnter:connect(function()
  876. gui.AltSound:Play()
  877. for _,b in pairs(menugui.Frames.Skills.List:GetChildren()) do
  878. if b ~= v then
  879. b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  880. end
  881. end
  882. end)
  883. v.Buttons.MouseLeave:connect(function()
  884. v:TweenPosition(UDim2.new(0, 0, v.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  885. end)
  886. v.MouseButton1Down:connect(function()
  887. for _,b in pairs(menugui.Frames.Skills.List:GetChildren()) do
  888. if b ~= v then
  889. b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  890. else
  891. b:TweenPosition(UDim2.new(-1, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  892. end
  893. end
  894. gui.ClickSound:Play()
  895. end)
  896. v.Buttons.Set.MouseButton1Down:connect(function()
  897. game.ReplicatedStorage:WaitForChild("ChangeSS"):InvokeServer(v.Name)
  898. gui.ClickSound:Play()
  899. listSwordSkills()
  900. end)
  901. end
  902. end
  903. end
  904.  
  905. modapp = function(type, item)
  906. game.ReplicatedStorage:WaitForChild("ModApp"):InvokeServer(type, item)
  907. end
  908.  
  909. EqItem = function(item)
  910. if assets[item].Value == "Outfit" then
  911. if assets[item].LVL.Value <= PlayerStats.Level.Value then
  912. modapp("Outfit", item)
  913. UpdateCharacter()
  914. SwordConnect()
  915. listInv(invfilter, true)
  916. gui.Bag:Play()
  917. else
  918. gui.Err:Play()
  919. end
  920. else
  921. if assets[item].Value == "One-Handed" or assets[item].Value == "Rapier" or assets[item].Value == "Dagger" or assets[item].Value == "Two-Handed" then
  922. if assets[item].Skill.Value <= PlayerStats[assets[item].Value .. "Skill"].Value then
  923. modapp("Weapon", item)
  924. UpdateCharacter()
  925. SwordConnect()
  926. gui.Bag:Play()
  927. listInv(invfilter, true)
  928. else
  929. gui.Err:Play()
  930. end
  931. else
  932. if assets[item].Value == "Headwear" then
  933. if PlayerStats.Headwear.Value ~= item then
  934. if assets[item].LVL.Value <= PlayerStats.Level.Value then
  935. modapp("Headwear", item)
  936. UpdateCharacter()
  937. SwordConnect()
  938. listInv(invfilter, true)
  939. gui.Bag:Play()
  940. else
  941. gui.Err:Play()
  942. end
  943. else
  944. modapp("Headwear", "")
  945. UpdateCharacter()
  946. SwordConnect()
  947. listInv(invfilter, true)
  948. end
  949. else
  950. if assets[item].Value == "Shield" then
  951. if PlayerStats.Shield.Value ~= item then
  952. if assets[item].LVL.Value <= PlayerStats.Level.Value then
  953. modapp("Shield", item)
  954. UpdateCharacter()
  955. SwordConnect()
  956. listInv(invfilter, true)
  957. gui.Bag:Play()
  958. else
  959. gui.Err:Play()
  960. end
  961. else
  962. modapp("Shield", "")
  963. UpdateCharacter()
  964. SwordConnect()
  965. listInv(invfilter, true)
  966. end
  967. else
  968. if assets[item].Value == "Consumable" and not consuming and not findDuelShow(Player) then
  969. consuming = item
  970. for _,b in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  971. b:TweenPosition(UDim2.new(0, 0, b.Position.Y.Scale, 0), "Out", "Quad", 0.25, true)
  972. end
  973. local anim = Player.Character.Humanoid:LoadAnimation(script.EatDrink)
  974. anim:Play()
  975. game.ReplicatedStorage.UseConsumable:InvokeServer(item)
  976. listInv(invfilter, true)
  977. anim:Stop()
  978. idleanim:Play()
  979. consuming = false
  980. end
  981. end
  982. end
  983. end
  984. end
  985. end
  986.  
  987. DrItem = function(item)
  988. if PlayerStats.DualWeapon.Value == item then
  989. item = "None"
  990. end
  991. if item == "None" or assets[item].Value == "One-Handed" and Player.PlayerStats["One-HandedSkill"].Value >= 250 then
  992. if item == "None" or assets[item].Skill.Value <= PlayerStats[assets[item].Value .. "Skill"].Value then
  993. game.ReplicatedStorage:WaitForChild("UpdateDualWeapon"):FireServer(item)
  994. UpdateCharacter()
  995. SwordConnect()
  996. gui.Bag:Play()
  997. listInv(invfilter, true)
  998. else
  999. gui.Err:Play()
  1000. end
  1001. end
  1002. end
  1003.  
  1004. DItem = function(item)
  1005. if item == consuming then
  1006. return
  1007. end
  1008. if PlayerStats.Outfit.Value ~= item and PlayerStats.Weapon.Value ~= item and PlayerStats.Headwear.Value ~= item and PlayerStats.Shield.Value ~= item and (not assets[item] or not assets[item].Bound) then
  1009. RemoveItem(item)
  1010. else
  1011. local stuff = getTable()
  1012. if getcount(stuff, item) >= 2 then
  1013. RemoveItem(item)
  1014. end
  1015. end
  1016. do
  1017. listInv(invfilter, true)
  1018. gui.Bag:Play()
  1019. end
  1020. end
  1021.  
  1022. inspect = function(item)
  1023. local it = assets[item]
  1024. if it then
  1025. gui.Inspect.TL.Text = item
  1026. gui.Inspect.Type.Text = it.Value
  1027. gui.Inspect.Worth.Text = "Worth: " .. it.Worth.Value .. " Col"
  1028. if it.LVL then
  1029. gui.Inspect.Level.Text = "Level: " .. tostring(it.LVL.Value)
  1030. else
  1031. if it.Skill then
  1032. gui.Inspect.Level.Text = "Skill: " .. tostring(it.Skill.Value)
  1033. else
  1034. gui.Inspect.Level.Text = ""
  1035. end
  1036. end
  1037. if it.DMG then
  1038. gui.Inspect.D.Text = "ATK: " .. tostring(it.DMG.Value)
  1039. else
  1040. if it.DEF then
  1041. gui.Inspect.D.Text = "DEF: " .. tostring(it.DEF.Value)
  1042. else
  1043. gui.Inspect.D.Text = ""
  1044. end
  1045. end
  1046. gui.Inspect.Icon.Image = "rbxassetid://" .. invpics[it.Value]
  1047. gui.Inspect.Visible = true
  1048. end
  1049. end
  1050.  
  1051. gui.Inspect.Done.MouseButton1Down:connect(function()
  1052. gui.ClickSound:Play()
  1053. gui.Inspect.Done.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  1054. wait(0.2)
  1055. gui.Inspect.Done.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
  1056. gui.Inspect.Visible = false
  1057. end)
  1058. for _,v in pairs(menugui.Menus:GetChildren()) do
  1059. do
  1060. if v:IsA("ImageButton") then
  1061. do
  1062. v.MouseEnter:connect(function()
  1063. if menuopen then
  1064. gui.AltSound:Play()
  1065. v.Image = v.Value.Value
  1066. end
  1067. end)
  1068. v.MouseLeave:connect(function()
  1069. if v.Name == "Players" then
  1070. v.Image = playersoriginal
  1071. else
  1072. if v.Name == "Player" then
  1073. v.Image = playeroriginal
  1074. else
  1075. if v.Name == "Data" then
  1076. v.Image = dataoriginal
  1077. else
  1078. if v.Name == "Message" then
  1079. v.Image = messageoriginal
  1080. else
  1081. if v.Name == "Settings" then
  1082. v.Image = settingsoriginal
  1083. end
  1084. end
  1085. end
  1086. end
  1087. end
  1088. end)
  1089. v.MouseButton1Down:connect(function()
  1090. if menuopen == true and not menumoving then
  1091. clearFrames()
  1092. clearMidFrames()
  1093. gui.ClickSound:Play()
  1094. menugui.Menus:TweenPosition(UDim2.new(0, 0, 0.1, 0), "Out", "Quad", 0.2, true)
  1095. menugui.InfoImage:TweenPosition(UDim2.new(-0.35, 0, 0.15, 0), "Out", "Quad", 0.2, true)
  1096. menugui.MidFrames[v.Name].Visible = true
  1097. end
  1098. end)
  1099. -- DECOMPILER ERROR at PC622: LeaveBlock: unexpected jumping out IF_THEN_STMT
  1100.  
  1101. -- DECOMPILER ERROR at PC622: LeaveBlock: unexpected jumping out IF_STMT
  1102.  
  1103. end
  1104. end
  1105. end
  1106. end
  1107. for _,v in pairs(menugui.MidFrames:GetChildren()) do
  1108. do
  1109. for _,c in pairs(v:GetChildren()) do
  1110. if c:IsA("TextButton") then
  1111. c.MouseButton1Down:connect(function()
  1112. if menugui.Frames:FindFirstChild(c.Name) then
  1113. gui.ClickSound:Play()
  1114. clearFrames()
  1115. menugui.Frames[c.Name].Visible = true
  1116. if c.Name == "Playerlist" then
  1117. listNear()
  1118. else
  1119. if c.Name == "Skills" then
  1120. listSwordSkills()
  1121. end
  1122. end
  1123. else
  1124. gui.ClickSound:Play()
  1125. clearFrames()
  1126. if c.Name == "Items" then
  1127. listInv("Items")
  1128. invfilter = "Items"
  1129. menugui.Frames.Inventory.Visible = true
  1130. else
  1131. if c.Name == "Equipment" then
  1132. listInv("Equipment")
  1133. invfilter = "Equipment"
  1134. menugui.Frames.Inventory.Visible = true
  1135. end
  1136. end
  1137. end
  1138. end)
  1139. c.MouseEnter:connect(function()
  1140. c.BackgroundColor3 = orhover
  1141. gui.AltSound:Play()
  1142. end)
  1143. c.MouseLeave:connect(function()
  1144. c.BackgroundColor3 = ordefault
  1145. end)
  1146. end
  1147. end
  1148. end
  1149. end
  1150. menugui.Frames.Inventory.Up.MouseButton1Down:connect(function()
  1151. if invindex > 1 then
  1152. invindex = invindex - 1
  1153. else
  1154. return
  1155. end
  1156. for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  1157. if v.Name ~= "Base" then
  1158. v.Position = v.Position + UDim2.new(0, 0, 0.125, 0)
  1159. end
  1160. end
  1161. gui.AltSound:Play()
  1162. end)
  1163. menugui.Frames.Inventory.Down.MouseButton1Down:connect(function()
  1164. invindex = invindex + 1
  1165. for _,v in pairs(menugui.Frames.Inventory.List:GetChildren()) do
  1166. if v.Name ~= "Base" then
  1167. v.Position = v.Position - UDim2.new(0, 0, 0.125, 0)
  1168. end
  1169. end
  1170. gui.AltSound:Play()
  1171. end)
  1172. menugui.Frames.Playerlist.Up.MouseButton1Down:connect(function()
  1173. for _,v in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
  1174. if v.Name ~= "Base" then
  1175. v.Position = v.Position + UDim2.new(0, 0, 0.125, 0)
  1176. end
  1177. end
  1178. gui.AltSound:Play()
  1179. end)
  1180. menugui.Frames.Playerlist.Down.MouseButton1Down:connect(function()
  1181. for _,v in pairs(menugui.Frames.Playerlist.List:GetChildren()) do
  1182. if v.Name ~= "Base" then
  1183. v.Position = v.Position - UDim2.new(0, 0, 0.125, 0)
  1184. end
  1185. end
  1186. gui.AltSound:Play()
  1187. end)
  1188. menugui.Frames.Skills.Up.MouseButton1Down:connect(function()
  1189. for _,v in pairs(menugui.Frames.Skills.List:GetChildren()) do
  1190. if v.Name ~= "Base" then
  1191. v.Position = v.Position + UDim2.new(0, 0, 0.125, 0)
  1192. end
  1193. end
  1194. gui.AltSound:Play()
  1195. end)
  1196. menugui.Frames.Skills.Down.MouseButton1Down:connect(function()
  1197. for _,v in pairs(menugui.Frames.Skills.List:GetChildren()) do
  1198. if v.Name ~= "Base" then
  1199. v.Position = v.Position - UDim2.new(0, 0, 0.125, 0)
  1200. end
  1201. end
  1202. gui.AltSound:Play()
  1203. end)
  1204. guildgui = menugui.Frames.Guild.Frame
  1205. MPService = game:GetService("MarketplaceService)
  1206. guildgui.Confirm.MouseButton1Down:connect(function()
  1207. gui.ClickSound:Play()
  1208. guildgui.Confirm.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  1209. wait(0.2)
  1210. guildgui.Confirm.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
  1211. if Player:IsInGroup(tonumber(guildgui.ID.Text)) then
  1212. MPService:PromptProductPurchase(Player, 107631719)
  1213. game.ReplicatedStorage.GuildUpdate:FireServer(tonumber(guildgui.ID.Text))
  1214. end
  1215. end)
  1216. repeat
  1217. wait()
  1218. until _G.CustomMouse
  1219. local customMouse = _G.CustomMouse
  1220. game.ReplicatedStorage:WaitForChild("NotificationEvent").OnClientEvent:connect(function(Header, Text, Image, Timed)
  1221. Notification(Header, Text, Image, Timed)
  1222. end)
  1223. local craftmode = gui:WaitForChild("CraftMode)
  1224. local crafting = gui:WaitForChild("Crafting")
  1225. local inputs = crafting:WaitForChild("Inputs")
  1226. local boxes = crafting:WaitForChild("Boxes")
  1227. local products = crafting:WaitForChild("Products)
  1228. local dropdown = crafting:WaitForChild("Dropdown")
  1229. do
  1230. local craftbutton = crafting:WaitForChild("Craft")
  1231. local close = crafting:WaitForChild("Close")
  1232. local inventory = (PlayerStats:WaitForChild("Inventory"))
  1233. local selectedcraft = nil
  1234. local craftdebounce = false
  1235. getInventoryTable = function(noEquipped)
  1236. local full = Explode(",", inventory.Value)
  1237. local filtered = {}
  1238. if not noEquipped then
  1239. return full
  1240. else
  1241. for _,v in pairs(full) do
  1242. local origcount = getcount(full, v)
  1243. local newcount = getcount(filtered, v)
  1244. if (PlayerStats.Outfit.Value:lower() ~= v:lower() and PlayerStats.Weapon.Value:lower() ~= v:lower()) or origcount > 1 and newcount + 1 < origcount then
  1245. table.insert(filtered, v)
  1246. end
  1247. end
  1248. return filtered
  1249. end
  1250. end
  1251.  
  1252. tableToString = function(tab)
  1253. return table.concat(tab, ",")
  1254. end
  1255.  
  1256. findBox = function(item)
  1257. for _,v in pairs(boxes:children()) do
  1258. if v.Item.Value == item then
  1259. return v
  1260. end
  1261. end
  1262. return false
  1263. end
  1264.  
  1265. listInputs = function()
  1266. local tab = getInventoryTable(true)
  1267. for _,v in pairs(inputs:children()) do
  1268. if v.Name ~= "Base" then
  1269. v:Remove()
  1270. end
  1271. end
  1272. inputs.CanvasSize = UDim2.new(0, 0, 0, 50 * #tab)
  1273. local amounts = {}
  1274. do
  1275. local index = 1
  1276. for i,v in pairs(tab) do
  1277. if assets[v] then
  1278. if inputs:FindFirstChild(v) then
  1279. amounts[v] = amounts[v] + 1
  1280. inputs[v].Text = v .. " x" .. amounts[v]
  1281. else
  1282. if not findBox(v) then
  1283. local new = inputs.Base:Clone()
  1284. new.Visible = true
  1285. new.Name = v
  1286. new.Text = v
  1287. new.Position = UDim2.new(0, 0, 0, 50 * (index - 1))
  1288. new.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
  1289. if inputs.AbsoluteWindowSize.Y < inputs.CanvasSize.Y.Offset then
  1290. new.Size = UDim2.new(1, -13, 0, 50)
  1291. else
  1292. new.Size = UDim2.new(1, 0, 0, 50)
  1293. end
  1294. new.MouseButton1Click:connect(function()
  1295. for i = 1, 4 do
  1296. local current = boxes["Box" .. i]
  1297. if current.Item.Value == "" then
  1298. current.Item.Value = v
  1299. selectedcraft = nil
  1300. craftbutton.BackgroundTransparency = 0.75
  1301. craftbutton.TextTransparency = 0.5
  1302. listInputs()
  1303. updateBoxes()
  1304. listProducts()
  1305. break
  1306. end
  1307. end
  1308. end)
  1309. new.Parent = inputs
  1310. amounts[v] = 1
  1311. index = index + 1
  1312. end
  1313. end
  1314. end
  1315. end
  1316. end
  1317. end
  1318.  
  1319. updateBoxes = function()
  1320. for i,v in pairs(boxes:children()) do
  1321. local val = v.Item.Value
  1322. if val ~= "" then
  1323. local tab = getInventoryTable(true)
  1324. local count = getcount(tab, val)
  1325. if count > 0 then
  1326. v.Text = val .. " x" .. count
  1327. else
  1328. v.Text = ""
  1329. v.Item.Value = ""
  1330. end
  1331. else
  1332. do
  1333. do
  1334. v.Text = ""
  1335. -- DECOMPILER ERROR at PC30: LeaveBlock: unexpected jumping out DO_STMT
  1336.  
  1337. -- DECOMPILER ERROR at PC30: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  1338.  
  1339. -- DECOMPILER ERROR at PC30: LeaveBlock: unexpected jumping out IF_STMT
  1340.  
  1341. end
  1342. end
  1343. end
  1344. end
  1345. for i = 1, 4 do
  1346. local current = boxes["Box" .. i]
  1347. if current.Item.Value == "" then
  1348. for x = i + 1, 4 do
  1349. local prev = boxes["Box" .. x - 1]
  1350. local this = boxes["Box" .. x]
  1351. prev.Text = this.Text
  1352. prev.Item.Value = this.Item.Value
  1353. end
  1354. end
  1355. end
  1356. end
  1357.  
  1358. listProducts = function()
  1359. local inv = getInventoryTable(true)
  1360. local tab = {}
  1361. for _,v in pairs(game.ReplicatedStorage.CraftingRecipes:children()) do
  1362. do
  1363. if v.CraftType.Value == craftmode.Value then
  1364. local okay = true
  1365. for _,needed in pairs(v:children()) do
  1366. if needed.Name ~= "CraftType" and needed.Name ~= "CraftingSkill" and (not findBox(needed.Name) or getcount(inv, needed.Name) < needed.Value) then
  1367. okay = false
  1368. break
  1369. end
  1370. end
  1371. do
  1372. if v.CraftType.Value ~= "Smeltering" and PlayerStats[v.CraftType.Value .. "Skill"].Value < v.CraftingSkill.Value then
  1373. okay = false
  1374. end
  1375. if okay then
  1376. do
  1377. table.insert(tab, {v, true})
  1378. -- DECOMPILER ERROR at PC72: LeaveBlock: unexpected jumping out IF_THEN_STMT
  1379.  
  1380. -- DECOMPILER ERROR at PC72: LeaveBlock: unexpected jumping out IF_STMT
  1381.  
  1382. end
  1383. end
  1384. end
  1385. end
  1386. -- DECOMPILER ERROR at PC72: LeaveBlock: unexpected jumping out DO_STMT
  1387.  
  1388. end
  1389. end
  1390. for _,v in pairs(game.ReplicatedStorage.CraftingRecipes:children()) do
  1391. if v.CraftType.Value == craftmode.Value then
  1392. local okay = true
  1393. for _,needed in pairs(v:children()) do
  1394. if needed.Name ~= "CraftType" and needed.Name ~= "CraftingSkill" and (not findBox(needed.Name) or getcount(inv, needed.Name) < needed.Value) then
  1395. okay = false
  1396. break
  1397. end
  1398. end
  1399. do
  1400. do
  1401. if v.CraftType.Value ~= "Smeltering" and PlayerStats[v.CraftType.Value .. "Skill"].Value < v.CraftingSkill.Value then
  1402. okay = false
  1403. end
  1404. if not okay then
  1405. table.insert(tab, {v, false})
  1406. end
  1407. -- DECOMPILER ERROR at PC142: LeaveBlock: unexpected jumping out DO_STMT
  1408.  
  1409. -- DECOMPILER ERROR at PC142: LeaveBlock: unexpected jumping out IF_THEN_STMT
  1410.  
  1411. -- DECOMPILER ERROR at PC142: LeaveBlock: unexpected jumping out IF_STMT
  1412.  
  1413. end
  1414. end
  1415. end
  1416. end
  1417. for _,v in pairs(products:children()) do
  1418. if v.Name ~= "Base" then
  1419. v:Remove()
  1420. end
  1421. end
  1422. products.CanvasSize = UDim2.new(0, 0, 0, 50 * #tab)
  1423. for i,v in pairs(tab) do
  1424. local new = products.Base:Clone()
  1425. new.Visible = true
  1426. new.Name = v[1].Name
  1427. new.Text = v[1].Name
  1428. new.Position = UDim2.new(0, 0, 0, 50 * (i - 1))
  1429. if products.AbsoluteWindowSize.Y < products.CanvasSize.Y.Offset then
  1430. new.Size = UDim2.new(1, -13, 0, 50)
  1431. else
  1432. new.Size = UDim2.new(1, 0, 0, 50)
  1433. end
  1434. new.MouseEnter:connect(function()
  1435. dropdown.Desc.Text = v[1].Value
  1436. dropdown.CraftingSkill.Text = v[1].CraftType.Value .. "Skill: " .. v[1].CraftingSkill.Value
  1437. local need = {}
  1438. for _,needed in pairs(v[1]:children()) do
  1439. if needed.Name ~= "CraftType" and needed.Name ~= "CraftingSkill" then
  1440. table.insert(need, needed.Value .. " " .. needed.Name)
  1441. end
  1442. end
  1443. dropdown.Required.Text = "Required: " .. table.concat(need, ", ")
  1444. end)
  1445. new.MouseMoved:connect(function(x, y)
  1446. dropdown.Position = UDim2.new(0, x - crafting.AbsolutePosition.X, 0, y - crafting.AbsolutePosition.Y)
  1447. dropdown.Visible = true
  1448. end)
  1449. new.MouseLeave:connect(function()
  1450. dropdown.Visible = false
  1451. end)
  1452. new.MouseButton1Click:connect(function()
  1453. if v[2] then
  1454. selectedcraft = v[1].Name
  1455. craftbutton.BackgroundTransparency = 0.5
  1456. craftbutton.TextTransparency = 0
  1457. listProducts()
  1458. end
  1459. end)
  1460. if not v[2] then
  1461. new.BackgroundTransparency = 0.75
  1462. new.TextStrokeTransparency = 1
  1463. new.TextTransparency = 0.7
  1464. new.Icon.ImageTransparency = 0.8
  1465. if selectedcraft == v[1].Name then
  1466. selectedcraft = nil
  1467. craftbutton.BackgroundTransparency = 0.75
  1468. craftbutton.TextTransparency = 0.5
  1469. end
  1470. end
  1471. if selectedcraft == v[1].Name then
  1472. new.BackgroundColor3 = orhover
  1473. end
  1474. new.Parent = products
  1475. end
  1476. end
  1477.  
  1478. for i,v in pairs(boxes:children()) do
  1479. v.MouseButton1Click:connect(function()
  1480. v.Item.Value = ""
  1481. updateBoxes()
  1482. listInputs()
  1483. listProducts()
  1484. end)
  1485. end
  1486. craftbutton.MouseButton1Click:connect(function()
  1487. if craftdebounce then
  1488. return
  1489. end
  1490. if not selectedcraft then
  1491. return
  1492. end
  1493. craftdebounce = true
  1494. local recipe = game.ReplicatedStorage.CraftingRecipes:FindFirstChild(selectedcraft)
  1495. if recipe.CraftType.Value ~= "Smeltering" then
  1496. game.ReplicatedStorage:WaitForChild("CraftingStart"):InvokeServer()
  1497. repeat
  1498. wait()
  1499. until _G.CraftingVictory ~= nil
  1500. else
  1501. _G.CraftingVictory = true
  1502. end
  1503. local SkillName = recipe.CraftType.Value .. "Skill"
  1504. game.ReplicatedStorage:WaitForChild("CraftingEnded"):InvokeServer(SkillName, recipe.Name, _G.CraftingVictory)
  1505. listInputs()
  1506. updateBoxes()
  1507. listProducts()
  1508. wait(1)
  1509. _G.CraftingVictory = nil
  1510. craftdebounce = false
  1511. end)
  1512. close.MouseButton1Click:connect(function()
  1513. crafting.Visible = false
  1514. craftingnow = false
  1515. Player.Character.Humanoid.WalkSpeed = 18
  1516. end)
  1517. crafting.Changed:connect(function(property)
  1518. if property == "Visible" then
  1519. listInputs()
  1520. listProducts()
  1521. end
  1522. end)
  1523. listInputs()
  1524. listProducts()
  1525. gui.Crafting.Changed:connect(function(property)
  1526. if property == "Visible" and gui.Crafting.Visible then
  1527. craftingnow = true
  1528. end
  1529. end)
  1530. inside = Player:WaitForChild("Inside)
  1531. ginterior = Player:WaitForChild("Interior)
  1532. local phomeinterior = ""
  1533. exitinterior = function()
  1534. workspace.CurrentCamera.CameraType = "Custom"
  1535. workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character
  1536. if workspace:FindFirstChild(ginterior.Value) then
  1537. workspace:FindFirstChild(ginterior.Value):remove()
  1538. end
  1539. if workspace:FindFirstChild("Ext-" .. phomeinterior) then
  1540. for _,v in pairs(workspace:FindFirstChild("Ext-" .. phomeinterior):GetChildren()) do
  1541. v.Transparency = 0
  1542. end
  1543. end
  1544. do
  1545. phomeinterior = ""
  1546. inside.Value = false
  1547. ginterior.Value = ""
  1548. game.ReplicatedStorage.IntValuesChanged:FireServer(false, "")
  1549. Player.Character.Humanoid.WalkSpeed = 18
  1550. end
  1551. end
  1552.  
  1553. if ginterior.Value ~= "" then
  1554. exitinterior()
  1555. end
  1556. loadinterior = function(interiormodel, owner)
  1557. local model = game.ReplicatedStorage.Interiors:FindFirstChild(interiormodel):clone()
  1558. model.Parent = workspace
  1559. model.Name = interiormodel
  1560. local ownervalue = Instance.new("StringValue", model)
  1561. ownervalue.Name = "Owner"
  1562. ownervalue.Value = owner
  1563. phomeinterior = interiormodel
  1564. inside.Value = true
  1565. ginterior.Value = interiormodel
  1566. game.ReplicatedStorage.IntValuesChanged:FireServer(true, interiormodel)
  1567. workspace.CurrentCamera.CameraType = "Custom"
  1568. workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character
  1569. if workspace:FindFirstChild("Ext-" .. ginterior.Value) then
  1570. for _,v in pairs(workspace:FindFirstChild("Ext-" .. ginterior.Value):GetChildren()) do
  1571. v.Transparency = 1
  1572. end
  1573. end
  1574. do
  1575. return model
  1576. end
  1577. end
  1578.  
  1579. local shopitem = ""
  1580. do
  1581. local shopping = false
  1582. local shopmode = true
  1583. makeBuyList = function()
  1584. for _,v in pairs(gui.Shop.List.F:GetChildren()) do
  1585. if v.Name ~= "Base" then
  1586. v:remove()
  1587. end
  1588. end
  1589. local count = 0
  1590. do
  1591. local list = game.ReplicatedStorage:WaitForChild("GetBuyList"):InvokeServer(proxitem.Id.Value)
  1592. gui.Shop.List.F.CanvasSize = UDim2.new(0, 0, 0, gui.Shop.List.F.Base.Size.Y.Offset * #list)
  1593. for _,v in pairs(list) do
  1594. if assets[v] then
  1595. local newb = gui.Shop.List.F.Base:clone()
  1596. newb.Parent = gui.Shop.List.F
  1597. newb.Name = v
  1598. newb.Text = v
  1599. newb.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
  1600. newb.Position = UDim2.new(0, 0, 0, newb.Size.Y.Offset * count)
  1601. newb.Visible = true
  1602. count = count + 1
  1603. end
  1604. end
  1605. for _,v in pairs(gui.Shop.List.F:children()) do
  1606. if v.Name ~= "Base" then
  1607. v.MouseButton1Down:connect(function()
  1608. gui.ClickSound:Play()
  1609. shopitem = v.Name
  1610. shopmode = true
  1611. gui.Shop.Confirm.Visible = true
  1612. gui.Shop.Confirm.TextLabel.Text = "Confirm Purchase of " .. v.Name .. " for " .. tostring(assets[v.Name].Worth.Value) .. " Col:"
  1613. if assets[v.Name].Badge then
  1614. gui.Shop.Confirm.TextLabel.Text = gui.Shop.Confirm.TextLabel.Text .. " [BADGE]"
  1615. end
  1616. if assets[v.Name].Pass then
  1617. gui.Shop.Confirm.TextLabel.Text = gui.Shop.Confirm.TextLabel.Text .. " [PASS]"
  1618. end
  1619. end)
  1620. end
  1621. end
  1622. end
  1623. end
  1624.  
  1625. makeSellList = function()
  1626. for _,v in pairs(gui.Shop.List.F:GetChildren()) do
  1627. if v.Name ~= "Base" then
  1628. v:remove()
  1629. end
  1630. end
  1631. local count = 0
  1632. do
  1633. local list = getTable()
  1634. gui.Shop.List.F.CanvasSize = UDim2.new(0, 0, 0, gui.Shop.List.F.Base.Size.Y.Offset * #list)
  1635. for i,v in pairs(list) do
  1636. if assets[v] and not assets[v].Bound then
  1637. local newb = gui.Shop.List.F.Base:clone()
  1638. newb.Parent = gui.Shop.List.F
  1639. newb.Name = v
  1640. newb.Text = v
  1641. newb.Icon.Image = "rbxassetid://" .. invpics[assets[v].Value]
  1642. newb.Position = UDim2.new(0, 0, 0, newb.Size.Y.Offset * count)
  1643. newb.Visible = true
  1644. count = count + 1
  1645. end
  1646. end
  1647. for _,v in pairs(gui.Shop.List.F:children()) do
  1648. if v.Name ~= "Base" then
  1649. v.MouseButton1Down:connect(function()
  1650. gui.ClickSound:Play()
  1651. shopitem = v.Name
  1652. shopmode = false
  1653. gui.Shop.Confirm.Visible = true
  1654. gui.Shop.Confirm.TextLabel.Text = "Confirm Sale of " .. v.Name .. " for " .. math.ceil(assets[v.Name].Worth.Value / 2) .. " Col:"
  1655. end)
  1656. end
  1657. end
  1658. end
  1659. end
  1660.  
  1661. gui.Shop.List.Buy.MouseButton1Down:connect(function()
  1662. gui.ClickSound:Play()
  1663. gui.Shop.List.Buy.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  1664. wait(0.2)
  1665. gui.Shop.List.Buy.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
  1666. makeBuyList()
  1667. end)
  1668. gui.Shop.List.Sell.MouseButton1Down:connect(function()
  1669. gui.ClickSound:Play()
  1670. gui.Shop.List.Sell.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  1671. wait(0.2)
  1672. gui.Shop.List.Sell.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
  1673. makeSellList()
  1674. end)
  1675. gui.Shop.Confirm.Cancel.MouseButton1Down:connect(function()
  1676. gui.ClickSound:Play()
  1677. gui.Shop.Confirm.Cancel.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  1678. wait(0.2)
  1679. gui.Shop.Confirm.Cancel.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
  1680. gui.Shop.Confirm.Visible = false
  1681. end)
  1682. local shopselldeb = false
  1683. gui.Shop.Confirm.Ok.MouseButton1Down:connect(function()
  1684. if shopselldeb then
  1685. return
  1686. end
  1687. shopselldeb = true
  1688. if shopitem ~= "" then
  1689. if game.ReplicatedStorage:WaitForChild("ShopTransfer"):InvokeServer(shopmode, shopitem) == true then
  1690. gui.ClickSound:Play()
  1691. gui.Shop.Confirm.Ok.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  1692. wait(0.2)
  1693. gui.Shop.Confirm.Ok.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
  1694. gui.Shop.Confirm.Visible = false
  1695. if shopmode == true then
  1696. makeBuyList()
  1697. else
  1698. makeSellList()
  1699. end
  1700. else
  1701. gui.Err:Play()
  1702. end
  1703. end
  1704. shopselldeb = false
  1705. end)
  1706. local entering = false
  1707. do
  1708. local dialogdeb = false
  1709. local WeldPing = game.ReplicatedStorage:WaitForChild("ChangeWeld")
  1710. local WeldPing2 = game.ReplicatedStorage:WaitForChild("ChangeWeld2")
  1711. local ad = game.ReplicatedStorage.GuiPart:clone()
  1712. local activeModel = Module3D:Attach3D(Player.PlayerGui:WaitForChild("MenuAdorn").BG, ad)
  1713. getOwnerList = function(interior)
  1714. for _,v in pairs(gui.Homes.F:GetChildren()) do
  1715. if v.Name ~= "Base" then
  1716. v:remove()
  1717. end
  1718. end
  1719. local count = 0
  1720. local list = game.Players:GetPlayers()
  1721. do
  1722. gui.Homes.F.CanvasSize = UDim2.new(0, 0, 0, gui.Homes.F.Base.Size.Y.Scale * #list)
  1723. for _,v in pairs(list) do
  1724. if v.PlayerStats.Home.Value == interior and v.Name ~= Player.Name then
  1725. local Privacy = v.PlayerStats.PlayerHomePrivacy
  1726. -- DECOMPILER ERROR at PC104: Unhandled construct in 'MakeBoolean' P3
  1727.  
  1728. 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
  1729. local newb = gui.Homes.F.Base:clone()
  1730. newb.Parent = gui.Homes.F
  1731. newb.Name = v.Name
  1732. newb.Text = v.Name .. "\'s Home"
  1733. newb.Position = UDim2.new(0, 0, 0, newb.Size.Y.Offset * count)
  1734. newb.Visible = true
  1735. count = count + 1
  1736. end
  1737. end
  1738. end
  1739. local debounce = false
  1740. for _,v in pairs(gui.Homes.F:children()) do
  1741. if v.Name ~= "Base" and v.Name ~= Player.Name then
  1742. v.MouseButton1Down:connect(function()
  1743. if debounce then
  1744. return
  1745. end
  1746. debounce = true
  1747. entering = true
  1748. gui.ClickSound:Play()
  1749. local home = loadinterior(game.Players[v.Name].PlayerStats.Home.Value, Player.Name)
  1750. home.Name = v.Name .. "\'s Home"
  1751. print(home.Name)
  1752. inside.Value = true
  1753. ginterior.Value = home.Name
  1754. game.ReplicatedStorage.IntValuesChanged:FireServer(true, home.Name)
  1755. gui.Homes.Visible = false
  1756. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.5, true)
  1757. local inside = Instance.new("StringValue", Player.Character)
  1758. inside.Name = "Inside"
  1759. wait(1)
  1760. Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
  1761. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
  1762. Player.Character.Humanoid.WalkSpeed = 18
  1763. wait(1)
  1764. entering = false
  1765. end)
  1766. end
  1767. end
  1768. end
  1769. end
  1770.  
  1771. gui.Homes.Cancel.MouseButton1Down:connect(function()
  1772. gui.ClickSound:Play()
  1773. local cam = workspace.CurrentCamera
  1774. cam.CameraType = "Custom"
  1775. cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  1776. gui.Homes.Visible = false
  1777. Player.Character.Humanoid.WalkSpeed = 18
  1778. end)
  1779. gui.Homes.Enter.MouseButton1Down:connect(function()
  1780. if gui.Homes.Enter.TextLabel.Text == "Buy" then
  1781. if game.ReplicatedStorage:WaitForChild("BuyPH"):InvokeServer(proxitem.Interior.Value) == true then
  1782. gui.ClickSound:Play()
  1783. gui.Homes.Enter.TextLabel.Text = "Enter"
  1784. else
  1785. gui.Err:Play()
  1786. end
  1787. else
  1788. entering = true
  1789. gui.Homes.Visible = false
  1790. local cam = workspace.CurrentCamera
  1791. cam.CameraType = "Custom"
  1792. cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  1793. gui.ClickSound:Play()
  1794. local home = loadinterior(proxitem.Interior.Value, Player.Name)
  1795. home.Name = Player.Name .. "\'s Home"
  1796. inside.Value = true
  1797. ginterior.Value = home.Name
  1798. game.ReplicatedStorage.IntValuesChanged:FireServer(true, home.Name)
  1799. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.5, true)
  1800. local inside = Instance.new("StringValue", Player.Character)
  1801. inside.Name = "Inside"
  1802. wait(1)
  1803. Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
  1804. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
  1805. Player.Character.Humanoid.WalkSpeed = 18
  1806. wait(1)
  1807. entering = false
  1808. end
  1809. end)
  1810. Editor = gui.Barber
  1811. hairs = game.ReplicatedStorage:WaitForChild("Char).Hair:GetChildren()
  1812. eyecolors = game.ReplicatedStorage.Char.EyeColor:GetChildren()
  1813. 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"}
  1814. skincolors = {"Brown", "Light orange", "Nougat", "Pastel brown"}
  1815. hairindex = 1
  1816. eyeindex = 1
  1817. haircolorindex = 1
  1818. skinindex = 1
  1819. hairindex2 = 1
  1820. BarberDevProduct = 107631798
  1821. hairindex = tonumber(PlayerStats.HairStyle.Value:match("%d+"))
  1822. hairindex2 = tonumber(PlayerStats.HairStyle2.Value:match("%d+"))
  1823. for i,v in pairs(eyecolors) do
  1824. if v.Name == PlayerStats.EyeColor.Value then
  1825. eyeindex = i
  1826. break
  1827. end
  1828. end
  1829. do
  1830. for i,v in pairs(haircolors) do
  1831. if v == PlayerStats.HairColor.Value then
  1832. haircolorindex = i
  1833. break
  1834. end
  1835. end
  1836. do
  1837. for i,v in pairs(skincolors) do
  1838. if v == PlayerStats.Skin.Value then
  1839. skinindex = i
  1840. break
  1841. end
  1842. end
  1843. do
  1844. preview = function()
  1845. UpdateCharacter()
  1846. Editor.Hair.Text = PlayerStats.HairStyle.Value:upper()
  1847. Editor.Hair2.Text = PlayerStats.HairStyle2.Value:upper()
  1848. Editor.Eyes.Text = PlayerStats.EyeColor.Value:upper() .. " EYES"
  1849. Editor.HairColor.Text = "HAIR COLOR: " .. PlayerStats.HairColor.Value:upper()
  1850. Editor.SkinColor.Text = "SKIN COLOR: " .. PlayerStats.Skin.Value:upper()
  1851. end
  1852.  
  1853. for _,b in pairs(Editor:GetChildren()) do
  1854. if b:IsA("TextButton") then
  1855. b.MouseButton1Down:connect(function()
  1856. gui.ClickSound:Play()
  1857. b.TextLabel:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.2, true)
  1858. wait(0.2)
  1859. b.TextLabel:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.2, true)
  1860. end)
  1861. end
  1862. end
  1863. ChangeApp = function(stat, val)
  1864. game.ReplicatedStorage:WaitForChild("ChangeApp"):InvokeServer(stat, val)
  1865. end
  1866.  
  1867. Editor.HairUp.MouseButton1Down:connect(function()
  1868. if hairindex < #hairs then
  1869. hairindex = hairindex + 1
  1870. else
  1871. hairindex = 1
  1872. end
  1873. ChangeApp("HairStyle", "Hair " .. hairindex)
  1874. preview()
  1875. end)
  1876. Editor.HairDown.MouseButton1Down:connect(function()
  1877. if hairindex > 1 then
  1878. hairindex = hairindex - 1
  1879. else
  1880. hairindex = #hairs
  1881. end
  1882. ChangeApp("HairStyle", "Hair " .. hairindex)
  1883. preview()
  1884. end)
  1885. Editor.HairUp2.MouseButton1Down:connect(function()
  1886. if hairindex2 < #hairs then
  1887. hairindex2 = hairindex2 + 1
  1888. else
  1889. hairindex2 = 1
  1890. end
  1891. ChangeApp("HairStyle2", "Hair " .. hairindex2)
  1892. preview()
  1893. end)
  1894. Editor.HairDown2.MouseButton1Down:connect(function()
  1895. if hairindex2 > 1 then
  1896. hairindex2 = hairindex2 - 1
  1897. else
  1898. hairindex2 = #hairs
  1899. end
  1900. ChangeApp("HairStyle2", "Hair " .. hairindex2)
  1901. preview()
  1902. end)
  1903. Editor.EyeUp.MouseButton1Down:connect(function()
  1904. if eyeindex < #eyecolors then
  1905. eyeindex = eyeindex + 1
  1906. else
  1907. eyeindex = 1
  1908. end
  1909. ChangeApp("EyeColor", eyecolors[eyeindex].Name)
  1910. preview()
  1911. end)
  1912. Editor.EyeDown.MouseButton1Down:connect(function()
  1913. if eyeindex > 1 then
  1914. eyeindex = eyeindex - 1
  1915. else
  1916. eyeindex = #eyecolors
  1917. end
  1918. ChangeApp("EyeColor", eyecolors[eyeindex].Name)
  1919. preview()
  1920. end)
  1921. Editor.HairColorUp.MouseButton1Down:connect(function()
  1922. if haircolorindex < #haircolors then
  1923. haircolorindex = haircolorindex + 1
  1924. else
  1925. haircolorindex = 1
  1926. end
  1927. ChangeApp("HairColor", haircolors[haircolorindex])
  1928. preview()
  1929. end)
  1930. Editor.HairColorDown.MouseButton1Down:connect(function()
  1931. if haircolorindex > 1 then
  1932. haircolorindex = haircolorindex - 1
  1933. else
  1934. haircolorindex = #haircolors
  1935. end
  1936. ChangeApp("HairColor", haircolors[haircolorindex])
  1937. preview()
  1938. end)
  1939. Editor.SkinColorUp.MouseButton1Down:connect(function()
  1940. if skinindex < #skincolors then
  1941. skinindex = skinindex + 1
  1942. else
  1943. skinindex = 1
  1944. end
  1945. ChangeApp("Skin", skincolors[skinindex])
  1946. preview()
  1947. end)
  1948. Editor.SkinColorDown.MouseButton1Down:connect(function()
  1949. if skinindex > 1 then
  1950. skinindex = skinindex - 1
  1951. else
  1952. skinindex = #skincolors
  1953. end
  1954. ChangeApp("Skin", skincolors[skinindex])
  1955. preview()
  1956. end)
  1957. Editor.Done.MouseButton1Down:connect(function()
  1958. Player.Character.Humanoid.WalkSpeed = 18
  1959. Editor.Visible = false
  1960. ChangeApp("CharMade", true)
  1961. UpdateCharacter()
  1962. end)
  1963. if Player.Character:FindFirstChild("SZ) then
  1964. _G.Zone = "Town"
  1965. end
  1966. gmgui.Changed:connect(function(property)
  1967. end)
  1968. local ChatService = game:GetService("Chat)
  1969. local blockanim = (Player.Character.Humanoid:LoadAnimation(script.Block))
  1970. local usanim = nil
  1971. local idleanim2 = Player.Character.Humanoid:LoadAnimation(script.DualIdle)
  1972. onKeyDown = function(key)
  1973. key = key:lower()
  1974. if key == "q" and Player.Character.Sword then
  1975. if swordequipped == false and not swordaction and not menutoggledopen and not menuopen and not Player.Character.Humanoid.Sit then
  1976. swordaction = true
  1977. if assets[PlayerStats.Weapon.Value].Value == "One-Handed" or assets[PlayerStats.Weapon.Value].Value == "Rapier" then
  1978. WeldPing:FireServer("One-Handed Held", "Right Arm")
  1979. else
  1980. if assets[PlayerStats.Weapon.Value].Value == "Dagger" then
  1981. WeldPing:FireServer("Dagger Held", "Right Arm")
  1982. else
  1983. if assets[PlayerStats.Weapon.Value].Value == "Two-Handed" then
  1984. WeldPing:FireServer("Two-Handed Held", "Right Arm")
  1985. end
  1986. end
  1987. end
  1988. 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
  1989. WeldPing2:FireServer("One-Handed Held", "Left Arm")
  1990. end
  1991. -- DECOMPILER ERROR at PC158: Unhandled construct in 'MakeBoolean' P3
  1992.  
  1993. 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
  1994. usanim = Player.Character.Humanoid:LoadAnimation(script.Unsheath)
  1995. else
  1996. 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
  1997. usanim = Player.Character.Humanoid:LoadAnimation(script.Unsheath2)
  1998. else
  1999. 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
  2000. usanim = Player.Character.Humanoid:LoadAnimation(script.DualUnsheath)
  2001. end
  2002. end
  2003. end
  2004. usanim:Play()
  2005. local usc = script.Parent.US:clone()
  2006. do
  2007. usc.Parent = Player.Character.Sword.Middle
  2008. usc:Play()
  2009. wait(0.5)
  2010. usanim:Stop()
  2011. usc:remove()
  2012. if assets[PlayerStats.Weapon.Value].Value == "One-Handed" and Player.Character:FindFirstChild("Sword2") and assets[PlayerStats.DualWeapon.Value].Value == "One-Handed" then
  2013. idleanim2:Play()
  2014. else
  2015. idleanim:Play()
  2016. end
  2017. swordequipped = true
  2018. swordaction = false
  2019. end
  2020. else
  2021. do
  2022. if swordequipped == true and not swordaction then
  2023. swordaction = true
  2024. local sc = script.Parent.S:clone()
  2025. sc.Parent = Player.Character.Sword.Middle
  2026. sc:Play()
  2027. if assets[PlayerStats.Weapon.Value].Value == "One-Handed" and Player.Character:FindFirstChild("Sword2") and assets[PlayerStats.DualWeapon.Value].Value == "One-Handed" then
  2028. idleanim2:Stop()
  2029. else
  2030. idleanim:Stop()
  2031. end
  2032. if (assets[PlayerStats.Weapon.Value].Value == "One-Handed" and not game:GetService("MarketplaceService"):PlayerOwnsAsset(Player, 1127853488)) or assets[PlayerStats.Weapon.Value].Value == "Rapier" then
  2033. WeldPing:FireServer("One-Handed Sheath", "Torso")
  2034. else
  2035. if assets[PlayerStats.Weapon.Value].Value == "Dagger" then
  2036. WeldPing:FireServer("Dagger Sheath", "Torso")
  2037. else
  2038. 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
  2039. WeldPing:FireServer("Two-Handed Sheath", "Torso")
  2040. end
  2041. end
  2042. end
  2043. if assets[PlayerStats.Weapon.Value].Value == "One-Handed" and Player.Character:FindFirstChild("Sword2") and assets[PlayerStats.DualWeapon.Value].Value == "One-Handed" then
  2044. WeldPing2:FireServer("Two-Handed Sheath2", "Torso")
  2045. end
  2046. wait(0.2)
  2047. sc:remove()
  2048. swordequipped = false
  2049. idleanim:Stop()
  2050. swordaction = false
  2051. end
  2052. do
  2053. if key == "c" and currentlyclashing and clashfolder ~= nil then
  2054. game.ReplicatedStorage:WaitForChild("InitClashing"):FireServer(2, clashfolder[Player.Name])
  2055. end
  2056. if key == "e" then
  2057. if not swordaction and swordequipped then
  2058. swordaction = true
  2059. blockanim:Play()
  2060. game.ReplicatedStorage:WaitForChild("BlockValue"):FireServer(true)
  2061. else
  2062. if swordaction and swordequipped then
  2063. swordaction = false
  2064. blockanim:Stop()
  2065. game.ReplicatedStorage:WaitForChild("BlockValue"):FireServer(false)
  2066. end
  2067. end
  2068. else
  2069. if key == "f" then
  2070. SwordSkill()
  2071. else
  2072. -- DECOMPILER ERROR at PC557: Unhandled construct in 'MakeBoolean' P1
  2073.  
  2074. if key == "x" and proxitem ~= nil then
  2075. if proxitem.Name == "Sign" then
  2076. gui.ClickSound:Play()
  2077. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.25, true)
  2078. wait(0.25)
  2079. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
  2080. ChatService:Chat(proxitem.ProxBase, proxitem.Text.Value, "Blue")
  2081. else
  2082. if proxitem.Name == "Barber" then
  2083. gui.ClickSound:Play()
  2084. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.25, true)
  2085. wait(0.25)
  2086. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
  2087. Player.Character.Humanoid.WalkSpeed = 0
  2088. Editor.Visible = true
  2089. preview()
  2090. else
  2091. if proxitem.Name == "Fishing" and not _G.Fishing and FishingCooldown <= math.abs(tick() - _G.LastFishingTick) then
  2092. _G.Fishing = true
  2093. gui.ClickSound:Play()
  2094. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.25, true)
  2095. wait(0.25)
  2096. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
  2097. game.ReplicatedStorage.FishingGame:Clone().Parent = Player.PlayerGui
  2098. else
  2099. if proxitem.Name == "TeleportDoor" and not entering then
  2100. Player.Character.Humanoid.WalkSpeed = 0
  2101. gui.ClickSound:Play()
  2102. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0), "Out", "Quad", 0.25, true)
  2103. delay(0.25, function()
  2104. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
  2105. end)
  2106. if Player.Character:FindFirstChild("Inside) then
  2107. entering = true
  2108. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2109. wait(1)
  2110. gui.Music:Stop()
  2111. Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
  2112. exitinterior()
  2113. Player.Character.Inside:remove()
  2114. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
  2115. entering = false
  2116. else
  2117. loadinterior(proxitem.Interior.Value, Player.Nam)
  2118. entering = true
  2119. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2120. wait(1)
  2121. Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
  2122. local inside = Instance.new("StringValue", Player.Characte)
  2123. inside.Name = "Inside"
  2124. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
  2125. entering = false
  2126. end
  2127. do
  2128. Player.Character.Humanoid.WalkSpeed = 18
  2129. if proxitem.Name == "Merchant" and not menutoggledopen and not menuopen then
  2130. gui.Shop.Confirm.Visible = false
  2131. gui.ClickSound:Play()
  2132. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
  2133. delay(0.25, function()
  2134. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
  2135. end)
  2136. if not shopping then
  2137. makeBuyList()
  2138. gui.Shop.Visible = true
  2139. shopping = true
  2140. else
  2141. gui.Shop.Visible = false
  2142. shopping = false
  2143. end
  2144. else
  2145. if proxitem.Name == "PlayerHome" and not entering then
  2146. gui.ClickSound:Play()
  2147. Player.Character.Humanoid.WalkSpeed = 0
  2148. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
  2149. delay(0.25, function()
  2150. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
  2151. end)
  2152. if Player.Character:FindFirstChild("Inside) then
  2153. entering = true
  2154. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2155. wait(1)
  2156. Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
  2157. exitinterior()
  2158. Player.Character.Inside:remove()
  2159. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
  2160. Player.Character.Humanoid.WalkSpeed = 18
  2161. wait(1)
  2162. entering = false
  2163. else
  2164. workspace.CurrentCamera.CameraType = "Scriptable"
  2165. workspace.CurrentCamera:Interpolate(proxitem.One.CFram, proxitem.Two.CFrame, 0.5)
  2166. gui.Homes.Visible = true
  2167. gui.Homes.TL.Text = proxitem.Interior.Value
  2168. if Player.PlayerStats.Home.Value == proxitem.Interior.Value then
  2169. gui.Homes.Enter.TextLabel.Text = "Enter"
  2170. else
  2171. gui.Homes.Enter.TextLabel.Text = "Buy"
  2172. end
  2173. gui.Homes.Preview.Image = proxitem.Preview.Value
  2174. gui.Homes.Col.Text = "Col: " .. tostring(proxitem.Col.Value)
  2175. getOwnerList(proxitem.Interior.Value)
  2176. end
  2177. else
  2178. if proxitem.Name == "Door" and not entering then
  2179. Player.Character.Humanoid.WalkSpeed = 0
  2180. gui.ClickSound:Play()
  2181. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
  2182. delay(0.25, function()
  2183. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
  2184. end)
  2185. if proxitem.Place.Value ~= "Dungeon" and proxitem.Place.Value ~= "Boss" then
  2186. if Player.Character:FindFirstChild("Inside) then
  2187. entering = true
  2188. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2189. wait(1)
  2190. gui.Music:Stop()
  2191. Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
  2192. Player.Character.Inside:remove()
  2193. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
  2194. entering = false
  2195. else
  2196. entering = true
  2197. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2198. wait(1)
  2199. Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
  2200. local inside = Instance.new("StringValue", Player.Characte)
  2201. inside.Name = "Inside"
  2202. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
  2203. entering = false
  2204. end
  2205. else
  2206. do
  2207. if proxitem.Place.Value == "Dungeon" then
  2208. if Player.Character:FindFirstChild("Dungeon) then
  2209. entering = true
  2210. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2211. wait(1)
  2212. gui.Music:Stop()
  2213. Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
  2214. Player.Character.Dungeon:remove()
  2215. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
  2216. _G.Zone = "Field"
  2217. entering = false
  2218. else
  2219. entering = true
  2220. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2221. wait(1)
  2222. Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
  2223. local inside = Instance.new("StringValue", Player.Characte)
  2224. inside.Name = "Dungeon"
  2225. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
  2226. _G.Zone = "Dungeon"
  2227. entering = false
  2228. end
  2229. else
  2230. do
  2231. if proxitem.Place.Value == "Boss" then
  2232. if Player.Character:FindFirstChild("Boss) then
  2233. entering = true
  2234. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2235. wait(1)
  2236. gui.Music:Stop()
  2237. Player.Character.Torso.CFrame = proxitem.T1.CFrame + Vector3.new(0, 2, 0)
  2238. Player.Character.Boss:remove()
  2239. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0, "Out", "Quad", 0.5, true)
  2240. _G.Zone = "Dungeon"
  2241. entering = false
  2242. else
  2243. entering = true
  2244. gui.Black:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.5, true)
  2245. wait(1)
  2246. Player.Character.Torso.CFrame = proxitem.T2.CFrame + Vector3.new(0, 2, 0)
  2247. local inside = Instance.new("StringValue", Player.Characte)
  2248. inside.Name = "Boss"
  2249. gui.Black:TweenPosition(UDim2.new(0, 0, -1.2, 0), "Out", "Quad", 0.5, true)
  2250. _G.Zone = "Boss"
  2251. entering = false
  2252. end
  2253. end
  2254. do
  2255. Player.Character.Humanoid.WalkSpeed = 18
  2256. if proxitem.Name == "Smithing" and not menutoggledopen and not menuopen and not Player.PlayerGui:FindFirstChild("CraftingGame) then
  2257. gui.ClickSound:Play()
  2258. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
  2259. delay(0.25, function()
  2260. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0), "Out", "Quad", 0.25, true)
  2261. end)
  2262. craftmode.Value = "Smithing"
  2263. gui.Crafting.Visible = true
  2264. Player.Character.Humanoid.WalkSpeed = 0
  2265. else
  2266. if proxitem.Name == "NPCDialog" and not dialogdeb and not gui.Dialog.Visible then
  2267. dialogdeb = true
  2268. gui.ClickSound:Play()
  2269. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, 0, 0, "Out", "Quad", 0.25, true)
  2270. wait(0.25)
  2271. Player.PlayerGui.InteractionGui.Base.Frame.Key:TweenPosition(UDim2.new(0, 0, -0.2, 0, "Out", "Quad", 0.25, true)
  2272. local cam = workspace.CurrentCamera
  2273. local dialog = proxitem:WaitForChild("Dialog")
  2274. local camPart2 = proxitem:WaitForChild("CameraLook")
  2275. local oldCF = cam.CoordinateFrame
  2276. local oldFocus = cam.Focus
  2277. Player.Character.Humanoid.WalkSpeed = 0
  2278. Instance.new("IntValue", Player.Character).Name = "NoLockOn"
  2279. repeat
  2280. wait()
  2281. until cam.CameraType ~= "Scriptable"
  2282. cam.CameraType = "Scriptable"
  2283. cam:Interpolate(CFrame.new((Player.Character.Head.Position + camPart2.Position) / 2), camPart2.CFrame, 1)
  2284. local holder = gui.Dialog
  2285. local scroll = holder.Options.Scroll
  2286. local base = scroll.Base
  2287. local endDialog = function()
  2288. holder.Visible = false
  2289. holder.Talk.Text = ""
  2290. for _,v in pairs(scroll:children()) do
  2291. if v.Name ~= "Base" then
  2292. v:Remove()
  2293. end
  2294. end
  2295. cam:Interpolate(oldCF, oldFocus, 1)
  2296. wait(1)
  2297. Player.Character.Humanoid.WalkSpeed = 18
  2298. if Player.Character:FindFirstChild("NoLockOn") then
  2299. Player.Character.NoLockOn:Remove()
  2300. end
  2301. cam.CameraType = "Custom"
  2302. cam.CameraSubject = Player.Character.Humanoid
  2303. end
  2304.  
  2305. local getChoices = function(obj)
  2306. for _,v in pairs(scroll:children()) do
  2307. if v.Name ~= "Base" then
  2308. v:Remove()
  2309. end
  2310. end
  2311. local tab = obj:children()
  2312. do
  2313. scroll.CanvasSize = UDim2.new(0, 0, 0, 20 * #tab)
  2314. local choicedebounce = false
  2315. for i,v in pairs(tab) do
  2316. local new = base:Clone()
  2317. new.Visible = true
  2318. new.Name = v.Name
  2319. new.Text = v.UserDialog
  2320. new.Position = UDim2.new(0, 0, 0, 20 * (i - 1))
  2321. new.MouseButton1Click:connect(function()
  2322. if choicedebounce then
  2323. return
  2324. end
  2325. choicedebounce = true
  2326. if v:FindFirstChild("QuestStart") then
  2327. endDialog()
  2328. else
  2329. l_0_91_r10(v)
  2330. end
  2331. end)
  2332. new.Parent = scroll
  2333. end
  2334. local goodbye = base:Clone()
  2335. goodbye.Visible = true
  2336. goodbye.Name = "DialogChoice"
  2337. goodbye.Text = obj.GoodbyeDialog
  2338. goodbye.Position = UDim2.new(0, 0, 0, 20 * #tab)
  2339. goodbye.MouseButton1Click:connect(function()
  2340. if choicedebounce then
  2341. return
  2342. end
  2343. choicedebounce = true
  2344. endDialog()
  2345. end)
  2346. goodbye.Parent = scroll
  2347. if obj.Name ~= "Dialog" or not obj.InitialPrompt then
  2348. local text = obj.ResponseDialog
  2349. end
  2350. for i = 1, #text, 2 do
  2351. if choicedebounce then
  2352. return
  2353. end
  2354. holder.Talk.Text = text:sub(1, i)
  2355. gui.TXTSound:Play()
  2356. wait()
  2357. end
  2358. holder.Talk.Text = text
  2359. end
  2360. end
  2361.  
  2362. holder.Visible = true
  2363. dialogdeb = false
  2364. getChoices(dialog)
  2365. else
  2366. do
  2367. do
  2368. if proxitem.Name == "GMConsole" and gmAccess then
  2369. local cam = workspace.CurrentCamera
  2370. if gmgui.Adornee then
  2371. gmgui.Adornee = nil
  2372. gmgui.Close:Play()
  2373. gmgui.Ambience:Stop()
  2374. Player.CameraMode = 0
  2375. ForceModal.Modal = false
  2376. Player.Character.Humanoid.WalkSpeed = 18
  2377. wait(0.)
  2378. cam:Interpolate(gmOldCameraCF, gmOldCameraFocus, 0.25)
  2379. wait(0.)
  2380. FixCamera()
  2381. else
  2382. gmgui.Adornee = proxitem.MainScreen
  2383. gmgui.Open:Play()
  2384. gmgui.Ambience:Play()
  2385. gmOldCameraCF = cam.CoordinateFrame
  2386. gmOldCameraFocus = cam.Focus
  2387. Player.CameraMode = 1
  2388. ForceModal.Modal = true
  2389. Player.Character.Humanoid.WalkSpeed = 0
  2390. cam.CameraType = "Scriptable"
  2391. cam:Interpolate(CFrame.new(proxitem.CameraStart.Position, proxitem.MainScreen.Position), CFrame.new(proxitem.MainScreen.Position), 0.25)
  2392. end
  2393. for _,v in pairs(proxitem:children() do
  2394. if v:FindFirstChild("Decal) and (not gmgui.Adornee or not 0.25) then
  2395. do
  2396. v.Decal.Transparency = v.Name ~= "Screen" or 1
  2397. -- DECOMPILER ERROR at PC1905: LeaveBlock: unexpected jumping out IF_THEN_STMT
  2398.  
  2399. -- DECOMPILER ERROR at PC1905: LeaveBlock: unexpected jumping out IF_STMT
  2400.  
  2401. end
  2402. end
  2403. end
  2404. end
  2405. if key:byte() == 9 and not swordaction and not shopping and not craftingnow then
  2406. if menutoggledopen then
  2407. menutoggledclose = true
  2408. menutoggledopen = false
  2409. menuopen = true
  2410. else
  2411. if menutoggledclose then
  2412. menutoggledopen = true
  2413. menutoggledclose = false
  2414. menuopen = false
  2415. end
  2416. end
  2417. if menuopen == false and not swordequipped and not swordaction and not shopping and not craftingnow then
  2418. menutoggledopen = true
  2419. menutoggledclose = false
  2420. activeModel:SetActive(tru)
  2421. gui.Up:Play()
  2422. clearFrames()
  2423. clearMidFrames()
  2424. menugui.InfoImage.Visible = true
  2425. menugui.Menus.Position = UDim2.new(0., 0, 0.1, 0)
  2426. menugui.InfoImage.Position = UDim2.new(0.0, 0, 0.15, 0)
  2427. menugui:TweenPosition(UDim2.new(menugui.Position.X.Scale, menugui.Position.X.Offset, 0.5, -(mgsize.Y / 2), "Out", "Quad", 0.075, true)
  2428. coroutine.resume(coroutine.create(function()
  2429. for i = 1, 35 do
  2430. if menutoggledclose or workspace.CurrentCamera.m.GuiPart.Transparency <= 0.65 then
  2431. workspace.CurrentCamera.m.GuiPart.Transparency = 0.65
  2432. return
  2433. end
  2434. workspace.CurrentCamera.m.GuiPart.Transparency = workspace.CurrentCamera.m.GuiPart.Transparency - 0.01
  2435. wait(0.01)
  2436. end
  2437. end))
  2438. gui.Switch.Modal = true
  2439. clearFrames()
  2440. menugui.InfoImage.PName.Text = Player.Name:upper()
  2441. menugui.InfoImage.Col.Text = "Col: " .. PlayerStats.Col.Value
  2442. if PlayerStats.Guild.Value ~= 0 then
  2443. guildinfo = groupservice:GetGroupInfoAsync(PlayerStats.Guild.Valu)
  2444. menugui.InfoImage.Image = guildinfo.EmblemUrl
  2445. else
  2446. menugui.InfoImage.Image = infoimg
  2447. end
  2448. menuopen = true
  2449. menutoggledopen = false
  2450. end
  2451. menutoggledclose = true
  2452. menutoggledopen = false
  2453. menuopen = false
  2454. clearFrames()
  2455. gui.Switch.Modal = false
  2456. gui.Down:Play()
  2457. menugui:TweenPosition(UDim2.new(menugui.Position.X.Scale, menugui.Position.X.Offset, -1, 0, "Out", "Quad", 1, true)
  2458. for i = 1, 35 do
  2459. if menutoggledopen or workspace.CurrentCamera.m.GuiPart.Transparency >= 1 then
  2460. workspace.CurrentCamera.m.GuiPart.Transparency = 1
  2461. return
  2462. end
  2463. workspace.CurrentCamera.m.GuiPart.Transparency = workspace.CurrentCamera.m.GuiPart.Transparency + 0.01
  2464. wait(0.01)
  2465. end
  2466. workspace.CurrentCamera.m.GuiPart.Transparency = 1
  2467. activeModel:SetActive(fals)
  2468. menuopen = false
  2469. menutoggledclose = false
  2470. else
  2471. 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
  2472. sprinting = true
  2473. sprintdeb = true
  2474. local SprintSpeed = 28
  2475. local SprintFOV = 85
  2476. for i = workspace.CurrentCamera.FieldOfView, SprintFOV, 2 do
  2477. if not sprinting then
  2478. return
  2479. end
  2480. workspace.CurrentCamera.FieldOfView = i
  2481. wait()
  2482. end
  2483. if not sprinting then
  2484. return
  2485. end
  2486. workspace.CurrentCamera.FieldOfView = SprintFOV
  2487. Player.Character.Humanoid.WalkSpeed = SprintSpeed
  2488. while sprinting and not Player.Character.Humanoid.Sit and Player.Character.Humanoid.WalkSpeed == SprintSpeed and stamina.Value > 0 do
  2489. wait(0.1)
  2490. if not sprinting or Player.Character.Humanoid.Sit or Player.Character.Humanoid.WalkSpeed ~= SprintSpeed or stamina.Value == 0 then
  2491. KeyUp(key)
  2492. return
  2493. end
  2494. stamina.Value = stamina.Value - 1
  2495. end
  2496. KeyUp(key)
  2497. else
  2498. do
  2499. if key == "z" and Player.Party.Value ~= "" and CanZSwitch then
  2500. CanZSwitch = false
  2501. local Head = Player.Character.Head
  2502. local Torso = Player.Character.Torso
  2503. game.ReplicatedStorage:WaitForChild("ZSwitching"):FireServer(true)
  2504. game:service("Chat"):Chat(Head, "Switch!", "Blue")
  2505. local Vel = Instance.new("BodyVelocity")
  2506. Vel.P = 1000
  2507. Vel.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  2508. Vel.Velocity = Torso.CFrame.lookVector * -100
  2509. Vel.Parent = Torso
  2510. coroutine.resume(coroutine.create(function()
  2511. while Vel.Parent and wait() do
  2512. local Start = Torso.Position
  2513. local End = Start + Torso.CFrame.lookVector * -5
  2514. local Ray = Ray.new(Start, Start - End.unit * 5)
  2515. local Obj, Pos = workspace:FindPartOnRayWithIgnoreList(Ray, {Player.Character}, false, true)
  2516. if Obj then
  2517. Vel:Remove()
  2518. Torso.Velocity = Vector3.new()
  2519. Torso.RotVelocity = Vector3.new()
  2520. end
  2521. end
  2522. end))
  2523. delay(0.2, function()
  2524. Vel:Remove()
  2525. end)
  2526. game.ReplicatedStorage:WaitForChild("ZSwitching):FireServer(fals)
  2527. Mates.Switch.Bar:TweenSize((UDim2.new(0, 0, , ), nil, nil, 0., tru)
  2528. wait(0.2)
  2529. for i = 1, 30 do
  2530. wait()
  2531. Mates.Switch.Bar:TweenSize((UDim2.new(i / 30, 0, 1, 0), nil, nil, 0.2, true)
  2532. end
  2533. CanZSwitch = true
  2534. end
  2535. end
  2536. end
  2537. end
  2538. end
  2539. end
  2540. end
  2541. end
  2542. end
  2543. end
  2544. end
  2545. end
  2546. end
  2547. end
  2548. end
  2549. end
  2550. end
  2551. end
  2552. end
  2553. end
  2554. end
  2555. end
  2556. end
  2557. end
  2558. end
  2559. end
  2560. end
  2561. end
  2562. end
  2563.  
  2564. mouse.KeyDown:connect(onKeyDown)
  2565. KeyUp = function(key)
  2566. key = key:lower()
  2567. if key:byte() == 48 and sprinting and not sprintdeb2 then
  2568. sprinting = false
  2569. sprintdeb2 = true
  2570. if Player.Character.Humanoid.WalkSpeed > 0 then
  2571. Player.Character.Humanoid.WalkSpeed = 18
  2572. end
  2573. for i = workspace.CurrentCamera.FieldOfView, 70, -2 do
  2574. workspace.CurrentCamera.FieldOfView = i
  2575. wait()
  2576. end
  2577. workspace.CurrentCamera.FieldOfView = 70
  2578. sprintdeb = false
  2579. sprintdeb2 = false
  2580. end
  2581. end
  2582.  
  2583. mouse.KeyUp:connect(KeyUp)
  2584. slashing = false
  2585. slash = function()
  2586. if Player.Character:FindFirstChild("Sword") and not Player.Character:FindFirstChild("Sword2") and not swordaction then
  2587. swordaction = true
  2588. game.ReplicatedStorage:WaitForChild("InitClashing"):FireServer(1)
  2589. local pick = math.random(1, #swordsounds)
  2590. local pick2 = math.random(1, #script.SwordSlashes[assets[PlayerStats.Weapon.Value].Value]:GetChildren())
  2591. local newsound = script.SwordSounds[swordsounds[pick].Name]:clone()
  2592. newsound.Parent = Player.Character.Sword.Middle
  2593. newsound:Play()
  2594. local newanim = Player.Character.Humanoid:LoadAnimation(script.SwordSlashes[assets[PlayerStats.Weapon.Value].Value]:GetChildren()[pick2])
  2595. newanim:Play()
  2596. local gripparent = script.SwordSlashes[assets[PlayerStats.Weapon.Value].Value]:GetChildren()[pick2]
  2597. local swordtype = assets[PlayerStats.Weapon.Value].Value
  2598. WeldPing:FireServer(gripparent.Grip.Value, "Right Arm")
  2599. wait(0.6)
  2600. if swordtype ~= "Rapier" then
  2601. WeldPing:FireServer(swordtype .. " Held", "Right Arm")
  2602. else
  2603. WeldPing:FireServer("One-Handed Held", "Right Arm")
  2604. end
  2605. newanim:Stop()
  2606. newsound:remove()
  2607. swordaction = false
  2608. else
  2609. do
  2610. 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
  2611. swordaction = true
  2612. game.ReplicatedStorage:WaitForChild("InitClashing"):FireServer()
  2613. local pick = math.random(1, #swordsounds)
  2614. local pick2 = math.random(1, #script.SwordSlashes["Dual-Handed"]:GetChildren())
  2615. local newsound = script.SwordSounds[swordsounds[pick].Name]:clone()
  2616. newsound.Parent = Player.Character.Sword.Middle
  2617. newsound:Play()
  2618. local newanim = Player.Character.Humanoid:LoadAnimation(script.SwordSlashes["Dual-Handed"]:GetChildren()[pick2])
  2619. newanim:Play()
  2620. wait(0.6)
  2621. newanim:Stop()
  2622. newsound:remove()
  2623. swordaction = false
  2624. end
  2625. end
  2626. end
  2627. end
  2628.  
  2629. selecteditem = nil
  2630. selectedpickup = nil
  2631. mouse.Button1Down:connect(function()
  2632. if not candamage and not slashing and swordequipped then
  2633. slashing = true
  2634. candamage = true
  2635. slash()
  2636. slashing = false
  2637. candamage = false
  2638. end
  2639. local igpclone = game.ReplicatedStorage.ItemGuiPart:clone()
  2640. local hit, pos = customMouse.getTarget(32, {Player.Character}, false)
  2641. if not hit or not pos then
  2642. return
  2643. end
  2644. if (hit.Name == "Base" or hit.Name == "Middle") and hit.Parent.Name == "ItemPickup" then
  2645. if workspace.CurrentCamera:FindFirstChild("ItemGuiPart") then
  2646. Player.PlayerGui.ItemGui.Adornee = nil
  2647. workspace.CurrentCamera.ItemGuiPart:remove()
  2648. end
  2649. selecteditem = hit.Parent.Item.Value
  2650. selectedpickup = hit.Parent
  2651. igpclone.Parent = workspace
  2652. igpclone.CFrame = CFrame.new(hit.Position + Vector3.new(0, 3.5, 0), workspace.CurrentCamera.CoordinateFrame.p)
  2653. igpclone.Parent = workspace.CurrentCamera
  2654. if hit.Parent:FindFirstChild("Col") then
  2655. hit.Parent.Col.Value = assets[hit.Parent.Item.Value].Worth.Value
  2656. end
  2657. Player.PlayerGui.ItemGui.Adornee = igpclone
  2658. Player.PlayerGui.ItemGui.Back.NL.Text = hit.Parent.Item.Value
  2659. Player.PlayerGui.ItemGui.Back.Owner.Text = "Owner: Server"
  2660. if hit.Parent:FindFirstChild("Col") then
  2661. Player.PlayerGui.ItemGui.Back.TakeL.Text = "Buy For " .. tostring(hit.Parent.Col.Value) .. " Col"
  2662. Player.PlayerGui.ItemGui.Back.Take.Visible = false
  2663. Player.PlayerGui.ItemGui.Back.Buy.Visible = true
  2664. end
  2665. end
  2666. end)
  2667. ig = Player.PlayerGui.ItemGui
  2668. ig.Back.Buy.MouseButton1Down:connect(function()
  2669. if game.ReplicatedStorage:WaitForChild("ShopTransfer"):InvokeServer(true, selectedpickup.Item.Value) == true then
  2670. selectedpickup = nil
  2671. selecteditem = nil
  2672. if workspace.CurrentCamera:FindFirstChild("ItemGuiPart") then
  2673. workspace.CurrentCamera.ItemGuiPart:remove()
  2674. end
  2675. gui.Bag:Play()
  2676. else
  2677. gui.Err:Play()
  2678. selectedpickup = nil
  2679. if workspace.CurrentCamera:FindFirstChild("ItemGuiPart") then
  2680. workspace.CurrentCamera.ItemGuiPart:remove()
  2681. end
  2682. end
  2683. end)
  2684. ig.Back.Inspect.MouseButton1Down:connect(function()
  2685. if selectedpickup ~= nil then
  2686. inspect(selectedpickup.Item.Value)
  2687. end
  2688. end)
  2689. findThingWithinDistance = function(distance)
  2690. for _,v in pairs(workspace.Interactions:GetChildren()) do
  2691. if v:FindFirstChild("ProxBase") and not Player.Character:FindFirstChild("Inside") and Player.Character.Torso.CFrame.p - v.ProxBase.CFrame.p.magnitude <= distance then
  2692. proxitem = v
  2693. return v
  2694. end
  2695. if v:FindFirstChild("ProxBase") and Player.Character:FindFirstChild("Inside") and Player.Character.Torso.CFrame.p - v.ProxBase.CFrame.p.magnitude <= distance then
  2696. proxitem = v
  2697. return v
  2698. end
  2699. if v:FindFirstChild("ProxBase2") and Player.Character:FindFirstChild("Inside") and Player.Character.Torso.CFrame.p - v.ProxBase2.CFrame.p.magnitude <= distance then
  2700. proxitem = v
  2701. return v
  2702. end
  2703. 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
  2704. proxitem = v
  2705. return v
  2706. end
  2707. 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
  2708. proxitem = v
  2709. return v
  2710. end
  2711. end
  2712. return false
  2713. end
  2714.  
  2715. local level = PlayerStats.Level
  2716. local exp = PlayerStats.EXP
  2717. local StatsEvent = game.ReplicatedStorage:WaitForChild("StatsEvent")
  2718. local StatsCache = {}
  2719. ProtectStats = function(Plr, Folder)
  2720. if not StatsCache[Plr] then
  2721. StatsCache[Plr] = {}
  2722. end
  2723. for _,v in pairs(Folder:children()) do
  2724. do
  2725. StatsCache[Plr][v.Name] = v.Value
  2726. v.Changed:connect(function(value)
  2727. if value ~= StatsCache[Plr][v.Name] then
  2728. v.Value = StatsCache[Plr][v.Name]
  2729. end
  2730. end)
  2731. end
  2732. end
  2733. end
  2734.  
  2735. StatsEvent.OnClientEvent:connect(function(...)
  2736. local Args = {...}
  2737. if Args[1] == "UpdateStat" then
  2738. local Affected = Args[2]
  2739. local Name = Args[3]
  2740. local Value = Args[4]
  2741. if not StatsCache[Affected] then
  2742. StatsCache[Affected] = {}
  2743. end
  2744. StatsCache[Affected][Name] = Value
  2745. if Affected:FindFirstChild("PlayerStats") and Affected.PlayerStats:FindFirstChild(Name) then
  2746. Affected.PlayerStats[Name].Value = Value
  2747. end
  2748. if Affected == Player then
  2749. if Name == "Level" then
  2750. gui.LevelSound:Play()
  2751. else
  2752. if Name:find("Skill") then
  2753. listSwordSkills()
  2754. else
  2755. if Name == "Inventory" then
  2756. listInv(invfilter, true)
  2757. end
  2758. end
  2759. end
  2760. end
  2761. if Name == "PlayerHomePrivacy" and gui.Homes.Visible and proxitem and proxitem:FindFirstChild("Interior") then
  2762. getOwnerList(proxitem.Interior.Value)
  2763. end
  2764. end
  2765. end)
  2766. game.Players.ChildAdded:connect(function(child)
  2767. if child:IsA("Player") then
  2768. ProtectStats(child, child:WaitForChild("PlayerStats"))
  2769. end
  2770. end)
  2771. coroutine.resume(coroutine.create(function()
  2772. for _,v in pairs(game.Players:GetPlayers()) do
  2773. ProtectStats(v, v:WaitForChild("PlayerStats"))
  2774. end
  2775. end))
  2776. game.ReplicatedStorage:WaitForChild("PurchaseMade).OnClientEvent:connect(function(...)
  2777. local Args = {...}
  2778. if Args[1] == "Barber" then
  2779. Player.Character.Humanoid.WalkSpeed = 0
  2780. Editor.Visible = true
  2781. preview()
  2782. end
  2783. end)
  2784. game.ReplicatedStorage:WaitForChild("LootDrop).OnClientEvent:connect(function(...)
  2785. local Args = {...}
  2786. if Args[1] == "ShowLoot" then
  2787. local Exp = Args[2]
  2788. do
  2789. local Col = Args[3]
  2790. local Amount = Args[4]
  2791. local Part = game.ReplicatedStorage:WaitForChild("LootGuiPart"):Clone()
  2792. local Back = Part.SurfaceGui.Back
  2793. if MPService:PlayerOwnsAsset(Player, 1149834979) then
  2794. Exp = Exp * 2
  2795. end
  2796. Back.Exp.Text = Exp
  2797. Back.Col.Text = Col
  2798. Back.Items.Text = Amount
  2799. local Torso = Player.Character.Torso
  2800. local Pos = Torso.CFrame + Torso.CFrame.lookVector * 3.p
  2801. Part.CFrame = CFrame.new(Pos, workspace.CurrentCamera.CoordinateFrame.p)
  2802. Part.Parent = workspace
  2803. delay(4, function()
  2804. Part:Destroy()
  2805. end)
  2806. while Part and Part.Parent and wait() do
  2807. Part.CFrame = CFrame.new(Pos, workspace.CurrentCamera.CoordinateFrame.)
  2808. end
  2809. end
  2810. end
  2811. end)
  2812. game.ReplicatedStorage:WaitForChild("StopSound).OnClientEvent:connect(function(Sound)
  2813. if type(Sound) == "userdata" then
  2814. Sound:Stop()
  2815. else
  2816. if type(Sound) == "table" then
  2817. for _,v in pairs(Sound) do
  2818. v:Stop()
  2819. end
  2820. end
  2821. end
  2822. end)
  2823. game.ReplicatedStorage:WaitForChild("StaminaUpdate).OnClientEvent:connect(function(Arg)
  2824. if Arg == "SetToFull" then
  2825. stamina.Value = PlayerStats:WaitForChild("MaxStamina").Value
  2826. end
  2827. end)
  2828. local StatusEffectImages = {Paralysis = "rbxassetid://330727828", Poison = "rbxassetid://172815017", Bleeding = ""}
  2829. local ActiveEffects = {}
  2830. UpdateStatusEffects = function()
  2831. local Amount = #gui.Health.Effects:children()
  2832. for i = 1, Amount do
  2833. gui.Health.Effects[i].Image = ""
  2834. end
  2835. local Index = 1
  2836. for Type,Active in pairs(ActiveEffects) do
  2837. if Active then
  2838. gui.Health.Effects[Index].Image = StatusEffectImages[Type]
  2839. Index = Index + 1
  2840. end
  2841. end
  2842. end
  2843.  
  2844. game.ReplicatedStorage:WaitForChild("StatusEffect").OnClientEvent:connect(function(Mode, Type)
  2845. ActiveEffects[Type] = ((Mode ~= "Add" or Mode == "Remove") and false)
  2846. if Mode == "Add" then
  2847. if Type == "Poison" then
  2848. Player.Character.HealthRegen.Toggle:FireServer(false)
  2849. elseif Type == "Bleeding" then
  2850. Player.Character.HealthRegen.Toggle:FireServer(false)
  2851. end
  2852. elseif Mode == "Remove" then
  2853. if Type == "Paralysis" then
  2854. human.PlatformStand = false
  2855. elseif Type == "Poison" and not ActiveEffects.Bleeding then
  2856. Player.Character.HealthRegen.Toggle:FireServer(true)
  2857. elseif Type == "Bleeding" and not ActiveEffects.Poison then
  2858. Player.Character.HealthRegen.Toggle:FireServer(true)
  2859. end
  2860. end
  2861. UpdateStatusEffects()
  2862. -- DECOMPILER ERROR: 8 unprocessed JMP targets
  2863. end)
  2864. human.Changed:connect(function(prop)
  2865. if prop == "PlatformStand" and ActiveEffects.Paralysis then
  2866. human.PlatformStand = true
  2867. end
  2868. end)
  2869. local Mobs = workspace:WaitForChild("Mobs)
  2870. local SelectBar = function(Num, Player, Parts)
  2871. do
  2872. local Multiple = not Parts or Parts > 5
  2873. for _,v in pairs(HBFolder[Player]:children()) do
  2874. local Number = tonumber(v.Name)
  2875. if Number then
  2876. if Number == Num then
  2877. v.Transparency = 0
  2878. elseif not Multiple or (Number % 5 == 0 or not 0) then
  2879. do
  2880. v.Transparency = Number >= Num or 1
  2881. if Num < Number then
  2882. v.Transparency = 1
  2883. end
  2884. -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_THEN_STMT
  2885.  
  2886. -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_STMT
  2887.  
  2888. -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  2889.  
  2890. -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_STMT
  2891.  
  2892. -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_THEN_STMT
  2893.  
  2894. -- DECOMPILER ERROR at PC39: LeaveBlock: unexpected jumping out IF_STMT
  2895.  
  2896. end
  2897. end
  2898. end
  2899. end
  2900. -- DECOMPILER ERROR: 8 unprocessed JMP targets
  2901. end
  2902. end
  2903.  
  2904. RepImages = {"rbxassetid://318393081", "rbxassetid://318393143", "rbxassetid://318393179"}
  2905. MatProg = gui.Collecting
  2906. Mat = workspace:WaitForChild("Materials")
  2907. OreInterval = 5
  2908. TreeInterval = 10
  2909. PlantInterval = 1
  2910. MatDebounce = false
  2911. for _,v in pairs(Mat:GetChildren()) do
  2912. if #Mat:GetChildren() ~= 0 then
  2913. v.C.D.MouseClick:connect(function()
  2914. if v.Owner.Value == "" and v.Core.Transparency == 0 and not MatDebounce then
  2915. MatDebounce = true
  2916. Player.Character.Humanoid.WalkSpeed = 0
  2917. game.ReplicatedStorage.ClaimMaterial:FireServer(v.Id.Value)
  2918. local interval = 0
  2919. local sound = nil
  2920. if v:FindFirstChild("Ore") then
  2921. interval = OreInterval
  2922. sound = gui.Mining
  2923. else
  2924. if v:FindFirstChild("Tree") then
  2925. interval = TreeInterval
  2926. sound = gui.Chopping
  2927. else
  2928. interval = PlantInterval
  2929. sound = gui.End
  2930. end
  2931. end
  2932. MatProg.Visible = true
  2933. MatProg.TextLabel.Text = "Obtaining " .. v.Name .. "..."
  2934. MatProg.Progress.Bar:TweenSize(UDim2.new(1, 0, 1, 0), "Out", "Quad", interval, true)
  2935. sound:Play()
  2936. wait(interval)
  2937. game.ReplicatedStorage.ToggleMaterial:FireServer(v.Id.Value)
  2938. sound:Stop()
  2939. gui.Bag:Play()
  2940. MatProg.Progress.Bar:TweenSize(UDim2.new(0, 0, 1, 0), "Out", "Quad", 0.5, true)
  2941. MatProg.TextLabel.Text = "Obtained " .. v.Name .. "!"
  2942. wait(0.5)
  2943. MatProg.Visible = false
  2944. Player.Character.Humanoid.WalkSpeed = 18
  2945. MatDebounce = false
  2946. end
  2947. end)
  2948. end
  2949. end
  2950. local OptionsDeb = {}
  2951. local PassiveModePass = 1114443847
  2952. local PartyInviteFilter = {"All", "Friends", "None"}
  2953. local PlayerHomePrivacy = {"Everyone", "Friends", "Party", "Guild", "Locked"}
  2954. for _,v in pairs(menugui.Frames.Options.Frame:children()) do
  2955. if v:IsA("TextButton") then
  2956. OptionsDeb[v] = false
  2957. v.MouseButton1Click:connect(function()
  2958. if OptionsDeb[v] then
  2959. return
  2960. end
  2961. OptionsDeb[v] = true
  2962. gui.ClickSound:Play()
  2963. if v.Name == "ToggleHair" then
  2964. game.ReplicatedStorage:WaitForChild("ChangeOption"):InvokeServer("HairStatus", not PlayerStats.HairStatus.Value)
  2965. UpdateCharacter()
  2966. else
  2967. if v.Name == "TogglePassive" then
  2968. if not MPService:PlayerOwnsAsset(Player, PassiveModePass) then
  2969. MPService:PromptPurchase(Player, PassiveModePass)
  2970. wait(0.5)
  2971. OptionsDeb[v] = false
  2972. return
  2973. end
  2974. if not checkSafeZone() or _G.Zone ~= "Town" then
  2975. Notification("Option Change Failed", "You must be in a safezone to change your passive mode.", "rbxassetid://268373553", nil)
  2976. wait(0.5)
  2977. OptionsDeb[v] = false
  2978. return
  2979. end
  2980. game.ReplicatedStorage:WaitForChild("ChangeOption"):InvokeServer("PassiveMode", not PlayerStats.PassiveMode.Value)
  2981. UpdateCharacter()
  2982. else
  2983. if v.Name == "PartyInviteFilter" then
  2984. local Current = PlayerStats.PartyInviteFilter.Value
  2985. for i,v in pairs(PartyInviteFilter) do
  2986. if Current:lower() == v:lower() then
  2987. if not PartyInviteFilter[i + 1] then
  2988. local New = PartyInviteFilter[1]
  2989. end
  2990. game.ReplicatedStorage:WaitForChild("ChangeOption"):InvokeServer("PartyInviteFilter", New)
  2991. break
  2992. end
  2993. end
  2994. else
  2995. do
  2996. if v.Name == "PlayerHomePrivacy" then
  2997. local Current = PlayerStats.PlayerHomePrivacy.Value
  2998. for i,v in pairs(PlayerHomePrivacy) do
  2999. if Current:lower() == v:lower() then
  3000. if not PlayerHomePrivacy[i + 1] then
  3001. local New = PlayerHomePrivacy[1]
  3002. end
  3003. game.ReplicatedStorage:WaitForChild("ChangeOption"):InvokeServer("PlayerHomePrivacy", New)
  3004. break
  3005. end
  3006. end
  3007. end
  3008. do
  3009. wait(0.5)
  3010. OptionsDeb[v] = false
  3011. end
  3012. end
  3013. end
  3014. end
  3015. end
  3016. end)
  3017. end
  3018. end
  3019. Player.Character.Humanoid.Died:connect(function()
  3020. if ginterior.Value ~= "" then
  3021. exitinterior()
  3022. end
  3023. inside.Value = false
  3024. ginterior.Value = ""
  3025. game.ReplicatedStorage.IntValuesChanged:FireServer(false, "")
  3026. if checkSafeZone() == true then
  3027. _G.Zone = "Town"
  3028. else
  3029. _G.Zone = "Field"
  3030. end
  3031. if workspace.CurrentCamera:FindFirstChild("m") then
  3032. workspace.CurrentCamera.m:Destroy()
  3033. end
  3034. end)
  3035. while 1 do
  3036. wait(0.025)
  3037. gui.Health.Health.Ring.Rotation = gui.Health.Health.Ring.Rotation + 1
  3038. if findThingWithinDistance(8) then
  3039. local thing = proxitem
  3040. if thing.Name == "Sign" then
  3041. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3042. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Read Sign"
  3043. end
  3044. if thing.Name == "Merchant" then
  3045. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3046. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Speak to Merchant"
  3047. end
  3048. if thing.Name == "Barber" then
  3049. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3050. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Change Character"
  3051. end
  3052. if thing.Name == "Door" then
  3053. if Player.Character:FindFirstChild("Inside) then
  3054. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase2
  3055. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Place.Value
  3056. else
  3057. if Player.Character:FindFirstChild("Dungeon) and _G.Zone == "Dungeon" then
  3058. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase2
  3059. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Place.Value
  3060. else
  3061. if Player.Character:FindFirstChild("Boss) and _G.Zone == "Boss" then
  3062. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase2
  3063. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Place.Value
  3064. else
  3065. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3066. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Enter " .. thing.Place.Value
  3067. end
  3068. end
  3069. end
  3070. end
  3071. if thing.Name == "PlayerHome" then
  3072. if Player.Character:FindFirstChild("Inside) then
  3073. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase2
  3074. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Interior.Value
  3075. else
  3076. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3077. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Enter " .. thing.Interior.Value
  3078. end
  3079. end
  3080. if thing.Name == "GuildHome" and Player.PlayerStats.Guild.Value == thing.Guild.Value then
  3081. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3082. if Player.Character:FindFirstChild("Inside) then
  3083. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Interior.Value
  3084. else
  3085. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Enter " .. thing.Interior.Value
  3086. end
  3087. end
  3088. if thing.Name == "TeleportDoor" then
  3089. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3090. if Player.Character:FindFirstChild("Inside) then
  3091. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Exit " .. thing.Interior.Value
  3092. else
  3093. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Enter " .. thing.Interior.Value
  3094. end
  3095. end
  3096. if thing.Name == "Smithing" then
  3097. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3098. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = "Blacksmithing"
  3099. end
  3100. if thing.Name == "Fishing" and not _G.Fishing then
  3101. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3102. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = FishingCooldown <= math.abs(tick() - _G.LastFishingTic) and "Start Fishing" or "5 minute cooldown"
  3103. end
  3104. if thing.Name == "NPCDialog" then
  3105. if not gui.Dialog.Visible then
  3106. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3107. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = thing.InteractText.Value
  3108. else
  3109. Player.PlayerGui.InteractionGui.Adornee = nil
  3110. end
  3111. end
  3112. if thing.Name == "GMConsole" then
  3113. Player.PlayerGui.InteractionGui.Adornee = thing.ProxBase
  3114. Player.PlayerGui.InteractionGui.Base.TextLabel.Text = not gmgui.Adornee and "Open GM Console" or "Close GM Console"
  3115. end
  3116. else
  3117. do
  3118. Player.PlayerGui.InteractionGui.Adornee = nil
  3119. proxitem = nil
  3120. shopping = false
  3121. gui.Shop.Visible = false
  3122. do
  3123. if gui.Homes.Visible then
  3124. local cam = workspace.CurrentCamera
  3125. cam.CameraType = "Custom"
  3126. cam.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
  3127. gui.Homes.Visible = false
  3128. Player.Character.Humanoid.WalkSpeed = 18
  3129. end
  3130. if workspace.CurrentCamera:FindFirstChild("ItemGuiPart) then
  3131. workspace.CurrentCamera.ItemGuiPart.CFrame = CFrame.new(workspace.CurrentCamera.ItemGuiPart.Positio, workspace.CurrentCamera.CoordinateFrame.p)
  3132. end
  3133. gui.Health.NameLabel.Text = string.upper(Player.Nam) .. " | HP:" .. math.floor(Player.Character.Humanoid.Health) .. "/" .. Player.Character.Humanoid.MaxHealth
  3134. menugui.InfoImage.Col.Text = "Col: " .. tostring(PlayerStats.Col.Valu)
  3135. menugui.InfoImage.Exp.Text = "EXP: " .. tostring(exp.Valu) .. "/" .. tostring(neededExp(level.Value))
  3136. menugui.InfoImage.Level.Text = "Level: " .. tostring(level.Valu)
  3137. gui.Health.AP.TextLabel.Text = "AP - " .. tostring(gui.AP.Valu) .. "/300"
  3138. gui.Health.AP.Bar.Size = UDim2.new(gui.AP.Value / 30, , 1, 0)
  3139. gui.Health.Stamina.TextLabel.Text = "Stamina - " .. gui.Stamina.Value .. "/" .. PlayerStats.MaxStamina.Value
  3140. gui.Health.Stamina.Bar.Size = UDim2.new(gui.Stamina.Value / PlayerStats.MaxStamina.Valu, , 1, 0)
  3141. if not RepImages[PlayerStats.Rep.Value + 1] then
  3142. gui.Health.Rep.Image = RepImages[1]
  3143. gui.Health.PassiveMode.Visible = PlayerStats.PassiveMode.Value
  3144. if Player.Character:FindFirstChild("BlockValue) and Player.Character.BlockValue.Value and (not swordequipped or not swordaction) then
  3145. game.ReplicatedStorage:WaitForChild("BlockValue):FireServer(fals)
  3146. end
  3147. for i = 1, 3 do
  3148. local Person = Mates:FindFirstChild(i)
  3149. if Person.PlayerName.Text ~= "" then
  3150. local Find = game.Players:FindFirstChild(Person.PlayerName.Tex)
  3151. if Find and Find.Character and Find.Character:FindFirstChild("Humanoid") then
  3152. local Human = Find.Character.Humanoid
  3153. Person.Health.Base:TweenPosition(UDim2.new(Human.Health / Human.MaxHealth - 1, 0, 0, 0), "Out", "Quad", 0.1, true, nil)
  3154. Person.Health.Base.Bar:TweenPosition(UDim2.new(1 - Human.Health / Human.MaxHealth, 0, 0, 0), "Out", "Quad", 0.1, true, nil)
  3155. if Human.Health <= Human.MaxHealth * 0.3 then
  3156. Person.Health.Base.Bar.ImageColor3 = Color3.new(1, 0, 0)
  3157. else
  3158. if Human.MaxHealth * 0.3 < Human.Health and Human.Health < Human.MaxHealth * 0.7 then
  3159. Person.Health.Base.Bar.ImageColor3 = Color3.new(1, 0.66666666666667, 0)
  3160. else
  3161. if Human.MaxHealth * 0.7 <= Human.Health then
  3162. Person.Health.Base.Bar.ImageColor3 = Color3.new(1, 1, 1)
  3163. end
  3164. end
  3165. end
  3166. end
  3167. end
  3168. end
  3169. if Party.Value ~= "" then
  3170. Mates.Switch.Visible = true
  3171. else
  3172. Mates.Switch.Visible = false
  3173. end
  3174. for _,v in pairs(game.Players:GetPlayers()) do
  3175. 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
  3176. local HB = createHB(v.Name, tru)
  3177. local HW = HB.GuiPart.HeadWeld
  3178. HW.Part0 = v.Character.Head
  3179. HW.Part1 = HB.GuiPart
  3180. end
  3181. end
  3182. for _,v in pairs(Mobs:GetChildren()) do
  3183. local IsBoss = (v:FindFirstChild("IsBoss) and false)
  3184. local HB = createHB(v.Nam, false, v.Mob.Value, IsBoss)
  3185. HB.Rep.BrickColor = BrickColor.new("Really red")
  3186. local HW = HB.GuiPart.HeadWeld
  3187. HW.Part0 = v.Head
  3188. HW.Part1 = HB.GuiPart
  3189. end
  3190. for _,h in pairs(HBFolder:GetChildren()) do
  3191. local plr = game.Players:FindFirstChild(h.Nam)
  3192. if h:FindFirstChild("GuiPart") and h.GuiPart:FindFirstChild("HeadWeld") then
  3193. if plr and h:FindFirstChild("IsPlayer") then
  3194. local stats = plr:FindFirstChild("PlayerStats")
  3195. 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
  3196. local hpos = plr.Character.Head.Position
  3197. local CJ = CFrame.new(hpos)
  3198. local New = CFrame.new(hpos + Vector3.new(0.4, 2.4, 0), workspace.CurrentCamera.CoordinateFrame.p)
  3199. h.GuiPart.HeadWeld.C0 = plr.Character.Head.CFrame:inverse() * CJ
  3200. h.GuiPart.HeadWeld.C1 = New:inverse() * CJ
  3201. local hum = plr.Character.Humanoid
  3202. local hp = hum.Health
  3203. local max = hum.MaxHealth
  3204. local percent = hp / max * 100
  3205. if 0 <= percent and percent < 20 then
  3206. SelectBar(1, h.Name)
  3207. elseif 20 <= percent and percent < 40 then
  3208. SelectBar(2, h.Name)
  3209. elseif 40 <= percent and percent < 60 then
  3210. SelectBar(3, h.Name)
  3211. elseif 60 <= percent and percent < 80 then
  3212. SelectBar(4, h.Name)
  3213. elseif 80 <= percent then
  3214. SelectBar(5, h.Name)
  3215. end
  3216. if (stats.Rep.Value ~= 0 or not "Lime green") and (stats.Rep.Value ~= 1 or not "Deep orange") then
  3217. do
  3218. do
  3219. h.Rep.BrickColor = BrickColor.new(not stats:FindFirstChild("Rep") or "Really red")
  3220. if stats:FindFirstChild("PassiveMode") then
  3221. h.GuiPart2.PassiveMode.ImageLabel.Visible = stats.PassiveMode.Value
  3222. end
  3223. h:Destroy()
  3224. do
  3225. do
  3226. local mob = Mobs:FindFirstChild(h.Name)
  3227. if mob and mob:FindFirstChild("Head") and mob:FindFirstChild("Humanoid") and 0 < mob.Humanoid.Health then
  3228. local hpos = mob.Head.Position
  3229. local CJ = CFrame.new(hpos)
  3230. local New = CFrame.new(hpos + Vector3.new(0.4, 2.4, 0), workspace.CurrentCamera.CoordinateFrame.p)
  3231. h.GuiPart.HeadWeld.C0 = mob.Head.CFrame:inverse() * CJ
  3232. h.GuiPart.HeadWeld.C1 = New:inverse() * CJ
  3233. local hum = mob.Humanoid
  3234. local hp = hum.Health
  3235. local max = hum.MaxHealth
  3236. local percent = hp / max * 100
  3237. local bars = nil
  3238. if mob:FindFirstChild("IsBoss") then
  3239. bars = 3
  3240. else
  3241. bars = 1
  3242. end
  3243. local parts = 100 / (5 * bars)
  3244. local nextpercent = 0
  3245. for i = 1, 5 * bars do
  3246. nextpercent = nextpercent + parts
  3247. local current = nextpercent - parts
  3248. if 100 - parts <= percent then
  3249. SelectBar(5 * bars, h.Name, 5 * bars)
  3250. break
  3251. elseif current <= percent and percent < nextpercent then
  3252. SelectBar(i, h.Name, 5 * bars)
  3253. end
  3254. end
  3255. else
  3256. h:Destroy()
  3257. end
  3258. h:Destroy()
  3259. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out DO_STMT
  3260.  
  3261. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out DO_STMT
  3262.  
  3263. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out DO_STMT
  3264.  
  3265. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out IF_THEN_STMT
  3266.  
  3267. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out IF_STMT
  3268.  
  3269. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out IF_THEN_STMT
  3270.  
  3271. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out IF_STMT
  3272.  
  3273. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out IF_THEN_STMT
  3274.  
  3275. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out IF_STMT
  3276.  
  3277. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out IF_THEN_STMT
  3278.  
  3279. -- DECOMPILER ERROR at PC2904: LeaveBlock: unexpected jumping out IF_STMT
  3280.  
  3281. end
  3282. end
  3283. end
  3284. end
  3285. end
  3286. end
  3287. end
  3288. end
  3289. end
  3290. for _,v in pairs(menugui.Frames.Stats.Frame:children()) do
  3291. if v:IsA("TextLabel) and PlayerStats:FindFirstChild(v.Nam) then
  3292. local Stat = PlayerStats[v.Name]
  3293. v.Text = v.Name .. " | " .. Stat.Value .. (v.Name:find("Skill") and "/500" or "")
  3294. end
  3295. end
  3296. for _,c in pairs(game.Players:GetChildren()) do
  3297. -- DECOMPILER ERROR at PC3009: Unhandled construct in 'MakeBoolean' P1
  3298.  
  3299. 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
  3300. c.Character.Torso.CFrame = CFrame.new(math.random(100, 50000), math.random(10000, 50000), math.random(100, 50000))
  3301. c.Character.Parent = game.Lighting
  3302. end
  3303. if c.Character and c.Character.Parent ~= workspace then
  3304. c.Character.Parent = workspace
  3305. c.Character:MakeJoints()
  3306. end
  3307. if c.Character and c.Character.Parent ~= workspace then
  3308. c.Character.Parent = workspace
  3309. c.Character:MakeJoints()
  3310. end
  3311. end
  3312. menugui.Frames.Options.Frame.ToggleHair.TextLabel.Text = "Hair [" .. (PlayerStats.HairStatus.Value and "ON" or "OFF") .. "]"
  3313. menugui.Frames.Options.Frame.TogglePassive.TextLabel.Text = "Passive Mode [" .. (PlayerStats.PassiveMode.Value and "ON" or "OFF") .. "]"
  3314. menugui.Frames.Options.Frame.PartyInviteFilter.TextLabel.Text = "Party Invite Filter [" .. PlayerStats.PartyInviteFilter.Value:upper() .. "]"
  3315. menugui.Frames.Options.Frame.PlayerHomePrivacy.TextLabel.Text = "Player Home Privacy [" .. PlayerStats.PlayerHomePrivacy.Value:upper() .. "]"
  3316. -- DECOMPILER ERROR at PC3123: LeaveBlock: unexpected jumping out IF_THEN_STMT
  3317.  
  3318. -- DECOMPILER ERROR at PC3123: LeaveBlock: unexpected jumping out IF_STMT
  3319.  
  3320. -- DECOMPILER ERROR at PC3123: LeaveBlock: unexpected jumping out DO_STMT
  3321.  
  3322. -- DECOMPILER ERROR at PC3123: LeaveBlock: unexpected jumping out DO_STMT
  3323.  
  3324. -- DECOMPILER ERROR at PC3123: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  3325.  
  3326. -- DECOMPILER ERROR at PC3123: LeaveBlock: unexpected jumping out IF_STMT
  3327.  
  3328. end
  3329. end
  3330. end
  3331. end
  3332. end
  3333. end
  3334. -- DECOMPILER ERROR: 31 unprocessed JMP targets
  3335. end
  3336. end
  3337. end
  3338. end
  3339. end
  3340. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement