Advertisement
iiFlamez

Untitled

Oct 30th, 2017
159
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.89 KB | None | 0 0
  1. -- params : ...
  2.  
  3. while 1 do
  4. if game.Players.LocalPlayer.Character == nil or game.Players.LocalPlayer.Character.Parent == nil or game.Players.LocalPlayer.Character:findFirstChild("Health") == nil or game.Players.LocalPlayer.Character.Health:IsA("IntValue") == false then
  5. wait(0.1)
  6. -- DECOMPILER ERROR at PC35: LeaveBlock: unexpected jumping out IF_THEN_STMT
  7.  
  8. -- DECOMPILER ERROR at PC35: LeaveBlock: unexpected jumping out IF_STMT
  9.  
  10. end
  11. end
  12. wait()
  13. game.StarterGui:SetCoreGuiEnabled(0, false)
  14. game.StarterGui:SetCoreGuiEnabled(1, false)
  15. game.StarterGui:SetCoreGuiEnabled(2, false)
  16. local keys = {}
  17. local player = game.Players.LocalPlayer
  18. local mouse = (player:GetMouse())
  19. local bv, bg = nil, nil
  20. local animations = {}
  21. local flying = false
  22. local state = "Hover"
  23. local wTable = nil
  24. local lastSpace = 0
  25. local speed = 0
  26. local lastFly = -1.5
  27. local cam = game.Workspace.CurrentCamera
  28. local resources = game.ReplicatedStorage.Resources
  29. local wingModule = require(game.ReplicatedStorage.Resources.Libraries.Wings)
  30. local skillModule = require(game.ReplicatedStorage.Resources.Libraries.Skills)
  31. local common = require(game.ReplicatedStorage.Resources.Libraries.CommonMethods)
  32. local profile = common.GetProfile(player)
  33. skillModule.Initialize(animations)
  34. player.NameDisplayDistance = 0
  35. player.HealthDisplayDistance = 0
  36. player.CameraMaxZoomDistance = 50
  37. local action = false
  38. local slashDB = false
  39. local skill = "None"
  40. local swordAnims = {"SpinSlash", "DoubleSlash"}
  41. SetupCharacter = function(char)
  42. while 1 do
  43. if char:findFirstChild("HumanoidRootPart") == nil or player.Character.HumanoidRootPart:findFirstChild("BodyGyro") == nil then
  44. wait(1)
  45. -- DECOMPILER ERROR at PC16: LeaveBlock: unexpected jumping out IF_THEN_STMT
  46.  
  47. -- DECOMPILER ERROR at PC16: LeaveBlock: unexpected jumping out IF_STMT
  48.  
  49. end
  50. end
  51. if profile.Wings.Value == "None" then
  52. profile.Wings.Value = profile.Class.Value
  53. end
  54. wTable = wingModule.AttachWings(player, game.ReplicatedStorage.Profiles[player.Name].Wings.Value)
  55. bv = player.Character.HumanoidRootPart:findFirstChild("BodyVelocity")
  56. bv.maxForce = Vector3.new(0, 0, 0)
  57. bv.velocity = Vector3.new(0, 0, 0)
  58. bg = player.Character.HumanoidRootPart:findFirstChild("BodyGyro")
  59. bg.maxTorque = Vector3.new(0, 0, 0)
  60. LoadAnimations()
  61. end
  62.  
  63. mouse.KeyDown:connect(function(k)
  64. if keys[k:lower()] ~= nil then
  65. keys[k:lower()] = true
  66. else
  67. keys[k:lower()] = true
  68. end
  69. if k == " " then
  70. if flying == false and time() - lastSpace < 0.5 and time() - lastFly > 1.5 and (game.ReplicatedStorage:findFirstChild("CanFly") == nil or game.ReplicatedStorage.CanFly.Value == true) then
  71. flying = true
  72. bv.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  73. bg.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
  74. player.Character.Humanoid.PlatformStand = true
  75. wTable.animation = wingModule.animations.Hover
  76. game.ReplicatedStorage.FlightHandler:FireServer("Flying")
  77. animations.LegRaise:Play()
  78. animations.FlightArms:Play()
  79. animations.SwordIdle:Stop()
  80. else
  81. if flying == true then
  82. flying = false
  83. lastFly = time()
  84. bv.maxForce = Vector3.new(0, 0, 0)
  85. bg.maxTorque = Vector3.new(0, 0, 0)
  86. player.Character.Humanoid.PlatformStand = false
  87. wTable.animation = wingModule.animations.Idle
  88. game.ReplicatedStorage.FlightHandler:FireServer("None")
  89. animations.LegRaise:Stop()
  90. animations.FlightArms:Stop()
  91. if IsEquipped() then
  92. animations.SwordIdle:Play()
  93. end
  94. end
  95. end
  96. lastSpace = time()
  97. end
  98. for i,v in pairs(profile.Skills:GetChildren()) do
  99. if v.Value == k:lower() then
  100. skillModule.UseSkill(v.Name)
  101. end
  102. end
  103. end)
  104. mouse.KeyUp:connect(function(k)
  105. if keys[k:lower()] ~= nil then
  106. keys[k:lower()] = false
  107. else
  108. keys[k:lower()] = false
  109. end
  110. end)
  111. local action2 = false
  112. mouse.Button1Down:connect(function()
  113. if action == false and action2 == false and IsEquipped() and slashDB == false then
  114. game.ReplicatedStorage.DamageHandler:FireServer("Damage")
  115. action = true
  116. action2 = true
  117. local swing = swordAnims[math.random(1, #swordAnims)]
  118. animations[swing]:Play()
  119. local blade = player.Character.Weapon.Blade
  120. wait(0.8)
  121. animations[swing]:Stop()
  122. wait(0.05)
  123. slashDB = false
  124. action = false
  125. wait(0.05)
  126. action2 = false
  127. end
  128. end)
  129. LoadAnimations = function()
  130. for i,v in pairs(game.ReplicatedStorage.Resources.Animations:GetChildren()) do
  131. animations[v.Name] = player.Character.Humanoid:LoadAnimation(v)
  132. end
  133. end
  134.  
  135. IsEquipped = function()
  136. if player.Character:findFirstChild("Weapon") ~= nil and player.Character.Weapon.Arm.WeaponWeld.Part0.Name == "Right Arm" then
  137. return true
  138. end
  139. return false
  140. end
  141.  
  142. SetupShops = function(w)
  143. for i,v in pairs(w:GetChildren()) do
  144. if v.Name == "ALO_ItemBuy" then
  145. local gui = v.SurfaceGui.Frame
  146. do
  147. gui.Buy.MouseButton1Click:connect(function()
  148. print(game.ReplicatedStorage.EquipmentHandler:InvokeServer("Buy", gui))
  149. end)
  150. local item = game.ReplicatedStorage.Resources.Items[gui.ItemName.Value]
  151. gui.ItemLabel.Text = "[Lv." .. tostring(item.Level.Value) .. "]" .. item.Name
  152. gui.PriceLabel.Text = "Col." .. tostring(gui.Price.Value)
  153. if item.Stats:FindFirstChild("Melee") then
  154. gui.Melee.Text = "Melee: " .. tostring(item.Stats.Melee.Value)
  155. else
  156. if item.Stats:FindFirstChild("Defense") then
  157. gui.Melee.Text = "Defense: " .. tostring(item.Stats.Defense.Value)
  158. end
  159. end
  160. gui.Magic.Text = "Magic: " .. tostring(item.Stats.Magic.Value)
  161. end
  162. else
  163. do
  164. do
  165. if v:IsA("Model") then
  166. SetupShops(v)
  167. end
  168. -- DECOMPILER ERROR at PC92: LeaveBlock: unexpected jumping out DO_STMT
  169.  
  170. -- DECOMPILER ERROR at PC92: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  171.  
  172. -- DECOMPILER ERROR at PC92: LeaveBlock: unexpected jumping out IF_STMT
  173.  
  174. end
  175. end
  176. end
  177. end
  178. end
  179.  
  180. FlyControls = function()
  181. local hoverCounter = 0
  182. coroutine.resume(coroutine.create(function()
  183. while 1 do
  184. while 1 do
  185. while 1 do
  186. while 1 do
  187. while 1 do
  188. while 1 do
  189. while 1 do
  190. while 1 do
  191. while 1 do
  192. while 1 do
  193. if wait(0.1) then
  194. if flying then
  195. if state == "Hover" then
  196. if speed < 55 then
  197. wTable.animSpeed = 0.08
  198. if hoverCounter <= 2 then
  199. wTable.animation = wingModule.animations.Hover
  200. else
  201. if hoverCounter <= 4 then
  202. wTable.animation = wingModule.animations.HoverBack
  203. else
  204. hoverCounter = -1
  205. end
  206. end
  207. hoverCounter = hoverCounter + 1
  208. else
  209. wTable.animSpeed = 0.04
  210. wTable.animation = wingModule.animations.Dive
  211. end
  212. end
  213. if skillModule.casting then
  214. bg.cframe = mouse.Hit
  215. else
  216. bg.cframe = cam.CoordinateFrame
  217. end
  218. local maxWSpeed = 52
  219. local maxADSpeed = 45
  220. local maxSSpeed = -45
  221. if keys.w then
  222. if speed < maxWSpeed then
  223. speed = maxWSpeed
  224. else
  225. if player.Character.HumanoidRootPart.Velocity.Y < -10 then
  226. speed = speed - player.Character.HumanoidRootPart.Velocity.unit.Y * 2
  227. else
  228. if maxWSpeed < speed then
  229. local add = speed - maxWSpeed
  230. add = add * 0.9
  231. speed = maxWSpeed + add
  232. else
  233. do
  234. speed = speed - player.Character.HumanoidRootPart.Velocity.unit.Y * 3
  235. if speed < 55 then
  236. bg.cframe = bg.cframe * CFrame.Angles(-0.6, 0, 0)
  237. else
  238. bg.cframe = bg.cframe * CFrame.Angles(-1.2, 0, 0)
  239. end
  240. if not keys.a and not keys.d then
  241. bv.velocity = cam.CoordinateFrame.lookVector * speed
  242. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_THEN_STMT
  243.  
  244. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_STMT
  245.  
  246. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out DO_STMT
  247.  
  248. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  249.  
  250. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_STMT
  251.  
  252. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  253.  
  254. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_STMT
  255.  
  256. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_ELSE_STMT
  257.  
  258. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_STMT
  259.  
  260. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_THEN_STMT
  261.  
  262. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_STMT
  263.  
  264. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_THEN_STMT
  265.  
  266. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_STMT
  267.  
  268. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_THEN_STMT
  269.  
  270. -- DECOMPILER ERROR at PC150: LeaveBlock: unexpected jumping out IF_STMT
  271.  
  272. end
  273. end
  274. end
  275. end
  276. end
  277. end
  278. end
  279. end
  280. end
  281. if keys.a then
  282. bg.cframe = bg.cframe * CFrame.Angles(0, -0.4, 0)
  283. bv.velocity = cam.CoordinateFrame * CFrame.Angles(0, 0.785, 0).lookVector * speed
  284. -- DECOMPILER ERROR at PC180: LeaveBlock: unexpected jumping out IF_THEN_STMT
  285.  
  286. -- DECOMPILER ERROR at PC180: LeaveBlock: unexpected jumping out IF_STMT
  287.  
  288. end
  289. end
  290. if keys.d then
  291. bg.cframe = bg.cframe * CFrame.Angles(0, 0.4, 0)
  292. bv.velocity = cam.CoordinateFrame * CFrame.Angles(0, -0.785, 0).lookVector * speed
  293. end
  294. end
  295. if keys.s then
  296. if speed >= 0 then
  297. speed = -30
  298. end
  299. bg.cframe = bg.cframe * CFrame.Angles(0.5, 0, 0)
  300. if not keys.a and not keys.d then
  301. bv.velocity = cam.CoordinateFrame.lookVector * speed
  302. -- DECOMPILER ERROR at PC246: LeaveBlock: unexpected jumping out IF_THEN_STMT
  303.  
  304. -- DECOMPILER ERROR at PC246: LeaveBlock: unexpected jumping out IF_STMT
  305.  
  306. -- DECOMPILER ERROR at PC246: LeaveBlock: unexpected jumping out IF_THEN_STMT
  307.  
  308. -- DECOMPILER ERROR at PC246: LeaveBlock: unexpected jumping out IF_STMT
  309.  
  310. end
  311. end
  312. end
  313. if keys.a then
  314. bg.cframe = bg.cframe * CFrame.Angles(0, 0, 0.4)
  315. bv.velocity = cam.CoordinateFrame * CFrame.Angles(0, -0.785, 0).lookVector * speed
  316. -- DECOMPILER ERROR at PC276: LeaveBlock: unexpected jumping out IF_THEN_STMT
  317.  
  318. -- DECOMPILER ERROR at PC276: LeaveBlock: unexpected jumping out IF_STMT
  319.  
  320. end
  321. end
  322. if keys.d then
  323. bg.cframe = bg.cframe * CFrame.Angles(0, 0, -0.4)
  324. bv.velocity = cam.CoordinateFrame * CFrame.Angles(0, 0.785, 0).lookVector * speed
  325. end
  326. end
  327. if keys.a then
  328. speed = maxADSpeed
  329. bg.cframe = bg.cframe * CFrame.Angles(0, 0, 0.4)
  330. bv.velocity = cam.CoordinateFrame * CFrame.Angles(0, 1.57, 0).lookVector * speed
  331. -- DECOMPILER ERROR at PC337: LeaveBlock: unexpected jumping out IF_THEN_STMT
  332.  
  333. -- DECOMPILER ERROR at PC337: LeaveBlock: unexpected jumping out IF_STMT
  334.  
  335. end
  336. end
  337. if keys.d then
  338. speed = maxADSpeed
  339. bg.cframe = bg.cframe * CFrame.Angles(0, 0, -0.4)
  340. bv.velocity = cam.CoordinateFrame * CFrame.Angles(0, -1.57, 0).lookVector * speed
  341. -- DECOMPILER ERROR at PC368: LeaveBlock: unexpected jumping out IF_THEN_STMT
  342.  
  343. -- DECOMPILER ERROR at PC368: LeaveBlock: unexpected jumping out IF_STMT
  344.  
  345. end
  346. end
  347. speed = 0
  348. if not keys.a and not keys.w and not keys.s and not keys.d and hoverCounter <= 4 then
  349. bv.velocity = cam.CoordinateFrame.lookVector * speed + Vector3.new(0, 0, 0)
  350. -- DECOMPILER ERROR at PC404: LeaveBlock: unexpected jumping out IF_THEN_STMT
  351.  
  352. -- DECOMPILER ERROR at PC404: LeaveBlock: unexpected jumping out IF_STMT
  353.  
  354. end
  355. end
  356. bv.velocity = cam.CoordinateFrame.lookVector * speed + Vector3.new(0, 0, 0)
  357. end
  358. end))
  359. end
  360.  
  361. player.CharacterAdded:connect(SetupCharacte)
  362. if player.Character ~= nil then
  363. SetupCharacter(player.Characte)
  364. end
  365. player.Character.ChildAdded:connect(function(c)
  366. wait()
  367. if c.Name == "Weapon" then
  368. animations.SwordIdle:Play()
  369. c.Arm.WeaponWeld.Changed:connect(function()
  370. -- DECOMPILER ERROR at PC28: Unhandled construct in 'MakeBoolean' P1
  371.  
  372. if c ~= nil and c:findFirstChild("Arm") ~= nil and c.Arm.WeaponWeld.Part0 ~= nil and c.Arm.WeaponWeld.Part0.Name == "Torso" and not flying then
  373. animations.SwordIdle:Stop()
  374. end
  375. if not flying then
  376. animations.SwordIdle:Play()
  377. end
  378. end)
  379. end
  380. end)
  381. game.Workspace.ChildAdded:connect(function(c)
  382. wait(1)
  383. if game.Players:findFirstChild(c.Name) ~= nil then
  384. wingModule.SetupCharacters()
  385. end
  386. end)
  387. if game:GetService("ReplicatedStorage):FindFirstChild("CanFly) ~= nil then
  388. game:GetService("ReplicatedStorage).CanFly.Value = false
  389. game:GetService("ReplicatedStorage).CanFly.Changed:connect(function()
  390. game:GetService("ReplicatedStorage").CanFly.Value = false
  391. end)
  392. end
  393. game.Workspace.Changed:Connect(function(ee)
  394. if ee == "Gravity" then
  395. workspace.Gravity = 196.2
  396. end
  397. end)
  398. wingModule.SetupCharacters()
  399. SetupShops(workspac)
  400. FlyControls()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement