Advertisement
XZTablets

Untitled

Mar 28th, 2020
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.53 KB | None | 0 0
  1. -- Decompiled with the Synapse X Luau decompiler.
  2.  
  3. local v1 = {};
  4. local v2 = require(script.Parent.VisualModule);
  5. local v3 = require(script.Parent.PlayerDataClient);
  6. local v4 = require(script.Parent.CategoryModule);
  7. local v5 = require(game.ReplicatedStorage.Modules.ShortNumber);
  8. local l__LocalPlayer__6 = game.Players.LocalPlayer;
  9. local l__UserInputService__7 = game:GetService("UserInputService");
  10. local l__Debris__8 = game:GetService("Debris");
  11. local l__Parent__9 = script.Parent.Parent;
  12. local v10 = require(script.Parent.SettingsModule);
  13. local l__Frames__11 = l__Parent__9:WaitForChild("Category"):WaitForChild("Frames");
  14. l__Frames__11:WaitForChild("Stats");
  15. local l__Backpack__12 = l__LocalPlayer__6.Backpack;
  16. v1.Loaded = false;
  17. v1.SelectedKey = nil;
  18. v1.Cooldown = false;
  19. v1.Sword = nil;
  20. v1.DefaultColor = Color3.fromRGB(255, 255, 255);
  21. v1.SelectedColor = Color3.fromRGB(157, 157, 157);
  22. v1.StatKeys = {
  23. ["1"] = "Strength",
  24. ["2"] = "Durability",
  25. ["3"] = "Chakra",
  26. ["4"] = "Sword",
  27. ["5"] = "Agility"
  28. };
  29. v1.AnimationTable = {};
  30. local u1 = false;
  31. local l__Events__2 = game.ReplicatedStorage.Events;
  32. local u3 = nil;
  33. local u4 = false;
  34. function v1.SelectKey(p1)
  35. if u1 == true then
  36. return;
  37. end;
  38. u1 = true;
  39. spawn(function()
  40. wait(0.2);
  41. u1 = false;
  42. end);
  43. if v1.Loaded == true then
  44. if v1.SelectedKey == nil then
  45. v1.SelectedKey = p1;
  46. v1.SelectedKey.ImageColor3 = v1.SelectedColor;
  47. else
  48. if v1.SelectedKey.Name == "4" then
  49. l__Events__2.GeneralEvent:FireServer("SE", false);
  50. end;
  51. if v1.SelectedKey == p1 then
  52. v1.SelectedKey.ImageColor3 = v1.DefaultColor;
  53. v1.SelectedKey = nil;
  54. elseif v1.SelectedKey ~= p1 then
  55. v1.SelectedKey.ImageColor3 = v1.DefaultColor;
  56. v1.SelectedKey = p1;
  57. v1.SelectedKey.ImageColor3 = v1.SelectedColor;
  58. end;
  59. end;
  60. for v13, v14 in pairs(v1.AnimationTable) do
  61. if v14.Name == "Pushup1" or v14.Name == "Chakra" or v14.Name == "SwordIdle" then
  62. v14:Stop();
  63. end;
  64. end;
  65. l__LocalPlayer__6.Character.Humanoid.WalkSpeed = v10.Speed;
  66. l__LocalPlayer__6.Character.Humanoid.JumpPower = v10.Jump;
  67. l__LocalPlayer__6.Character.Humanoid:UnequipTools();
  68. v1.Sword = nil;
  69. if v1.SelectedKey then
  70. if v1.SelectedKey.Name == "2" or v1.SelectedKey.Name == "3" then
  71. l__LocalPlayer__6.Character.Humanoid.WalkSpeed = 0;
  72. l__LocalPlayer__6.Character.Humanoid.JumpPower = 0;
  73. if v1.SelectedKey.Name == "2" then
  74. v1.AnimationTable.Pushup1:Play();
  75. return;
  76. end;
  77. if v1.SelectedKey.Name == "3" then
  78. v1.AnimationTable.Chakra:Play();
  79. spawn(function()
  80. while v1.SelectedKey and v1.SelectedKey.Name == "3" do
  81. wait(1.01);
  82. if not v1.SelectedKey then
  83. break;
  84. end;
  85. if v1.SelectedKey.Name ~= "3" then
  86. break;
  87. end;
  88. v1.ActivateKey();
  89. end;
  90. end);
  91. return;
  92. end;
  93. elseif v1.SelectedKey.Name == "4" then
  94. l__Events__2.GeneralEvent:FireServer("SE", true);
  95. v1.Sword = l__LocalPlayer__6.Character.SWORD;
  96. v1.AnimationTable.SwordIdle:Play();
  97. u3 = v1.Sword.HitPart.Touched:Connect(function(p2)
  98. if u4 and (p2.Parent ~= l__LocalPlayer__6.Character or p2.Parent.Parent ~= l__LocalPlayer__6.Character) then
  99. local v15 = p2.Parent:FindFirstChild("Humanoid") or p2.Parent.Parent:FindFirstChild("Humanoid");
  100. if v15 and v15.Health > 0 then
  101. u4 = false;
  102. l__Events__2.GeneralEvent:FireServer("HE", v15);
  103. v15.Parent.PrimaryPart.HitParticle:Emit(1);
  104. v2.ShakeCamera(1);
  105. end;
  106. end;
  107. end);
  108. end;
  109. end;
  110. end;
  111. end;
  112. function v1.RemoveKey()
  113. if v1.SelectedKey then
  114. v1.SelectedKey.ImageColor3 = v1.DefaultColor;
  115. v1.SelectedKey = nil;
  116. end;
  117. l__LocalPlayer__6.Character.Humanoid.WalkSpeed = v10.Speed;
  118. l__LocalPlayer__6.Character.Humanoid.JumpPower = v10.Jump;
  119. l__LocalPlayer__6.Character.Humanoid:UnequipTools();
  120. v1.Sword = nil;
  121. for v16, v17 in pairs(v1.AnimationTable) do
  122. if v17.Name == "Pushup1" or v17.Name == "Chakra" or v17.Name == "SwordIdle" then
  123. v17:Stop();
  124. end;
  125. end;
  126. end;
  127. function v1.SendToServer(p3)
  128. if v1.Loaded == true and l__LocalPlayer__6.Character.Humanoid.Health > 0 then
  129. local v18 = l__Events__2.StatFunction:InvokeServer("Stat", p3);
  130. if v18 ~= nil then
  131. v1.SuccessReturned(p3, v18);
  132. end;
  133. end;
  134. end;
  135. function v1.SuccessReturned(p4, p5)
  136. l__Frames__11.Stats.Container.Stats[p4].Current.Stat.Text = v5.abr(p5[1]);
  137. v3.Data.Stats[p4][1] = p5[1];
  138. local v19 = script.Example:Clone();
  139. v19.ImageLabel.Image = v4.GUIAspect[p4].Image;
  140. v19.TextLabel.Text = "+" .. v5.abr(p5[2]) .. " " .. v4.GUIAspect[p4].Text;
  141. v19.TextLabel.TextColor3 = v4.GUIAspect[p4].Color;
  142. v19.Parent = l__Parent__9;
  143. l__Debris__8:AddItem(v19, 1);
  144. v19.Position = UDim2.new(math.random(3, 7) / 10, 0, math.random(5, 7) / 10, 0);
  145. v19:TweenSize(UDim2.new(0.4, 0, 0.2, 0), "Out", Enum.EasingStyle.Elastic, 0.3, true);
  146. end;
  147. function v1.ActivateKey()
  148. if v1.Loaded == true and v1.SelectedKey and v1.StatKeys[v1.SelectedKey.Name] and v1.Cooldown == false then
  149. v1.Cooldown = true;
  150. if v1.SelectedKey.Name == "2" then
  151. v1.AnimationTable.Pushup2:Play();
  152. end;
  153. v1.SendToServer(v1.StatKeys[v1.SelectedKey.Name]);
  154. wait(1);
  155. v1.Cooldown = false;
  156. end;
  157. end;
  158. function v1.Speed()
  159. if l__LocalPlayer__6.Character.Humanoid.WalkSpeed > 0 then
  160. v1.SendToServer("Speed");
  161. end;
  162. end;
  163. function v1.LoadAnimations(p6)
  164. v1.AnimationTable = p6;
  165. v1.Loaded = true;
  166. end;
  167. for v20, v21 in pairs(l__Parent__9:WaitForChild("Hotkeys"):GetChildren()) do
  168. v21.MouseButton1Click:Connect(function()
  169. v1.SelectKey(v21);
  170. end);
  171. end;
  172. local u5 = false;
  173. local u6 = false;
  174. local u7 = false;
  175. local function u8()
  176. if v1.SelectedKey and v1.SelectedKey.Name ~= "3" then
  177. if v1.SelectedKey.Name == "4" then
  178. if v1.Sword then
  179. spawn(function()
  180. if not u5 and l__LocalPlayer__6.Character and l__LocalPlayer__6.Character.Humanoid.Health > 0 then
  181. u5 = true;
  182. ({ v1.AnimationTable.Swing1, v1.AnimationTable.Swing2 })[math.random(1, 2)]:Play();
  183. v1.Sword.HitPart.Swing:Play();
  184. u4 = true;
  185. wait(1);
  186. u4 = false;
  187. u5 = false;
  188. end;
  189. end);
  190. end;
  191. elseif v1.SelectedKey.Name == "1" then
  192. spawn(function()
  193. if not u6 then
  194. u6 = true;
  195. local v22 = {};
  196. if not l__LocalPlayer__6.Character:FindFirstChild("TITANLIMB") then
  197. local v23 = { l__LocalPlayer__6.Character.LeftHand, l__LocalPlayer__6.Character.RightHand };
  198. ({ v1.AnimationTable.PunchRight, v1.AnimationTable.PunchLeft })[math.random(1, 2)]:Play();
  199. else
  200. v23 = { l__LocalPlayer__6.Character.RightFoot, l__LocalPlayer__6.Character.RightLowerLeg };
  201. v1.AnimationTable.Stomp:Play();
  202. end;
  203. local v24 = {};
  204. u7 = true;
  205. for v25, v26 in pairs(v23) do
  206. local u9 = nil;
  207. u9 = v26.Touched:Connect(function(p7)
  208. if u7 == true and (p7.Parent ~= l__LocalPlayer__6.Character or p7.Parent.Parent ~= l__LocalPlayer__6.Character) then
  209. local v27 = p7.Parent:FindFirstChild("Humanoid") or p7.Parent.Parent:FindFirstChild("Humanoid");
  210. if v27 and v27.Health > 0 then
  211. u7 = false;
  212. l__Events__2.GeneralEvent:FireServer("HE", v27);
  213. v27.Parent.PrimaryPart.HitParticle:Emit(1);
  214. v2.ShakeCamera(1);
  215. v24[u9] = nil;
  216. u9:Disconnect();
  217. end;
  218. end;
  219. end);
  220. v24[u9] = true;
  221. end;
  222. wait(1);
  223. for v28, v29 in pairs(v24) do
  224. v28:Disconnect();
  225. end;
  226. u6 = false;
  227. end;
  228. end);
  229. end;
  230. v1.ActivateKey();
  231. end;
  232. end;
  233. l__UserInputService__7.TouchTap:Connect(function(p8, p9)
  234. if p9 then
  235. return;
  236. end;
  237. u8();
  238. end);
  239. l__UserInputService__7.InputBegan:Connect(function(p10, p11)
  240. if p11 then
  241. return;
  242. end;
  243. if p10.UserInputType == Enum.UserInputType.MouseButton1 then
  244. u8();
  245. end;
  246. end);
  247. local u10 = false;
  248. l__UserInputService__7.JumpRequest:Connect(function()
  249. if u10 == false and l__LocalPlayer__6.Character.Humanoid.JumpPower > 0 and l__LocalPlayer__6.Character.Humanoid:GetState() ~= Enum.HumanoidStateType.Freefall then
  250. u10 = true;
  251. spawn(function()
  252. wait(1.5);
  253. u10 = false;
  254. end);
  255. if l__LocalPlayer__6.Character.PrimaryPart.BodyPosition.MaxForce == Vector3.new(0, 0, 0) then
  256. v1.SendToServer("Agility");
  257. end;
  258. end;
  259. end);
  260. function v1.PlayerSpawned()
  261. v1.RemoveKey();
  262. v1.Sword = nil;
  263. if u3 then
  264. u3:Disconnect();
  265. u3 = nil;
  266. end;
  267. end;
  268. function v1.PlayerDied()
  269. v1.Loaded = false;
  270. v1.RemoveKey();
  271. v1.Sword = nil;
  272. if u3 then
  273. u3:Disconnect();
  274. u3 = nil;
  275. end;
  276. end;
  277. return v1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement