Guest User

Black Clover Online

a guest
Mar 3rd, 2018
7,899
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 106.15 KB | None | 0 0
  1. game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
  2. game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
  3. wait()
  4. if not game:GetService("RunService"):IsStudio() then
  5. game.ReplicatedFirst.Loading.BindableFunction:Invoke("LOADING")
  6. end
  7. workspace.IgnoreFolder.LocalItems:ClearAllChildren()
  8. local player = game.Players.LocalPlayer
  9. local character = player.Character
  10. local camera = workspace.CurrentCamera
  11. local DATAFOLDER = player:WaitForChild("DataFolder")
  12. local Grimoire_Tool = player.Backpack:WaitForChild("Book")
  13. local mouse = player:GetMouse()
  14. mouse.TargetFilter = workspace.IgnoreFolder
  15. local MAINGUI = player.PlayerGui:WaitForChild("MainGUI")
  16. local LevelSystem = require(game.ReplicatedStorage:WaitForChild("LevelSystem"))
  17. local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent")
  18. local RemoteFunction = game.ReplicatedStorage:WaitForChild("RemoteFunction")
  19. local PASSCODE = RemoteFunction:InvokeServer("PASSCODE")
  20. local SKILLTREE = game.ReplicatedStorage:WaitForChild(DATAFOLDER.MagicType.Value .. "MagicSkills"):Clone()
  21. SKILLTREE.Parent = MAINGUI
  22. game.ReplicatedStorage:WaitForChild("Experience"):Clone().Parent = MAINGUI
  23. for i, v in pairs(SKILLTREE.Center:GetChildren()) do
  24. if v:IsA("ImageLabel") and v ~= SKILLTREE.Center.CLOVER then
  25. local TextLabel = Instance.new("TextLabel")
  26. TextLabel.ZIndex = 6
  27. TextLabel.Size = UDim2.new(0, 100, 0, 10)
  28. TextLabel.Position = UDim2.new(0, 0, 0, -5)
  29. TextLabel.BackgroundTransparency = 1
  30. TextLabel.Text = v.Name
  31. TextLabel.TextStrokeTransparency = 0
  32. TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
  33. TextLabel.FontSize = Enum.FontSize.Size14
  34. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  35. TextLabel.Font = Enum.Font.Arcade
  36. TextLabel.Parent = v
  37. end
  38. end
  39. for i, v in pairs(SKILLTREE.Center.Moves:GetChildren()) do
  40. do
  41. local TextLabel = Instance.new("TextLabel")
  42. TextLabel.BorderSizePixel = 0
  43. TextLabel.TextWrapped = false
  44. TextLabel.ZIndex = 7
  45. TextLabel.Size = UDim2.new(0, 100, 0, 20)
  46. TextLabel.Position = UDim2.new(0, 40, 0, -10)
  47. TextLabel.BackgroundTransparency = 0.5
  48. TextLabel.BackgroundColor3 = Color3.new(0, 0, 0)
  49. TextLabel.TextSize = 16
  50. TextLabel.Text = v.Name
  51. TextLabel.TextStrokeTransparency = 1
  52. TextLabel.TextScaled = false
  53. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  54. TextLabel.Font = Enum.Font.ArialBold
  55. TextLabel.Visible = false
  56. TextLabel.Parent = v
  57. local TextLvl = TextLabel:Clone()
  58. TextLvl.BorderSizePixel = 1
  59. TextLvl.TextScaled = true
  60. TextLvl.Visible = true
  61. TextLvl.Size = UDim2.new(0, 20, 0, 20)
  62. TextLvl.Position = UDim2.new(0, -20, 0, 0)
  63. TextLvl.Text = v.LVL_TAG.Value
  64. TextLvl.Parent = TextLabel
  65. local TextDescription = TextLvl:Clone()
  66. TextDescription.TextWrapped = false
  67. TextDescription.BorderSizePixel = 0
  68. TextDescription.TextSize = 11
  69. TextDescription.TextScaled = false
  70. TextDescription.Visible = true
  71. TextDescription.Size = UDim2.new(0, 100, 0, 40)
  72. TextDescription.Position = UDim2.new(0, 0, 0, 20)
  73. TextDescription.Text = v.Description.Value .. [[
  74.  
  75. SkillPoint(s): ]] .. tostring(game.ReplicatedStorage.MagicSkillPoint[v.Name].Value)
  76. TextDescription.Parent = TextLabel
  77. TextLabel.TextXAlignment = Enum.TextXAlignment.Left
  78. TextDescription.TextXAlignment = Enum.TextXAlignment.Left
  79. local textBOUNDS = TextLabel.TextBounds + TextDescription.TextBounds
  80. TextLabel.Size = UDim2.new(0, textBOUNDS.x, 0, 20)
  81. TextDescription.Size = UDim2.new(0, textBOUNDS.x, 0, textBOUNDS.y)
  82. v.MouseEnter:connect(function()
  83. TextLabel.Visible = true
  84. end)
  85. v.MouseLeave:connect(function()
  86. TextLabel.Visible = false
  87. end)
  88. _G.MagicEquipClicking = false
  89. v.MouseButton1Click:connect(function()
  90. if _G.MagicEquipClicking == false then
  91. _G.MagicEquipClicking = true
  92. local MYLEVEL = LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value)
  93. if character:FindFirstChild("DEBUGGER") then
  94. return
  95. end
  96. local REQUIRESKILLPOINTFORMAGIC = game.ReplicatedStorage.MagicSkillPoint[v.Name].Value
  97. if REQUIRESKILLPOINTFORMAGIC <= tonumber(DATAFOLDER.Stats.SkillPoint.Value) and MYLEVEL >= v.LVL_TAG.Value and (DATAFOLDER.Magics:FindFirstChild(v.PREVIOUS_MOVE_TAG.Value) or v.PREVIOUS_MOVE_TAG.Value == "") or DATAFOLDER.Magics:FindFirstChild(v.Name) then
  98. local MYCLOVER = math.min(DATAFOLDER.Clover.Value + DATAFOLDER.ExtraSlot.Value, #SKILLTREE.MagicInventory:GetChildren() - 1)
  99. local checkingdebug = false
  100. for i = 1, #SKILLTREE.MagicInventory:GetChildren() - 1 do
  101. if DATAFOLDER["Slot" .. i].Value == v.Name then
  102. checkingdebug = true
  103. break
  104. end
  105. end
  106. if checkingdebug ~= true then
  107. local check2 = true
  108. for i = 1, MYCLOVER do
  109. if DATAFOLDER["Slot" .. i].Value == "" then
  110. RemoteEvent:FireServer("AddSlotMagic", i, v.Name, PASSCODE)
  111. check2 = false
  112. break
  113. end
  114. end
  115. if check2 == true then
  116. script.Error:Play()
  117. MAINGUI.Error.Text = "Your magic slot(s) are full"
  118. MAINGUI.Error.Visible = true
  119. wait(0.5)
  120. MAINGUI.Error.Visible = false
  121. end
  122. else
  123. script.Error:Play()
  124. MAINGUI.Error.Text = "[" .. v.Name .. "]" .. " already equipped"
  125. MAINGUI.Error.Visible = true
  126. wait(0.5)
  127. MAINGUI.Error.Visible = false
  128. end
  129. elseif MYLEVEL < v.LVL_TAG.Value then
  130. script.Error:Play()
  131. MAINGUI.Error.Text = "Require: Level " .. v.LVL_TAG.Value
  132. MAINGUI.Error.Visible = true
  133. wait(0.5)
  134. MAINGUI.Error.Visible = false
  135. elseif v.PREVIOUS_MOVE_TAG.Value ~= "" and DATAFOLDER.Magics:FindFirstChild(v.PREVIOUS_MOVE_TAG.Value) == nil then
  136. script.Error:Play()
  137. MAINGUI.Error.Text = "Require: " .. v.PREVIOUS_MOVE_TAG.Value
  138. MAINGUI.Error.Visible = true
  139. wait(1)
  140. MAINGUI.Error.Visible = false
  141. elseif REQUIRESKILLPOINTFORMAGIC > tonumber(DATAFOLDER.Stats.SkillPoint.Value) then
  142. script.Error:Play()
  143. MAINGUI.Error.Text = "You need " .. REQUIRESKILLPOINTFORMAGIC .. " skill point!"
  144. MAINGUI.Error.Visible = true
  145. wait(1)
  146. MAINGUI.Error.Visible = false
  147. end
  148. _G.MagicEquipClicking = false
  149. end
  150. end)
  151. v.ImageColor3 = Color3.new(0, 0, 0)
  152. end
  153. end
  154. for i, v in pairs(SKILLTREE.MagicInventory:GetChildren()) do
  155. if v:IsA("TextButton") then
  156. v.MouseButton1Click:connect(function()
  157. if DATAFOLDER["Slot" .. v.Name].Value ~= "" then
  158. RemoteEvent:FireServer("RemoveSlot", v.Name, PASSCODE)
  159. elseif tonumber(v.Name) > math.min(DATAFOLDER.Clover.Value + DATAFOLDER.ExtraSlot.Value, #SKILLTREE.MagicInventory:GetChildren() - 1) then
  160. RemoteEvent:FireServer("ExtraSlotPrompt", PASSCODE)
  161. end
  162. end)
  163. end
  164. end
  165. do
  166. local MAGICSFOLDER = DATAFOLDER:WaitForChild("Magics")
  167. function _G.UPDATEMAGICSTUFF()
  168. for i, v in pairs(SKILLTREE.Center.Moves:GetChildren()) do
  169. if MAGICSFOLDER:FindFirstChild(v.Name) then
  170. v.ImageColor3 = Color3.new(1, 1, 1)
  171. else
  172. v.ImageColor3 = Color3.new(0, 0, 0)
  173. end
  174. end
  175. end
  176. _G.UPDATEMAGICSTUFF()
  177. for i, v in pairs(DATAFOLDER:GetChildren()) do
  178. if string.match(v.Name, "Slot") then
  179. v.Changed:connect(_G.UPDATEMAGICSTUFF)
  180. end
  181. end
  182. end
  183. do
  184. local EXPERIENCE_GUI = MAINGUI:WaitForChild("Experience")
  185. local line = EXPERIENCE_GUI.Line
  186. local curve1 = EXPERIENCE_GUI.Curve1
  187. local curve2 = EXPERIENCE_GUI.Curve2
  188. local curve3 = EXPERIENCE_GUI.Curve3
  189. local CurvePercentage = 0.75
  190. local function UPDATEXPBAR(val, createTEXT)
  191. _G.EXPVAL = _G.EXPVAL + (val - _G.EXPVAL) * 0.02
  192. val = _G.EXPVAL
  193. local current_Lvl = LevelSystem.CalculateLVLfromEXP(val)
  194. EXPERIENCE_GUI.LevelText.Text = current_Lvl
  195. local next_LvlExp = LevelSystem.CalculateEXPfromLVL(current_Lvl + 1)
  196. local ch, mh = val - LevelSystem.CalculateEXPfromLVL(current_Lvl), next_LvlExp - LevelSystem.CalculateEXPfromLVL(current_Lvl)
  197. if ch / mh >= CurvePercentage then
  198. curve1.Frame.Visible = true
  199. curve1.Frame.Rotation = 0
  200. curve2.Frame.Rotation = 0
  201. curve2.Frame.ZIndex = 11
  202. local percentage = (ch - mh * CurvePercentage) / (mh * (1 - CurvePercentage))
  203. line.Frame.Size = UDim2.new(percentage, 0, 1, 0)
  204. line.Frame.Position = UDim2.new(1 - percentage, 0, 0, 0)
  205. curve1.Frame.ImageColor3 = Color3.new(1, 1, 1)
  206. curve2.Frame.ImageColor3 = Color3.new(1, 1, 1)
  207. curve3.Frame.ImageColor3 = Color3.new(1, 1, 1)
  208. line.Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  209. else
  210. line.Frame.Size = UDim2.new(0, 0, 0, 0)
  211. local max = ch / mh / CurvePercentage
  212. if max >= 0.6666666666666666 then
  213. curve1.Frame.Visible = true
  214. curve2.Frame.Rotation = 0
  215. curve2.Frame.ZIndex = 11
  216. curve1.Frame.ImageColor3 = Color3.new(1, 1, 1)
  217. curve2.Frame.ImageColor3 = Color3.new(1, 1, 1)
  218. curve3.Frame.ImageColor3 = Color3.new(1, 1, 1)
  219. local percentage = (ch / mh - CurvePercentage * 0.6666666666666666) / (CurvePercentage * 0.33333333333333337)
  220. curve1.Frame.Rotation = -90 * (1 - percentage)
  221. elseif max >= 0.3333333333333333 then
  222. curve1.Frame.Visible = false
  223. curve2.Frame.ZIndex = 11
  224. local percentage = (max - 0.3333333333333333) / 0.3333333333333333
  225. curve1.Frame.ImageColor3 = Color3.new(1, 1, 1)
  226. curve2.Frame.ImageColor3 = Color3.new(1, 1, 1)
  227. curve3.Frame.ImageColor3 = Color3.new(1, 1, 1)
  228. curve2.Frame.Rotation = -90 * (1 - percentage)
  229. else
  230. curve1.Frame.Visible = false
  231. local percentage = max / 0.3333333333333333
  232. curve2.Frame.ImageColor3 = Color3.new(0, 0, 0)
  233. curve2.Frame.Rotation = -90 * (1 - percentage)
  234. curve2.Frame.ZIndex = 12
  235. end
  236. end
  237. wait()
  238. if math.abs(DATAFOLDER.Stats.XP.Value - _G.EXPVAL) > 0.01 then
  239. UPDATEXPBAR(DATAFOLDER.Stats.XP.Value)
  240. end
  241. end
  242. local function UPDATESKILLPOINT(val)
  243. SKILLTREE.SkillPointText.Text = "Skill Point(s): " .. val
  244. end
  245. local XPDATA = DATAFOLDER:WaitForChild("Stats"):WaitForChild("XP")
  246. local SKILLPOINT = DATAFOLDER.Stats:WaitForChild("SkillPoint")
  247. _G.EXPVAL = XPDATA.Value
  248. UPDATEXPBAR(XPDATA.Value)
  249. UPDATESKILLPOINT(SKILLPOINT.Value)
  250. EXPERIENCE_GUI.BUYXPBOOST.MouseButton1Click:connect(function()
  251. if not LevelSystem.CalculateXPTIME(DATAFOLDER.DOUBLEXPBOOST.Value) then
  252. game:GetService("MarketplaceService"):PromptProductPurchase(player, 135187447)
  253. end
  254. end)
  255. function UNLOCKINGTHINGS(typeitem, array)
  256. if typeitem == "Text" then
  257. local val = array[1]
  258. local PREVIOUSXPVAL = array[2]
  259. if val - PREVIOUSXPVAL ~= 0 then
  260. do
  261. local TEXT = array[3]
  262. local textlb = game.ReplicatedStorage.Rewards.XP.BillboardGui.TextLabel:Clone()
  263. textlb.TextScaled = false
  264. textlb.TextWrapped = false
  265. textlb.Size = UDim2.new(1, 0, 1, 0)
  266. textlb.Position = UDim2.new(0, -50, 0, 0)
  267. textlb.TextSize = 40
  268. if TEXT == "GOLD" then
  269. if val - PREVIOUSXPVAL > 0 then
  270. textlb.TextColor3 = Color3.fromRGB(255, 229, 25)
  271. else
  272. textlb.TextColor3 = Color3.new(1, 0, 0)
  273. end
  274. textlb.Position = UDim2.new(0, -120, 0, -50)
  275. if not (val - PREVIOUSXPVAL > 0) or not ("+$" .. ADDCOMMAS(val - PREVIOUSXPVAL)) then
  276. end
  277. textlb.Text = "$" .. ADDCOMMAS(val - PREVIOUSXPVAL)
  278. elseif TEXT == "SkillPoint" then
  279. textlb.Position = UDim2.new(0, -120, 0, 0)
  280. textlb.TextColor3 = Color3.new(1, 1, 1)
  281. if not (val - PREVIOUSXPVAL > 0) or not ("+" .. ADDCOMMAS(val - PREVIOUSXPVAL)) then
  282. end
  283. textlb.Text = ADDCOMMAS(val - PREVIOUSXPVAL)
  284. else
  285. TEXT = LevelSystem.XPClientPerspective(TEXT)
  286. if not (val - PREVIOUSXPVAL > 0) or not ("+" .. TEXT .. " XP") then
  287. end
  288. textlb.Text = TEXT .. " XP"
  289. end
  290. textlb.Parent = MAINGUI.Obtain
  291. game:GetService("TweenService"):Create(textlb, TweenInfo.new(1.25, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  292. Position = UDim2.new(0, 0, -1, 0),
  293. TextTransparency = 1
  294. }):Play()
  295. delay(1.25, function()
  296. textlb:Destroy()
  297. end)
  298. end
  299. end
  300. elseif typeitem == "Image" then
  301. do
  302. local img = array[1]
  303. local imglb = Instance.new("ImageLabel")
  304. imglb.Image = img
  305. imglb.BackgroundTransparency = 1
  306. imglb.Size = UDim2.new(0, 50, 0, 50)
  307. imglb.Position = UDim2.new(0, 0, 0, 0)
  308. local text = Instance.new("TextLabel")
  309. text.Text = "x" .. array[2]
  310. text.BorderSizePixel = 0
  311. text.TextSize = 25
  312. text.Font = Enum.Font.Highway
  313. text.TextStrokeTransparency = 0
  314. text.TextStrokeColor3 = Color3.new(0, 0, 0)
  315. text.TextColor3 = Color3.new(1, 1, 1)
  316. text.Parent = imglb
  317. imglb.Parent = MAINGUI.Obtain
  318. game:GetService("TweenService"):Create(imglb, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  319. Position = UDim2.new(0, 0, -1, 0),
  320. ImageTransparency = 1
  321. }):Play()
  322. game:GetService("TweenService"):Create(text, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {TextTransparency = 1, TextStrokeTransparency = 1}):Play()
  323. delay(2, function()
  324. imglb:Destroy()
  325. end)
  326. end
  327. end
  328. end
  329. local PREVIOUSXPVAL = XPDATA.Value
  330. XPDATA.Changed:connect(function(val)
  331. local TEXT = math.floor((val - PREVIOUSXPVAL) * 100) / 100
  332. UNLOCKINGTHINGS("Text", {
  333. val,
  334. PREVIOUSXPVAL,
  335. TEXT
  336. })
  337. PREVIOUSXPVAL = val
  338. UPDATEXPBAR(val)
  339. end)
  340. SKILLPOINT.Changed:connect(UPDATESKILLPOINT)
  341. local function UPDATEMAGICEFFECTS(CHILD)
  342. if CHILD.Name == "Shock" then
  343. do
  344. local SHOCKEFFECT = Instance.new("Frame")
  345. SHOCKEFFECT.Size = UDim2.new(1, 0, 2, 0)
  346. SHOCKEFFECT.Position = UDim2.new(0, 0, -0.5, 0)
  347. SHOCKEFFECT.BackgroundColor3 = Color3.fromRGB(0, 255, 255)
  348. SHOCKEFFECT.Parent = MAINGUI
  349. spawn(function()
  350. while CHILD and CHILD:isDescendantOf(workspace) do
  351. SHOCKEFFECT.BackgroundTransparency = SHOCKEFFECT.BackgroundTransparency == 0 and math.random() or 0
  352. wait(0.4)
  353. end
  354. SHOCKEFFECT:Destroy()
  355. end)
  356. end
  357. end
  358. local img = Instance.new("ImageLabel")
  359. img.Name = CHILD.Name
  360. img.Image = CHILD.Value
  361. img.BackgroundTransparency = 1
  362. img.Parent = MAINGUI.MagicEffects
  363. local TextLabel = Instance.new("TextLabel")
  364. TextLabel.Size = UDim2.new(0, 100, 0, 20)
  365. TextLabel.Position = UDim2.new(0, -25, 0, -15)
  366. TextLabel.BackgroundTransparency = 1
  367. TextLabel.Text = img.Name
  368. TextLabel.TextStrokeTransparency = 0
  369. TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
  370. TextLabel.TextScaled = true
  371. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  372. TextLabel.Font = Enum.Font.Arcade
  373. TextLabel.Visible = false
  374. TextLabel.Parent = img
  375. img.MouseEnter:connect(function()
  376. TextLabel.Visible = true
  377. end)
  378. img.MouseLeave:connect(function()
  379. TextLabel.Visible = false
  380. end)
  381. spawn(function()
  382. while img do
  383. pcall(function()
  384. local cd = CHILD:FindFirstChild("Cooldown").Value
  385. local timer = CHILD:FindFirstChild("Time").Value
  386. local myTime = os.time()
  387. img.ImageTransparency = math.min((myTime - timer) / cd, 1)
  388. end)
  389. game:GetService("RunService").Heartbeat:wait()
  390. end
  391. end)
  392. end
  393. local function REMOVEMAGICEFFECTS(CHILD)
  394. if MAINGUI.MagicEffects:FindFirstChild(CHILD.Name) then
  395. MAINGUI.MagicEffects[CHILD.Name]:Destroy()
  396. end
  397. end
  398. character:WaitForChild("Effects").ChildAdded:connect(UPDATEMAGICEFFECTS)
  399. character:WaitForChild("Effects").ChildRemoved:connect(REMOVEMAGICEFFECTS)
  400. function ADDCOMMAS(num)
  401. num = tostring(num)
  402. local len = math.floor(string.len(num) / 3)
  403. for i = 1, len do
  404. num = string.gsub(num, "^(-?%d+)(%d%d%d)", "%1,%2")
  405. end
  406. return num
  407. end
  408. local PREVIOUSCURRENCYVAL = DATAFOLDER.Currency.Value
  409. local function changeCURRENCY(val)
  410. if val and tonumber(val) then
  411. UNLOCKINGTHINGS("Text", {
  412. val,
  413. PREVIOUSCURRENCYVAL,
  414. "GOLD"
  415. })
  416. PREVIOUSCURRENCYVAL = val
  417. end
  418. spawn(function()
  419. if DATAFOLDER.CurrencyShow.Value == "Active" then
  420. MAINGUI.Money:TweenPosition(UDim2.new(0.5, -100, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)
  421. else
  422. MAINGUI.Money:TweenPosition(UDim2.new(0.5, -100, 0, -100), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)
  423. end
  424. if not tonumber(val) then
  425. return
  426. end
  427. MAINGUI.Money:TweenPosition(UDim2.new(0.5, -100, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)
  428. MAINGUI.Money.Text = "$" .. ADDCOMMAS(val)
  429. wait(4)
  430. if DATAFOLDER.CurrencyShow.Value ~= "Active" then
  431. MAINGUI.Money:TweenPosition(UDim2.new(0.5, -100, 0, -100), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)
  432. end
  433. end)
  434. end
  435. changeCURRENCY(DATAFOLDER.Currency.Value)
  436. DATAFOLDER.CurrencyShow.Changed:connect(changeCURRENCY)
  437. DATAFOLDER.Currency.Changed:connect(changeCURRENCY)
  438. local PREVIOUSSKILLPOINT = DATAFOLDER.Stats.SkillPoint.Value
  439. DATAFOLDER.Stats.SkillPoint.Changed:connect(function(val)
  440. UNLOCKINGTHINGS("Text", {
  441. val,
  442. PREVIOUSSKILLPOINT,
  443. "SkillPoint"
  444. })
  445. PREVIOUSSKILLPOINT = val
  446. end)
  447. end
  448. local UIS = game:GetService("UserInputService")
  449. local KeyModule = require(game.ReplicatedStorage:WaitForChild("KeyModule"))
  450. local KeyPressed = {}
  451. local SkillTreeEnable = false
  452. local SkillTreePressed = false
  453. local MAGICWHEELVISIBLE = false
  454. local OPENBOOK = false
  455. local DOUBLE_JUMP_ENABLE = false
  456. UIS.InputBegan:connect(function(input, bool)
  457. KeyPressed[input.UserInputType.Name] = {
  458. true,
  459. tick(),
  460. KeyPressed[input.UserInputType.Name] and KeyPressed[input.UserInputType.Name][3]
  461. }
  462. if input.UserInputType == Enum.UserInputType.MouseButton1 then
  463. KeyPressed[input.UserInputType.Name] = {
  464. true,
  465. tick(),
  466. Vector2.new(mouse.X, mouse.Y)
  467. }
  468. end
  469. if not bool and input.UserInputType == Enum.UserInputType.Keyboard then
  470. input = input.KeyCode
  471. KeyPressed[input.Name] = {
  472. true,
  473. tick(),
  474. KeyPressed[input.Name] and KeyPressed[input.Name][3]
  475. }
  476. if KeyModule[input.Name] and _G[KeyModule[input.Name]] then
  477. _G[KeyModule[input.Name]]()
  478. end
  479. if DATAFOLDER.Magics:FindFirstChild("Double Jump") and character.HumanoidRootPart:FindFirstChild("BROOMFLIGHTBV") == nil and not DOUBLE_JUMP_ENABLE and character.Humanoid.Health > 0 and input.Name == Enum.KeyCode.Space.Name and character.Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
  480. DOUBLE_JUMP_ENABLE = true
  481. RemoteEvent:FireServer("DoubleJUMPBOOST", PASSCODE)
  482. wait(1.5)
  483. DOUBLE_JUMP_ENABLE = false
  484. end
  485. end
  486. end)
  487. UIS.InputEnded:connect(function(input, bool)
  488. KeyPressed[input.UserInputType.Name] = {
  489. false,
  490. nil,
  491. tick()
  492. }
  493. if not bool and input.UserInputType == Enum.UserInputType.Keyboard then
  494. KeyPressed[input.KeyCode.Name] = {
  495. false,
  496. nil,
  497. tick()
  498. }
  499. end
  500. end)
  501. function _G.Book()
  502. if character:FindFirstChild("Grimoire") == nil then
  503. RemoteEvent:FireServer("Book", Grimoire_Tool, PASSCODE)
  504. end
  505. end
  506. _G.Book()
  507. character:WaitForChild("Grimoire")
  508. SKILLTREE.Center.CLOVER.MouseButton1Click:connect(function()
  509. RemoteEvent:FireServer("MagicRerollMagic", PASSCODE)
  510. end)
  511. function _G.SkillTree()
  512. if SkillTreeEnable == true and DATAFOLDER.Information:FindFirstChild("Tutorial") == nil then
  513. return
  514. end
  515. if SkillTreePressed == false and SkillTreeEnable == false then
  516. SkillTreePressed = true
  517. do
  518. local waittill = false
  519. MAINGUI.Gate1:TweenPosition(UDim2.new(0.5, 0, -1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1.5, 1, function()
  520. end)
  521. MAINGUI.Gate2:TweenPosition(UDim2.new(-0.5, camera.ViewportSize.X % 2 == 0 and 0 or 1, -1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1.5, 1, function()
  522. waittill = true
  523. end)
  524. repeat
  525. wait()
  526. until waittill
  527. SKILLTREE.Center.Position = UDim2.new(0.5, 0, 0.5, 0)
  528. SKILLTREE.Visible = true
  529. for i = 0, 1, 0.1 do
  530. wait()
  531. MAINGUI.Gate1.CLOVER.ImageColor3 = Color3.new(0, 0, 0):Lerp(Color3.new(1, 1, 1), i)
  532. MAINGUI.Gate2.CLOVER.ImageColor3 = Color3.new(0, 0, 0):Lerp(Color3.new(1, 1, 1), i)
  533. MAINGUI.Gate1.BackgroundTransparency = i
  534. MAINGUI.Gate2.BackgroundTransparency = i
  535. end
  536. MAINGUI.Gate1.Position = UDim2.new(1, 0, -1, 0)
  537. MAINGUI.Gate2.Position = UDim2.new(-1, 0, -1, 0)
  538. MAINGUI.Gate1.BackgroundColor3 = Color3.new(1, 1, 1)
  539. MAINGUI.Gate2.BackgroundColor3 = Color3.new(1, 1, 1)
  540. MAINGUI.Gate1.CLOVER.ImageColor3 = Color3.new(0, 0, 0)
  541. MAINGUI.Gate2.CLOVER.ImageColor3 = Color3.new(0, 0, 0)
  542. MAINGUI.Gate1.BackgroundTransparency = 0
  543. MAINGUI.Gate2.BackgroundTransparency = 0
  544. SkillTreeEnable = true
  545. SkillTreePressed = false
  546. end
  547. elseif SkillTreePressed == false and SkillTreeEnable == true then
  548. SkillTreeEnable = false
  549. SKILLTREE.Visible = false
  550. end
  551. end
  552. if DATAFOLDER.Information:FindFirstChild("Tutorial") == nil then
  553. do
  554. local screentutorial = Instance.new("Frame")
  555. screentutorial.Size = UDim2.new(1, 0, 1, 0)
  556. screentutorial.BackgroundTransparency = 0.4
  557. screentutorial.BackgroundColor3 = Color3.new(0, 0, 0)
  558. screentutorial.Parent = MAINGUI
  559. local function createTutorialCircle(pos, text, ZINDEX)
  560. local size = typeof(pos) == "UDim2" and 255 or (pos.AbsoluteSize.x + pos.AbsoluteSize.y) * 0.6
  561. local tutorialImg = Instance.new("ImageLabel")
  562. tutorialImg.Image = "rbxassetid://1108275823"
  563. tutorialImg.Size = UDim2.new(0, size * 0.5, 0, size * 0.5)
  564. tutorialImg.Position = typeof(pos) == "UDim2" and pos or UDim2.new(0, pos.AbsoluteSize.X * 0.5 + pos.AbsolutePosition.x, 0, pos.AbsoluteSize.Y * 0.5 + pos.AbsolutePosition.y)
  565. tutorialImg.Position = tutorialImg.Position - UDim2.new(0, tutorialImg.Size.X.Offset * 0.5, 0, tutorialImg.Size.Y.Offset * 0.5)
  566. tutorialImg.ImageColor3 = Color3.new(1, 0, 0)
  567. tutorialImg.BackgroundTransparency = 1
  568. tutorialImg.ZIndex = ZINDEX and ZINDEX or typeof(pos) == "UDim2" and 0 or pos.ZIndex + 1
  569. tutorialImg.ImageTransparency = 0.2
  570. tutorialImg.Parent = MAINGUI
  571. local tutorialText = Instance.new("TextLabel")
  572. tutorialText.Text = text
  573. tutorialText.Position = typeof(pos) == "UDim2" and pos or tutorialImg.Position + UDim2.new(0, 0, 0, -size * 0.5)
  574. tutorialText.TextColor3 = Color3.new(1, 1, 1)
  575. tutorialText.TextStrokeTransparency = 0
  576. tutorialText.TextStrokeColor3 = Color3.new(0, 0, 0)
  577. tutorialText.BackgroundTransparency = 1
  578. tutorialText.ZIndex = tutorialImg.ZIndex
  579. tutorialText.Font = Enum.Font.Highway
  580. tutorialText.FontSize = Enum.FontSize.Size18
  581. if typeof(pos) == "UDim2" then
  582. tutorialText.TextXAlignment = Enum.TextXAlignment.Center
  583. else
  584. tutorialText.TextXAlignment = camera.ViewportSize.X * 0.5 > tutorialText.Position.X.Offset and Enum.TextXAlignment.Left or Enum.TextXAlignment.Right
  585. end
  586. tutorialText.Parent = MAINGUI
  587. game:GetService("TweenService"):Create(tutorialImg, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  588. Size = UDim2.new(0, size, 0, size),
  589. Position = tutorialImg.Position - UDim2.new(0, size * 0.5 * 0.5, 0, size * 0.5 * 0.5),
  590. ImageTransparency = 1
  591. }):Play()
  592. wait(1)
  593. tutorialText:Destroy()
  594. tutorialImg:Destroy()
  595. end
  596. local continue = false
  597. local CLICKMOUSE = mouse.Button1Down:connect(function()
  598. if continue == false then
  599. continue = true
  600. script.Select:Play()
  601. end
  602. end)
  603. while not continue do
  604. createTutorialCircle(UDim2.new(0.5, 0, 0.5, 0), "Keep your eyes on this red circle, this is for a quick tutorial. You can click to proceed")
  605. end
  606. continue = false
  607. while not continue do
  608. createTutorialCircle(MAINGUI.BottomLeft.Settings, "Setting interface: to optimize your gaming experience")
  609. end
  610. continue = false
  611. while not continue do
  612. createTutorialCircle(MAINGUI.BottomLeft.Tittle, "Title interface: depends on what you select you'll spawn in different location")
  613. end
  614. continue = false
  615. while not continue do
  616. createTutorialCircle(MAINGUI.BottomLeft.Save, "Saving interface: you can save up to 4 items and a quick-save button")
  617. end
  618. continue = false
  619. while not continue do
  620. createTutorialCircle(MAINGUI.BottomLeft.Stats, "Attributes interface: everytime you level up you get a free attribute points")
  621. end
  622. continue = false
  623. while not continue do
  624. createTutorialCircle(MAINGUI.BottomLeft.Help, "Tips interface: show game tips")
  625. end
  626. continue = false
  627. while not continue do
  628. createTutorialCircle(MAINGUI.Party.ImageButton, "Creating/Joining Party (you will not attack allies if you are in a party with them)")
  629. end
  630. continue = false
  631. while not continue do
  632. createTutorialCircle(MAINGUI.Experience.LevelText, "This is your XP/Level Bar")
  633. end
  634. continue = false
  635. while not SKILLTREE.Visible do
  636. createTutorialCircle(UDim2.new(0.5, 0, 0.5, 0), "Press 'M' to open up your skill-tree")
  637. end
  638. continue = false
  639. while not continue do
  640. createTutorialCircle(UDim2.new(0.5, 0, 0.5, 0), "This is your magic skill-tree!", 100)
  641. end
  642. continue = false
  643. while not continue do
  644. createTutorialCircle(SKILLTREE.SkillPointText, "This is where you check how many skillpoint's you have")
  645. end
  646. continue = false
  647. while not continue do
  648. createTutorialCircle(UDim2.new(0.5, 0, 0.5, 0), "That's all for this tutorial! GOOD LUCK!", 100)
  649. end
  650. continue = false
  651. screentutorial:Destroy()
  652. CLICKMOUSE:disconnect()
  653. RemoteEvent:FireServer("FinishTutorial", PASSCODE)
  654. end
  655. end
  656. local BOOKENABLINGSIDJSIDJS = false
  657. function _G.BookOpen()
  658. if character:FindFirstChild("Grimoire") and OPENBOOK == true then
  659. if BOOKENABLINGSIDJSIDJS == false then
  660. RemoteEvent:FireServer("OpenBook", true, PASSCODE)
  661. end
  662. BOOKENABLINGSIDJSIDJS = true
  663. elseif BOOKENABLINGSIDJSIDJS == true then
  664. BOOKENABLINGSIDJSIDJS = false
  665. RemoteEvent:FireServer("OpenBook", false, PASSCODE)
  666. end
  667. end
  668. MAINGUI.Quest.TextButton.MouseButton1Click:connect(function()
  669. local quest = player:FindFirstChild("Quest")
  670. if quest then
  671. RemoteEvent:FireServer("DeleteQuest", PASSCODE)
  672. end
  673. end)
  674. do
  675. local quest_pointer = game.ReplicatedStorage.OBJECTs.Pointer:Clone()
  676. quest_pointer.Transparency = 1
  677. quest_pointer.Parent = workspace.IgnoreFolder.LocalItems
  678. local function DOQUEST(obj)
  679. if obj and obj.Name == "Quest" then
  680. do
  681. local REALQUESTOBJ = obj.Value
  682. MAINGUI.Quest.QuestName.Text = REALQUESTOBJ.Name
  683. spawn(function()
  684. while obj:isDescendantOf(player) and obj.TargetVal.Value < REALQUESTOBJ.Target.Need.Value do
  685. MAINGUI.Quest.TextLabel.Text = "Defeated: " .. obj.TargetVal.Value .. "/" .. REALQUESTOBJ.Target.Need.Value .. " " .. REALQUESTOBJ.Target.Value
  686. pcall(function()
  687. local NPCS_CHECKERS = {}
  688. for _, v in pairs(workspace.NPCs:GetChildren()) do
  689. if v:FindFirstChild("ENEMYSELECTEDVALUE") and v.ENEMYSELECTEDVALUE.Value == REALQUESTOBJ.Target.Value and v.HumanoidRootPart.Position.Y < 500 then
  690. table.insert(NPCS_CHECKERS, v.HumanoidRootPart.Position)
  691. end
  692. end
  693. if #NPCS_CHECKERS > 0 and character.HumanoidRootPart.Position.Y < 500 then
  694. table.sort(NPCS_CHECKERS, function(i, v)
  695. return v - character.HumanoidRootPart.Position.magnitude > i - character.HumanoidRootPart.Position.magnitude
  696. end)
  697. if NPCS_CHECKERS[1] - character.HumanoidRootPart.Position.magnitude > 35 then
  698. quest_pointer.Transparency = 1.3 * tick() % 1
  699. quest_pointer.CFrame = CFrame.new(character.HumanoidRootPart.Position + NPCS_CHECKERS[1] - character.HumanoidRootPart.Position.unit * 4 + Vector3.new(0, 3, 0), NPCS_CHECKERS[1])
  700. else
  701. quest_pointer.Transparency = 1
  702. end
  703. end
  704. end)
  705. game:GetService("RunService").Heartbeat:wait()
  706. end
  707. end)
  708. game:GetService("TweenService"):Create(MAINGUI.Quest, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  709. Position = UDim2.new(1, -200, 0.5, -100)
  710. }):Play()
  711. end
  712. end
  713. end
  714. player.ChildAdded:connect(function(obj)
  715. if obj.Name == "Quest" then
  716. DOQUEST(obj)
  717. end
  718. end)
  719. DOQUEST(player:FindFirstChild("Quest"))
  720. player.ChildRemoved:connect(function(obj)
  721. if obj.Name == "Quest" then
  722. quest_pointer.Transparency = 1
  723. game:GetService("TweenService"):Create(MAINGUI.Quest, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  724. Position = UDim2.new(1, 0, 0.5, -100)
  725. }):Play()
  726. end
  727. end)
  728. end
  729. do
  730. local teleporting_debug = false
  731. character.Humanoid.Touched:connect(function(hit)
  732. if not teleporting_debug and character.DisableEffects:FindFirstChild("NoTP") == nil and hit:FindFirstChild("TELEPORT") and (hit:FindFirstChild("RequireLevel") == nil or LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value) >= hit.RequireLevel.Value) then
  733. teleporting_debug = true
  734. MAINGUI.BlackScreen.Position = UDim2.new(2, 0, -1, 0)
  735. MAINGUI.BlackScreen.Rotation = 180
  736. MAINGUI.BlackScreen:TweenPosition(UDim2.new(0, 0, -1, 0), "Out", "Quad", 1, true)
  737. wait(1)
  738. MAINGUI.BlackScreen.Rotation = 0
  739. MAINGUI.BlackScreen:TweenPosition(UDim2.new(-3, 0, -1, 0), "Out", "Quad", 1, true)
  740. RemoteEvent:FireServer("TELEPORTINGCF", hit.TELEPORT.Value.CFrame * CFrame.new(0, 0, -4), PASSCODE)
  741. wait()
  742. camera.CFrame = character.HumanoidRootPart.CFrame
  743. wait(3)
  744. teleporting_debug = false
  745. end
  746. end)
  747. end
  748. workspace:WaitForChild("Shops")
  749. game.ReplicatedStorage:WaitForChild("GrimoireEdit")
  750. do
  751. local RANGE = 20
  752. local inBUYING = false
  753. local inHarvesting = false
  754. local CALCULATEBOOKSIZES = function(TEXT)
  755. if TEXT == "S" then
  756. return "1"
  757. elseif TEXT == "M" then
  758. return "2"
  759. elseif TEXT == "L" then
  760. return "3"
  761. elseif TEXT == "XL" then
  762. return "4"
  763. end
  764. end
  765. function GetID(flagID)
  766. local Start = flagID
  767. local End = Start - 500
  768. local ID = 0
  769. local _, STARTCUR = pcall(function()
  770. return game:GetService("MarketplaceService"):GetProductInfo(Start)
  771. end)
  772. for idAsset = Start, End, -1 do
  773. do
  774. local s, curId = pcall(function()
  775. return game:GetService("MarketplaceService"):GetProductInfo(idAsset)
  776. end)
  777. if s and curId and curId.AssetTypeId == 1 and curId.Creator.Id == STARTCUR.Creator.Id then
  778. ID = idAsset
  779. end
  780. else
  781. end
  782. end
  783. return ID
  784. end
  785. mouse.Move:connect(function()
  786. local target = mouse.Target
  787. if target and target:isDescendantOf(workspace.Shops) and target.Position - character.HumanoidRootPart.Position.magnitude < RANGE and inBUYING == false then
  788. if target.Name == "Quest" then
  789. mouse.Icon = "http://www.roblox.com/asset/?id=162414555"
  790. else
  791. mouse.Icon = "http://www.roblox.com/asset/?id=607872389"
  792. end
  793. elseif target and target.Transparency ~= 1 and target.Name == "Corn Mesh" and target.Parent.Name == "Corn" and character:FindFirstChild("BasketHarvest") and not inHarvesting and target.Position - character.HumanoidRootPart.Position.magnitude <= RANGE then
  794. mouse.Icon = "http://www.roblox.com/asset/?id=607872389"
  795. elseif mouse.Icon == "http://www.roblox.com/asset/?id=607872389" or mouse.Icon == "http://www.roblox.com/asset/?id=162414555" then
  796. mouse.Icon = ""
  797. end
  798. end)
  799. mouse.Button1Down:connect(function()
  800. local targ = mouse.Target
  801. if not inHarvesting and targ and character:FindFirstChild("BasketHarvest") and targ.Position - character.HumanoidRootPart.Position.magnitude <= RANGE and targ.Name == "Corn Mesh" and targ.Parent.Name == "Corn" then
  802. inHarvesting = true
  803. RemoteEvent:FireServer("Harvesting", targ, PASSCODE)
  804. delay(2, function()
  805. inHarvesting = false
  806. end)
  807. end
  808. if inBUYING then
  809. return
  810. end
  811. if targ and targ:isDescendantOf(workspace.Shops) and targ.Position - character.HumanoidRootPart.Position.magnitude < RANGE then
  812. if targ.Name == "Market" and targ:FindFirstChild("Shop") then
  813. inBUYING = true
  814. do
  815. local MAINBUYINGFRAME = Instance.new("Frame")
  816. MAINBUYINGFRAME.BackgroundTransparency = 1
  817. MAINBUYINGFRAME.Size = UDim2.new(0, 300, 0, 300)
  818. MAINBUYINGFRAME.Position = UDim2.new(0.5, -150, 0.5, -150)
  819. local SHOP_TEXT = Instance.new("TextLabel")
  820. SHOP_TEXT.BackgroundTransparency = 0.5
  821. SHOP_TEXT.Font = Enum.Font.Highway
  822. SHOP_TEXT.TextSize = 28
  823. SHOP_TEXT.TextColor3 = Color3.fromRGB(245, 229, 54)
  824. SHOP_TEXT.Text = "SHOP"
  825. SHOP_TEXT.BackgroundColor3 = Color3.new(1, 1, 1)
  826. SHOP_TEXT.BorderSizePixel = 0
  827. SHOP_TEXT.Size = UDim2.new(1, 0, 0, 50)
  828. SHOP_TEXT.Position = UDim2.new(0, 0, 0, -50)
  829. SHOP_TEXT.Parent = MAINBUYINGFRAME
  830. local BUYINGFRAME = Instance.new("ScrollingFrame")
  831. BUYINGFRAME.BackgroundTransparency = 0.5
  832. BUYINGFRAME.BackgroundColor3 = Color3.new(1, 1, 1)
  833. BUYINGFRAME.BorderSizePixel = 0
  834. BUYINGFRAME.Size = UDim2.new(1, 0, 1, 0)
  835. BUYINGFRAME.Parent = MAINBUYINGFRAME
  836. local UIGridLayout = Instance.new("UIGridLayout")
  837. UIGridLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  838. UIGridLayout.CellPadding = UDim2.new(0, 10, 0, 10)
  839. UIGridLayout.CellSize = UDim2.new(0, 75, 0, 75)
  840. UIGridLayout.Parent = BUYINGFRAME
  841. for _, v in pairs(targ.Shop:GetChildren()) do
  842. do
  843. local ITEM_IMG = Instance.new("ImageLabel")
  844. ITEM_IMG.BackgroundColor3 = Color3.new(0, 0, 0)
  845. ITEM_IMG.BackgroundTransparency = 0.8
  846. ITEM_IMG.BorderSizePixel = 0
  847. ITEM_IMG.Image = game.ReplicatedStorage.ItemsImg:FindFirstChild(v.Name) and game.ReplicatedStorage.ItemsImg[v.Name].Value or "rbxassetid://1019185679"
  848. ITEM_IMG.Parent = BUYINGFRAME
  849. local BUYSELLDEBUG = false
  850. if v:FindFirstChild("Buy") then
  851. local BUYBOX = Instance.new("TextButton")
  852. BUYBOX.Font = Enum.Font.Highway
  853. BUYBOX.TextSize = 15
  854. BUYBOX.BorderSizePixel = 0
  855. BUYBOX.Size = UDim2.new(1, 0, 0.2, 0)
  856. BUYBOX.Position = UDim2.new(0, 0, 0, 0)
  857. BUYBOX.BackgroundColor3 = Color3.fromRGB(52, 142, 64)
  858. BUYBOX.Text = "Buy: $" .. ADDCOMMAS(v.Buy.Value)
  859. BUYBOX.TextColor3 = Color3.new(1, 1, 1)
  860. BUYBOX.Parent = ITEM_IMG
  861. BUYBOX.MouseButton1Click:connect(function()
  862. if BUYSELLDEBUG == false and player.DataFolder.Currency.Value >= v.Buy.Value then
  863. BUYSELLDEBUG = true
  864. script.Buy:Play()
  865. RemoteEvent:FireServer("Buy/SellItem", true, v.Name, v.Buy, PASSCODE)
  866. wait()
  867. BUYSELLDEBUG = false
  868. else
  869. script.Error:Play()
  870. end
  871. end)
  872. end
  873. if v:FindFirstChild("Sell") then
  874. local BUYBOX = Instance.new("TextButton")
  875. BUYBOX.Font = Enum.Font.Highway
  876. BUYBOX.TextSize = 15
  877. BUYBOX.BorderSizePixel = 0
  878. BUYBOX.Size = UDim2.new(1, 0, 0.2, 0)
  879. BUYBOX.Position = UDim2.new(0, 0, 0.8, 0)
  880. BUYBOX.BackgroundColor3 = Color3.fromRGB(248, 217, 109)
  881. BUYBOX.Text = "Sell: $" .. ADDCOMMAS(v.Sell.Value)
  882. BUYBOX.TextColor3 = Color3.new(1, 1, 1)
  883. BUYBOX.Parent = ITEM_IMG
  884. BUYBOX.MouseButton1Click:connect(function()
  885. if BUYSELLDEBUG == false and player.Backpack:FindFirstChild(v.Name) then
  886. BUYSELLDEBUG = true
  887. script.Buy:Play()
  888. RemoteEvent:FireServer("Buy/SellItem", false, v.Name, v.Sell, PASSCODE)
  889. wait()
  890. BUYSELLDEBUG = false
  891. else
  892. script.Error:Play()
  893. end
  894. end)
  895. end
  896. end
  897. end
  898. local CLOSEDDEBUG = false
  899. local CLOSEBUTTON = Instance.new("TextButton")
  900. CLOSEBUTTON.Size = UDim2.new(0, 25, 0, 25)
  901. CLOSEBUTTON.Position = UDim2.new(1, -25, 0, -50)
  902. CLOSEBUTTON.Text = "X"
  903. CLOSEBUTTON.TextColor3 = Color3.new(1, 1, 1)
  904. CLOSEBUTTON.BackgroundColor3 = Color3.new(1, 0, 0)
  905. CLOSEBUTTON.TextSize = 20
  906. CLOSEBUTTON.BorderSizePixel = 0
  907. game.ReplicatedStorage.PartyFrame.HP.Gradient:Clone().Parent = CLOSEBUTTON
  908. CLOSEBUTTON.Parent = MAINBUYINGFRAME
  909. MAINBUYINGFRAME.Parent = MAINGUI
  910. CLOSEBUTTON.MouseButton1Click:connect(function()
  911. CLOSEDDEBUG = true
  912. end)
  913. repeat
  914. wait()
  915. until targ.Position - character.HumanoidRootPart.Position.magnitude > RANGE or CLOSEDDEBUG
  916. MAINBUYINGFRAME:Destroy()
  917. inBUYING = false
  918. return
  919. end
  920. end
  921. if targ.Name == "Quest" and targ:FindFirstChild("Quest") then
  922. inBUYING = true
  923. do
  924. local CLOSEDDEBUG = false
  925. local QUESTFRAME = Instance.new("Frame")
  926. QUESTFRAME.BackgroundTransparency = 1
  927. QUESTFRAME.Size = UDim2.new(0, 300, 0, 300)
  928. QUESTFRAME.Position = UDim2.new(0.5, -150, 0.5, -150)
  929. local QUESTFRAME_TEXT = Instance.new("TextLabel")
  930. QUESTFRAME_TEXT.BackgroundTransparency = 0.5
  931. QUESTFRAME_TEXT.Font = Enum.Font.Highway
  932. QUESTFRAME_TEXT.TextSize = 28
  933. QUESTFRAME_TEXT.TextColor3 = Color3.fromRGB(245, 229, 54)
  934. QUESTFRAME_TEXT.Text = "QUEST"
  935. QUESTFRAME_TEXT.BackgroundColor3 = Color3.new(1, 1, 1)
  936. QUESTFRAME_TEXT.BorderSizePixel = 0
  937. QUESTFRAME_TEXT.Size = UDim2.new(1, 0, 0, 50)
  938. QUESTFRAME_TEXT.Position = UDim2.new(0, 0, 0, -50)
  939. QUESTFRAME_TEXT.Parent = QUESTFRAME
  940. local QUESTSCROLL = Instance.new("ScrollingFrame")
  941. QUESTSCROLL.BackgroundTransparency = 0.5
  942. QUESTSCROLL.BackgroundColor3 = Color3.new(1, 1, 1)
  943. QUESTSCROLL.BorderSizePixel = 0
  944. QUESTSCROLL.ScrollBarThickness = 1
  945. QUESTSCROLL.Size = UDim2.new(1, 0, 1, 0)
  946. QUESTSCROLL.Parent = QUESTFRAME
  947. local UIGridLayout = Instance.new("UIGridLayout")
  948. UIGridLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
  949. UIGridLayout.CellPadding = UDim2.new(0, 10, 0, 50)
  950. UIGridLayout.CellSize = UDim2.new(1, 0, 0, 50)
  951. UIGridLayout.Parent = QUESTSCROLL
  952. local ORDERARRAY = {}
  953. for _, v in pairs(targ.Quest:GetChildren()) do
  954. table.insert(ORDERARRAY, v)
  955. end
  956. table.sort(ORDERARRAY, function(i, v)
  957. return v.LevelRequire.Value > i.LevelRequire.Value
  958. end)
  959. for _, v in pairs(ORDERARRAY) do
  960. do
  961. local quest_name = Instance.new("TextLabel")
  962. quest_name.TextXAlignment = Enum.TextXAlignment.Left
  963. quest_name.Text = "[" .. v.LevelRequire.Value .. "] " .. v.Name
  964. quest_name.Font = Enum.Font.Highway
  965. quest_name.TextSize = 20
  966. quest_name.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
  967. quest_name.BackgroundTransparency = 0.4
  968. quest_name.TextColor3 = Color3.new(1, 1, 1)
  969. quest_name.BorderSizePixel = 0
  970. local button = Instance.new("ImageButton")
  971. button.Position = UDim2.new(0.8, 0, 0, 0)
  972. button.Size = UDim2.new(0, 50, 0, 50)
  973. button.BackgroundTransparency = 1
  974. if DATAFOLDER.Quest:FindFirstChild(v.Name) == nil then
  975. button.Image = "http://www.roblox.com/asset/?id=963841901"
  976. do
  977. local debugCHECKINGGGG = false
  978. button.MouseButton1Click:connect(function()
  979. if not debugCHECKINGGGG and player:FindFirstChild("Quest") == nil and LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value) >= v.LevelRequire.Value then
  980. debugCHECKINGGGG = true
  981. RemoteEvent:FireServer("StartQuest", v, PASSCODE)
  982. CLOSEDDEBUG = true
  983. else
  984. script.Error:Play()
  985. end
  986. end)
  987. end
  988. else
  989. end
  990. button.Image = "http://www.roblox.com/asset/?id=697062834"
  991. local description = quest_name:Clone()
  992. description.Size = UDim2.new(1, 0, 0, 15)
  993. description.Position = UDim2.new(0, 0, 1, 0)
  994. description.Text = v.Value
  995. description.TextSize = 14
  996. description.TextYAlignment = Enum.TextYAlignment.Top
  997. description.TextXAlignment = Enum.TextXAlignment.Right
  998. description.Parent = quest_name
  999. local exptext = description:Clone()
  1000. exptext.Position = exptext.Position + UDim2.new(0, 0, 0, exptext.Size.Y.Offset)
  1001. exptext.Text = LevelSystem.XPClientPerspective(v.EXP.Value) .. " EXP"
  1002. exptext.TextSize = 14
  1003. exptext.TextColor3 = Color3.fromRGB(4, 175, 236)
  1004. exptext.Parent = quest_name
  1005. local goldtext = exptext:Clone()
  1006. goldtext.Position = goldtext.Position + UDim2.new(0, 0, 0, goldtext.Size.Y.Offset)
  1007. goldtext.Text = "$" .. v.Currency.Value
  1008. goldtext.TextSize = 14
  1009. goldtext.TextColor3 = Color3.fromRGB(248, 217, 109)
  1010. goldtext.Parent = quest_name
  1011. button.Parent = quest_name
  1012. quest_name.Parent = QUESTSCROLL
  1013. end
  1014. end
  1015. local CLOSEBUTTON = Instance.new("TextButton")
  1016. CLOSEBUTTON.Size = UDim2.new(0, 25, 0, 25)
  1017. CLOSEBUTTON.Position = UDim2.new(1, -25, 0, -50)
  1018. CLOSEBUTTON.Text = "X"
  1019. CLOSEBUTTON.TextColor3 = Color3.new(1, 1, 1)
  1020. CLOSEBUTTON.BackgroundColor3 = Color3.new(1, 0, 0)
  1021. CLOSEBUTTON.TextSize = 20
  1022. CLOSEBUTTON.BorderSizePixel = 0
  1023. game.ReplicatedStorage.PartyFrame.HP.Gradient:Clone().Parent = CLOSEBUTTON
  1024. CLOSEBUTTON.Parent = QUESTFRAME
  1025. QUESTFRAME.Parent = MAINGUI
  1026. CLOSEBUTTON.MouseButton1Click:connect(function()
  1027. CLOSEDDEBUG = true
  1028. end)
  1029. repeat
  1030. wait()
  1031. until targ.Position - character.HumanoidRootPart.Position.magnitude > RANGE or CLOSEDDEBUG
  1032. QUESTFRAME:Destroy()
  1033. inBUYING = false
  1034. return
  1035. end
  1036. end
  1037. if targ.Parent.Name == "GrimoireEdit" then
  1038. inBUYING = true
  1039. do
  1040. local FINISH = false
  1041. local GRIMOIREGUI = game.ReplicatedStorage.GrimoireEdit:Clone()
  1042. GRIMOIREGUI.Parent = MAINGUI
  1043. if player.DataFolder.Clover.Value == 3 then
  1044. GRIMOIREGUI.Clover.Image = "http://www.roblox.com/asset/?id=1259788180"
  1045. elseif player.DataFolder.Clover.Value == 4 then
  1046. GRIMOIREGUI.Clover.Image = "http://www.roblox.com/asset/?id=1259787885"
  1047. elseif player.DataFolder.Clover.Value == 5 then
  1048. GRIMOIREGUI.Clover.Image = "http://www.roblox.com/asset/?id=1270513809"
  1049. end
  1050. local COLORPICKED = Color3.new(1, 1, 1)
  1051. local SELECTED
  1052. local SIZE = "S"
  1053. local MATERIAL = Enum.Material.SmoothPlastic
  1054. local debugger_click_on_checker = false
  1055. GRIMOIREGUI.Cancel.MouseButton1Click:connect(function()
  1056. FINISH = true
  1057. debugger_click_on_checker = true
  1058. end)
  1059. GRIMOIREGUI.Confirm.MouseButton1Click:connect(function()
  1060. if not debugger_click_on_checker and not FINISH then
  1061. debugger_click_on_checker = true
  1062. RemoteEvent:FireServer("EditGrimoire", {
  1063. Size = CALCULATEBOOKSIZES(SIZE),
  1064. Material = MATERIAL.Name,
  1065. Left = GRIMOIREGUI.Right.Image,
  1066. Right = GRIMOIREGUI.Left.Image,
  1067. Color2 = GRIMOIREGUI.Clover.ImageColor3,
  1068. Color = GRIMOIREGUI.Middle.BackgroundColor3,
  1069. CloverTransparency = GRIMOIREGUI.Clover.ImageTransparency,
  1070. ImageColor = GRIMOIREGUI.Right.ImageColor3
  1071. }, PASSCODE)
  1072. FINISH = true
  1073. end
  1074. end)
  1075. GRIMOIREGUI.Middle.MouseButton1Click:connect(function()
  1076. if not debugger_click_on_checker then
  1077. SELECTED = "Middle"
  1078. COLORPICKED = Color3.new(1, 1, 1)
  1079. end
  1080. end)
  1081. GRIMOIREGUI.Left.MouseButton1Click:connect(function()
  1082. if not debugger_click_on_checker then
  1083. SELECTED = "Decal"
  1084. COLORPICKED = Color3.new(1, 1, 1)
  1085. end
  1086. end)
  1087. GRIMOIREGUI.Right.MouseButton1Click:connect(function()
  1088. if not debugger_click_on_checker then
  1089. SELECTED = "Decal"
  1090. COLORPICKED = Color3.new(1, 1, 1)
  1091. end
  1092. end)
  1093. GRIMOIREGUI.Red.MouseButton1Click:connect(function()
  1094. if not debugger_click_on_checker then
  1095. local mouseVec = Vector2.new(mouse.X, mouse.Y)
  1096. local COLORPICKPOS = GRIMOIREGUI.Red.AbsolutePosition
  1097. local COLORPICKSIZE = GRIMOIREGUI.Red.AbsoluteSize
  1098. local INSIDECOLORPOS = mouseVec - COLORPICKPOS
  1099. local r = math.min(COLORPICKSIZE.x, INSIDECOLORPOS.x) / COLORPICKSIZE.x
  1100. COLORPICKED = Color3.new(r, COLORPICKED.g, COLORPICKED.b)
  1101. GRIMOIREGUI.Red.ImageLabel.Position = UDim2.new(r, -10, 0, 0)
  1102. GRIMOIREGUI.Red.TextBox.Text = math.floor(r * 255)
  1103. end
  1104. end)
  1105. GRIMOIREGUI.Green.MouseButton1Click:connect(function()
  1106. if not debugger_click_on_checker then
  1107. local mouseVec = Vector2.new(mouse.X, mouse.Y)
  1108. local COLORPICKPOS = GRIMOIREGUI.Green.AbsolutePosition
  1109. local COLORPICKSIZE = GRIMOIREGUI.Green.AbsoluteSize
  1110. local INSIDECOLORPOS = mouseVec - COLORPICKPOS
  1111. local g = math.min(COLORPICKSIZE.x, INSIDECOLORPOS.x) / COLORPICKSIZE.x
  1112. COLORPICKED = Color3.new(COLORPICKED.r, g, COLORPICKED.b)
  1113. GRIMOIREGUI.Green.ImageLabel.Position = UDim2.new(g, -10, 0, 0)
  1114. GRIMOIREGUI.Green.TextBox.Text = math.floor(g * 255)
  1115. end
  1116. end)
  1117. GRIMOIREGUI.Blue.MouseButton1Click:connect(function()
  1118. if not debugger_click_on_checker then
  1119. local mouseVec = Vector2.new(mouse.X, mouse.Y)
  1120. local COLORPICKPOS = GRIMOIREGUI.Blue.AbsolutePosition
  1121. local COLORPICKSIZE = GRIMOIREGUI.Blue.AbsoluteSize
  1122. local INSIDECOLORPOS = mouseVec - COLORPICKPOS
  1123. local b = math.min(COLORPICKSIZE.x, INSIDECOLORPOS.x) / COLORPICKSIZE.x
  1124. COLORPICKED = Color3.new(COLORPICKED.r, COLORPICKED.g, b)
  1125. GRIMOIREGUI.Blue.ImageLabel.Position = UDim2.new(b, -10, 0, 0)
  1126. GRIMOIREGUI.Blue.TextBox.Text = math.floor(b * 255)
  1127. end
  1128. end)
  1129. GRIMOIREGUI.Red.TextBox.FocusLost:connect(function()
  1130. if not debugger_click_on_checker then
  1131. local N = tonumber(GRIMOIREGUI.Red.TextBox.Text)
  1132. if N then
  1133. N = math.min(math.abs(math.floor(N)), 255)
  1134. GRIMOIREGUI.Red.TextBox.Text = N
  1135. local alpha = N / 255
  1136. COLORPICKED = Color3.new(alpha, COLORPICKED.g, COLORPICKED.b)
  1137. GRIMOIREGUI.Red.ImageLabel.Position = UDim2.new(alpha, -10, 0, 0)
  1138. else
  1139. GRIMOIREGUI.Red.TextBox.Text = math.floor(COLORPICKED.r * 255)
  1140. end
  1141. end
  1142. end)
  1143. GRIMOIREGUI.Blue.TextBox.FocusLost:connect(function()
  1144. if not debugger_click_on_checker then
  1145. local N = tonumber(GRIMOIREGUI.Blue.TextBox.Text)
  1146. if N then
  1147. N = math.min(math.abs(math.floor(N)), 255)
  1148. GRIMOIREGUI.Blue.TextBox.Text = N
  1149. local alpha = N / 255
  1150. COLORPICKED = Color3.new(COLORPICKED.r, COLORPICKED.g, alpha)
  1151. GRIMOIREGUI.Blue.ImageLabel.Position = UDim2.new(alpha, -10, 0, 0)
  1152. else
  1153. GRIMOIREGUI.Blue.TextBox.Text = math.floor(COLORPICKED.b * 255)
  1154. end
  1155. end
  1156. end)
  1157. GRIMOIREGUI.Green.TextBox.FocusLost:connect(function()
  1158. if not debugger_click_on_checker then
  1159. local N = tonumber(GRIMOIREGUI.Green.TextBox.Text)
  1160. if N then
  1161. N = math.min(math.abs(math.floor(N)), 255)
  1162. GRIMOIREGUI.Green.TextBox.Text = N
  1163. local alpha = N / 255
  1164. COLORPICKED = Color3.new(COLORPICKED.r, alpha, COLORPICKED.b)
  1165. GRIMOIREGUI.Green.ImageLabel.Position = UDim2.new(alpha, -10, 0, 0)
  1166. else
  1167. GRIMOIREGUI.Green.TextBox.Text = math.floor(COLORPICKED.g * 255)
  1168. end
  1169. end
  1170. end)
  1171. GRIMOIREGUI.Clover.MouseButton1Click:connect(function()
  1172. if not debugger_click_on_checker then
  1173. SELECTED = "Clover"
  1174. COLORPICKED = Color3.new(1, 1, 1)
  1175. end
  1176. end)
  1177. for _, v in pairs(GRIMOIREGUI.BookSize:GetChildren()) do
  1178. if v:IsA("TextButton") then
  1179. v.MouseButton1Click:connect(function()
  1180. if not debugger_click_on_checker then
  1181. SIZE = v.Name
  1182. for _, textbut in pairs(GRIMOIREGUI.BookSize:GetChildren()) do
  1183. if textbut:IsA("TextButton") then
  1184. textbut.BorderSizePixel = 0
  1185. end
  1186. end
  1187. v.BorderSizePixel = 4
  1188. end
  1189. end)
  1190. end
  1191. end
  1192. local CLOVERTEXT = GRIMOIREGUI.CloverTransparency.Text
  1193. local LEFTIDTEXT = GRIMOIREGUI.LeftID.Text
  1194. local RIGHTIDTEXT = GRIMOIREGUI.RightID.Text
  1195. GRIMOIREGUI.CloverTransparency.FocusLost:connect(function()
  1196. if not debugger_click_on_checker then
  1197. if tonumber(GRIMOIREGUI.CloverTransparency.Text) then
  1198. GRIMOIREGUI.Clover.ImageTransparency = tonumber(GRIMOIREGUI.CloverTransparency.Text)
  1199. else
  1200. GRIMOIREGUI.CloverTransparency.Text = CLOVERTEXT
  1201. end
  1202. end
  1203. end)
  1204. GRIMOIREGUI.LeftID.FocusLost:connect(function()
  1205. if not debugger_click_on_checker then
  1206. if tonumber(GRIMOIREGUI.LeftID.Text) then
  1207. GRIMOIREGUI.Left.Image = "rbxassetid://" .. GetID(tonumber(GRIMOIREGUI.LeftID.Text))
  1208. else
  1209. GRIMOIREGUI.LeftID.Text = LEFTIDTEXT
  1210. end
  1211. end
  1212. end)
  1213. GRIMOIREGUI.RightID.FocusLost:connect(function()
  1214. if not debugger_click_on_checker then
  1215. if tonumber(GRIMOIREGUI.RightID.Text) then
  1216. GRIMOIREGUI.Right.Image = "rbxassetid://" .. GetID(tonumber(GRIMOIREGUI.RightID.Text))
  1217. else
  1218. GRIMOIREGUI.RightID.Text = RIGHTIDTEXT
  1219. end
  1220. end
  1221. end)
  1222. GRIMOIREGUI.Material.FocusLost:connect(function()
  1223. if not debugger_click_on_checker then
  1224. do
  1225. local TEXT = GRIMOIREGUI.Material.Text
  1226. if pcall(function()
  1227. return Enum.Material[TEXT]
  1228. end) then
  1229. MATERIAL = Enum.Material[TEXT]
  1230. GRIMOIREGUI.Material.Text = "Material [" .. MATERIAL.Name .. "]"
  1231. else
  1232. GRIMOIREGUI.Material.Text = "Material [" .. MATERIAL.Name .. "]"
  1233. end
  1234. end
  1235. end
  1236. end)
  1237. repeat
  1238. wait()
  1239. if COLORPICKED then
  1240. GRIMOIREGUI.TextLabel.BackgroundColor3 = COLORPICKED
  1241. GRIMOIREGUI.TextLabel.Text = "(" .. math.floor(255 * COLORPICKED.r) .. "," .. math.floor(255 * COLORPICKED.g) .. "," .. math.floor(255 * COLORPICKED.b) .. ")"
  1242. if SELECTED then
  1243. if SELECTED == "Middle" then
  1244. GRIMOIREGUI.Middle.BackgroundColor3 = COLORPICKED
  1245. GRIMOIREGUI.Left.BackgroundColor3 = COLORPICKED
  1246. GRIMOIREGUI.Right.BackgroundColor3 = COLORPICKED
  1247. elseif SELECTED == "Decal" then
  1248. GRIMOIREGUI.Left.ImageColor3 = COLORPICKED
  1249. GRIMOIREGUI.Right.ImageColor3 = COLORPICKED
  1250. elseif SELECTED == "Clover" then
  1251. GRIMOIREGUI.Clover.ImageColor3 = COLORPICKED
  1252. end
  1253. end
  1254. end
  1255. until FINISH
  1256. GRIMOIREGUI:Destroy()
  1257. inBUYING = false
  1258. return
  1259. end
  1260. end
  1261. end
  1262. end)
  1263. end
  1264. for i = 1, #SKILLTREE.MagicInventory:GetChildren() - 1 do
  1265. local ImageLabel = Instance.new("ImageLabel")
  1266. ImageLabel.Name = i
  1267. ImageLabel.Size = UDim2.new(0, 50, 0, 50)
  1268. ImageLabel.Visible = false
  1269. ImageLabel.BackgroundTransparency = 1
  1270. ImageLabel.ImageColor3 = Color3.new(0, 0, 0)
  1271. ImageLabel.Parent = MAINGUI.MagicWheel.MagicSlots
  1272. local Frame = Instance.new("Frame")
  1273. Frame.Size = ImageLabel.Size
  1274. Frame.BackgroundTransparency = 1
  1275. Frame.ClipsDescendants = true
  1276. Frame.Parent = ImageLabel
  1277. local ColorImageLabel = Instance.new("ImageLabel")
  1278. ColorImageLabel.Size = ImageLabel.Size
  1279. ColorImageLabel.BackgroundTransparency = 1
  1280. ColorImageLabel.Parent = Frame
  1281. local CoolDownText = Instance.new("TextLabel")
  1282. CoolDownText.Size = UDim2.new(1, 0, 1, 0)
  1283. CoolDownText.Position = UDim2.new(0, 0, 0, 0)
  1284. CoolDownText.BackgroundTransparency = 1
  1285. CoolDownText.TextStrokeTransparency = 0
  1286. CoolDownText.TextStrokeColor3 = Color3.new(0, 0, 0)
  1287. CoolDownText.FontSize = Enum.FontSize.Size12
  1288. CoolDownText.TextColor3 = Color3.new(1, 1, 1)
  1289. CoolDownText.Font = Enum.Font.Arcade
  1290. CoolDownText.Visible = false
  1291. CoolDownText.Name = "CoolDown"
  1292. CoolDownText.Parent = ImageLabel
  1293. local TextLabel = Instance.new("TextLabel")
  1294. TextLabel.Size = UDim2.new(0, 100, 0, 10)
  1295. TextLabel.Position = UDim2.new(0, -25, 0, -5)
  1296. TextLabel.BackgroundTransparency = 1
  1297. TextLabel.TextStrokeTransparency = 0
  1298. TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
  1299. TextLabel.FontSize = Enum.FontSize.Size14
  1300. TextLabel.TextColor3 = Color3.new(1, 1, 1)
  1301. TextLabel.Font = Enum.Font.Arcade
  1302. TextLabel.Visible = false
  1303. TextLabel.Parent = ImageLabel
  1304. end
  1305. _G.ConvertToTick = _G.ConvertToTick or {}
  1306. local MAGICENABLED = false
  1307. local MAGICSELECTED
  1308. local FINISH_MAGIC_MOVE = true
  1309. local NIL_COOLDOWN = game.ReplicatedStorage.NIL_COOLDOWN.Value
  1310. local FLYINGV = Instance.new("BodyVelocity")
  1311. FLYINGV.Name = "BROOMFLIGHTBV"
  1312. FLYINGV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  1313. FLYINGV.P = 1000
  1314. local FACEB = Instance.new("BodyGyro")
  1315. FACEB.D = 500
  1316. FACEB.P = 5000
  1317. FACEB.CFrame = CFrame.new(0, 0, 0)
  1318. FACEB.MaxTorque = Vector3.new(1000000000, 1000000000, 1000000000)
  1319. local flightAnimation = character.Humanoid:LoadAnimation(game.ReplicatedStorage.LocalAnimations.BroomFlight)
  1320. local cleanAnimation = character.Humanoid:LoadAnimation(game.ReplicatedStorage.LocalAnimations.Clean)
  1321. local runAnimation = character.Humanoid:LoadAnimation(game.ReplicatedStorage.LocalAnimations.RunAnimation)
  1322. local rollAnimation = character.Humanoid:LoadAnimation(game.ReplicatedStorage.LocalAnimations.Rolling)
  1323. runAnimation.Priority = Enum.AnimationPriority.Movement
  1324. rollAnimation.Priority = Enum.AnimationPriority.Movement
  1325. local MYBROOM
  1326. function render_MagicHold()
  1327. if character.Effects:FindFirstChild("Hit Stun") == nil and not runAnimation.IsPlaying and MAGICENABLED == false and Grimoire_Tool.Parent == character and KeyPressed[Enum.UserInputType.MouseButton1.Name] and KeyPressed[Enum.UserInputType.MouseButton1.Name][1] == true and character:FindFirstChild("Grimoire") and SkillTreeEnable ~= true then
  1328. local holdtime = KeyPressed[Enum.UserInputType.MouseButton1.Name][2]
  1329. if holdtime then
  1330. holdtime = tick() - holdtime
  1331. if holdtime > 0.5 then
  1332. OPENBOOK = true
  1333. end
  1334. if holdtime > 1.5 then
  1335. local MAGICEQUIP = {}
  1336. for i = 1, #SKILLTREE.MagicInventory:GetChildren() - 1 do
  1337. if DATAFOLDER["Slot" .. i].Value ~= "" then
  1338. table.insert(MAGICEQUIP, DATAFOLDER["Slot" .. i].Value)
  1339. end
  1340. end
  1341. local MYMOUSEPOS = Vector2.new(mouse.X, mouse.Y)
  1342. local ALREADYSELECTED = false
  1343. for i = 1, #MAGICEQUIP do
  1344. local rot = math.rad(360 / #MAGICEQUIP * i) - math.rad(360 / #MAGICEQUIP) * 0.25
  1345. local x = math.cos(rot) * (MAINGUI.MagicWheel.Middle.Size.Y.Offset * 0.6)
  1346. local y = math.sin(rot) * (MAINGUI.MagicWheel.Middle.Size.Y.Offset * 0.6)
  1347. MAINGUI.MagicWheel.MagicSlots[i].Position = UDim2.new(0, x - 25, 0, y - 25)
  1348. MAINGUI.MagicWheel.MagicSlots[i].Image = game.ReplicatedStorage.MagicImg:FindFirstChild(MAGICEQUIP[i]).Value
  1349. MAINGUI.MagicWheel.MagicSlots[i].Frame.ImageLabel.Image = game.ReplicatedStorage.MagicImg:FindFirstChild(MAGICEQUIP[i]).Value
  1350. MAINGUI.MagicWheel.MagicSlots[i].Visible = true
  1351. local MAGICSLOTPOS = MAINGUI.MagicWheel.MagicSlots[i].AbsolutePosition + MAINGUI.MagicWheel.MagicSlots[i].AbsoluteSize * 0.5
  1352. local CENTER_MOUSE = MYMOUSEPOS - MAINGUI.MagicWheel.MagicSlots.AbsolutePosition.unit
  1353. local CENTER_SLOT = MAGICSLOTPOS - MAINGUI.MagicWheel.MagicSlots.AbsolutePosition.unit
  1354. local THISCOOLDOWN = game.ReplicatedStorage.MagicCD:FindFirstChild(MAGICEQUIP[i]) and game.ReplicatedStorage.MagicCD:FindFirstChild(MAGICEQUIP[i]).Value or NIL_COOLDOWN
  1355. local ISONCOOLDOWN = DATAFOLDER.Magics[MAGICEQUIP[i]]:FindFirstChild("COOLDOWN_DEBUG") and _G.ConvertToTick[MAGICEQUIP[i]][1] + (DATAFOLDER.Magics[MAGICEQUIP[i]].COOLDOWN_DEBUG.Value - _G.ConvertToTick[MAGICEQUIP[i]][2])
  1356. local UPDOWNPERCENTAGE = ISONCOOLDOWN and 1 - math.min(tick() - ISONCOOLDOWN, THISCOOLDOWN) / THISCOOLDOWN or 0
  1357. MAINGUI.MagicWheel.MagicSlots[i].Frame.Position = UDim2.new(0, 0, math.floor(UPDOWNPERCENTAGE * 100) / 100, 0)
  1358. MAINGUI.MagicWheel.MagicSlots[i].Frame.ImageLabel.Position = UDim2.new(0, 0, -math.floor(UPDOWNPERCENTAGE * 100) / 100, 0)
  1359. if UPDOWNPERCENTAGE ~= 0 then
  1360. if _G.ConvertToTick[MAGICEQUIP[i]] then
  1361. _G.ConvertToTick[MAGICEQUIP[i]][3] = false
  1362. end
  1363. local number = math.floor(ISONCOOLDOWN + THISCOOLDOWN - tick())
  1364. MAINGUI.MagicWheel.MagicSlots[i].CoolDown.Text = number
  1365. MAINGUI.MagicWheel.MagicSlots[i].CoolDown.Visible = true
  1366. else
  1367. if _G.ConvertToTick[MAGICEQUIP[i]] then
  1368. _G.ConvertToTick[MAGICEQUIP[i]][3] = true
  1369. end
  1370. MAINGUI.MagicWheel.MagicSlots[i].CoolDown.Visible = false
  1371. end
  1372. if MYMOUSEPOS - MAINGUI.MagicWheel.MagicSlots.AbsolutePosition.magnitude <= MAINGUI.MagicWheel.Middle.Size.Y.Offset * 0.5 and UPDOWNPERCENTAGE <= 0 then
  1373. MAGICSELECTED = nil
  1374. end
  1375. if UPDOWNPERCENTAGE <= 0 and MYMOUSEPOS - MAINGUI.MagicWheel.MagicSlots.AbsolutePosition.magnitude > MAINGUI.MagicWheel.Middle.Size.Y.Offset * 0.5 and CENTER_MOUSE.x * CENTER_SLOT.x + CENTER_MOUSE.y * CENTER_SLOT.y > 0.99 then
  1376. ALREADYSELECTED = true
  1377. MAGICSELECTED = MAGICEQUIP[i]
  1378. MAINGUI.MagicWheel.MagicSlots[i].TextLabel.Text = MAGICEQUIP[i]
  1379. MAINGUI.MagicWheel.MagicSlots[i].TextLabel.Visible = true
  1380. else
  1381. MAINGUI.MagicWheel.MagicSlots[i].TextLabel.Visible = false
  1382. end
  1383. if ALREADYSELECTED == false then
  1384. MAGICSELECTED = nil
  1385. end
  1386. end
  1387. MAGICWHEELVISIBLE = true
  1388. else
  1389. for i, v in pairs(MAINGUI.MagicWheel.MagicSlots:GetChildren()) do
  1390. v.TextLabel.Visible = false
  1391. v.Visible = false
  1392. end
  1393. MAGICWHEELVISIBLE = false
  1394. end
  1395. end
  1396. else
  1397. MAGICWHEELVISIBLE = false
  1398. OPENBOOK = false
  1399. if MAGICENABLED == false and MAGICSELECTED and (DATAFOLDER.Magics[MAGICSELECTED]:FindFirstChild("COOLDOWN_DEBUG") == nil or _G.ConvertToTick[MAGICSELECTED][3]) then
  1400. if MAGICENABLED == true then
  1401. return
  1402. end
  1403. MAGICENABLED = true
  1404. FINISH_MAGIC_MOVE = false
  1405. _G.ConvertToTick[MAGICSELECTED] = {
  1406. tick() + 3,
  1407. os.time(),
  1408. false
  1409. }
  1410. RemoteEvent:FireServer("MAGIC_" .. MAGICSELECTED, "MAGIC_0101010101", PASSCODE)
  1411. repeat
  1412. wait()
  1413. until FINISH_MAGIC_MOVE == true and DATAFOLDER.Magics[MAGICSELECTED]:FindFirstChild("COOLDOWN_DEBUG")
  1414. if MAGICSELECTED and DATAFOLDER.Magics:FindFirstChild(MAGICSELECTED) then
  1415. UNLOCKINGTHINGS("Image", {
  1416. game.ReplicatedStorage.MagicImg[MAGICSELECTED].Value,
  1417. DATAFOLDER.Magics:FindFirstChild(MAGICSELECTED).Value
  1418. })
  1419. end
  1420. _G.ConvertToTick[MAGICSELECTED] = {
  1421. tick() + 3,
  1422. DATAFOLDER.Magics[MAGICSELECTED].COOLDOWN_DEBUG.Value
  1423. }
  1424. MAGICSELECTED = nil
  1425. MAGICENABLED = false
  1426. end
  1427. end
  1428. _G.BookOpen()
  1429. if MAGICWHEELVISIBLE then
  1430. MAINGUI.MagicWheel.Visible = true
  1431. local mousepoint = MAINGUI.MagicWheel.MousePoint
  1432. local mousepos = Vector2.new(mouse.X, mouse.Y) - MAINGUI.MagicWheel.AbsolutePosition.unit * math.min(MAINGUI.MagicWheel.Middle.Size.X.Offset * 0.4, Vector2.new(mouse.X, mouse.Y) - MAINGUI.MagicWheel.AbsolutePosition.magnitude - mousepoint.Size.X.Offset * 0.6)
  1433. local rotation = math.deg(math.atan2(mousepos.y / mousepos.magnitude, mousepos.x / mousepos.magnitude)) + 90
  1434. mousepoint.Rotation = rotation
  1435. mousepoint.Position = UDim2.new(0, mousepos.x - mousepoint.Size.X.Offset * 0.5, 0, mousepos.y - mousepoint.Size.Y.Offset * 0.5)
  1436. else
  1437. MAINGUI.MagicWheel.Visible = false
  1438. end
  1439. if SkillTreeEnable then
  1440. local centerScreen = camera.ViewportSize * 0.5
  1441. local mousePos = Vector2.new(mouse.X, mouse.Y)
  1442. SKILLTREE.Center.CLOVER.Background.Rotation = SKILLTREE.Center.CLOVER.Background.Rotation + 0.5
  1443. if KeyPressed[Enum.UserInputType.MouseButton1.Name] and KeyPressed[Enum.UserInputType.MouseButton1.Name][1] == true then
  1444. local MOUSEHOLDPOS = KeyPressed[Enum.UserInputType.MouseButton1.Name][3]
  1445. local differenceUnit = (mousePos - MOUSEHOLDPOS) * 0.5
  1446. _G.CurrentSkillTreePos = _G.CurrentSkillTreePos or UDim2.new(0, 0, 0, 0)
  1447. SKILLTREE.Center.Position = _G.CurrentSkillTreePos + UDim2.new(0, differenceUnit.x, 0, differenceUnit.y)
  1448. else
  1449. _G.CurrentSkillTreePos = SKILLTREE.Center.Position
  1450. end
  1451. end
  1452. if character:FindFirstChild("Broom") and character.Effects:FindFirstChild("Flying Broom") then
  1453. local direction = camera.CFrame:vectorToWorldSpace(Vector3.new((KeyPressed[Enum.KeyCode.A.Name] and (KeyPressed[Enum.KeyCode.A.Name][1] and -1 or 0) or 0) + (KeyPressed[Enum.KeyCode.D.Name] and (KeyPressed[Enum.KeyCode.D.Name][1] and 1 or 0) or 0), 0, (KeyPressed[Enum.KeyCode.W.Name] and (KeyPressed[Enum.KeyCode.W.Name][1] and -1 or 0) or 0) + (KeyPressed[Enum.KeyCode.S.Name] and (KeyPressed[Enum.KeyCode.S.Name][1] and 1 or 0) or 0)))
  1454. FLYINGV.Velocity = direction * (not character.DisableEffects:FindFirstChild("Movement") and 20 or 0)
  1455. FACEB.CFrame = 0 < direction.magnitude and CFrame.new(camera.CFrame.p, camera.CFrame.p + direction) or camera.CFrame
  1456. MYBROOM = character:FindFirstChild("Broom")
  1457. if not flightAnimation.IsPlaying then
  1458. flightAnimation:Play()
  1459. RemoteEvent:FireServer("FlyingBroomEnable", MYBROOM, true, PASSCODE)
  1460. end
  1461. FLYINGV.Parent = character.HumanoidRootPart
  1462. FACEB.Parent = character.HumanoidRootPart
  1463. else
  1464. FLYINGV.Parent = nil
  1465. FACEB.Parent = nil
  1466. MYBROOM = character:FindFirstChild("Broom") or MYBROOM
  1467. if flightAnimation.IsPlaying or MYBROOM and MYBROOM.Broom.Trail.Enabled == true then
  1468. flightAnimation:Stop()
  1469. RemoteEvent:FireServer("FlyingBroomEnable", MYBROOM, false, PASSCODE)
  1470. end
  1471. end
  1472. if KeyPressed[Enum.UserInputType.MouseButton1.Name] and KeyPressed[Enum.UserInputType.MouseButton1.Name][1] == true and character:FindFirstChild("Broom") and not cleanAnimation.isPlaying and not character.Effects:FindFirstChild("Flying Broom") then
  1473. cleanAnimation:Play()
  1474. end
  1475. local MULTIPLIER = math.max(character.Humanoid.Health / character.Humanoid.MaxHealth, 0.3) == 0.3 and 0.3 or 1
  1476. if character.Effects:FindFirstChild("Lightning Equip") then
  1477. MULTIPLIER = MULTIPLIER + 0.2
  1478. end
  1479. if character.HumanoidRootPart:FindFirstChild("MudParticle") then
  1480. MULTIPLIER = MULTIPLIER * 0.5
  1481. end
  1482. if _G.FrostyDomainSpeed then
  1483. MULTIPLIER = MULTIPLIER * 1.5
  1484. end
  1485. if character.DisableEffects:FindFirstChild("Movement") then
  1486. MULTIPLIER = 0
  1487. end
  1488. if not character.DisableEffects:FindFirstChild("Run") and not character.DisableEffects:FindFirstChild("ToolsRun") and not character.DisableEffects:FindFirstChild("Movement") and KeyPressed[Enum.KeyCode.W.Name] and KeyPressed[Enum.KeyCode.W.Name][1] == true and (KeyPressed[Enum.KeyCode.W.Name][#KeyPressed[Enum.KeyCode.W.Name]] == true or KeyPressed[Enum.KeyCode.W.Name][3] and tick() - KeyPressed[Enum.KeyCode.W.Name][3] < 0.15) and FLYINGV.Parent == nil and 0 < character.Humanoid.MoveDirection.magnitude then
  1489. table.insert(KeyPressed[Enum.KeyCode.W.Name], true)
  1490. character.Humanoid.WalkSpeed = character.Humanoid.WalkSpeed + (22 * MULTIPLIER - character.Humanoid.WalkSpeed) * 0.01
  1491. if not runAnimation.IsPlaying then
  1492. runAnimation:Play()
  1493. end
  1494. else
  1495. character.Humanoid.WalkSpeed = 16 * MULTIPLIER
  1496. if runAnimation.IsPlaying then
  1497. runAnimation:Stop()
  1498. end
  1499. end
  1500. if rollAnimation.IsPlaying and character.Humanoid.JumpPower ~= 0 then
  1501. character.Humanoid.JumpPower = 0
  1502. delay(2, function()
  1503. character.Humanoid.JumpPower = 50
  1504. end)
  1505. end
  1506. if not rollAnimation.IsPlaying and character.DisableEffects:FindFirstChild("Movement") and character.Humanoid.JumpPower ~= 0 then
  1507. character.Humanoid.JumpPower = 0
  1508. spawn(function()
  1509. repeat
  1510. wait()
  1511. until character.DisableEffects:FindFirstChild("Movement") == nil
  1512. character.Humanoid.JumpPower = 50
  1513. end)
  1514. end
  1515. local SHAKECAM = false
  1516. if not SHAKECAM and character.Effects:FindFirstChild("Camera Shake") then
  1517. SHAKECAM = true
  1518. end
  1519. if not SHAKECAM and workspace:FindFirstChild("VolcanoMesh") then
  1520. for _, v in pairs(workspace:GetChildren()) do
  1521. if v.Name == "VolcanoMesh" and v.Shake.Value == true and character.HumanoidRootPart.Position - v.Part.Position.magnitude < 18 then
  1522. SHAKECAM = true
  1523. break
  1524. end
  1525. end
  1526. end
  1527. if SHAKECAM then
  1528. camera.CFrame = camera.CFrame * CFrame.new(math.random() * math.random(-1, 1), math.random() * math.random(-1, 1), math.random() * math.random(-1, 1))
  1529. end
  1530. local Distortion = 70
  1531. local Blur = 0
  1532. if character.Effects:FindFirstChild("Distortion") then
  1533. Distortion = Distortion + 13
  1534. end
  1535. if character.Effects:FindFirstChild("ReDistortion") then
  1536. Distortion = Distortion - 15
  1537. end
  1538. if character.Effects:FindFirstChild("Blur") then
  1539. Blur = Blur + 15
  1540. MAINGUI.mistblur.Visible = true
  1541. else
  1542. MAINGUI.mistblur.Visible = false
  1543. end
  1544. if character.Effects:FindFirstChild("Sud") then
  1545. Blur = Blur + 15
  1546. MAINGUI.bubblecoat.Visible = true
  1547. else
  1548. MAINGUI.bubblecoat.Visible = false
  1549. end
  1550. game.Lighting.Blur.Size = game.Lighting.Blur.Size + (Blur - game.Lighting.Blur.Size) * 0.1
  1551. camera.FieldOfView = camera.FieldOfView + (Distortion - camera.FieldOfView) * 0.1
  1552. if DATAFOLDER.Magics:FindFirstChild("Sensing") then
  1553. local target = mouse.Target
  1554. if KeyPressed[Enum.UserInputType.MouseButton2.Name] and KeyPressed[Enum.UserInputType.MouseButton2.Name][1] and 0 >= character.Humanoid.MoveDirection.magnitude and 1 <= tick() - KeyPressed[Enum.UserInputType.MouseButton2.Name][2] and target and target:isDescendantOf(workspace.NPCs) and target.Parent:FindFirstChild("Humanoid") and target.Position - character.HumanoidRootPart.Position.magnitude < 30 then
  1555. local otherLevel
  1556. local myLevel = LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value)
  1557. if game.Players:GetPlayerFromCharacter(target.Parent) then
  1558. otherLevel = LevelSystem.CalculateLVLfromEXP(game.Players:GetPlayerFromCharacter(target.Parent).DataFolder.Stats.XP.Value)
  1559. elseif target.Parent:FindFirstChild("DataFolder") and target.Parent.DataFolder:FindFirstChild("XP") then
  1560. otherLevel = LevelSystem.CalculateLVLfromEXP(target.Parent.DataFolder.XP.Value)
  1561. end
  1562. local textOFLEVEL = ""
  1563. if otherLevel ~= nil and myLevel >= otherLevel then
  1564. textOFLEVEL = tostring(otherLevel)
  1565. else
  1566. textOFLEVEL = "?"
  1567. end
  1568. MAINGUI.Sensing.Text = "Level: " .. textOFLEVEL
  1569. MAINGUI.Sensing.Position = UDim2.new(0, mouse.X, 0, mouse.Y - 7)
  1570. MAINGUI.Sensing.Visible = true
  1571. else
  1572. MAINGUI.Sensing.Visible = false
  1573. end
  1574. end
  1575. end
  1576. character.Humanoid.StateChanged:connect(function(oldstate, newstate)
  1577. if runAnimation.IsPlaying and newstate == Enum.HumanoidStateType.Jumping then
  1578. rollAnimation:Play()
  1579. end
  1580. end)
  1581. function SettingsGUIENABLE(UI)
  1582. if not MAINGUI.Settings.Visible then
  1583. for i, v in pairs(MAINGUI.Settings:GetChildren()) do
  1584. if v:IsA("Frame") or v:IsA("ScrollingFrame") then
  1585. if v == UI then
  1586. v.Visible = true
  1587. else
  1588. v.Visible = false
  1589. end
  1590. end
  1591. end
  1592. MAINGUI.Settings.Visible = true
  1593. else
  1594. MAINGUI.Settings.Visible = false
  1595. end
  1596. end
  1597. do
  1598. local function MAKESETTINGS(DATAFOLDITEM, NAME)
  1599. local Frame = Instance.new("Frame")
  1600. Frame.Size = UDim2.new(1, 0, 0, 35)
  1601. Frame.BackgroundColor3 = Color3.new(1, 1, 1)
  1602. local LABEL = Instance.new("TextLabel")
  1603. LABEL.BackgroundTransparency = 1
  1604. LABEL.Font = Enum.Font.Highway
  1605. LABEL.Size = UDim2.new(0.5, 0, 0, 35)
  1606. LABEL.TextXAlignment = Enum.TextXAlignment.Left
  1607. LABEL.TextSize = 25
  1608. LABEL.Text = NAME
  1609. LABEL.Parent = Frame
  1610. local BUTTON = Instance.new("TextButton")
  1611. BUTTON.Size = UDim2.new(0, 35, 0, 35)
  1612. BUTTON.Position = UDim2.new(1, -50, 0, 0)
  1613. BUTTON.TextColor3 = Color3.new(1, 1, 1)
  1614. BUTTON.Font = Enum.Font.Highway
  1615. BUTTON.TextSize = 20
  1616. BUTTON.Parent = Frame
  1617. game.ReplicatedStorage.PartyFrame.HP.Gradient:Clone().Parent = BUTTON
  1618. Frame.Parent = MAINGUI.Settings.Settings
  1619. BUTTON.MouseButton1Click:connect(function()
  1620. RemoteEvent:FireServer("ChangeSettings", DATAFOLDITEM, PASSCODE)
  1621. end)
  1622. local function checker()
  1623. local CHECKER = DATAFOLDITEM.Value
  1624. if CHECKER == "Active" then
  1625. CHECKER = true
  1626. else
  1627. CHECKER = false
  1628. end
  1629. if NAME == "Music" then
  1630. _G.MUSIC_OG_VOLUME = _G.MUSIC_OG_VOLUME or script.Music.Volume
  1631. script.Music.Volume = CHECKER and _G.MUSIC_OG_VOLUME or 0
  1632. end
  1633. BUTTON.Text = CHECKER and "ON" or "OFF"
  1634. if not CHECKER or not Color3.new(0, 1, 0) then
  1635. end
  1636. BUTTON.BackgroundColor3 = Color3.new(1, 0, 0)
  1637. end
  1638. checker()
  1639. DATAFOLDITEM.Changed:connect(checker)
  1640. MAINGUI.Settings.Settings.CanvasSize = UDim2.new(0, 0, 0, #MAINGUI.Settings.Settings:GetChildren() * 40)
  1641. end
  1642. MAKESETTINGS(DATAFOLDER.PartyInvite, "Party Invites UI")
  1643. MAKESETTINGS(DATAFOLDER.CurrencyShow, "Show Currency")
  1644. MAKESETTINGS(DATAFOLDER.Music, "Music")
  1645. local MAINGUI_SAVE_TEXT = MAINGUI.Settings.Save.TextLabel.Text
  1646. MAINGUI.Settings.Save.TextLabel.MouseEnter:connect(function()
  1647. MAINGUI.Settings.Save.TextLabel.Text = "Hold out an item and click one of the slot"
  1648. end)
  1649. MAINGUI.Settings.Save.TextLabel.MouseLeave:connect(function()
  1650. MAINGUI.Settings.Save.TextLabel.Text = MAINGUI_SAVE_TEXT
  1651. end)
  1652. MAINGUI.Settings.Save.SaveButton.MouseButton1Click:connect(function()
  1653. if player.SAVE_GAME.Value == false then
  1654. RemoteEvent:FireServer("QUICK_SAVE", PASSCODE)
  1655. MAINGUI.Error.Text = "SAVED"
  1656. MAINGUI.Error.Visible = true
  1657. wait(0.5)
  1658. MAINGUI.Error.Visible = false
  1659. end
  1660. end)
  1661. local clickingSaveItemDebug = false
  1662. local ITEMSTABLEARRAYBLAHBLAHBLAH = {}
  1663. for _, v in pairs(DATAFOLDER:GetChildren()) do
  1664. if string.match(v.Name, "Item") then
  1665. table.insert(ITEMSTABLEARRAYBLAHBLAHBLAH, v)
  1666. end
  1667. end
  1668. table.sort(ITEMSTABLEARRAYBLAHBLAHBLAH, function(i, v)
  1669. return tonumber(string.match(v.Name, "%d")) > tonumber(string.match(i.Name, "%d"))
  1670. end)
  1671. for _, v in pairs(ITEMSTABLEARRAYBLAHBLAHBLAH) do
  1672. do
  1673. local textbutton = Instance.new("ImageButton")
  1674. textbutton.BorderSizePixel = 0
  1675. textbutton.Size = UDim2.new(0, 50, 0, 50)
  1676. textbutton.BackgroundTransparency = 0.75
  1677. textbutton.BackgroundColor3 = Color3.new(1, 1, 1)
  1678. textbutton.Parent = MAINGUI.Settings.Save.Frame
  1679. local function UPDATECHANGED(value)
  1680. if value == "" then
  1681. textbutton.Image = "rbxassetid://9571720"
  1682. else
  1683. textbutton.Image = game.ReplicatedStorage.ItemsImg:FindFirstChild(value) and game.ReplicatedStorage.ItemsImg[value].Value or "rbxassetid://1019185679"
  1684. end
  1685. end
  1686. textbutton.MouseButton1Click:connect(function()
  1687. if clickingSaveItemDebug == false then
  1688. clickingSaveItemDebug = true
  1689. RemoteEvent:FireServer("Save/LoadItem", v, PASSCODE)
  1690. wait(1)
  1691. clickingSaveItemDebug = false
  1692. end
  1693. end)
  1694. UPDATECHANGED(v.Value)
  1695. v.Changed:connect(UPDATECHANGED)
  1696. end
  1697. end
  1698. local clickSLOWDEBUG = false
  1699. for _, v in pairs(KeyModule.Tittles()) do
  1700. do
  1701. local tittle_name = v[1]
  1702. local tittle_level = v[2]
  1703. local tittle_badge = v[3]
  1704. local tittle_color = v[4]
  1705. if tittle_name == DATAFOLDER.Tittle.Value then
  1706. player.Character.HumanoidRootPart.CFrame = v[5].CFrame
  1707. end
  1708. local textbutton = Instance.new("TextButton")
  1709. textbutton.Text = tittle_name .. " (Level: " .. (tittle_level or "???") .. ")"
  1710. textbutton.BorderSizePixel = 0
  1711. textbutton.BackgroundColor3 = tittle_color
  1712. textbutton.Font = Enum.Font.Highway
  1713. textbutton.TextSize = 15
  1714. textbutton.TextColor3 = Color3.new(1, 1, 1)
  1715. textbutton.TextStrokeColor3 = Color3.new(0, 0, 0)
  1716. textbutton.TextStrokeTransparency = 0
  1717. textbutton.Size = UDim2.new(1, 0, 0, 35)
  1718. game.ReplicatedStorage.PartyFrame.HP.Gradient:Clone().Parent = textbutton
  1719. textbutton.Parent = MAINGUI.Settings.Tittle
  1720. textbutton.MouseButton1Click:connect(function()
  1721. if clickSLOWDEBUG == false then
  1722. clickSLOWDEBUG = true
  1723. if tittle_level and LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value) >= tittle_level then
  1724. RemoteEvent:FireServer("ChangeTittle", tittle_name, PASSCODE)
  1725. elseif tittle_badge then
  1726. RemoteEvent:FireServer("ChangeTittle", tittle_name, {tittle_badge}, PASSCODE)
  1727. end
  1728. wait(1)
  1729. clickSLOWDEBUG = false
  1730. end
  1731. end)
  1732. MAINGUI.Settings.Tittle.CanvasSize = UDim2.new(0, 0, 0, #MAINGUI.Settings.Tittle:GetChildren() * 40)
  1733. end
  1734. end
  1735. local function updateTittle()
  1736. MAINGUI.Settings.Tittle.TextLabel.Text = "Title: " .. DATAFOLDER.Tittle.Value
  1737. end
  1738. updateTittle()
  1739. DATAFOLDER.Tittle.Changed:connect(updateTittle)
  1740. local function UPDATE_ATTRIBUTES()
  1741. MAINGUI.Settings.Stats.Attributes.Text = "Statistics: " .. LevelSystem.GETATTRIBUTES_POINTS(player) .. " point(s)"
  1742. end
  1743. local function addAttributes(statsVALUE)
  1744. local text1 = Instance.new("TextLabel")
  1745. text1.BackgroundTransparency = 1
  1746. text1.Font = Enum.Font.SourceSans
  1747. text1.TextColor3 = Color3.new(1, 1, 1)
  1748. text1.TextSize = 25
  1749. text1.TextXAlignment = Enum.TextXAlignment.Left
  1750. text1.Size = UDim2.new(0.8, 0, 0, 30)
  1751. text1.Text = statsVALUE.Name
  1752. local text2 = text1:Clone()
  1753. text2.Text = statsVALUE.Value
  1754. text2.Position = UDim2.new(0, 0, 0, 0)
  1755. text2.TextXAlignment = Enum.TextXAlignment.Right
  1756. text2.Parent = text1
  1757. local addition = Instance.new("TextButton")
  1758. addition.BackgroundTransparency = 0.5
  1759. addition.Font = Enum.Font.SourceSans
  1760. addition.TextSize = 25
  1761. addition.Position = UDim2.new(1, -10, 0.5, -8)
  1762. addition.Size = UDim2.new(0, 40, 0, 16)
  1763. addition.TextColor3 = Color3.fromRGB(130, 203, 255)
  1764. addition.TextStrokeTransparency = 0.7
  1765. addition.Text = "+"
  1766. addition.Parent = text1
  1767. text1.Parent = MAINGUI.Settings.Stats
  1768. addition.MouseButton1Click:connect(function()
  1769. if LevelSystem.CheckAttributes(player) then
  1770. RemoteEvent:FireServer("Stats_" .. statsVALUE.Name, true, PASSCODE)
  1771. else
  1772. script.Error:Play()
  1773. MAINGUI.Error.Text = "0 Attributes Point(s)"
  1774. MAINGUI.Error.Visible = true
  1775. wait(0.5)
  1776. MAINGUI.Error.Visible = false
  1777. end
  1778. end)
  1779. statsVALUE.Changed:connect(function()
  1780. UPDATE_ATTRIBUTES()
  1781. text2.Text = statsVALUE.Value
  1782. end)
  1783. end
  1784. updateTittle(DATAFOLDER.Strength)
  1785. addAttributes(DATAFOLDER.Defense)
  1786. addAttributes(DATAFOLDER.MagicDamage)
  1787. addAttributes(DATAFOLDER.Vitality)
  1788. DATAFOLDER.Stats.XP.Changed:connect(function()
  1789. UPDATE_ATTRIBUTES()
  1790. end)
  1791. UPDATE_ATTRIBUTES()
  1792. MAINGUI.Settings.Stats.Attributes.Reset.MouseButton1Click:connect(function()
  1793. RemoteEvent:FireServer("ResetAttributesPoint", PASSCODE)
  1794. end)
  1795. MAINGUI.BottomLeft.Stats.MouseButton1Click:connect(function()
  1796. SettingsGUIENABLE(MAINGUI.Settings.Stats)
  1797. end)
  1798. MAINGUI.BottomLeft.Tittle.MouseButton1Click:connect(function()
  1799. SettingsGUIENABLE(MAINGUI.Settings.Tittle)
  1800. end)
  1801. MAINGUI.BottomLeft.Save.MouseButton1Click:connect(function()
  1802. SettingsGUIENABLE(MAINGUI.Settings.Save)
  1803. end)
  1804. MAINGUI.BottomLeft.Help.MouseButton1Click:connect(function()
  1805. SettingsGUIENABLE(MAINGUI.Settings.Help)
  1806. end)
  1807. MAINGUI.BottomLeft.Settings.MouseButton1Click:connect(function()
  1808. SettingsGUIENABLE(MAINGUI.Settings.Settings)
  1809. end)
  1810. MAINGUI.Party.ImageButton.MouseEnter:connect(function()
  1811. MAINGUI.Party.ImageButton.ImageColor3 = Color3.new(0, 0, 0)
  1812. end)
  1813. MAINGUI.Party.ImageButton.MouseLeave:connect(function()
  1814. MAINGUI.Party.ImageButton.ImageColor3 = Color3.new(1, 1, 1)
  1815. end)
  1816. MAINGUI.Party.ImageButton.MouseButton1Click:connect(function()
  1817. if player.Character:FindFirstChild("OwnerTag") == nil then
  1818. MAINGUI.Settings.Party["Create/Join"].Visible = true
  1819. MAINGUI.Settings.Party.Invite.Visible = false
  1820. MAINGUI.Settings.Party.Leave.Visible = false
  1821. elseif player.Character:FindFirstChild("OwnerTag").Value[player.Name]:FindFirstChild("OWNER") then
  1822. MAINGUI.Settings.Party.Invite.TextLabel.Text = "Passcode: " .. player.Character:FindFirstChild("OwnerTag").Value.Value
  1823. MAINGUI.Settings.Party.Invite.Visible = true
  1824. MAINGUI.Settings.Party["Create/Join"].Visible = false
  1825. MAINGUI.Settings.Party.Leave.Visible = false
  1826. else
  1827. MAINGUI.Settings.Party.Leave.Visible = true
  1828. MAINGUI.Settings.Party.Invite.Visible = false
  1829. MAINGUI.Settings.Party["Create/Join"].Visible = false
  1830. end
  1831. SettingsGUIENABLE(MAINGUI.Settings.Party)
  1832. end)
  1833. MAINGUI.Settings.Party["Create/Join"].PartyName.FocusLost:connect(function()
  1834. if MAINGUI.Settings.Party["Create/Join"].PartyName.Text == "" then
  1835. MAINGUI.Settings.Party["Create/Join"].PartyName.Text = "Party Name"
  1836. end
  1837. end)
  1838. MAINGUI.Settings.Party["Create/Join"].Passcode.FocusLost:connect(function()
  1839. if MAINGUI.Settings.Party["Create/Join"].Passcode.Text == "" then
  1840. MAINGUI.Settings.Party["Create/Join"].Passcode.Text = "Passcode"
  1841. end
  1842. end)
  1843. MAINGUI.Settings.Party.Leave.Leave.TextButton.MouseButton1Click:connect(function()
  1844. if player.Character:FindFirstChild("OwnerTag") then
  1845. local TAG = player.Character:FindFirstChild("OwnerTag").Value[player.Name]
  1846. RemoteEvent:FireServer("RemovePartyMember", TAG, PASSCODE)
  1847. SettingsGUIENABLE(MAINGUI.Settings.Party)
  1848. end
  1849. end)
  1850. MAINGUI.Settings.Party["Create/Join"].Join.TextButton.MouseButton1Click:connect(function()
  1851. if game.ReplicatedStorage.PartySystem:FindFirstChild(MAINGUI.Settings.Party["Create/Join"].PartyName.Text) and game.ReplicatedStorage.PartySystem:FindFirstChild(MAINGUI.Settings.Party["Create/Join"].PartyName.Text).Value == MAINGUI.Settings.Party["Create/Join"].Passcode.Text then
  1852. RemoteEvent:FireServer("PartyAddMember2", game.ReplicatedStorage.PartySystem:FindFirstChild(MAINGUI.Settings.Party["Create/Join"].PartyName.Text), player.Character, nil, PASSCODE)
  1853. SettingsGUIENABLE(MAINGUI.Settings.Party)
  1854. else
  1855. script.Error:Play()
  1856. MAINGUI.Error.Text = "Party Name/Passcode is wrong"
  1857. MAINGUI.Error.Visible = true
  1858. wait(0.5)
  1859. MAINGUI.Error.Visible = false
  1860. end
  1861. end)
  1862. MAINGUI.Settings.Party.Invite.PlayerName.FocusLost:connect(function()
  1863. if MAINGUI.Settings.Party.Invite.PlayerName.Text == "" then
  1864. MAINGUI.Settings.Party.Invite.PlayerName.Text = "Player Name"
  1865. end
  1866. end)
  1867. MAINGUI.Settings.Party["Create/Join"].Create.TextButton.Text = "Create ($" .. tostring(game.ReplicatedStorage.PartyAmountRequire.Value) .. ")"
  1868. MAINGUI.Settings.Party["Create/Join"].Create.TextButton.MouseButton1Click:connect(function()
  1869. if DATAFOLDER.Currency.Value >= game.ReplicatedStorage.PartyAmountRequire.Value and game.ReplicatedStorage.PartySystem:FindFirstChild(MAINGUI.Settings.Party["Create/Join"].PartyName.Text) == nil then
  1870. RemoteEvent:FireServer("CreateParty", {
  1871. Name = MAINGUI.Settings.Party["Create/Join"].PartyName.Text,
  1872. Passcode = MAINGUI.Settings.Party["Create/Join"].Passcode.Text
  1873. }, PASSCODE)
  1874. SettingsGUIENABLE(nil)
  1875. script.Buy:Play()
  1876. else
  1877. script.Error:Play()
  1878. MAINGUI.Error.Text = "Not enough currency or Party Name already existed"
  1879. MAINGUI.Error.Visible = true
  1880. wait(0.5)
  1881. MAINGUI.Error.Visible = false
  1882. end
  1883. end)
  1884. MAINGUI.Settings.Party.Invite.Disband.TextButton.MouseButton1Click:connect(function()
  1885. if player.Character:FindFirstChild("OwnerTag").Value[player.Name]:FindFirstChild("OWNER") then
  1886. SettingsGUIENABLE(nil)
  1887. RemoteEvent:FireServer("DisbandParty", player.Character:FindFirstChild("OwnerTag").Value, PASSCODE)
  1888. end
  1889. end)
  1890. MAINGUI.Settings.Party.Invite.Invite.TextButton.MouseButton1Click:connect(function()
  1891. local TEXTPLAYER = game.Players:FindFirstChild(MAINGUI.Settings.Party.Invite.PlayerName.Text)
  1892. if TEXTPLAYER and TEXTPLAYER.Character:FindFirstChild("OwnerTag") == nil then
  1893. RemoteEvent:FireServer("PartyInvite", TEXTPLAYER, PASSCODE)
  1894. else
  1895. script.Error:Play()
  1896. MAINGUI.Error.Text = "Player does not exist or already in a party"
  1897. MAINGUI.Error.Visible = true
  1898. wait(0.5)
  1899. MAINGUI.Error.Visible = false
  1900. end
  1901. end)
  1902. local function CreatePartyFrame(user, TAG)
  1903. if user and MAINGUI.Party.Frame:FindFirstChild(user.Name) == nil then
  1904. do
  1905. local p_frame = game.ReplicatedStorage.PartyFrame:Clone()
  1906. p_frame.Name = user.Name
  1907. p_frame.Kick.Visible = false
  1908. p_frame.PlayerName.Text = user.Name
  1909. p_frame.Parent = MAINGUI.Party.Frame
  1910. local connect1
  1911. local function DELETETHISFRAME()
  1912. if connect1 then
  1913. connect1:disconnect()
  1914. end
  1915. RemoteEvent:FireServer("RemovePartyMember", TAG, PASSCODE)
  1916. p_frame:Destroy()
  1917. end
  1918. p_frame.Kick.MouseButton1Click:connect(function()
  1919. DELETETHISFRAME()
  1920. end)
  1921. local function changeHealth(health)
  1922. if connect1 and p_frame == nil and p_frame:FindFirstChild("HP") == nil then
  1923. connect1:disconnect()
  1924. return
  1925. end
  1926. p_frame.HP.Frame.Size = UDim2.new(math.max(0, health / user.Humanoid.MaxHealth), 0, 1, 0)
  1927. p_frame.HP.Frame.BackgroundColor3 = Color3.fromRGB(75, 234, 50):lerp(Color3.fromRGB(234, 29, 29), 1 - health / user.Humanoid.MaxHealth)
  1928. if TAG and health == 0 and not game.Players:GetPlayerFromCharacter(user) then
  1929. wait(1)
  1930. DELETETHISFRAME()
  1931. end
  1932. end
  1933. if TAG and game.Players:GetPlayerFromCharacter(user) then
  1934. game.Players:GetPlayerFromCharacter(user).CharacterAdded:connect(function(otherChar)
  1935. user = otherChar
  1936. if connect1 then
  1937. connect1:disconnect()
  1938. end
  1939. otherChar:WaitForChild("OwnerTag")
  1940. changeHealth(user.Humanoid.Health)
  1941. connect1 = user.Humanoid.HealthChanged:connect(changeHealth)
  1942. end)
  1943. end
  1944. changeHealth(user.Humanoid.Health)
  1945. connect1 = user.Humanoid.HealthChanged:connect(changeHealth)
  1946. end
  1947. end
  1948. end
  1949. local function RemovePartySystem()
  1950. if #MAINGUI.Party.Frame:GetChildren() > 2 then
  1951. for i, v in pairs(MAINGUI.Party.Frame:GetChildren()) do
  1952. if v:IsA("ImageLabel") and v.Name ~= player.Name then
  1953. v:Destroy()
  1954. end
  1955. end
  1956. end
  1957. end
  1958. spawn(function()
  1959. while game:GetService("RunService").Heartbeat:wait() do
  1960. if MAINGUI.Party.Frame:FindFirstChild(player.Name) == nil then
  1961. CreatePartyFrame(player.Character)
  1962. end
  1963. if MAINGUI.Settings.Visible then
  1964. if MAINGUI.Settings.Settings.Visible then
  1965. MAINGUI.BottomLeft.Settings.ImageColor3 = Color3.fromRGB(6, 147, 255)
  1966. elseif MAINGUI.Settings.Tittle.Visible then
  1967. MAINGUI.BottomLeft.Tittle.ImageColor3 = Color3.fromRGB(6, 147, 255)
  1968. elseif MAINGUI.Settings.Save.Visible then
  1969. MAINGUI.BottomLeft.Save.ImageColor3 = Color3.fromRGB(6, 147, 255)
  1970. elseif MAINGUI.Settings.Help.Visible then
  1971. MAINGUI.BottomLeft.Help.ImageColor3 = Color3.fromRGB(6, 147, 255)
  1972. elseif MAINGUI.BottomLeft.Stats.Visible then
  1973. MAINGUI.BottomLeft.Stats.ImageColor3 = Color3.fromRGB(6, 147, 255)
  1974. end
  1975. else
  1976. MAINGUI.BottomLeft.Settings.ImageColor3 = Color3.new(1, 1, 1)
  1977. MAINGUI.BottomLeft.Tittle.ImageColor3 = Color3.new(1, 1, 1)
  1978. MAINGUI.BottomLeft.Save.ImageColor3 = Color3.new(1, 1, 1)
  1979. MAINGUI.BottomLeft.Help.ImageColor3 = Color3.new(1, 1, 1)
  1980. MAINGUI.BottomLeft.Stats.ImageColor3 = Color3.new(1, 1, 1)
  1981. end
  1982. if player.Character:FindFirstChild("OwnerTag") == nil then
  1983. if MAINGUI.Party.ImageButton.ImageColor3 == Color3.new(0, 0, 0) then
  1984. MAINGUI.Party.TextLabel.Text = "Create/Join Party"
  1985. else
  1986. MAINGUI.Party.TextLabel.Text = ""
  1987. end
  1988. RemovePartySystem()
  1989. elseif player.Character.OwnerTag.Value:isDescendantOf(game.ReplicatedStorage.PartySystem) then
  1990. local PARTY = player.Character.OwnerTag.Value
  1991. local TOTALMEMBERS = #PARTY:GetChildren()
  1992. MAINGUI.Party.TextLabel.Text = PARTY.Name .. " (" .. tostring(TOTALMEMBERS) .. ")"
  1993. for _, v in pairs(MAINGUI.Party.Frame:GetChildren()) do
  1994. if v:IsA("ImageLabel") and PARTY:FindFirstChild(v.Name) == nil then
  1995. v:Destroy()
  1996. end
  1997. end
  1998. for _, v in pairs(PARTY:GetChildren()) do
  1999. if MAINGUI.Party.Frame:FindFirstChild(v.Name) == nil then
  2000. CreatePartyFrame(v.Value, v)
  2001. else
  2002. if v:FindFirstChild("OWNER") then
  2003. MAINGUI.Party.Frame[v.Name].Leader.Visible = true
  2004. else
  2005. MAINGUI.Party.Frame[v.Name].Leader.Visible = false
  2006. end
  2007. if v:FindFirstChild("OWNER") then
  2008. local activate = false
  2009. if v.Name == player.Name then
  2010. activate = true
  2011. end
  2012. for _, CHILDREN in pairs(MAINGUI.Party.Frame:GetChildren()) do
  2013. if CHILDREN:IsA("ImageLabel") then
  2014. if activate then
  2015. if CHILDREN.Name ~= player.Name then
  2016. CHILDREN.Kick.Visible = true
  2017. end
  2018. else
  2019. CHILDREN.Kick.Visible = false
  2020. end
  2021. end
  2022. end
  2023. end
  2024. end
  2025. end
  2026. end
  2027. end
  2028. end)
  2029. end
  2030. function render_MagicInventory()
  2031. local myClover = DATAFOLDER.Clover.Value + DATAFOLDER.ExtraSlot.Value
  2032. for i, v in pairs(SKILLTREE.MagicInventory:GetChildren()) do
  2033. if tonumber(v.Name) then
  2034. if myClover >= tonumber(v.Name) or DATAFOLDER["Slot" .. v.Name].Value ~= "" then
  2035. if DATAFOLDER["Slot" .. v.Name].Value ~= "" then
  2036. v.ImageLabel.Image = game.ReplicatedStorage.MagicImg:FindFirstChild(DATAFOLDER["Slot" .. v.Name].Value).Value
  2037. else
  2038. v.ImageLabel.Image = ""
  2039. end
  2040. else
  2041. v.ImageLabel.Image = "rbxassetid://9571720"
  2042. end
  2043. end
  2044. end
  2045. local SAFEZONEHIT = KeyModule.SafeZones(character.HumanoidRootPart.Position)
  2046. if SAFEZONEHIT and SAFEZONEHIT:FindFirstChild("SafeZone") then
  2047. if not character.Effects:FindFirstChild("Safe Zone") then
  2048. local SECONDS = LevelSystem.DOUBLEXPSECONDS()
  2049. local stringvalue = Instance.new("StringValue")
  2050. stringvalue.Name = "Safe Zone"
  2051. stringvalue.Value = "http://www.roblox.com/asset/?id=580388963"
  2052. local cooldowntag = Instance.new("NumberValue")
  2053. cooldowntag.Name = "Cooldown"
  2054. cooldowntag.Value = 999999
  2055. cooldowntag.Parent = stringvalue
  2056. local timeUsed = Instance.new("NumberValue")
  2057. timeUsed.Name = "Time"
  2058. timeUsed.Value = os.time()
  2059. timeUsed.Parent = stringvalue
  2060. stringvalue.Parent = character.Effects
  2061. end
  2062. elseif character.Effects:FindFirstChild("Safe Zone") then
  2063. character.Effects["Safe Zone"]:Destroy()
  2064. end
  2065. if SAFEZONEHIT and SAFEZONEHIT:FindFirstChild("HealZone") then
  2066. if not character.Effects:FindFirstChild("Healing Zone") then
  2067. local SECONDS = LevelSystem.DOUBLEXPSECONDS()
  2068. local stringvalue = Instance.new("StringValue")
  2069. stringvalue.Name = "Healing Zone"
  2070. stringvalue.Value = "http://www.roblox.com/asset/?id=1032918680"
  2071. local cooldowntag = Instance.new("NumberValue")
  2072. cooldowntag.Name = "Cooldown"
  2073. cooldowntag.Value = 999999
  2074. cooldowntag.Parent = stringvalue
  2075. local timeUsed = Instance.new("NumberValue")
  2076. timeUsed.Name = "Time"
  2077. timeUsed.Value = os.time()
  2078. timeUsed.Parent = stringvalue
  2079. stringvalue.Parent = character.Effects
  2080. end
  2081. elseif character.Effects:FindFirstChild("Healing Zone") then
  2082. character.Effects["Healing Zone"]:Destroy()
  2083. end
  2084. if character:FindFirstChild("Effects") and LevelSystem.CalculateXPTIME(DATAFOLDER.DOUBLEXPBOOST.Value) and not character.Effects:FindFirstChild("Double EXP") then
  2085. do
  2086. local SECONDS = LevelSystem.DOUBLEXPSECONDS()
  2087. local stringvalue = Instance.new("StringValue")
  2088. stringvalue.Name = "Double EXP"
  2089. stringvalue.Value = "http://www.roblox.com/asset/?id=384520176"
  2090. local cooldowntag = Instance.new("NumberValue")
  2091. cooldowntag.Name = "Cooldown"
  2092. cooldowntag.Value = 999999
  2093. cooldowntag.Parent = stringvalue
  2094. local timeUsed = Instance.new("NumberValue")
  2095. timeUsed.Name = "Time"
  2096. timeUsed.Value = DATAFOLDER.DOUBLEXPBOOST.Value
  2097. timeUsed.Parent = stringvalue
  2098. stringvalue.Parent = character.Effects
  2099. delay(math.abs(SECONDS - (os.time() - DATAFOLDER.DOUBLEXPBOOST.Value)), function()
  2100. stringvalue:Destroy()
  2101. end)
  2102. end
  2103. end
  2104. end
  2105. for i, v in pairs(getfenv()) do
  2106. if type(v) == "function" and string.match(i, "render_") then
  2107. game:GetService("RunService"):BindToRenderStep(i, Enum.RenderPriority.Last.Value - 1, v)
  2108. end
  2109. end
  2110. function RUNFUNC(func_name, ...)
  2111. if getfenv()[func_name] then
  2112. getfenv()[func_name](...)
  2113. end
  2114. end
  2115. _G.FrostyDomainSpeed = false
  2116. function FrostyDomain(OTHERPLAYA, obj)
  2117. if OTHERPLAYA or OTHERPLAYA == character then
  2118. if OTHERPLAYA ~= character then
  2119. if OTHERPLAYA:FindFirstChild("OwnerTag") == nil then
  2120. return
  2121. end
  2122. if not OTHERPLAYA.OwnerTag or not character:FindFirstChild("OwnerTag") or OTHERPLAYA.OwnerTag.Value ~= character.OwnerTag.Value then
  2123. return
  2124. end
  2125. end
  2126. do
  2127. local DEBUG_TOUCH = false
  2128. obj.Touched:connect(function(hit)
  2129. if not DEBUG_TOUCH and hit:isDescendantOf(character) then
  2130. DEBUG_TOUCH = true
  2131. _G.FrostyDomainSpeed = true
  2132. wait(0.1)
  2133. _G.FrostyDomainSpeed = false
  2134. DEBUG_TOUCH = false
  2135. end
  2136. end)
  2137. end
  2138. end
  2139. end
  2140. function GetMouseClick(array)
  2141. repeat
  2142. wait()
  2143. if array then
  2144. if array.MinRange and array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude < array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude > array.MinRange then
  2145. mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
  2146. else
  2147. mouse.Icon = "http://www.roblox.com/asset/?id=158691754"
  2148. end
  2149. else
  2150. mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
  2151. end
  2152. until character.Effects:FindFirstChild("Hit Stun") == nil
  2153. repeat
  2154. wait()
  2155. if array then
  2156. if array.MinRange and array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude < array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude > array.MinRange then
  2157. mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
  2158. else
  2159. mouse.Icon = "http://www.roblox.com/asset/?id=158691754"
  2160. end
  2161. else
  2162. mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
  2163. end
  2164. until KeyPressed[Enum.UserInputType.MouseButton1.Name] and KeyPressed[Enum.UserInputType.MouseButton1.Name][1] == true or Grimoire_Tool.Parent ~= character
  2165. repeat
  2166. wait()
  2167. if array then
  2168. if array.MinRange and array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude < array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude > array.MinRange then
  2169. mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
  2170. else
  2171. mouse.Icon = "http://www.roblox.com/asset/?id=158691754"
  2172. end
  2173. else
  2174. mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
  2175. end
  2176. until character.Effects:FindFirstChild("Hit Stun") == nil and character.Humanoid.Health > 0
  2177. mouse.Icon = ""
  2178. local HITPOPP = mouse.Hit
  2179. return HITPOPP.p, mouse.Target, HITPOPP
  2180. end
  2181. function FinishMagicMove()
  2182. FINISH_MAGIC_MOVE = true
  2183. end
  2184. function Sensory(TRUECHAR)
  2185. if TRUECHAR then
  2186. do
  2187. local RANDOM_OS = tostring(tick())
  2188. local MAP_RADAR = Instance.new("Part")
  2189. MAP_RADAR.Size = Vector3.new(7, 0, 7)
  2190. MAP_RADAR.Material = Enum.Material.SmoothPlastic
  2191. MAP_RADAR.Transparency = 0.9
  2192. MAP_RADAR.BrickColor = BrickColor.new("Light blue")
  2193. MAP_RADAR.Anchored = true
  2194. MAP_RADAR.CanCollide = false
  2195. local meshBlock = Instance.new("BlockMesh")
  2196. meshBlock.Scale = Vector3.new(1, 0, 1)
  2197. meshBlock.Parent = MAP_RADAR
  2198. local mySpherecone = Instance.new("Part")
  2199. mySpherecone.Shape = Enum.PartType.Ball
  2200. mySpherecone.Material = Enum.Material.SmoothPlastic
  2201. mySpherecone.BrickColor = BrickColor.new("Gold")
  2202. mySpherecone.Anchored = true
  2203. mySpherecone.CanCollide = false
  2204. mySpherecone.Size = Vector3.new(0.4, 0.4, 0.4)
  2205. mySpherecone.Parent = MAP_RADAR
  2206. MAP_RADAR.Parent = workspace.IgnoreFolder.LocalItems
  2207. local GRAB_RANGE = 500
  2208. local Y_DIFF_MAX = 30
  2209. local TAGs = {}
  2210. local HEIGHTS = 3
  2211. local DISABLEEFFECTS_NOW = false
  2212. delay(30, function()
  2213. DISABLEEFFECTS_NOW = true
  2214. end)
  2215. while TRUECHAR and not DISABLEEFFECTS_NOW do
  2216. local POS = TRUECHAR.HumanoidRootPart.CFrame
  2217. for i, v in pairs(workspace.NPCs:GetChildren()) do
  2218. if v ~= TRUECHAR and v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Humanoid") and 0 < v.Humanoid.Health then
  2219. local otherPOS = v.HumanoidRootPart.CFrame
  2220. if v:FindFirstChild(RANDOM_OS) == nil and Y_DIFF_MAX >= math.abs(otherPOS.y - POS.y) and GRAB_RANGE >= math.abs(otherPOS.x - POS.x) and GRAB_RANGE >= math.abs(otherPOS.z - POS.z) then
  2221. local TAGCreate = Instance.new("Part")
  2222. TAGCreate.Name = RANDOM_OS
  2223. TAGCreate.Shape = Enum.PartType.Ball
  2224. TAGCreate.Material = Enum.Material.SmoothPlastic
  2225. TAGCreate.BrickColor = BrickColor.Red()
  2226. TAGCreate.Anchored = true
  2227. TAGCreate.CanCollide = false
  2228. TAGCreate.Size = Vector3.new(0.3, 0.3, 0.3)
  2229. TAGCreate.Parent = v
  2230. table.insert(TAGs, TAGCreate)
  2231. elseif v:FindFirstChild(RANDOM_OS) and Y_DIFF_MAX >= math.abs(otherPOS.y - POS.y) and GRAB_RANGE >= math.abs(otherPOS.x - POS.x) and GRAB_RANGE >= math.abs(otherPOS.z - POS.z) then
  2232. local TAGCreate = v:FindFirstChild(RANDOM_OS)
  2233. TAGCreate.Transparency = 0
  2234. if TRUECHAR:FindFirstChild("OwnerTag") and v:FindFirstChild("OwnerTag") then
  2235. if TRUECHAR.OwnerTag.Value == v.OwnerTag.Value or v.OwnerTag.Value == TRUECHAR then
  2236. TAGCreate.BrickColor = BrickColor.Green()
  2237. else
  2238. TAGCreate.BrickColor = BrickColor.Red()
  2239. end
  2240. else
  2241. TAGCreate.BrickColor = BrickColor.Red()
  2242. end
  2243. local newPOS = POS.p + Vector3.new((otherPOS.x - POS.x) / GRAB_RANGE * (MAP_RADAR.Size.X * 0.5), math.floor((otherPOS.y - POS.y) / (Y_DIFF_MAX / 2) * 1 + 0.5) / 2, (otherPOS.z - POS.z) / GRAB_RANGE * (MAP_RADAR.Size.Z * 0.5))
  2244. TAGCreate.CFrame = CFrame.new(newPOS) + Vector3.new(0, HEIGHTS, 0)
  2245. elseif v:FindFirstChild(RANDOM_OS) then
  2246. local TAGCreate = v:FindFirstChild(RANDOM_OS)
  2247. TAGCreate.Transparency = 1
  2248. end
  2249. end
  2250. end
  2251. MAP_RADAR.CFrame = CFrame.new(POS.p) + Vector3.new(0, HEIGHTS, 0)
  2252. mySpherecone.CFrame = CFrame.new(POS.p) + Vector3.new(0, HEIGHTS, 0)
  2253. game:GetService("RunService").Heartbeat:wait()
  2254. end
  2255. for i, v in pairs(TAGs) do
  2256. if v then
  2257. v:Destroy()
  2258. end
  2259. end
  2260. MAP_RADAR:Destroy()
  2261. end
  2262. end
  2263. end
  2264. local GETCONFIRMDEBUG = false
  2265. function GetConfirm(text)
  2266. if not GETCONFIRMDEBUG and character:FindFirstChild("DEBUGGER") == nil then
  2267. GETCONFIRMDEBUG = true
  2268. do
  2269. local textbox = Instance.new("TextLabel")
  2270. textbox.Size = UDim2.new(0, 200, 0, 100)
  2271. textbox.Position = UDim2.new(0.5, -100, 0.5, -100)
  2272. textbox.Text = text
  2273. textbox.BackgroundColor3 = Color3.new(0, 0, 0)
  2274. textbox.FontSize = 12
  2275. textbox.Font = Enum.Font.Highway
  2276. textbox.BackgroundTransparency = 0.5
  2277. textbox.TextColor3 = Color3.new(1, 1, 1)
  2278. textbox.ZIndex = 1000
  2279. textbox.Name = "GetConfirm"
  2280. textbox.Parent = MAINGUI
  2281. local accept = Instance.new("TextButton")
  2282. accept.Position = UDim2.new(0, 0, 1, 0)
  2283. accept.Text = "YES"
  2284. accept.ZIndex = 1000
  2285. accept.TextSize = 10
  2286. accept.TextColor3 = Color3.new(1, 1, 1)
  2287. accept.Size = UDim2.new(0.5, 0, 0.5, 0)
  2288. accept.BackgroundColor3 = Color3.new(0, 1, 0)
  2289. game.ReplicatedStorage.PartyFrame.Kick.Gradient:Clone().Parent = accept
  2290. accept.Gradient.ZIndex = 1001
  2291. accept.Parent = textbox
  2292. local decline = accept:Clone()
  2293. decline.Position = UDim2.new(0.5, 0, 1, 0)
  2294. decline.BackgroundColor3 = Color3.new(1, 0, 0)
  2295. decline.Text = "NO"
  2296. decline.Parent = textbox
  2297. local optional
  2298. accept.MouseButton1Click:connect(function()
  2299. if optional == nil then
  2300. optional = true
  2301. end
  2302. end)
  2303. decline.MouseButton1Click:connect(function()
  2304. if optional == nil then
  2305. optional = false
  2306. end
  2307. end)
  2308. repeat
  2309. wait()
  2310. until optional ~= nil
  2311. GETCONFIRMDEBUG = false
  2312. textbox:Destroy()
  2313. return optional
  2314. end
  2315. end
  2316. end
  2317. function PartyInvite(tag)
  2318. if DATAFOLDER.PartyInvite.Value == "Active" and character:FindFirstChild("OwnerTag") == nil and MAINGUI:FindFirstChild("PartyInvite") == nil then
  2319. do
  2320. local ui = game.ReplicatedStorage.PartyInvite:Clone()
  2321. ui.TextLabel.Text = "You have been invited to join " .. tag.Name
  2322. ui.Parent = MAINGUI
  2323. ui.Decline.TextButton.MouseButton1Click:connect(function()
  2324. ui:Destroy()
  2325. end)
  2326. ui.Accept.TextButton.MouseButton1Click:connect(function()
  2327. RemoteEvent:FireServer("PartyAddMember2", tag, character, nil, PASSCODE)
  2328. ui:Destroy()
  2329. end)
  2330. end
  2331. end
  2332. end
  2333. function RemoteFunction.OnClientInvoke(func_name, ...)
  2334. if getfenv()[func_name] then
  2335. return getfenv()[func_name](...)
  2336. end
  2337. end
  2338. RemoteEvent.OnClientEvent:connect(RUNFUNC)
  2339. do
  2340. local AREAs = workspace.IgnoreFolder["Area[Name/Music]"].Areas
  2341. local ExploreArea = workspace.IgnoreFolder["Area[Name/Music]"]["???"]
  2342. local selectedP
  2343. local MUSIC = script.Music
  2344. local LIGHTING_SECONDS_CHANGE = 0.5
  2345. for i, v in pairs(AREAs:GetChildren()) do
  2346. v.Transparency = 1
  2347. end
  2348. ExploreArea.Transparency = 1
  2349. function playMUSIC(hit)
  2350. if hit then
  2351. if hit:FindFirstChild("Bloom") then
  2352. game:GetService("TweenService"):Create(game.Lighting.Bloom, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  2353. Intensity = hit.Bloom.Intensity,
  2354. Size = hit.Bloom.Size,
  2355. Threshold = hit.Bloom.Threshold
  2356. }):Play()
  2357. else
  2358. game:GetService("TweenService"):Create(game.Lighting.Bloom, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  2359. Intensity = 0,
  2360. Size = 0,
  2361. Threshold = 0
  2362. }):Play()
  2363. end
  2364. if hit:FindFirstChild("ColorCorrection") then
  2365. game:GetService("TweenService"):Create(game.Lighting.ColorCorrection, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  2366. TintColor = hit.ColorCorrection.TintColor,
  2367. Saturation = hit.ColorCorrection.Saturation,
  2368. Contrast = hit.ColorCorrection.Contrast,
  2369. Brightness = hit.ColorCorrection.Brightness
  2370. }):Play()
  2371. else
  2372. game:GetService("TweenService"):Create(game.Lighting.ColorCorrection, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  2373. TintColor = Color3.new(1, 1, 1),
  2374. Saturation = 0,
  2375. Contrast = 0,
  2376. Brightness = 0
  2377. }):Play()
  2378. end
  2379. if hit:FindFirstChild("Fog") then
  2380. game:GetService("TweenService"):Create(game.Lighting, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  2381. FogColor = hit.Fog.FogColor.Value,
  2382. FogEnd = hit.Fog.FogEnd.Value,
  2383. FogStart = hit.Fog.FogStart.Value
  2384. }):Play()
  2385. else
  2386. game:GetService("TweenService"):Create(game.Lighting, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
  2387. FogColor = Color3.fromRGB(127, 127, 127),
  2388. FogEnd = 2000,
  2389. FogStart = 200
  2390. }):Play()
  2391. end
  2392. do
  2393. local MusicId = hit.MusicIds
  2394. local SOUND = MusicId:GetChildren()
  2395. local CURRENTSONG = math.random(#SOUND)
  2396. MUSIC:Stop()
  2397. MUSIC.SoundId = SOUND[CURRENTSONG].SoundId
  2398. MUSIC:Play()
  2399. local MUSICLOOP = MUSIC.DidLoop:connect(function()
  2400. MUSIC:Stop()
  2401. CURRENTSONG = (CURRENTSONG + 1) % #SOUND
  2402. MUSIC.SoundId = SOUND[CURRENTSONG + 1].SoundId
  2403. MUSIC:Play()
  2404. end)
  2405. spawn(function()
  2406. repeat
  2407. game:GetService("RunService").Heartbeat:wait()
  2408. until selectedP ~= hit
  2409. MUSICLOOP:disconnect()
  2410. end)
  2411. spawn(function()
  2412. MAINGUI.AreaTextLabel.Text = hit.Name
  2413. MAINGUI.AreaTextLabel.TextStrokeTransparency = 0
  2414. MAINGUI.AreaTextLabel.TextTransparency = 0
  2415. wait(2.2)
  2416. game:GetService("TweenService"):Create(MAINGUI.AreaTextLabel, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {TextStrokeTransparency = 1, TextTransparency = 1}):Play()
  2417. end)
  2418. end
  2419. end
  2420. end
  2421. spawn(function()
  2422. while wait(2.5) do
  2423. local ray = Ray.new(character.HumanoidRootPart.Position, Vector3.new(0, 9999, 0))
  2424. local hit = workspace:FindPartOnRayWithWhitelist(ray, {AREAs})
  2425. if hit then
  2426. if selectedP ~= hit then
  2427. selectedP = hit
  2428. playMUSIC(hit)
  2429. end
  2430. elseif selectedP ~= ExploreArea then
  2431. selectedP = ExploreArea
  2432. playMUSIC(ExploreArea)
  2433. end
  2434. end
  2435. end)
  2436. end
  2437. script.Archivable = false
Advertisement
Add Comment
Please, Sign In to add comment