Advertisement
Guest User

Untitled

a guest
Oct 17th, 2017
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 77.82 KB | None | 0 0
  1. Player = game.Players.LocalPlayer
  2. local ChatService = game:GetService("Chat")
  3. repeat
  4. wait()
  5. until _G["26"]
  6. GuiModules = require(game.ReplicatedStorage.GuiModules.GuiFunctions)
  7. Explosion = require(game.ReplicatedStorage.MiscModules.ExplosionsModule)
  8. Admin = require(game.ReplicatedStorage.MiscModules.Admin)
  9. MainGuiUpdate = require(game.ReplicatedStorage.GuiModules.MainGuiUpdate)
  10. local TableFunction = require(game.ReplicatedStorage.TableFunctions.TableFunctions)
  11. local Guild2 = TableFunction.GuildInfo(Player)
  12. local Level = game.Workspace.Main.CheckStat:InvokeServer("Level", Player.Name)
  13. local Stamina = game.Workspace.Main.CheckStat:InvokeServer("Stamina", Player.Name)
  14. Player.LocalData.MaxStamina.Value = 500 + Stamina * 50
  15. Player.LocalData.Stamina.Value = Player.LocalData.MaxStamina.Value
  16. local HasAgile = game.Workspace.ServerEvents.CheckGamepass:InvokeServer(464265442, Player.Name)
  17. local HasOrigin = game.Workspace.ServerEvents.CheckGamepass:InvokeServer(462751351, Player.Name)
  18. if HasOrigin == false then
  19. Player.LocalData.MaxMagicEnergy.Value = 100 + Level * 19
  20. else
  21. Player.LocalData.MaxMagicEnergy.Value = (100 + Level * 19) * 2
  22. end
  23. Player.LocalData.MagicEnergy.Value = Player.LocalData.MaxMagicEnergy.Value
  24. local Leader = game.Workspace.Main.CheckParty:InvokeServer("Leader", Player.Name)
  25. local Defense = game.Workspace.Main.CheckStat:InvokeServer("Defense", Player.Name)
  26. local Level = game.Workspace.Main.CheckStat:InvokeServer("Level", Player.Name)
  27. Player.Character.Humanoid.MaxHealth = 100 + Defense * 125 + Level * 50
  28. wait(0.25)
  29. Player.Character.Humanoid.Health = Player.Character.Humanoid.MaxHealth
  30. Player.LocalData.Charging.Value = true
  31. Player.LocalData.Charging2.Value = true
  32. Player.LocalData.DamageOutput.Value = 100
  33. Charging = false
  34. FeedbackD = false
  35. Charging2 = false
  36. MCharging = false
  37. MCharging2 = false
  38. Saved = false
  39. Saved2 = false
  40. local Load = false
  41. local Show = false
  42. local ButtonKey = false
  43. local Run = false
  44. local MusicPlaying = false
  45. local DamageOutputD = false
  46. local Jump = false
  47. local JumpCharge = false
  48. local MaxLevel = require(game.ReplicatedStorage.MiscModules.DataModule).MaxLevel()
  49. local ContextActionService = game:GetService("ContextActionService")
  50. script.Parent.NpcLocal.Disabled = false
  51. PlayMusic = coroutine.wrap(function()
  52. local Setting3 = game.Workspace.Main.CheckStat:InvokeServer("Setting3", Player.Name)
  53. if Setting3 == "Unmute" or Setting3 == "" then
  54. for i, v in pairs(Player.PlayerGui:GetChildren()) do
  55. if v.ClassName == "Sound" then
  56. v:Destroy()
  57. end
  58. end
  59. local Music = game.ReplicatedStorage.Sounds.FairyTail
  60. local RandomMusic = math.random(1, #Music:GetChildren())
  61. local Sound = Music:FindFirstChild(RandomMusic):Clone()
  62. Sound.Parent = Player.PlayerGui
  63. game.Debris:AddItem(Sound, 120)
  64. Sound:Play()
  65. else
  66. for i, v in pairs(Player.PlayerGui:GetChildren()) do
  67. if v.ClassName == "Sound" then
  68. v:Destroy()
  69. end
  70. end
  71. end
  72. while wait(120) do
  73. local Setting3 = game.Workspace.Main.CheckStat:InvokeServer("Setting3", Player.Name)
  74. if Setting3 == "Unmute" or Setting3 == "" then
  75. for i, v in pairs(Player.PlayerGui:GetChildren()) do
  76. if v.ClassName == "Sound" then
  77. v:Destroy()
  78. end
  79. end
  80. local Music = game.ReplicatedStorage.Sounds.FairyTail
  81. local RandomMusic = math.random(1, #Music:GetChildren())
  82. local Sound = Music:FindFirstChild(RandomMusic):Clone()
  83. Sound.Parent = Player.PlayerGui
  84. game.Debris:AddItem(Sound, 120)
  85. Sound:Play()
  86. else
  87. for i, v in pairs(Player.PlayerGui:GetChildren()) do
  88. if v.ClassName == "Sound" then
  89. v:Destroy()
  90. end
  91. end
  92. end
  93. end
  94. end)
  95. Swim = coroutine.wrap(function()
  96. while wait() do
  97. if Player.Character.Torso.Position.Y <= 68 then
  98. if Player.Character.Torso:findFirstChild("SwimPosition") then
  99. Player.Character.Torso:FindFirstChild("SwimPosition"):Destroy()
  100. end
  101. local bp = Instance.new("BodyPosition", Player.Character.Torso)
  102. bp.Name = "SwimPosition"
  103. bp.maxForce = Vector3.new(0, math.huge, 0)
  104. Player.Character.Torso.SwimPosition.position = Vector3.new(0, 68, 0)
  105. if Player.LocalData.Stamina.Value < 4 then
  106. Player.Character.Humanoid.Health = Player.Character.Humanoid.Health - 10
  107. else
  108. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 4
  109. end
  110. elseif Player.Character.Torso:findFirstChild("SwimPosition") then
  111. Player.Character.Torso:FindFirstChild("SwimPosition"):Destroy()
  112. end
  113. end
  114. end)
  115. function EnergyUpdate()
  116. local MaxEnergy = Player.LocalData.MaxMagicEnergy.Value
  117. local Energy = Player.LocalData.MagicEnergy.Value
  118. local Bar = Energy / MaxEnergy
  119. script.Parent.Energy.Bar:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  120. script.Parent.Energy.Bar2:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  121. local Increment = MaxEnergy - Energy
  122. local Scale = 255 / MaxEnergy
  123. script.Parent.Energy.Label.Text = "Energy: " .. Energy .. "/" .. MaxEnergy
  124. script.Parent.Energy.Bar.BackgroundColor3 = Color3.new(0, (Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255)
  125. script.Parent.Energy.Bar2.BackgroundColor3 = Color3.new(0, (Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255)
  126. end
  127. function EnergyUpdate2()
  128. if not script.Parent.Parent:FindFirstChild("PartyMember") then
  129. return
  130. end
  131. game.Workspace.ServerEvents.ChangePartyGui:FireServer(Player.Name, "Energy")
  132. local MaxEnergy = Player.LocalData.MaxMagicEnergy.Value
  133. local Energy = Player.LocalData.MagicEnergy.Value
  134. local Bar = Energy / MaxEnergy
  135. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Energy.Bar:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  136. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Energy.Bar2:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  137. local Increment = MaxEnergy - Energy
  138. local Scale = 255 / MaxEnergy
  139. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Energy.Label.Text = "Energy: " .. Energy .. "/" .. MaxEnergy
  140. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Energy.Bar.BackgroundColor3 = Color3.new(0, (Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255)
  141. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Energy.Bar2.BackgroundColor3 = Color3.new(0, (Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255)
  142. end
  143. function JewelsUpdate()
  144. local Jewels = game.Workspace.Main.CheckStat:InvokeServer("Jewels", Player.Name)
  145. script.Parent.Jewels.Label.Text = "Jewels: " .. Jewels
  146. end
  147. function StaminaUpdate()
  148. local MaxEnergy = Player.LocalData.MaxStamina.Value
  149. local Energy = Player.LocalData.Stamina.Value
  150. local Bar = Energy / MaxEnergy
  151. script.Parent.Stamina.Bar:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  152. script.Parent.Stamina.Bar2:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  153. local Increment = MaxEnergy - Energy
  154. local Scale = 255 / MaxEnergy
  155. script.Parent.Stamina.Label.Text = "Stamina: " .. Energy .. "/" .. MaxEnergy
  156. script.Parent.Stamina.Bar.BackgroundColor3 = Color3.new((Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255)
  157. script.Parent.Stamina.Bar2.BackgroundColor3 = Color3.new((Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255)
  158. end
  159. function HealthUpdate()
  160. local MaxHealth = Player.Character.Humanoid.MaxHealth
  161. local Health = math.ceil(Player.Character.Humanoid.Health)
  162. local Bar = Health / MaxHealth
  163. script.Parent.Health.Bar:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  164. script.Parent.Health.Bar2:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  165. script.Parent.Health.Label.Text = "Health: " .. Health .. "/" .. MaxHealth
  166. if Health >= MaxHealth * 0.5 then
  167. local Increment = MaxHealth - Health
  168. local Scale = 255 / MaxHealth * 2
  169. script.Parent.Health.Bar.BackgroundColor3 = Color3.new(Scale * Increment / 255, 1, 0)
  170. script.Parent.Health.Bar2.BackgroundColor3 = Color3.new(Scale * Increment / 255, 1, 0)
  171. elseif Health < MaxHealth * 0.5 then
  172. local Increment = MaxHealth * 0.5 - Health
  173. local Scale = 255 / (MaxHealth * 0.5)
  174. script.Parent.Health.Bar.BackgroundColor3 = Color3.new(1, (Scale * Increment - 255) * -1 / 255, 0)
  175. script.Parent.Health.Bar2.BackgroundColor3 = Color3.new(1, (Scale * Increment - 255) * -1 / 255, 0)
  176. end
  177. end
  178. function HealthUpdate2()
  179. if not script.Parent.Parent:FindFirstChild("PartyMember") then
  180. return
  181. end
  182. game.Workspace.ServerEvents.ChangePartyGui:FireServer(Player.Name, "Health")
  183. local MaxHealth = Player.Character.Humanoid.MaxHealth
  184. local Health = math.ceil(Player.Character.Humanoid.Health)
  185. local Bar = Health / MaxHealth
  186. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Health.Bar:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  187. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Health.Bar2:TweenSize(UDim2.new(Bar, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  188. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Health.Label.Text = "Health: " .. Health .. "/" .. MaxHealth
  189. if Health >= MaxHealth * 0.5 then
  190. local Increment = MaxHealth - Health
  191. local Scale = 255 / MaxHealth * 2
  192. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Health.Bar.BackgroundColor3 = Color3.new(Scale * Increment / 255, 1, 0)
  193. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Health.Bar2.BackgroundColor3 = Color3.new(Scale * Increment / 255, 1, 0)
  194. elseif Health < MaxHealth * 0.5 then
  195. local Increment = MaxHealth * 0.5 - Health
  196. local Scale = 255 / (MaxHealth * 0.5)
  197. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Health.Bar.BackgroundColor3 = Color3.new(1, (Scale * Increment - 255) * -1 / 255, 0)
  198. script.Parent.Parent:FindFirstChild("PartyMember")[Player.Name].Health.Bar2.BackgroundColor3 = Color3.new(1, (Scale * Increment - 255) * -1 / 255, 0)
  199. end
  200. end
  201. function LevelUpdate()
  202. local Level = game.Workspace.Main.CheckStat:InvokeServer("Level", Player.Name)
  203. script.Parent.Level.Label.Text = "Level: " .. Level
  204. end
  205. function ExperienceUpdate()
  206. local Level = game.Workspace.Main.CheckStat:InvokeServer("Level", Player.Name)
  207. local Experience = game.Workspace.Main.CheckStat:InvokeServer("Experience", Player.Name)
  208. local MaxExperience = 10 * (Level ^ 1.05 / 2)
  209. script.Parent.Experience.Bar:TweenSize(UDim2.new(Experience / MaxExperience, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  210. script.Parent.Experience.Bar2:TweenSize(UDim2.new(Experience / MaxExperience, 0, 0.5, 0), "Out", "Quad", 0.25, true)
  211. script.Parent.Experience.Label.Text = "[2x] Experience: " .. Experience .. "/" .. math.ceil(MaxExperience)
  212. local Increment = MaxExperience - Experience
  213. local Scale = 255 / MaxExperience
  214. script.Parent.Experience.Bar.BackgroundColor3 = Color3.new((Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255, 0)
  215. script.Parent.Experience.Bar2.BackgroundColor3 = Color3.new((Scale * Increment - 255) * -1 / 255, (Scale * Increment - 255) * -1 / 255, 0)
  216. end
  217. function AutoCharge()
  218. if Player.LocalData.Charging.Value ~= true then
  219. return
  220. end
  221. Charging = true
  222. while Player.LocalData.MagicEnergy.Value < Player.LocalData.MaxMagicEnergy.Value do
  223. if Player.LocalData.MagicEnergy.Value <= 0 then
  224. Player.LocalData.MagicEnergy.Value = 0
  225. end
  226. Player.LocalData.MagicEnergy.Value = Player.LocalData.MagicEnergy.Value + Player.LocalData.MaxMagicEnergy.Value * 0.012
  227. if Player.LocalData.MagicEnergy.Value >= Player.LocalData.MaxMagicEnergy.Value then
  228. Player.LocalData.MagicEnergy.Value = Player.LocalData.MaxMagicEnergy.Value
  229. break
  230. end
  231. wait(0.5)
  232. end
  233. Charging = false
  234. end
  235. function AutoChargeStamina()
  236. if Player.LocalData.Stamina.Value <= 0 and Player.LocalData.Charging2.Value == false then
  237. Run = false
  238. Player.Character.Humanoid.WalkSpeed = 16
  239. Player.LocalData.Charging2.Value = true
  240. Player.Character.Animate.Disabled = true
  241. Player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  242. Player.Character.Animate.Disabled = false
  243. end
  244. if Player.LocalData.Charging2.Value == false then
  245. return
  246. end
  247. Charging2 = true
  248. if Player.LocalData.Stamina.Value >= Player.LocalData.MaxStamina.Value then
  249. Player.LocalData.Stamina.Value = Player.LocalData.MaxStamina.Value
  250. end
  251. while Player.LocalData.Stamina.Value < Player.LocalData.MaxStamina.Value and Player.LocalData.Charging2.Value == true do
  252. if Player.LocalData.Stamina.Value <= 0 then
  253. Player.LocalData.Stamina.Value = 0
  254. end
  255. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value + Player.LocalData.MaxStamina.Value * 0.015
  256. if Player.LocalData.Stamina.Value >= Player.LocalData.MaxStamina.Value then
  257. Player.LocalData.Stamina.Value = Player.LocalData.MaxStamina.Value
  258. break
  259. end
  260. wait(0.5)
  261. end
  262. Charging2 = false
  263. end
  264. function ShowB()
  265. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.SaveMoves, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  266. script.Parent.ButtonFrame.Show.MouseButton1Click:connect(function()
  267. if Show == false then
  268. Show = true
  269. for i, v in next, script.Parent.ButtonFrame:GetChildren() do
  270. if v.Name ~= "PartyChat" and v.Name ~= "MainChat" and v.Name ~= "Show" then
  271. v.Visible = false
  272. end
  273. end
  274. script.Parent.ButtonFrame.Show.Text = "<"
  275. elseif Show == true then
  276. Show = false
  277. for i, v in next, script.Parent.ButtonFrame:GetChildren() do
  278. if v.Name ~= "PartyChat" and v.Name ~= "MainChat" and v.Name ~= "Show" then
  279. v.Visible = true
  280. end
  281. end
  282. script.Parent.ButtonFrame.Show.Text = ">"
  283. end
  284. end)
  285. end
  286. function SaveMoveSet()
  287. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Show, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  288. script.Parent.ButtonFrame.SaveMoves.MouseButton1Click:connect(function()
  289. if Saved2 == false then
  290. Saved2 = true
  291. game.Workspace.Main.Save:InvokeServer(true)
  292. for i = 30, 1, -1 do
  293. script.Parent.ButtonFrame.SaveMoves.Text = i
  294. wait(1)
  295. end
  296. script.Parent.ButtonFrame.SaveMoves.Text = "Save Spells"
  297. Saved2 = false
  298. end
  299. end)
  300. end
  301. function LoadMoveset()
  302. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.LoadMoves, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  303. script.Parent.ButtonFrame.LoadMoves.MouseButton1Click:connect(function()
  304. if Load == false then
  305. Load = true
  306. game.Workspace.Main.LoadSet:FireServer()
  307. for i = 30, 1, -1 do
  308. script.Parent.ButtonFrame.LoadMoves.Text = i
  309. wait(1)
  310. end
  311. script.Parent.ButtonFrame.LoadMoves.Text = "Load Spells"
  312. Load = false
  313. end
  314. end)
  315. end
  316. function Guild()
  317. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Guild, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  318. script.Parent.ButtonFrame.Guild.MouseButton1Click:connect(function()
  319. script.Parent.SettingsFrame.Visible = false
  320. script.Parent.FeedbackFrame.Visible = false
  321. script.Parent.PartyFrame.Visible = false
  322. script.Parent.SecondMagicFrame.Visible = false
  323. script.Parent.TwitterFrame.Visible = false
  324. script.Parent.InventoryFrame.Visible = false
  325. script.Parent.DamageFrame.Visible = false
  326. script.Parent.ThirdMagicFrame.Visible = false
  327. script.Parent.ShopFrame.Visible = false
  328. script.Parent.FirstMagicFrame.Visible = false
  329. if script.Parent.GuildFrame.Visible then
  330. script.Parent.GuildFrame.Visible = false
  331. script.Parent.GuildFrame.Main.Disabled = true
  332. else
  333. script.Parent.GuildFrame.Visible = true
  334. script.Parent.GuildFrame.Main.Disabled = false
  335. end
  336. end)
  337. end
  338. function Inventory()
  339. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Inventory, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  340. script.Parent.ButtonFrame.Inventory.MouseButton1Click:connect(function()
  341. script.Parent.SettingsFrame.Visible = false
  342. script.Parent.FeedbackFrame.Visible = false
  343. script.Parent.PartyFrame.Visible = false
  344. script.Parent.SecondMagicFrame.Visible = false
  345. script.Parent.TwitterFrame.Visible = false
  346. script.Parent.DamageFrame.Visible = false
  347. script.Parent.ThirdMagicFrame.Visible = false
  348. script.Parent.ShopFrame.Visible = false
  349. script.Parent.GuildFrame.Visible = false
  350. script.Parent.FirstMagicFrame.Visible = false
  351. if script.Parent.InventoryFrame.Visible then
  352. script.Parent.InventoryFrame.Visible = false
  353. script.Parent.InventoryFrame.Main.Disabled = true
  354. else
  355. script.Parent.InventoryFrame.Visible = true
  356. script.Parent.InventoryFrame.Main.Disabled = false
  357. end
  358. end)
  359. end
  360. function Shop()
  361. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Shop, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  362. script.Parent.ButtonFrame.Shop.MouseButton1Click:connect(function()
  363. script.Parent.DamageFrame.Visible = false
  364. script.Parent.SettingsFrame.Visible = false
  365. script.Parent.FeedbackFrame.Visible = false
  366. script.Parent.InventoryFrame.Visible = false
  367. script.Parent.PartyFrame.Visible = false
  368. script.Parent.FirstMagicFrame.Visible = false
  369. script.Parent.TwitterFrame.Visible = false
  370. script.Parent.SkillPointsFrame.Visible = false
  371. script.Parent.GuildFrame.Visible = false
  372. script.Parent.ThirdMagicFrame.Visible = false
  373. script.Parent.SecondMagicFrame.Visible = false
  374. if script.Parent.ShopFrame.Visible then
  375. script.Parent.ShopFrame.Visible = false
  376. script.Parent.ShopFrame.Main.Disabled = true
  377. for i, v in pairs(script.Parent.ShopFrame.ScrollingFrame:GetChildren()) do
  378. if v.ClassName == "Frame" and v.Name ~= "Item" then
  379. v:Destroy()
  380. end
  381. end
  382. else
  383. script.Parent.ShopFrame.Visible = true
  384. script.Parent.ShopFrame.Main.Disabled = true
  385. for i, v in pairs(script.Parent.ShopFrame.ScrollingFrame:GetChildren()) do
  386. if v.ClassName == "Frame" and v.Name ~= "Item" then
  387. v:Destroy()
  388. end
  389. end
  390. script.Parent.ShopFrame.Main.Disabled = false
  391. end
  392. end)
  393. end
  394. function FirstMagic()
  395. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.FirstMagic, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  396. script.Parent.ButtonFrame.FirstMagic.MouseButton1Click:connect(function()
  397. script.Parent.SettingsFrame.Visible = false
  398. script.Parent.DamageFrame.Visible = false
  399. script.Parent.ShopFrame.Visible = false
  400. script.Parent.GuildFrame.Visible = false
  401. script.Parent.FeedbackFrame.Visible = false
  402. script.Parent.PartyFrame.Visible = false
  403. script.Parent.InventoryFrame.Visible = false
  404. script.Parent.TwitterFrame.Visible = false
  405. script.Parent.SkillPointsFrame.Visible = false
  406. script.Parent.ThirdMagicFrame.Visible = false
  407. script.Parent.SecondMagicFrame.Visible = false
  408. if script.Parent.FirstMagicFrame.Visible then
  409. script.Parent.FirstMagicFrame.Visible = false
  410. script.Parent.FirstMagicFrame.Main.Disabled = true
  411. for i, v in pairs(script.Parent.FirstMagicFrame.ScrollingFrame:GetChildren()) do
  412. if v.ClassName == "Frame" and v.Name ~= "Spell" then
  413. v:Destroy()
  414. end
  415. end
  416. else
  417. script.Parent.FirstMagicFrame.Visible = true
  418. script.Parent.FirstMagicFrame.Main.Disabled = true
  419. for i, v in pairs(script.Parent.FirstMagicFrame.ScrollingFrame:GetChildren()) do
  420. if v.ClassName == "Frame" and v.Name ~= "Spell" then
  421. v:Destroy()
  422. end
  423. end
  424. script.Parent.FirstMagicFrame.Main.Disabled = false
  425. end
  426. end)
  427. end
  428. function SecondMagic()
  429. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.SecondMagic, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  430. script.Parent.ButtonFrame.SecondMagic.MouseButton1Click:connect(function()
  431. script.Parent.SettingsFrame.Visible = false
  432. script.Parent.FeedbackFrame.Visible = false
  433. script.Parent.DamageFrame.Visible = false
  434. script.Parent.ShopFrame.Visible = false
  435. script.Parent.PartyFrame.Visible = false
  436. script.Parent.TwitterFrame.Visible = false
  437. script.Parent.GuildFrame.Visible = false
  438. script.Parent.SkillPointsFrame.Visible = false
  439. script.Parent.FirstMagicFrame.Visible = false
  440. script.Parent.InventoryFrame.Visible = false
  441. script.Parent.ThirdMagicFrame.Visible = false
  442. local Level = game.Workspace.Main.CheckStat:InvokeServer("Level", Player.Name)
  443. local Magic2 = game.Workspace.Main.CheckStat:InvokeServer("Magic2", Player.Name)
  444. if Magic2 ~= "" then
  445. if script.Parent.SecondMagicFrame.Visible then
  446. script.Parent.SecondMagicFrame.Visible = false
  447. script.Parent.SecondMagicFrame.Main.Disabled = true
  448. for i, v in pairs(script.Parent.SecondMagicFrame.ScrollingFrame:GetChildren()) do
  449. if v.ClassName == "Frame" and v.Name ~= "Spell" then
  450. v:Destroy()
  451. end
  452. end
  453. else
  454. script.Parent.SecondMagicFrame.Visible = true
  455. script.Parent.SecondMagicFrame.Main.Disabled = true
  456. for i, v in pairs(script.Parent.SecondMagicFrame.ScrollingFrame:GetChildren()) do
  457. if v.ClassName == "Frame" and v.Name ~= "Spell" then
  458. v:Destroy()
  459. end
  460. end
  461. script.Parent.SecondMagicFrame.Main.Disabled = false
  462. end
  463. else
  464. local Gamepass = game.Workspace.ServerEvents.CheckGamepass:InvokeServer(378084188, Player.Name)
  465. local Check2Chance = game.Workspace.Main.CheckStat:InvokeServer("Magic2Chance", Player.Name)
  466. if Level >= 50 and Gamepass == false and Magic2 == "" then
  467. if Check2Chance == 0 then
  468. game.Workspace.Main.SetStat:FireServer("Magic2Chance", Player.Name, 1, game:GetService("HttpService"):JSONEncode({
  469. _G["26"]
  470. }))
  471. game.Workspace.Main.AddStat:FireServer("Chances", Player.Name, 3, game:GetService("HttpService"):JSONEncode({
  472. _G["26"]
  473. }))
  474. end
  475. game.Workspace.Main.ParentGui:FireServer(Player.Name, "Magic2", "Main")
  476. elseif Level >= 20 and Gamepass == true and Magic2 == "" then
  477. if Check2Chance == 0 then
  478. game.Workspace.Main.SetStat:FireServer("Magic2Chance", Player.Name, 1, game:GetService("HttpService"):JSONEncode({
  479. _G["26"]
  480. }))
  481. game.Workspace.Main.AddStat:FireServer("Chances", Player.Name, 3, game:GetService("HttpService"):JSONEncode({
  482. _G["26"]
  483. }))
  484. end
  485. game.Workspace.Main.ParentGui:FireServer(Player.Name, "Magic2", "Main")
  486. elseif Level < 20 and Gamepass == true and Magic2 == "" then
  487. if Player.PlayerGui:FindFirstChild("TopbarNotification") == nil then
  488. local Notification = game.ReplicatedStorage.LocalGuis.TopbarNotification:Clone()
  489. Notification.Parent = Player.PlayerGui
  490. game.Debris:AddItem(Notification, 4)
  491. Notification.Notification.Text = "You have the gamepass but you need to be level 20!"
  492. for i = 1, 40 do
  493. Notification.Notification.TextTransparency = Notification.Notification.TextTransparency + 0.025
  494. wait(0.05)
  495. end
  496. end
  497. elseif Level < 50 and Gamepass == false and Magic2 == "" and Player.PlayerGui:FindFirstChild("TopbarNotification") == nil then
  498. local Notification = game.ReplicatedStorage.LocalGuis.TopbarNotification:Clone()
  499. Notification.Parent = Player.PlayerGui
  500. game.Debris:AddItem(Notification, 4)
  501. Notification.Notification.Text = "You have to be level 50 to unlock second magic!"
  502. for i = 1, 40 do
  503. Notification.Notification.TextTransparency = Notification.Notification.TextTransparency + 0.025
  504. wait(0.05)
  505. end
  506. end
  507. end
  508. end)
  509. end
  510. function ThirdMagic()
  511. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.ThirdMagic, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  512. script.Parent.ButtonFrame.ThirdMagic.MouseButton1Click:connect(function()
  513. script.Parent.SettingsFrame.Visible = false
  514. script.Parent.FeedbackFrame.Visible = false
  515. script.Parent.PartyFrame.Visible = false
  516. script.Parent.GuildFrame.Visible = false
  517. script.Parent.DamageFrame.Visible = false
  518. script.Parent.InventoryFrame.Visible = false
  519. script.Parent.TwitterFrame.Visible = false
  520. script.Parent.SkillPointsFrame.Visible = false
  521. script.Parent.FirstMagicFrame.Visible = false
  522. script.Parent.ShopFrame.Visible = false
  523. script.Parent.SecondMagicFrame.Visible = false
  524. local Level = game.Workspace.Main.CheckStat:InvokeServer("Level", Player.Name)
  525. local Gamepass = game.Workspace.ServerEvents.CheckGamepass:InvokeServer(378084358, Player.Name)
  526. local Magic3 = game.Workspace.Main.CheckStat:InvokeServer("Magic3", Player.Name)
  527. if Magic3 ~= "" then
  528. if script.Parent.ThirdMagicFrame.Visible then
  529. script.Parent.ThirdMagicFrame.Visible = false
  530. script.Parent.ThirdMagicFrame.Main.Disabled = true
  531. for i, v in pairs(script.Parent.ThirdMagicFrame.ScrollingFrame:GetChildren()) do
  532. if v.ClassName == "Frame" and v.Name ~= "Spell" then
  533. v:Destroy()
  534. end
  535. end
  536. else
  537. script.Parent.ThirdMagicFrame.Visible = true
  538. script.Parent.ThirdMagicFrame.Main.Disabled = true
  539. for i, v in pairs(script.Parent.ThirdMagicFrame.ScrollingFrame:GetChildren()) do
  540. if v.ClassName == "Frame" and v.Name ~= "Spell" then
  541. v:Destroy()
  542. end
  543. end
  544. script.Parent.ThirdMagicFrame.Main.Disabled = false
  545. end
  546. else
  547. local Check3Chance = game.Workspace.Main.CheckStat:InvokeServer("Magic3Chance", Player.Name)
  548. if Level >= 150 and Gamepass == false and Magic3 == "" then
  549. if Check3Chance == 0 then
  550. game.Workspace.Main.SetStat:FireServer("Magic3Chance", Player.Name, 1, game:GetService("HttpService"):JSONEncode({
  551. _G["26"]
  552. }))
  553. game.Workspace.Main.AddStat:FireServer("Chances", Player.Name, 3, game:GetService("HttpService"):JSONEncode({
  554. _G["26"]
  555. }))
  556. end
  557. game.Workspace.Main.ParentGui:FireServer(Player.Name, "Magic3", "Main")
  558. elseif Level >= 40 and Gamepass == true and Magic3 == "" then
  559. if Check3Chance == 0 then
  560. game.Workspace.Main.SetStat:FireServer("Magic3Chance", Player.Name, 1, game:GetService("HttpService"):JSONEncode({
  561. _G["26"]
  562. }))
  563. game.Workspace.Main.AddStat:FireServer("Chances", Player.Name, 3, game:GetService("HttpService"):JSONEncode({
  564. _G["26"]
  565. }))
  566. end
  567. game.Workspace.Main.ParentGui:FireServer(Player.Name, "Magic3", "Main")
  568. elseif Level < 40 and Gamepass == true and Magic3 == "" then
  569. if Player.PlayerGui:FindFirstChild("TopbarNotification") == nil then
  570. local Notification = game.ReplicatedStorage.LocalGuis.TopbarNotification:Clone()
  571. Notification.Parent = Player.PlayerGui
  572. game.Debris:AddItem(Notification, 4)
  573. Notification.Notification.Text = "You have the gamepass but you need to be level 40!"
  574. for i = 1, 40 do
  575. Notification.Notification.TextTransparency = Notification.Notification.TextTransparency + 0.025
  576. wait(0.05)
  577. end
  578. end
  579. elseif Level < 150 and Gamepass == false and Magic3 == "" and Player.PlayerGui:FindFirstChild("TopbarNotification") == nil then
  580. local Notification = game.ReplicatedStorage.LocalGuis.TopbarNotification:Clone()
  581. Notification.Parent = Player.PlayerGui
  582. game.Debris:AddItem(Notification, 4)
  583. Notification.Notification.Text = "You have to be level 150 to unlock third magic!"
  584. for i = 1, 40 do
  585. Notification.Notification.TextTransparency = Notification.Notification.TextTransparency + 0.025
  586. wait(0.05)
  587. end
  588. end
  589. end
  590. end)
  591. end
  592. function SkillPoints()
  593. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.SkillPoints, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  594. script.Parent.ButtonFrame.SkillPoints.MouseButton1Click:connect(function()
  595. script.Parent.SettingsFrame.Visible = false
  596. script.Parent.FeedbackFrame.Visible = false
  597. script.Parent.PartyFrame.Visible = false
  598. script.Parent.GuildFrame.Visible = false
  599. script.Parent.SecondMagicFrame.Visible = false
  600. script.Parent.GuildFrame.Visible = false
  601. script.Parent.TwitterFrame.Visible = false
  602. script.Parent.InventoryFrame.Visible = false
  603. script.Parent.DamageFrame.Visible = false
  604. script.Parent.ThirdMagicFrame.Visible = false
  605. script.Parent.ShopFrame.Visible = false
  606. script.Parent.FirstMagicFrame.Visible = false
  607. if script.Parent.SkillPointsFrame.Visible then
  608. script.Parent.SkillPointsFrame.Visible = false
  609. script.Parent.SkillPointsFrame.Main.Disabled = true
  610. else
  611. script.Parent.SkillPointsFrame.Visible = true
  612. script.Parent.SkillPointsFrame.Main.Disabled = false
  613. end
  614. end)
  615. end
  616. function ChatChange()
  617. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.MainChat, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  618. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.PartyChat, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  619. local CheckLeader = game.Workspace.Main.CheckParty:InvokeServer("Leader", Player.Name)
  620. if CheckLeader ~= "" then
  621. script.Parent.ButtonFrame.MainChat.Visible = true
  622. script.Parent.ButtonFrame.PartyChat.Visible = true
  623. elseif CheckLeader == "" and Player:FindFirstChild("Chat") then
  624. Player:FindFirstChild("Chat"):Destroy()
  625. end
  626. script.Parent.ButtonFrame.MainChat.MouseButton1Click:connect(function()
  627. if Player.PlayerGui:FindFirstChild("LocalChat") then
  628. Player.PlayerGui.LocalChat.Frame.Visible = true
  629. end
  630. if Player.PlayerGui:FindFirstChild("PartyChat") then
  631. Player.PlayerGui.PartyChat.Frame.Visible = false
  632. end
  633. if Player:FindFirstChild("Chat") then
  634. Player:FindFirstChild("Chat"):Destroy()
  635. end
  636. end)
  637. script.Parent.ButtonFrame.PartyChat.MouseButton1Click:connect(function()
  638. if Player.PlayerGui:FindFirstChild("LocalChat") then
  639. Player.PlayerGui.LocalChat.Frame.Visible = false
  640. end
  641. if Player.PlayerGui:FindFirstChild("PartyChat") then
  642. Player.PlayerGui.PartyChat.Frame.Visible = true
  643. end
  644. if Player:FindFirstChild("Chat") then
  645. Player:FindFirstChild("Chat"):Destroy()
  646. end
  647. local Chat = Instance.new("StringValue", Player)
  648. Chat.Name = "Chat"
  649. end)
  650. end
  651. function Twitter()
  652. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Twitter, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  653. script.Parent.ButtonFrame.Twitter.MouseButton1Click:connect(function()
  654. script.Parent.SettingsFrame.Visible = false
  655. script.Parent.FeedbackFrame.Visible = false
  656. script.Parent.PartyFrame.Visible = false
  657. script.Parent.SkillPointsFrame.Visible = false
  658. script.Parent.InventoryFrame.Visible = false
  659. script.Parent.GuildFrame.Visible = false
  660. script.Parent.DamageFrame.Visible = false
  661. script.Parent.SecondMagicFrame.Visible = false
  662. script.Parent.ThirdMagicFrame.Visible = false
  663. script.Parent.ShopFrame.Visible = false
  664. script.Parent.FirstMagicFrame.Visible = false
  665. if script.Parent.TwitterFrame.Visible then
  666. script.Parent.TwitterFrame.Visible = false
  667. script.Parent.TwitterFrame.Main.Disabled = true
  668. else
  669. script.Parent.TwitterFrame.Visible = true
  670. script.Parent.TwitterFrame.Main.Disabled = false
  671. end
  672. end)
  673. end
  674. function Party()
  675. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Party, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  676. script.Parent.ButtonFrame.Party.MouseButton1Click:connect(function()
  677. script.Parent.FirstMagicFrame.Visible = false
  678. script.Parent.FeedbackFrame.Visible = false
  679. script.Parent.TwitterFrame.Visible = false
  680. script.Parent.SkillPointsFrame.Visible = false
  681. script.Parent.InventoryFrame.Visible = false
  682. script.Parent.SettingsFrame.Visible = false
  683. script.Parent.GuildFrame.Visible = false
  684. script.Parent.DamageFrame.Visible = false
  685. script.Parent.ThirdMagicFrame.Visible = false
  686. script.Parent.ShopFrame.Visible = false
  687. script.Parent.SecondMagicFrame.Visible = false
  688. if script.Parent.PartyFrame.Visible then
  689. script.Parent.PartyFrame.Visible = false
  690. else
  691. script.Parent.PartyFrame.Visible = true
  692. script.Parent.PartyFrame.Invite.MouseEnter:connect(function()
  693. script.Parent.PartyFrame.Invite.Back.ImageColor3 = Color3.new(0.11372549019607843, 0.11372549019607843, 0.11372549019607843)
  694. end)
  695. script.Parent.PartyFrame.Invite.MouseLeave:connect(function()
  696. script.Parent.PartyFrame.Invite.Back.ImageColor3 = Color3.new(0.44313725490196076, 0.4196078431372549, 0.44313725490196076)
  697. end)
  698. script.Parent.PartyFrame.Invite.MouseButton1Click:connect(function()
  699. if script.Parent.PartyFrame.PlayerText.Text ~= Player.Name and game.Players:FindFirstChild(script.Parent.PartyFrame.PlayerText.Text) then
  700. local Target = game.Players:FindFirstChild(script.Parent.PartyFrame.PlayerText.Text)
  701. local Check = game.Workspace.Main.CheckStat:InvokeServer("Party", Target.Name)
  702. if Check == "" then
  703. local Names, Values = game.Workspace.Main.GetPartyMembers:InvokeServer("Party", Player.Name)
  704. local Count = 0
  705. for i, v in pairs(Values) do
  706. if v == "" then
  707. break
  708. end
  709. Count = Count + 1
  710. end
  711. if Count == 4 then
  712. script.Parent.PartyFrame.PlayerText.Text = "Your party is too full so invite to " .. Target.Name .. " couldn't be sent"
  713. else
  714. script.Parent.PartyFrame.PlayerText.Text = "Sent invite to " .. Target.Name
  715. game.Workspace.Main.ParentGui:FireServer(Target.Name, "PartyInvite", "Main", Player.Name, "Inviter")
  716. end
  717. else
  718. script.Parent.PartyFrame.PlayerText.Text = Target.Name .. " is in another party"
  719. end
  720. else
  721. script.Parent.PartyFrame.PlayerText.Text = "Player is not found, or you're trying to invite yourself"
  722. end
  723. end)
  724. end
  725. end)
  726. end
  727. function Settings()
  728. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Settings, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  729. script.Parent.ButtonFrame.Settings.MouseButton1Click:connect(function()
  730. script.Parent.FirstMagicFrame.Visible = false
  731. script.Parent.FeedbackFrame.Visible = false
  732. script.Parent.DamageFrame.Visible = false
  733. script.Parent.ShopFrame.Visible = false
  734. script.Parent.PartyFrame.Visible = false
  735. script.Parent.SecondMagicFrame.Visible = false
  736. script.Parent.SkillPointsFrame.Visible = false
  737. script.Parent.InventoryFrame.Visible = false
  738. script.Parent.ThirdMagicFrame.Visible = false
  739. script.Parent.GuildFrame.Visible = false
  740. script.Parent.TwitterFrame.Visible = false
  741. if script.Parent.SettingsFrame.Visible then
  742. script.Parent.SettingsFrame.Visible = false
  743. else
  744. script.Parent.SettingsFrame.Visible = true
  745. local Setting1 = game.Workspace.Main.CheckStat:InvokeServer("Setting1", Player.Name)
  746. local Setting2 = game.Workspace.Main.CheckStat:InvokeServer("Setting2", Player.Name)
  747. local Setting3 = game.Workspace.Main.CheckStat:InvokeServer("Setting3", Player.Name)
  748. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.Keydown, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  749. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.Tool, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  750. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.Show, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  751. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.NoShow, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  752. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.CustomizeExceed, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  753. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.Reset2nd, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  754. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.Reset3rd, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  755. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.Reset1st, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  756. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.Mute, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  757. GuiModules.ButtonEffect(Player, script.Parent.SettingsFrame.Unmute, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  758. if Setting1 == "Keydown" then
  759. script.Parent.SettingsFrame.Keydown.TextStrokeTransparency = 0
  760. script.Parent.SettingsFrame.Tool.TextStrokeTransparency = 1
  761. elseif Setting1 == "Tool" then
  762. script.Parent.SettingsFrame.Keydown.TextStrokeTransparency = 1
  763. script.Parent.SettingsFrame.Tool.TextStrokeTransparency = 0
  764. end
  765. if Setting2 == "true" then
  766. script.Parent.SettingsFrame.Show.TextStrokeTransparency = 0
  767. script.Parent.SettingsFrame.NoShow.TextStrokeTransparency = 1
  768. elseif Setting2 == "false" then
  769. script.Parent.SettingsFrame.Show.TextStrokeTransparency = 1
  770. script.Parent.SettingsFrame.NoShow.TextStrokeTransparency = 0
  771. end
  772. if Setting3 == "Mute" then
  773. script.Parent.SettingsFrame.Mute.TextStrokeTransparency = 0
  774. script.Parent.SettingsFrame.Unmute.TextStrokeTransparency = 1
  775. elseif Setting3 == "Unmute" then
  776. script.Parent.SettingsFrame.Mute.TextStrokeTransparency = 1
  777. script.Parent.SettingsFrame.Unmute.TextStrokeTransparency = 0
  778. end
  779. script.Parent.SettingsFrame.Keydown.MouseButton1Click:connect(function()
  780. if ButtonKey == false then
  781. ButtonKey = true
  782. game.Workspace.Main.SetStat:FireServer("Setting1", Player.Name, "Keydown", game:GetService("HttpService"):JSONEncode({
  783. _G["26"]
  784. }))
  785. script.Parent.SettingsFrame.Keydown.TextStrokeTransparency = 0
  786. script.Parent.SettingsFrame.Tool.TextStrokeTransparency = 1
  787. for i, v in pairs(Player.Backpack:GetChildren()) do
  788. if v.Name == "Keys" then
  789. v.Disabled = true
  790. v:Destroy()
  791. end
  792. end
  793. for i, v in pairs(Player.Backpack:GetChildren()) do
  794. if v:FindFirstChild("Magic") then
  795. v:Destroy()
  796. end
  797. end
  798. for i, v in pairs(Player.Character:GetChildren()) do
  799. if v:FindFirstChild("Magic") then
  800. v:Destroy()
  801. end
  802. end
  803. game.Workspace.ServerEvents.AddKeydown:FireServer(Player.Name)
  804. ButtonKey = false
  805. end
  806. end)
  807. script.Parent.SettingsFrame.Tool.MouseButton1Click:connect(function()
  808. game.Workspace.Main.SetStat:FireServer("Setting1", Player.Name, "Tool", game:GetService("HttpService"):JSONEncode({
  809. _G["26"]
  810. }))
  811. script.Parent.SettingsFrame.Keydown.TextStrokeTransparency = 1
  812. script.Parent.SettingsFrame.Tool.TextStrokeTransparency = 0
  813. for i, v in pairs(Player.Backpack:GetChildren()) do
  814. if v.Name == "Keys" then
  815. v.Disabled = true
  816. v:Destroy()
  817. end
  818. end
  819. for i, v in pairs(Player.Backpack:GetChildren()) do
  820. if v:FindFirstChild("Magic") then
  821. v:Destroy()
  822. end
  823. end
  824. for i, v in pairs(Player.Character:GetChildren()) do
  825. if v:FindFirstChild("Magic") then
  826. v:Destroy()
  827. end
  828. end
  829. end)
  830. script.Parent.SettingsFrame.Show.MouseButton1Click:connect(function()
  831. game.Workspace.Main.SetStat:FireServer("Setting2", Player.Name, "true", game:GetService("HttpService"):JSONEncode({
  832. _G["26"]
  833. }))
  834. script.Parent.SettingsFrame.Show.TextStrokeTransparency = 0
  835. script.Parent.SettingsFrame.NoShow.TextStrokeTransparency = 1
  836. if Player.Character.Head:FindFirstChild("Level") then
  837. Player.Character.Head.Level.Level.Text = "Level " .. Level
  838. else
  839. local FLevel = Instance.new("BillboardGui", Player.Character.Head)
  840. FLevel.Name = "Level"
  841. FLevel.Size = UDim2.new(5, 0, 5, 0)
  842. FLevel.StudsOffset = Vector3.new(0, 4, 0)
  843. local FTLevel = Instance.new("TextLabel", FLevel)
  844. FTLevel.BackgroundTransparency = 1
  845. FTLevel.Name = "Level"
  846. FTLevel.Size = UDim2.new(0.5, 0, 0.2, 0)
  847. FTLevel.Position = UDim2.new(0.25, 0, 0.75, 0)
  848. FTLevel.TextColor3 = Color3.new(0, 0.6666666666666666, 1)
  849. FTLevel.TextStrokeColor3 = Color3.new(0, 0, 0)
  850. FTLevel.TextStrokeTransparency = 0
  851. FTLevel.Font = "SourceSansLight"
  852. FTLevel.Text = "Level " .. Level
  853. FTLevel.TextScaled = true
  854. local GuildImage = Instance.new("ImageLabel", FLevel)
  855. GuildImage.BackgroundTransparency = 1
  856. GuildImage.Name = "Guild"
  857. GuildImage.Size = UDim2.new(0.5, 0, 0.5, 0)
  858. GuildImage.Position = UDim2.new(0.25, 0, 0.25, 0)
  859. for i, v in pairs(Guild2) do
  860. if Player:IsInGroup(v.GroupId) then
  861. GuildImage.Image = "rbxassetid://" .. v.GroupLogo
  862. end
  863. end
  864. end
  865. end)
  866. script.Parent.SettingsFrame.NoShow.MouseButton1Click:connect(function()
  867. game.Workspace.Main.SetStat:FireServer("Setting2", Player.Name, "false", game:GetService("HttpService"):JSONEncode({
  868. _G["26"]
  869. }))
  870. script.Parent.SettingsFrame.Show.TextStrokeTransparency = 1
  871. script.Parent.SettingsFrame.NoShow.TextStrokeTransparency = 0
  872. if Player.Character.Head:FindFirstChild("Level") then
  873. Player.Character.Head.Level:Destroy()
  874. else
  875. end
  876. end)
  877. script.Parent.SettingsFrame.CustomizeExceed.MouseButton1Click:connect(function()
  878. local Exceed = game.Workspace.ServerEvents.CheckGamepass:InvokeServer(374065490, Player.Name)
  879. if Exceed == true then
  880. game.Workspace.Main.ParentGui:FireServer(Player.Name, "ExceedCustomizer", "LocalScript")
  881. else
  882. game:GetService("MarketplaceService"):PromptPurchase(Player, 374065490)
  883. game:GetService("MarketplaceService").PromptPurchaseFinished:connect(function(player, assetId, isPurchased)
  884. if isPurchased and assetId == 374065490 then
  885. Player.Character.Humanoid.Health = 0
  886. end
  887. end)
  888. end
  889. end)
  890. script.Parent.SettingsFrame.Reset2nd.MouseButton1Click:connect(function()
  891. local Magic2 = game.Workspace.Main.CheckStat:InvokeServer("Magic2", Player.Name)
  892. if Magic2 ~= "" then
  893. game.Workspace.Main.SetStat:FireServer("Magic2", Player.Name, "", game:GetService("HttpService"):JSONEncode({
  894. _G["26"]
  895. }))
  896. end
  897. end)
  898. script.Parent.SettingsFrame.Reset3rd.MouseButton1Click:connect(function()
  899. local Magic3 = game.Workspace.Main.CheckStat:InvokeServer("Magic3", Player.Name)
  900. if Magic3 ~= "" then
  901. game.Workspace.Main.SetStat:FireServer("Magic3", Player.Name, "", game:GetService("HttpService"):JSONEncode({
  902. _G["26"]
  903. }))
  904. end
  905. end)
  906. script.Parent.SettingsFrame.Reset1st.MouseButton1Click:connect(function()
  907. if game.PlaceId == 415380657 then
  908. game:GetService("MarketplaceService"):PromptProductPurchase(Player, 35732330, true, Enum.CurrencyType.Robux)
  909. else
  910. game:GetService("MarketplaceService"):PromptProductPurchase(Player, 33331914, true, Enum.CurrencyType.Robux)
  911. end
  912. end)
  913. script.Parent.SettingsFrame.Mute.MouseButton1Click:connect(function()
  914. game.Workspace.Main.SetStat:FireServer("Setting3", Player.Name, "Mute", game:GetService("HttpService"):JSONEncode({
  915. _G["26"]
  916. }))
  917. script.Parent.SettingsFrame.Mute.TextStrokeTransparency = 0
  918. script.Parent.SettingsFrame.Unmute.TextStrokeTransparency = 1
  919. for i, v in pairs(Player.PlayerGui:GetChildren()) do
  920. if v.ClassName == "Sound" then
  921. v:Stop()
  922. end
  923. end
  924. end)
  925. script.Parent.SettingsFrame.Unmute.MouseButton1Click:connect(function()
  926. game.Workspace.Main.SetStat:FireServer("Setting3", Player.Name, "Unmute", game:GetService("HttpService"):JSONEncode({
  927. _G["26"]
  928. }))
  929. script.Parent.SettingsFrame.Mute.TextStrokeTransparency = 1
  930. script.Parent.SettingsFrame.Unmute.TextStrokeTransparency = 0
  931. for i, v in pairs(Player.PlayerGui:GetChildren()) do
  932. if v.ClassName == "Sound" then
  933. v:Play()
  934. end
  935. end
  936. end)
  937. end
  938. end)
  939. end
  940. function DamageOutput()
  941. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Damage, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  942. script.Parent.ButtonFrame.Damage.MouseButton1Click:connect(function()
  943. script.Parent.SettingsFrame.Visible = false
  944. script.Parent.FirstMagicFrame.Visible = false
  945. script.Parent.PartyFrame.Visible = false
  946. script.Parent.SkillPointsFrame.Visible = false
  947. script.Parent.GuildFrame.Visible = false
  948. script.Parent.FeedbackFrame.Visible = false
  949. script.Parent.ShopFrame.Visible = false
  950. script.Parent.InventoryFrame.Visible = false
  951. script.Parent.ThirdMagicFrame.Visible = false
  952. script.Parent.SecondMagicFrame.Visible = false
  953. script.Parent.TwitterFrame.Visible = false
  954. if DamageOutputD == false then
  955. DamageOutputD = true
  956. script.Parent.DamageFrame.Visible = true
  957. script.Parent.DamageFrame.Main.Disabled = false
  958. elseif DamageOutputD == true then
  959. DamageOutputD = false
  960. script.Parent.DamageFrame.Visible = false
  961. script.Parent.DamageFrame.Main.Disabled = true
  962. end
  963. end)
  964. end
  965. function ClearQuest()
  966. script.Parent.ClearQuestButton.MouseButton1Click:connect(function()
  967. game.Workspace.ServerEvents.ClearQuest:FireServer()
  968. MainGuiUpdate.QuestClear(Player, script.Parent.QuestFrame)
  969. end)
  970. end
  971. local KeyCode = "Quote"
  972. local Prefix = ";"
  973. function CommandBar(actionName, actionInputState, inputObject)
  974. if actionInputState == Enum.UserInputState.Begin and game.Workspace.ServerEvents.CheckAdmin:InvokeServer(Player.Name) == true and script.Parent.Commandbox.Visible == false then
  975. script.Parent.Commandbox.Visible = true
  976. script.Parent.Commandbox.Text = ""
  977. script.Parent.Commandbox:CaptureFocus()
  978. elseif actionInputState == Enum.UserInputState.Begin and game.Workspace.ServerEvents.CheckAdmin:InvokeServer(Player.Name) == true and script.Parent.Commandbox.Visible == true then
  979. script.Parent.Commandbox.Visible = false
  980. end
  981. end
  982. function Save()
  983. GuiModules.ButtonEffect(Player, script.Parent.ButtonFrame.Save, "Back", Color3.new(0.20784313725490197, 0.20784313725490197, 0.20784313725490197), Color3.new(0.10196078431372549, 0.10196078431372549, 0.10196078431372549))
  984. script.Parent.ButtonFrame.Save.MouseButton1Click:connect(function()
  985. if Saved == false then
  986. Saved = true
  987. game.Workspace.Main.Save:InvokeServer(false)
  988. for i = 30, 1, -1 do
  989. script.Parent.ButtonFrame.Save.Text = i
  990. wait(1)
  991. end
  992. script.Parent.ButtonFrame.Save.Text = "Save"
  993. Saved = false
  994. elseif Saved == true then
  995. end
  996. end)
  997. end
  998. function HighJump(actionName, actionInputState, inputObject)
  999. if actionInputState == Enum.UserInputState.Begin and Jump == false and Player.LocalData.Stamina.Value >= 35 then
  1000. Jump = true
  1001. JumpCharge = true
  1002. if Player.Character.Humanoid.Jump == true then
  1003. Jump = false
  1004. JumpCharge = false
  1005. return
  1006. end
  1007. if Player.Character.Humanoid.Sit == true then
  1008. Jump = false
  1009. JumpCharge = false
  1010. return
  1011. end
  1012. Speed = Player.Character.Humanoid.WalkSpeed
  1013. if Speed == 0 then
  1014. Speed = 16
  1015. end
  1016. Player.Character.Humanoid.WalkSpeed = 8
  1017. if Player.LocalData.Stamina.Value < 15 then
  1018. Jump = false
  1019. JumpCharge = false
  1020. return
  1021. end
  1022. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 35
  1023. local Anim = 389078601
  1024. local animation = Instance.new("Animation")
  1025. animation.AnimationId = "http://www.roblox.com/Asset?ID=" .. Anim
  1026. local animTrack = Player.Character.Humanoid:LoadAnimation(animation)
  1027. animTrack:Play()
  1028. animTrack:AdjustSpeed(0)
  1029. local Charge = 0
  1030. while JumpCharge == true do
  1031. Charge = Charge + 1
  1032. if Player.LocalData.Stamina.Value <= 15 then
  1033. break
  1034. end
  1035. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 15
  1036. if Player.Character.Humanoid.Jump == true then
  1037. break
  1038. end
  1039. if JumpCharge == false then
  1040. break
  1041. end
  1042. if Charge == 30 then
  1043. break
  1044. end
  1045. wait()
  1046. end
  1047. Player.Character.Humanoid.WalkSpeed = Speed
  1048. if Player.Character.Torso.Position.Y > 102 then
  1049. Explosion.Shockwave(nil, nil, Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1050. else
  1051. Explosion.Shockwave(BrickColor.new("White"), BrickColor.new("White"), Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1052. end
  1053. local LeapV = Instance.new("BodyVelocity", Player.Character.HumanoidRootPart)
  1054. LeapV.maxForce = Vector3.new(0, math.huge, 0)
  1055. if HasAgile then
  1056. LeapV.velocity = Vector3.new(0, (40 + Charge * 0.85) * 2.25, 0)
  1057. else
  1058. LeapV.velocity = Vector3.new(0, (40 + Charge * 0.85) * 2, 0)
  1059. end
  1060. game.Debris:AddItem(LeapV, 0.25)
  1061. wait(0.5)
  1062. animTrack:Stop()
  1063. wait(1)
  1064. Jump = false
  1065. end
  1066. if actionInputState == Enum.UserInputState.End then
  1067. JumpCharge = false
  1068. end
  1069. end
  1070. function FrontFlip(actionName, actionInputState, inputObject)
  1071. if actionInputState == Enum.UserInputState.Begin and Jump == false and Player.LocalData.Stamina.Value >= 35 then
  1072. Jump = true
  1073. JumpCharge = true
  1074. if Player.Character.Humanoid.Jump == true then
  1075. Jump = false
  1076. JumpCharge = false
  1077. return
  1078. end
  1079. if Player.Character.Humanoid.Sit == true then
  1080. Jump = false
  1081. JumpCharge = false
  1082. return
  1083. end
  1084. Speed = Player.Character.Humanoid.WalkSpeed
  1085. if Speed == 0 then
  1086. Speed = 16
  1087. end
  1088. Player.Character.Humanoid.WalkSpeed = 8
  1089. if Player.LocalData.Stamina.Value < 15 then
  1090. Jump = false
  1091. JumpCharge = false
  1092. return
  1093. end
  1094. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 35
  1095. local Anim = 464288577
  1096. local animation = Instance.new("Animation")
  1097. animation.AnimationId = "http://www.roblox.com/Asset?ID=" .. Anim
  1098. local animTrack = Player.Character.Humanoid:LoadAnimation(animation)
  1099. animTrack:Play()
  1100. animTrack:AdjustSpeed(0)
  1101. local Charge = 0
  1102. while JumpCharge == true do
  1103. Charge = Charge + 1
  1104. if Player.LocalData.Stamina.Value <= 15 then
  1105. break
  1106. end
  1107. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 15
  1108. if Player.Character.Humanoid.Jump == true then
  1109. break
  1110. end
  1111. if JumpCharge == false then
  1112. break
  1113. end
  1114. if Charge == 30 then
  1115. break
  1116. end
  1117. wait()
  1118. end
  1119. animTrack:AdjustSpeed(1)
  1120. Player.Character.Humanoid.WalkSpeed = Speed
  1121. if Player.Character.Torso.Position.Y > 102 then
  1122. Explosion.Shockwave(nil, nil, Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1123. else
  1124. Explosion.Shockwave(BrickColor.new("White"), BrickColor.new("White"), Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1125. end
  1126. local LeapV = Instance.new("BodyVelocity", Player.Character.HumanoidRootPart)
  1127. LeapV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1128. local LeapV2 = Instance.new("BodyVelocity", Player.Character.Torso)
  1129. LeapV2.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1130. Player.Character.Animate.Disabled = true
  1131. if HasAgile then
  1132. LeapV.velocity = Player.Character.Torso.CFrame * CFrame.Angles(math.rad(90), 0, 0).lookVector * ((30 + Charge) * 2)
  1133. LeapV2.velocity = Player.Character.Torso.CFrame.lookVector * ((45 + Charge) * 2)
  1134. else
  1135. LeapV.velocity = Player.Character.Torso.CFrame * CFrame.Angles(math.rad(90), 0, 0).lookVector * (45 + Charge) * 1.25
  1136. LeapV2.velocity = Player.Character.Torso.CFrame.lookVector * (45 + Charge)
  1137. end
  1138. game.Debris:AddItem(LeapV, 0.25)
  1139. game.Debris:AddItem(LeapV2, 0.25)
  1140. wait(1)
  1141. animTrack:Stop()
  1142. Player.Character.Animate.Disabled = false
  1143. wait(0.5)
  1144. Jump = false
  1145. end
  1146. if actionInputState == Enum.UserInputState.End then
  1147. JumpCharge = false
  1148. end
  1149. end
  1150. function BackFlip(actionName, actionInputState, inputObject)
  1151. if actionInputState == Enum.UserInputState.Begin and Jump == false and Player.LocalData.Stamina.Value >= 35 then
  1152. Jump = true
  1153. JumpCharge = true
  1154. if Player.Character.Humanoid.Jump == true then
  1155. Jump = false
  1156. JumpCharge = false
  1157. return
  1158. end
  1159. if Player.Character.Humanoid.Sit == true then
  1160. Jump = false
  1161. JumpCharge = false
  1162. return
  1163. end
  1164. Speed = Player.Character.Humanoid.WalkSpeed
  1165. if Speed == 0 then
  1166. Speed = 16
  1167. end
  1168. Player.Character.Humanoid.WalkSpeed = 8
  1169. if Player.LocalData.Stamina.Value < 35 then
  1170. Jump = false
  1171. JumpCharge = false
  1172. return
  1173. end
  1174. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 15
  1175. local Anim = 464288062
  1176. local animation = Instance.new("Animation")
  1177. animation.AnimationId = "http://www.roblox.com/Asset?ID=" .. Anim
  1178. local animTrack = Player.Character.Humanoid:LoadAnimation(animation)
  1179. animTrack:Play()
  1180. animTrack:AdjustSpeed(0)
  1181. local Charge = 0
  1182. while JumpCharge == true do
  1183. Charge = Charge + 1
  1184. if Player.LocalData.Stamina.Value <= 15 then
  1185. break
  1186. end
  1187. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 15
  1188. if Player.Character.Humanoid.Jump == true then
  1189. break
  1190. end
  1191. if JumpCharge == false then
  1192. break
  1193. end
  1194. if Charge == 30 then
  1195. break
  1196. end
  1197. wait()
  1198. end
  1199. animTrack:AdjustSpeed(1)
  1200. Player.Character.Humanoid.WalkSpeed = Speed
  1201. if Player.Character.Torso.Position.Y > 102 then
  1202. Explosion.Shockwave(nil, nil, Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1203. else
  1204. Explosion.Shockwave(BrickColor.new("White"), BrickColor.new("White"), Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1205. end
  1206. local LeapV = Instance.new("BodyVelocity", Player.Character.HumanoidRootPart)
  1207. LeapV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1208. local LeapV2 = Instance.new("BodyVelocity", Player.Character.Torso)
  1209. LeapV2.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1210. Player.Character.Animate.Disabled = true
  1211. if HasAgile then
  1212. LeapV.velocity = Player.Character.Torso.CFrame * CFrame.Angles(math.rad(90), 0, 0).lookVector * ((30 + Charge) * 2)
  1213. LeapV2.velocity = -Player.Character.Torso.CFrame.lookVector * ((45 + Charge) * 2)
  1214. else
  1215. LeapV.velocity = Player.Character.Torso.CFrame * CFrame.Angles(math.rad(90), 0, 0).lookVector * (45 + Charge) * 1.25
  1216. LeapV2.velocity = -Player.Character.Torso.CFrame.lookVector * (45 + Charge)
  1217. end
  1218. game.Debris:AddItem(LeapV, 0.25)
  1219. game.Debris:AddItem(LeapV2, 0.25)
  1220. wait(1)
  1221. animTrack:Stop()
  1222. Player.Character.Animate.Disabled = false
  1223. wait(0.5)
  1224. Jump = false
  1225. end
  1226. if actionInputState == Enum.UserInputState.End then
  1227. JumpCharge = false
  1228. end
  1229. end
  1230. function RightWheel(actionName, actionInputState, inputObject)
  1231. if actionInputState == Enum.UserInputState.Begin and Jump == false and Player.LocalData.Stamina.Value >= 35 then
  1232. Jump = true
  1233. JumpCharge = true
  1234. if Player.Character.Humanoid.Jump == true then
  1235. Jump = false
  1236. JumpCharge = false
  1237. return
  1238. end
  1239. if Player.Character.Humanoid.Sit == true then
  1240. Jump = false
  1241. JumpCharge = false
  1242. return
  1243. end
  1244. Speed = Player.Character.Humanoid.WalkSpeed
  1245. if Speed == 0 then
  1246. Speed = 16
  1247. end
  1248. Player.Character.Humanoid.WalkSpeed = 8
  1249. if Player.LocalData.Stamina.Value < 15 then
  1250. Jump = false
  1251. JumpCharge = false
  1252. return
  1253. end
  1254. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 35
  1255. local Anim = 464290561
  1256. local animation = Instance.new("Animation")
  1257. animation.AnimationId = "http://www.roblox.com/Asset?ID=" .. Anim
  1258. local animTrack = Player.Character.Humanoid:LoadAnimation(animation)
  1259. animTrack:Play()
  1260. wait(0.1)
  1261. animTrack:AdjustSpeed(0)
  1262. local Charge = 0
  1263. while JumpCharge == true do
  1264. Charge = Charge + 1
  1265. if Player.LocalData.Stamina.Value <= 15 then
  1266. break
  1267. end
  1268. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 15
  1269. if Player.Character.Humanoid.Jump == true then
  1270. break
  1271. end
  1272. if JumpCharge == false then
  1273. break
  1274. end
  1275. if Charge == 30 then
  1276. break
  1277. end
  1278. wait()
  1279. end
  1280. animTrack:AdjustSpeed(1)
  1281. Player.Character.Humanoid.WalkSpeed = Speed
  1282. if Player.Character.Torso.Position.Y > 102 then
  1283. Explosion.Shockwave(nil, nil, Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1284. else
  1285. Explosion.Shockwave(BrickColor.new("White"), BrickColor.new("White"), Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1286. end
  1287. local LeapV = Instance.new("BodyVelocity", Player.Character.Torso)
  1288. LeapV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1289. local LeapV2 = Instance.new("BodyVelocity", Player.Character.HumanoidRootPart)
  1290. LeapV2.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1291. Player.Character.Animate.Disabled = true
  1292. if HasAgile then
  1293. LeapV.velocity = Player.Character.Torso.CFrame * CFrame.Angles(0, math.rad(-90), 0).lookVector * ((65 + Charge) * 2)
  1294. LeapV2.velocity = Player.Character.Torso.CFrame * CFrame.Angles(math.rad(90), 0, 0).lookVector * 45
  1295. else
  1296. LeapV.velocity = Player.Character.Torso.CFrame * CFrame.Angles(0, math.rad(-90), 0).lookVector * (100 + Charge)
  1297. LeapV2.velocity = Player.Character.Torso.CFrame * CFrame.Angles(math.rad(90), 0, 0).lookVector * 45
  1298. end
  1299. game.Debris:AddItem(LeapV, 0.25)
  1300. game.Debris:AddItem(LeapV2, 0.25)
  1301. wait(1)
  1302. animTrack:Stop()
  1303. Player.Character.Animate.Disabled = false
  1304. wait(0.5)
  1305. Jump = false
  1306. end
  1307. if actionInputState == Enum.UserInputState.End then
  1308. JumpCharge = false
  1309. end
  1310. end
  1311. function LeftWheel(actionName, actionInputState, inputObject)
  1312. if actionInputState == Enum.UserInputState.Begin and Jump == false and Player.LocalData.Stamina.Value >= 35 then
  1313. Jump = true
  1314. JumpCharge = true
  1315. if Player.Character.Humanoid.Jump == true then
  1316. Jump = false
  1317. JumpCharge = false
  1318. return
  1319. end
  1320. if Player.Character.Humanoid.Sit == true then
  1321. Jump = false
  1322. JumpCharge = false
  1323. return
  1324. end
  1325. Speed = Player.Character.Humanoid.WalkSpeed
  1326. if Speed == 0 then
  1327. Speed = 16
  1328. end
  1329. Player.Character.Humanoid.WalkSpeed = 8
  1330. if Player.LocalData.Stamina.Value < 15 then
  1331. Jump = false
  1332. JumpCharge = false
  1333. return
  1334. end
  1335. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 35
  1336. local Anim = 464296623
  1337. local animation = Instance.new("Animation")
  1338. animation.AnimationId = "http://www.roblox.com/Asset?ID=" .. Anim
  1339. local animTrack = Player.Character.Humanoid:LoadAnimation(animation)
  1340. animTrack:Play()
  1341. wait(0.1)
  1342. animTrack:AdjustSpeed(0)
  1343. local Charge = 0
  1344. while JumpCharge == true do
  1345. Charge = Charge + 1
  1346. if Player.LocalData.Stamina.Value <= 15 then
  1347. break
  1348. end
  1349. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 15
  1350. if Player.Character.Humanoid.Jump == true then
  1351. break
  1352. end
  1353. if JumpCharge == false then
  1354. break
  1355. end
  1356. if Charge == 30 then
  1357. break
  1358. end
  1359. wait()
  1360. end
  1361. animTrack:AdjustSpeed(1)
  1362. Player.Character.Humanoid.WalkSpeed = Speed
  1363. if Player.Character.Torso.Position.Y > 102 then
  1364. Explosion.Shockwave(nil, nil, Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1365. else
  1366. Explosion.Shockwave(BrickColor.new("White"), BrickColor.new("White"), Vector3.new(Charge / 6 + 10, Charge / 12 + 2.5, Charge / 6 + 10), true, Player.Character.Torso.Position + Vector3.new(0, -2, 0), game.Workspace)
  1367. end
  1368. local LeapV = Instance.new("BodyVelocity", Player.Character.HumanoidRootPart)
  1369. LeapV.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1370. local LeapV2 = Instance.new("BodyVelocity", Player.Character.Torso)
  1371. LeapV2.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1372. Player.Character.Animate.Disabled = true
  1373. if HasAgile then
  1374. LeapV.velocity = Player.Character.Torso.CFrame * CFrame.Angles(0, math.rad(90), 0).lookVector * ((65 + Charge) * 2)
  1375. LeapV2.velocity = Player.Character.Torso.CFrame * CFrame.Angles(math.rad(90), 0, 0).lookVector * 45
  1376. else
  1377. LeapV.velocity = Player.Character.Torso.CFrame * CFrame.Angles(0, math.rad(90), 0).lookVector * (100 + Charge)
  1378. LeapV2.velocity = Player.Character.Torso.CFrame * CFrame.Angles(math.rad(90), 0, 0).lookVector * 45
  1379. end
  1380. game.Debris:AddItem(LeapV, 0.25)
  1381. game.Debris:AddItem(LeapV2, 0.25)
  1382. wait(1)
  1383. animTrack:Stop()
  1384. Player.Character.Animate.Disabled = false
  1385. wait(0.5)
  1386. Jump = false
  1387. end
  1388. if actionInputState == Enum.UserInputState.End then
  1389. JumpCharge = false
  1390. end
  1391. end
  1392. function CloseUI(actionName, actionInputState, inputObject)
  1393. if actionInputState == Enum.UserInputState.Begin then
  1394. script.Parent.SettingsFrame.Visible = false
  1395. script.Parent.FeedbackFrame.Visible = false
  1396. script.Parent.PartyFrame.Visible = false
  1397. script.Parent.SecondMagicFrame.Visible = false
  1398. script.Parent.TwitterFrame.Visible = false
  1399. script.Parent.InventoryFrame.Visible = false
  1400. script.Parent.DamageFrame.Visible = false
  1401. script.Parent.ThirdMagicFrame.Visible = false
  1402. script.Parent.ShopFrame.Visible = false
  1403. script.Parent.FirstMagicFrame.Visible = false
  1404. script.Parent.GuildFrame.Visible = false
  1405. end
  1406. end
  1407. function ChargingEnergy(actionName, actionInputState, inputObject)
  1408. if actionInputState == Enum.UserInputState.Begin then
  1409. if Player.LocalData.Charging.Value ~= true then
  1410. return
  1411. end
  1412. if MCharging == true then
  1413. return
  1414. end
  1415. if Player.LocalData.MagicEnergy.Value >= Player.LocalData.MaxMagicEnergy.Value then
  1416. return
  1417. end
  1418. local ChargeTrack = Player.Character.Humanoid:LoadAnimation(game.ReplicatedStorage.Animations.Charging.Animation)
  1419. ChargeTrack:Play()
  1420. ChargeTrack:AdjustSpeed(0)
  1421. local Magic1 = game.Workspace.Main.CheckStat:InvokeServer("Magic", Player.Name)
  1422. for i, v in pairs(game.ReplicatedStorage.ChargeParticles[Magic1]:GetChildren()) do
  1423. local p = v:Clone()
  1424. p.Parent = Player.Character.Torso
  1425. end
  1426. local Chargep = Instance.new("BodyPosition", Player.Character.HumanoidRootPart)
  1427. Chargep.position = Player.Character.HumanoidRootPart.Position
  1428. Chargep.Name = "Chargep"
  1429. Chargep.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1430. local Chargeg = Instance.new("BodyGyro", Player.Character.HumanoidRootPart)
  1431. Chargeg.Name = "Chargeg"
  1432. Chargeg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  1433. Chargeg.D = 50
  1434. Chargeg.P = 30000
  1435. Chargeg.cframe = Player.Character.HumanoidRootPart.CFrame
  1436. Player.LocalData.Move.Value = true
  1437. ws = Player.Character.Humanoid.WalkSpeed
  1438. jp = Player.Character.Humanoid.JumpPower
  1439. Player.Character.Humanoid.WalkSpeed = 0
  1440. Player.Character.Humanoid.JumpPower = 0
  1441. MCharging2 = true
  1442. MCharging = true
  1443. while MCharging2 == true and Player.LocalData.Charging.Value == true do
  1444. if Player.LocalData.MagicEnergy.Value <= 0 then
  1445. Player.LocalData.MagicEnergy.Value = 0
  1446. end
  1447. Player.LocalData.MagicEnergy.Value = Player.LocalData.MagicEnergy.Value + Player.LocalData.MaxMagicEnergy.Value * 0.006
  1448. if Player.LocalData.MagicEnergy.Value >= Player.LocalData.MaxMagicEnergy.Value then
  1449. Player.LocalData.MagicEnergy.Value = Player.LocalData.MaxMagicEnergy.Value
  1450. break
  1451. end
  1452. wait(0.5)
  1453. end
  1454. for i, v in pairs(Player.Character.Humanoid:GetPlayingAnimationTracks()) do
  1455. v:Stop()
  1456. end
  1457. for i, v in pairs(Player.Character.Torso:GetChildren()) do
  1458. if v.ClassName == "ParticleEmitter" then
  1459. v:Destroy()
  1460. end
  1461. end
  1462. for i, v in next, Player.Character.HumanoidRootPart:GetChildren(), nil do
  1463. if v.Name == "Chargep" or v.Name == "Chargeg" then
  1464. v:Destroy()
  1465. end
  1466. end
  1467. Player.LocalData.Move.Value = false
  1468. Player.Character.Humanoid.WalkSpeed = 16
  1469. Player.Character.Humanoid.JumpPower = 50
  1470. MCharging2 = false
  1471. wait(2)
  1472. MCharging = false
  1473. end
  1474. if actionInputState == Enum.UserInputState.End then
  1475. for i, v in pairs(Player.Character.Humanoid:GetPlayingAnimationTracks()) do
  1476. v:Stop()
  1477. end
  1478. for i, v in pairs(Player.Character.Torso:GetChildren()) do
  1479. if v.ClassName == "ParticleEmitter" then
  1480. v:Destroy()
  1481. end
  1482. end
  1483. for i, v in next, Player.Character.HumanoidRootPart:GetChildren(), nil do
  1484. if v.Name == "Chargep" or v.Name == "Chargeg" then
  1485. v:Destroy()
  1486. end
  1487. end
  1488. Player.LocalData.Move.Value = false
  1489. Player.Character.Humanoid.WalkSpeed = 16
  1490. Player.Character.Humanoid.JumpPower = 50
  1491. MCharging2 = false
  1492. wait(2)
  1493. MCharging = false
  1494. end
  1495. end
  1496. function LeftCtrl(actionName, actionInputState, actionInputObject)
  1497. if actionInputState == Enum.UserInputState.Begin and Run == false then
  1498. Run = true
  1499. if HasAgile then
  1500. Player.Character.Humanoid.WalkSpeed = 64
  1501. else
  1502. Player.Character.Humanoid.WalkSpeed = 48
  1503. end
  1504. if Player.Character:FindFirstChild("Animate") then
  1505. Player.Character.Animate.Disabled = true
  1506. Player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=345789264"
  1507. Player.Character.Animate.Disabled = false
  1508. Player.LocalData.Charging2.Value = false
  1509. while Run == true do
  1510. wait(0.1)
  1511. if Player.LocalData.Moving.Value == true then
  1512. if Player.LocalData.Stamina.Value <= 0 then
  1513. Run = false
  1514. Player.Character.Humanoid.WalkSpeed = 16
  1515. if Player.Character:FindFirstChild("Animate") then
  1516. Player.Character.Animate.Disabled = true
  1517. Player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1518. Player.Character.Animate.Disabled = false
  1519. Player.LocalData.Charging2.Value = true
  1520. end
  1521. end
  1522. if Player.LocalData:FindFirstChild("Stamina") then
  1523. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 4
  1524. end
  1525. end
  1526. end
  1527. Player.LocalData.Stamina.Value = Player.LocalData.Stamina.Value - 1
  1528. end
  1529. elseif actionInputState == Enum.UserInputState.Begin and Run == true then
  1530. Run = false
  1531. Player.Character.Humanoid.WalkSpeed = 16
  1532. if Player.Character:FindFirstChild("Animate") then
  1533. Player.Character.Animate.Disabled = true
  1534. Player.Character.Animate.walk.WalkAnim.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1535. Player.Character.Animate.Disabled = false
  1536. Player.LocalData.Charging2.Value = true
  1537. end
  1538. end
  1539. end
  1540. local Keys = {
  1541. ["w"] = false,
  1542. ["a"] = false,
  1543. ["d"] = false,
  1544. ["s"] = false,
  1545. [" "] = false
  1546. }
  1547. Mouse = Player:GetMouse()
  1548. function KeyDown(Key)
  1549. Key = Key:lower()
  1550. if Key == "w" or Key == "d" or Key == "a" or Key == "s" or Key == " " then
  1551. Player.LocalData.Moving.Value = true
  1552. if Key == " " then
  1553. local Character = Player.Character
  1554. if Character.Torso:findFirstChild("SwimPosition") then
  1555. Character.Torso.SwimPosition.position = Vector3.new(0, 74, 0)
  1556. end
  1557. end
  1558. Keys[Key] = true
  1559. end
  1560. end
  1561. function KeyUp(Key)
  1562. Key = Key:lower()
  1563. if Key == " " or Key == "w" or Key == "a" or Key == "s" or Key == "d" then
  1564. local Detect = false
  1565. local Count = 0
  1566. Keys[Key] = false
  1567. for i, v in next, Keys, nil do
  1568. if v == false then
  1569. Count = Count + 1
  1570. end
  1571. end
  1572. if Count >= 5 then
  1573. Player.LocalData.Moving.Value = false
  1574. end
  1575. end
  1576. end
  1577. Mouse.KeyDown:connect(KeyDown)
  1578. Mouse.KeyUp:connect(KeyUp)
  1579. Shop()
  1580. LevelUpdate()
  1581. Party()
  1582. EnergyUpdate()
  1583. StaminaUpdate()
  1584. HealthUpdate()
  1585. ExperienceUpdate()
  1586. JewelsUpdate()
  1587. FirstMagic()
  1588. SecondMagic()
  1589. ThirdMagic()
  1590. Settings()
  1591. HealthUpdate2()
  1592. EnergyUpdate2()
  1593. Inventory()
  1594. ShowB()
  1595. SaveMoveSet()
  1596. LoadMoveset()
  1597. SkillPoints()
  1598. Twitter()
  1599. DamageOutput()
  1600. Save()
  1601. ChatChange()
  1602. Guild()
  1603. Swim()
  1604. ClearQuest()
  1605. game:GetService("UserInputService").GamepadConnected:connect(function(gamepad)
  1606. ContextActionService:BindAction("Run", LeftCtrl, true, Enum.KeyCode.ButtonL3)
  1607. ContextActionService:BindAction("CloseUI", CloseUI, true, Enum.KeyCode.ButtonB)
  1608. ContextActionService:BindAction("Jump", HighJump, true, Enum.KeyCode.ButtonY)
  1609. ContextActionService:BindAction("Charging", ChargingEnergy, true, Enum.KeyCode.ButtonX)
  1610. end)
  1611. game:GetService("UserInputService").GamepadDisconnected:connect(function(gamepad)
  1612. ContextActionService:BindAction("Run", LeftCtrl, true, Enum.KeyCode.LeftControl)
  1613. ContextActionService:BindAction("Jump", HighJump, true, Enum.KeyCode.T)
  1614. ContextActionService:BindAction("Charging", ChargingEnergy, true, Enum.KeyCode.LeftShift)
  1615. end)
  1616. if game:GetService("UserInputService").GamepadEnabled then
  1617. ContextActionService:BindAction("Run", LeftCtrl, true, Enum.KeyCode.ButtonL3)
  1618. ContextActionService:BindAction("CloseUI", CloseUI, true, Enum.KeyCode.ButtonB)
  1619. ContextActionService:BindAction("Jump", HighJump, true, Enum.KeyCode.ButtonY)
  1620. ContextActionService:BindAction("Charging", ChargingEnergy, true, Enum.KeyCode.ButtonX)
  1621. else
  1622. ContextActionService:BindAction("Run", LeftCtrl, true, Enum.KeyCode.LeftControl)
  1623. ContextActionService:BindAction("Jump", HighJump, true, Enum.KeyCode.T)
  1624. ContextActionService:BindAction("Charging", ChargingEnergy, true, Enum.KeyCode.LeftShift)
  1625. ContextActionService:BindAction("CommandBar", CommandBar, false, Enum.KeyCode[KeyCode])
  1626. end
  1627. ContextActionService:BindAction("FrontFlip", FrontFlip, false, Enum.KeyCode.R)
  1628. ContextActionService:BindAction("BackFlip", BackFlip, false, Enum.KeyCode.G)
  1629. ContextActionService:BindAction("RightWheel", RightWheel, false, Enum.KeyCode.H)
  1630. ContextActionService:BindAction("LeftWheel", LeftWheel, false, Enum.KeyCode.F)
  1631. script.Parent.Commandbox.FocusLost:connect(function(Ep)
  1632. if Ep == true and game.Workspace.ServerEvents.CheckAdmin:InvokeServer(Player.Name) == true then
  1633. do
  1634. local Message = script.Parent.Commandbox.Text
  1635. local Count = 0
  1636. local Command = ""
  1637. local Type = ""
  1638. local Type2 = ""
  1639. for i in string.gmatch(Message, "%S+") do
  1640. Count = Count + 1
  1641. if Count == 1 then
  1642. Command = i
  1643. elseif Count == 2 then
  1644. Type = i
  1645. elseif Count == 3 then
  1646. Type2 = i
  1647. end
  1648. end
  1649. local success, filteredMessage = pcall(function()
  1650. return ChatService:FilterStringForBroadcast(Message, Player)
  1651. end)
  1652. if not success then
  1653. filteredMessage = "Nope"
  1654. end
  1655. Admin.RunCommand(Command, Prefix, Player.Name, Type, Type2, filteredMessage)
  1656. script.Parent.Commandbox.Visible = false
  1657. end
  1658. end
  1659. end)
  1660. local Level = game.Workspace.Main.CheckStat:InvokeServer("Level", Player.Name)
  1661. if MaxLevel < Level then
  1662. Player:Kick("Please stop exploiting on roblox")
  1663. end
  1664. script.Parent.Profile.PlayerImage.Image = "http://www.roblox.com/Thumbs/Avatar.ashx?x=100&y=100&Format=Png&username=" .. Player.Name
  1665. if Leader ~= "" then
  1666. game.Workspace.Main.ParentGui:FireServer(Player.Name, "PartyMember", "Main", nil, nil)
  1667. end
  1668. local Setting2 = game.Workspace.Main.CheckStat:InvokeServer("Setting2", Player.Name)
  1669. if Setting2 == "false" then
  1670. elseif Setting2 == "true" then
  1671. if Player.Character.Head:FindFirstChild("Level") then
  1672. Player.Character.Head.Level.Level.Text = "Level " .. Level
  1673. else
  1674. local FLevel = Instance.new("BillboardGui", Player.Character.Head)
  1675. FLevel.Name = "Level"
  1676. FLevel.Size = UDim2.new(5, 0, 5, 0)
  1677. FLevel.StudsOffset = Vector3.new(0, 4, 0)
  1678. local FTLevel = Instance.new("TextLabel", FLevel)
  1679. FTLevel.BackgroundTransparency = 1
  1680. FTLevel.Name = "Level"
  1681. FTLevel.Size = UDim2.new(0.5, 0, 0.2, 0)
  1682. FTLevel.Position = UDim2.new(0.25, 0, 0.75, 0)
  1683. FTLevel.TextColor3 = Color3.new(0, 0.6666666666666666, 1)
  1684. FTLevel.TextStrokeColor3 = Color3.new(0, 0, 0)
  1685. FTLevel.TextStrokeTransparency = 0
  1686. FTLevel.Font = "SourceSansLight"
  1687. FTLevel.Text = "Level " .. Level
  1688. FTLevel.TextScaled = true
  1689. local GuildImage = Instance.new("ImageLabel", FLevel)
  1690. GuildImage.BackgroundTransparency = 1
  1691. GuildImage.Name = "Guild"
  1692. GuildImage.Size = UDim2.new(0.5, 0, 0.5, 0)
  1693. GuildImage.Position = UDim2.new(0.25, 0, 0.25, 0)
  1694. for i, v in pairs(Guild2) do
  1695. if Player:IsInGroup(v.GroupId) then
  1696. GuildImage.Image = "rbxassetid://" .. v.GroupLogo
  1697. end
  1698. end
  1699. end
  1700. end
  1701. Player.Character.Humanoid.HealthChanged:connect(function()
  1702. HealthUpdate()
  1703. HealthUpdate2()
  1704. end)
  1705. Player.LocalData.MagicEnergy.Changed:connect(function()
  1706. if Charging == false then
  1707. AutoCharge()
  1708. end
  1709. EnergyUpdate()
  1710. EnergyUpdate2()
  1711. end)
  1712. Player.LocalData.MaxMagicEnergy.Changed:connect(function()
  1713. if Charging == false then
  1714. AutoCharge()
  1715. end
  1716. EnergyUpdate()
  1717. EnergyUpdate2()
  1718. end)
  1719. Player.LocalData.Stamina.Changed:connect(function()
  1720. if Charging2 == false then
  1721. AutoChargeStamina()
  1722. end
  1723. StaminaUpdate()
  1724. end)
  1725. Player.LocalData.Charging.Changed:connect(function()
  1726. if Charging == false then
  1727. AutoCharge()
  1728. end
  1729. EnergyUpdate()
  1730. EnergyUpdate2()
  1731. end)
  1732. Player.LocalData.MaxStamina.Changed:connect(function()
  1733. if Charging2 == false then
  1734. AutoChargeStamina()
  1735. end
  1736. StaminaUpdate()
  1737. end)
  1738. PlayMusic()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement