Advertisement
astronaut32

amaranth

Oct 16th, 2016
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 63.43 KB | None | 0 0
  1. local wfc = function(m, n)
  2. return m:WaitForChild(n)
  3. end
  4. local RbxUtility = LoadLibrary("RbxUtility")
  5. local Create = RbxUtility.Create
  6. local Player = game:GetService("Players").LocalPlayer
  7. local Mouse = Player:GetMouse()
  8. repeat
  9. wait()
  10. until Player.Character ~= nil
  11. local Character = Player.Character
  12. local Humanoid = Character:WaitForChild("Humanoid")
  13. local Camera = workspace.CurrentCamera
  14. local Equipped = false
  15. Anim = "Idle"
  16. jumping = false
  17. walkforw = false
  18. idleforw = false
  19. walk = 0
  20. idle = 0
  21. deb = false
  22. deb2 = false
  23. safehum = true
  24. canwalk = true
  25. Effects = {
  26. buffer = {}
  27. , add = function(self, part, mesh, rotate, size, transparency, time, toPoint, speed)
  28. local data = {part = part, mesh = mesh or nil, rotate = rotate or false, size = vt(), transparency = not size and transparency or 0, toPoint = toPoint or nil, speed = speed or 0.1}
  29. table.insert(self.buffer, data)
  30. game:GetService("Debris"):AddItem(part, time or 5)
  31. end, update = function(self, step)
  32. for i,v in ipairs(self.buffer) do
  33. if v.part == nil or v.part.Parent == nil then
  34. table.remove(self.buffer, i)
  35. else
  36. if v.part.Transparency >= 1 then
  37. game:GetService("Debris"):AddItem(v.part, 1)
  38. table.remove(self.buffer, i)
  39. else
  40. if v.mesh then
  41. v.mesh.Scale = v.mesh.Scale + vt(v.size.X * step, v.size.Y * step, v.size.Z * step)
  42. else
  43. v.part.Size = v.part.Size + vt(v.size.X * step, v.size.Y * step, v.size.Z * step)
  44. end
  45. v.part.Transparency = v.part.Transparency + v.transparency * step
  46. if v.toPoint then
  47. v.part.CFrame = v.part.CFrame:lerp(v.toPoint, v.speed)
  48. end
  49. if v.rotate then
  50. v.part.CFrame = v.part.CFrame * RandomCFRot()
  51. end
  52. end
  53. end
  54. end
  55. end}
  56. curkeys = ""
  57. curinactive = 0
  58. curmaxinactive = 0.2
  59. Stats = {
  60. Speed = {
  61. effects = {}
  62. , add = function(self, time, amount)
  63. local data = {amount = amount, time = time}
  64. data.remove = function(self)
  65. self.time = 0
  66. end
  67. table.insert(self.effects, data)
  68. return data
  69. end, update = function(self, step)
  70. if not Equipped then
  71. return
  72. end
  73. local new = 1
  74. for i,v in ipairs(self.effects) do
  75. new = new + v.amount
  76. if v.time ~= nil then
  77. v.time = v.time - step
  78. if v.time <= 0 then
  79. table.remove(self.effects, i)
  80. end
  81. end
  82. end
  83. if new < 0 then
  84. new = 0
  85. end
  86. Humanoid.WalkSpeed = 16 * new
  87. end}
  88. ,
  89. Accuracy = {Value = 0,
  90. effects = {}
  91. , add = function(self, time, amount)
  92. local data = {amount = amount, time = time}
  93. data.remove = function(self)
  94. self.time = 0
  95. end
  96. table.insert(self.effects, data)
  97. return data
  98. end, update = function(self, step)
  99. if not Equipped then
  100. return
  101. end
  102. local new = 0
  103. for i,v in ipairs(self.effects) do
  104. new = new + v.amount
  105. if v.time ~= nil then
  106. v.time = v.time - step
  107. if v.time <= 0 then
  108. table.remove(self.effects, i)
  109. end
  110. end
  111. end
  112. if new < 0 then
  113. new = 0
  114. end
  115. if new > 5 then
  116. new = 5
  117. end
  118. self.Value = lerp(self.Value, new, 0.25)
  119. end, get = function(self)
  120. return self.Value
  121. end}
  122. }
  123. _G.add = function(time, amount)
  124. Stats.Speed:add(time, amount)
  125. end
  126. game:GetService("RunService").RenderStepped:connect(function(step)
  127. Stats.Speed:update(step)
  128. Stats.Accuracy:update(step)
  129. Effects:update(step)
  130. end)
  131. it = Instance.new
  132. vt = Vector3.new
  133. cf = CFrame.new
  134. euler = CFrame.fromEulerAnglesXYZ
  135. angles = CFrame.Angles
  136. PlayerGui = Player:WaitForChild("PlayerGui")
  137. Backpack = Player:WaitForChild("Backpack")
  138. Torso = Character:WaitForChild("Torso")
  139. Head = Character:WaitForChild("Head")
  140. LeftArm = Character:WaitForChild("Left Arm")
  141. LeftLeg = Character:WaitForChild("Left Leg")
  142. RightArm = Character:WaitForChild("Right Arm")
  143. RightLeg = Character:WaitForChild("Right Leg")
  144. Neck = Torso:WaitForChild("Neck")
  145. necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  146. necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  147. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  148. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  149. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  150. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  151. RootPart = Character:WaitForChild("HumanoidRootPart")
  152. RootJoint = RootPart:WaitForChild("RootJoint")
  153. RootCF = euler(-1.57, 0, 3.14)
  154. pi = math.pi
  155. pi2 = pi * 2
  156. sin = math.sin
  157. cos = math.cos
  158. local N = wfc(wfc(Character, "Torso"), "Neck")
  159. local RW = wfc(Character.Torso, "Right Shoulder")
  160. local LW = wfc(Character.Torso, "Left Shoulder")
  161. local RH = wfc(Character.Torso, "Right Hip")
  162. local LH = wfc(Character.Torso, "Left Hip")
  163. local RJ = wfc(wfc(Character, "HumanoidRootPart"), "RootJoint")
  164. local RS, LS = RW, LW
  165. local RootPart = Character.HumanoidRootPart
  166. local DN1 = N.C1
  167. local DRS1 = RS.C1
  168. local DLS1 = LS.C1
  169. local DRH1 = RH.C1
  170. local DLH1 = LH.C1
  171. local DRJ1 = RJ.C1
  172. local RootJoint = RJ
  173. local Neck = N
  174. local RootCF = euler(-1.57, 0, 3.14)
  175. local necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  176. local necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  177. local DN1 = N.C1
  178. local DRS1 = RS.C1
  179. local DLS1 = LS.C1
  180. local DRH1 = RH.C1
  181. local DLH1 = LH.C1
  182. local DRJ1 = RJ.C1
  183. local DN0 = N.C0
  184. local DRS0 = RS.C0
  185. local DLS0 = LS.C0
  186. local DRH0 = RH.C0
  187. local DLH0 = LH.C0
  188. local DRJ0 = RJ.C0
  189. DLH0_ = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  190. DRH0_ = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  191. local sounds = {}
  192. newSound = function(id, parent, name)
  193. local s = Instance.new("Sound", parent or Head)
  194. s.SoundId = "http://www.roblox.com/asset/?id=" .. id
  195. s.Volume = 1
  196. sounds[name or id] = s
  197. end
  198. playSound = function(...)
  199. local ids = {...}
  200. local p = 1
  201. local play = function()
  202. local so = sounds[ids[p]]
  203. if so then
  204. so:Play()
  205. if p < #ids then
  206. p = p + 1
  207. so.Ended:connect(function()
  208. l_0_11_r2()
  209. end)
  210. end
  211. else
  212. warn("sound " .. ids[p] .. " does not exist")
  213. end
  214. end
  215. play()
  216. end
  217. swait = function(num)
  218. if num == 0 or num == nil then
  219. game:service("RunService").Heartbeat:wait(0)
  220. else
  221. for i = 0, num do
  222. game:service("RunService").Heartbeat:wait(0)
  223. end
  224. end
  225. do
  226. return true
  227. end
  228. end
  229. rwait = function(num)
  230. if num == 0 or num == nil then
  231. game:service("RunService").RenderStepped:wait(0)
  232. else
  233. for i = 0, num do
  234. game:service("RunService").RenderStepped:wait(0)
  235. end
  236. end
  237. do
  238. return true
  239. end
  240. end
  241. removeControl = function()
  242. canjump = false
  243. end
  244. resumeControl = function()
  245. canjump = true
  246. end
  247. Humanoid.Changed:connect(function()
  248. if not Equipped then
  249. return
  250. end
  251. if canjump == false then
  252. Humanoid.Jump = false
  253. end
  254. end)
  255. rayCast = function(Pos, End, Max)
  256. local Dir = End - Pos.unit
  257. local ig = {Character}
  258. local get = function(o)
  259. for i,v in ipairs(o:GetChildren()) do
  260. if v:IsA("Model") and v:FindFirstChild("Humanoid") then
  261. table.insert(ig, v)
  262. else
  263. if v:IsA("BasePart") and v.CanCollide == false then
  264. table.insert(ig, v)
  265. end
  266. end
  267. l_0_17_r5(v)
  268. end
  269. end
  270. get(Workspace)
  271. return game:service("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Pos, Dir.unit * (Max or 999.999)), ig)
  272. end
  273. rayCast2 = function(Pos, Dir, Max, Ignore)
  274. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  275. end
  276. clerp = function(a, b, t)
  277. return a:lerp(b, t)
  278. end
  279. Weld = function(X, Y, Zero)
  280. local CJ = CFrame.new(X.Position)
  281. local C0 = X.CFrame:inverse() * CJ
  282. local C1 = Y.CFrame:inverse() * CJ
  283. if Zero then
  284. C0 = CFrame.new()
  285. end
  286. local W = Create("Weld")({Name = "Weld", Parent = X, Part0 = X, Part1 = Y, C0 = C0, C1 = C1})
  287. return W
  288. end
  289. local WeldObjects = function(parent, h)
  290. for i,obj in pairs(parent:GetChildren()) do
  291. if not h and not parent:FindFirstChild("Handle") then
  292. do
  293. Weld(not obj:IsA("BasePart") and not obj:IsA("UnionOperation") or Handle, obj)
  294. obj.Anchored = false
  295. -- DECOMPILER ERROR at PC27: LeaveBlock: unexpected jumping out IF_THEN_STMT
  296.  
  297. -- DECOMPILER ERROR at PC27: LeaveBlock: unexpected jumping out IF_STMT
  298.  
  299. end
  300. end
  301. end
  302. end
  303. local Bezier = {}
  304. Bezier.__index = Bezier
  305. Bezier.new = function(...)
  306. local points = {...}
  307. assert(#points >= 3, "Must have at least 3 points")
  308. local bezier = {}
  309. local V3 = Vector3.new
  310. local lerpV3 = V3().lerp
  311. local lines = {}
  312. local numLines = 0
  313. local finalLine = nil
  314. local CreatePoint = function(v3)
  315. local point = {v3.X, v3.Y, v3.Z}
  316. point.ToVector3 = function(self)
  317. return V3(self[1], self[2], self[3])
  318. end
  319. point.lerp = function(self, other, ratio)
  320. return lerpV3(self:ToVector3(), other:ToVector3(), ratio)
  321. end
  322. return point
  323. end
  324. for i = 1, #points - 1 do
  325. local p1 = CreatePoint(points[i])
  326. local p2 = CreatePoint(points[i + 1])
  327. local line = {p1, p2, CreatePoint(p1)}
  328. lines[#lines + 1] = line
  329. end
  330. do
  331. do
  332. local relativeLines = lines
  333. for n = #lines, 2, -1 do
  334. local newLines = {}
  335. for i = 1, n - 1 do
  336. local l1, l2 = relativeLines[i], relativeLines[i + 1]
  337. local line = {l1[3], l2[3], CreatePoint(l1[3])}
  338. newLines[i] = line
  339. lines[#lines + 1] = line
  340. end
  341. relativeLines = newLines
  342. end
  343. finalLine = relativeLines[1]
  344. numLines = #lines
  345. bezier.Get = function(self, ratio, clampRatio)
  346. -- DECOMPILER ERROR at PC15: Unhandled construct in 'MakeBoolean' P3
  347.  
  348. -- DECOMPILER ERROR at PC15: Unhandled construct in 'MakeBoolean' P3
  349.  
  350. if not clampRatio or ((ratio >= 0 or not 0)) then
  351. for i = 1, numLines do
  352. local line = lines[i]
  353. local mid = line[1]:lerp(line[2], ratio)
  354. local pt = line[3]
  355. pt[1] = mid.X
  356. end
  357. return finalLine[3]:ToVector3()
  358. end
  359. end
  360. bezier.GetPath = function(self, step)
  361. assert(type(step) == "number", "Must provide a step increment")
  362. assert(step > 0 and step < 1, "Step out of domain; should be between 0 and 1 (exclusive)")
  363. local path = {}
  364. local lastI = 0
  365. for i = 0, 1, step do
  366. lastI = i
  367. path[#path + 1] = self:Get(i)
  368. end
  369. if 1 - lastI >= step * 0.5 then
  370. do
  371. do
  372. local overrideLast = lastI >= 1
  373. path[#path + (overrideLast and 0 or 1)] = bezier:Get(1)
  374. do return path end
  375. -- DECOMPILER ERROR: 7 unprocessed JMP targets
  376. end
  377. end
  378. end
  379. end
  380. bezier.GetPoints = function(self)
  381. return points
  382. end
  383. do return setmetatable(bezier, Bezier) end
  384. -- DECOMPILER ERROR: 1 unprocessed JMP targets
  385. end
  386. end
  387. end
  388. Color = function(r, g, b)
  389. return Color3.new(r / 255, g / 255, b / 255)
  390. end
  391. lerp = function(a, b, k)
  392. return a + (b - a) * k
  393. end
  394. SineInOut = function(step)
  395. return 0.5 + math.cos(step * math.pi) * -0.5
  396. end
  397. normalize = function(value, min, max)
  398. return (value - min) / (max - min)
  399. end
  400. RandomCFRot = function()
  401. return CFrame.Angles(math.rad(math.random(360)), math.rad(math.random(360)), math.rad(math.random(360)))
  402. end
  403. NoOutline = function(Part)
  404. Part.TopSurface = 10
  405. end
  406. CreatePart = function()
  407. local part = Instance.new("Part")
  408. part.Size = vt(0.2, 0.2, 0.2)
  409. NoOutline(part)
  410. part.Anchored = true
  411. part.CanCollide = false
  412. local mesh = Instance.new("SpecialMesh", part)
  413. mesh.MeshType = "Brick"
  414. mesh.Scale = vt(5, 5, 5)
  415. return part, mesh
  416. end
  417. zapp = function(p0, p1, partcount, offset, color, transparency, material, size, fade, fadetrans, delay)
  418. if not partcount then
  419. partcount = math.ceil(p0 - p1.magnitude)
  420. end
  421. if not offset then
  422. offset = 2
  423. end
  424. if not color then
  425. color = BrickColor.new("Bright yellow")
  426. end
  427. if type(color) == "string" then
  428. color = BrickColor.new(color)
  429. end
  430. if not transparency then
  431. transparency = 0.5
  432. end
  433. if not material then
  434. material = "Neon"
  435. end
  436. if not size then
  437. size = 0.2
  438. end
  439. if fade == nil then
  440. fade = true
  441. end
  442. if not fadetrans then
  443. fadetrans = 1
  444. end
  445. local parts = {}
  446. local lastpos = p0
  447. local lastranpos = p0
  448. for i = 1, partcount do
  449. local curpos = p0:lerp(p1, i / partcount)
  450. local curranpos = cf(curpos, lastpos) * cf(math.random(-offset * 10, offset * 10) / 10, math.random(-offset * 10, offset * 10) / 10, 0).p
  451. local p, m = CreatePart()
  452. p.BrickColor = color
  453. p.Transparency = transparency
  454. p.Material = material
  455. if i == partcount then
  456. curranpos = curpos
  457. end
  458. local range = lastranpos - curranpos.magnitude
  459. m.Scale = vt(size * 5, size * 5, range * 5)
  460. p.CFrame = cf(lastranpos, curranpos) * cf(0, 0, -range / 2)
  461. p.Parent = Character
  462. if fade then
  463. Effects:add(p, m, fase, nil, fadetrans)
  464. end
  465. table.insert(parts, {part = p, mesh = m})
  466. if delay ~= nil then
  467. if type(delay) == "function" then
  468. delay(curpos, curranpos, lastpos, curranpos, p, m)
  469. else
  470. wait(delay)
  471. end
  472. end
  473. lastpos = curpos
  474. lastranpos = curranpos
  475. end
  476. return parts
  477. end
  478. CheckHumanoidOfPart = function(part)
  479. local h = nil
  480. local h1, h2 = part.Parent:FindFirstChild("Humanoid"), part.Parent.Parent:FindFirstChild("Humanoid")
  481. if h1 then
  482. h = h1
  483. else
  484. if h2 then
  485. h = h2
  486. else
  487. return false
  488. end
  489. end
  490. return h, h.Parent
  491. end
  492. CheckHumanoidOfModel = function(Model)
  493. for i,v in ipairs(Model:GetChildren()) do
  494. if v:IsA("Humanoid") then
  495. return true, v
  496. end
  497. end
  498. end
  499. CheckHumanoid = function(Pos, Rad, MinRad, args)
  500. if not args then
  501. args = {}
  502. end
  503. if not MinRad then
  504. MinRad = 0
  505. end
  506. if DEBUG then
  507. local n = Instance.new("Part")
  508. n.Anchored = true
  509. n.CanCollide = false
  510. n.Transparency = 0.8
  511. n.TopSurface = "Smooth"
  512. n.BottomSurface = "Smooth"
  513. n.Size = Vector3.new(Rad, Rad, Rad)
  514. n.CFrame = CFrame.new(Pos)
  515. local m = Instance.new("SpecialMesh")
  516. m.MeshType = "Sphere"
  517. m.Parent = n
  518. n.Parent = Character
  519. game:GetService("Debris"):AddItem(n, 0.2)
  520. end
  521. do
  522. local Results = {}
  523. for i,v in ipairs(workspace:GetChildren()) do
  524. if v:IsA("Model") then
  525. local go = false
  526. if args.ignoreSelf == true then
  527. go = true
  528. else
  529. if v ~= Character then
  530. go = true
  531. end
  532. end
  533. if go then
  534. local succes, humanoid = CheckHumanoidOfModel(v)
  535. if succes and humanoid.Health > 0 then
  536. for _,b in ipairs(v:GetChildren()) do
  537. if b:IsA("BasePart") then
  538. local Dist = Pos - b.CFrame.p.magnitude
  539. if Dist <= Rad / 2 and MinRad / 2 <= Dist then
  540. table.insert(Results, {Model = v, Humanoid = humanoid, Distance = Dist, HitPart = b})
  541. break
  542. end
  543. end
  544. end
  545. end
  546. end
  547. end
  548. end
  549. table.sort(Results, function(a, b)
  550. do return a.Distance < b.Distance end
  551. -- DECOMPILER ERROR: 1 unprocessed JMP targets
  552. end)
  553. return Results
  554. end
  555. end
  556. so = function(id, par, vol, pit)
  557. local sou = Instance.new("Sound", par or workspace)
  558. sou.Volume = vol
  559. sou.Pitch = pit or 1
  560. sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
  561. sou:play()
  562. game:GetService("Debris"):AddItem(sou, 6)
  563. end
  564. joinTables = function(...)
  565. local tabs = {...}
  566. local newtab = {}
  567. for i,tab in ipairs(tabs) do
  568. for i,v in ipairs(tab) do
  569. table.insert(newtab, v)
  570. end
  571. end
  572. return newtab
  573. end
  574. KnockBack = function(Target, Amount, Dir, Position, Extra, args)
  575. if not args then
  576. args = {}
  577. end
  578. local Torso = Target.Parent:FindFirstChild("Torso")
  579. if not Torso then
  580. return
  581. end
  582. local Vel = nil
  583. if not Extra then
  584. Extra = Vector3.new(0, 0, 0)
  585. end
  586. if Dir then
  587. Vel = Dir * Amount + Extra
  588. else
  589. Dir = Torso.Position - Position.unit
  590. Vel = Dir * Amount + Extra
  591. end
  592. local bf = it("BodyVelocity")
  593. bf.Velocity = Vel
  594. bf.MaxForce = vt(math.huge, math.huge, math.huge)
  595. bf.Parent = Torso
  596. game:GetService("Debris"):AddItem(bf, args.time or 0.2)
  597. end
  598. showDamage = function(Hum, Dealt, Type)
  599. if not DmgPart then
  600. warn("Dont have DmgPart loaded")
  601. return
  602. end
  603. local color = nil
  604. local font = "SourceSans"
  605. if Type == "Damage" then
  606. if Dealt == "Blocked" then
  607. color = BrickColor.new("Bright blue").Color
  608. else
  609. if Dealt < 3 then
  610. color = BrickColor.new("White").Color
  611. else
  612. if Dealt >= 3 and Dealt < 20 then
  613. color = BrickColor.new("Bright yellow").Color
  614. else
  615. color = BrickColor.new("Really red").Color
  616. font = "SourceSansBold"
  617. end
  618. end
  619. end
  620. else
  621. if Type == "Heal" then
  622. color = BrickColor.new("Bright green").Color
  623. end
  624. end
  625. local p = DmgPart:Clone()
  626. local b = p:WaitForChild("Bill")
  627. local t = b:WaitForChild("Label")
  628. if Hum:findFirstChild("Head") ~= nil then
  629. p.CFrame = cf(Hum.Head.CFrame.p + vt(math.random(-100, 100) / 100, 2, math.random(-100, 100) / 100))
  630. else
  631. if Hum.Parent:findFirstChild("Head") ~= nil then
  632. p.CFrame = cf(Hum.Parent.Head.CFrame.p + vt(math.random(-100, 100) / 100, 2, math.random(-100, 100) / 100))
  633. end
  634. end
  635. t.Font = font
  636. t.TextColor3 = color
  637. t.Text = Dealt
  638. p.Parent = Character
  639. local lp = p.CFrame
  640. spawn(function()
  641. for i = 0, 10 do
  642. swait()
  643. p.CFrame = p.CFrame:lerp(lp * cf(0, 1, 0), 0.1)
  644. t.TextTransparency = lerp(1, 0, i / 10)
  645. end
  646. wait(1)
  647. local lp = p.CFrame
  648. for i = 0, 10 do
  649. swait()
  650. p.CFrame = p.CFrame:lerp(lp * cf(0, 5, 0), 0.1)
  651. t.TextTransparency = lerp(0, 1, i / 10)
  652. end
  653. game:GetService("Debris"):AddItem(p, 0.1)
  654. end)
  655. end
  656. takeDamage = function(Target, Min, Max, args)
  657. if not args then
  658. args = {}
  659. end
  660. local h = Target
  661. local hit = Target.Parent:FindFirstChild("Torso")
  662. if not hit then
  663. return 0
  664. end
  665. local succes = true
  666. local blocked = false
  667. local enblock = false
  668. local staggering = false
  669. if DEBUG then
  670. local nrargs = 0
  671. for i,v in pairs(args) do
  672. nrargs = nrargs + 1
  673. end
  674. if nrargs > 0 then
  675. print("Damage - Arguments")
  676. for i,v in pairs(args) do
  677. print("\t" .. tostring(i) .. " = " .. tostring(v))
  678. end
  679. end
  680. end
  681. do
  682. local dmg = math.random(Min, Max)
  683. if args.maxDamage and args.maxDamage < dmg then
  684. dmg = args.maxDamage
  685. end
  686. if dmg <= 3 and dmg > 0 and blocked ~= true and not args.noSound then
  687. local hitnum = math.random(1, 5)
  688. if hitnum == 1 then
  689. so("199149321", hit, 1, 1)
  690. else
  691. if hitnum == 2 then
  692. so("199149338", hit, 1, 1)
  693. else
  694. if hitnum == 3 then
  695. so("199149367", hit, 1, 1)
  696. else
  697. if hitnum == 4 then
  698. so("199149409", hit, 1, 1)
  699. else
  700. if hitnum == 5 then
  701. so("199149452", hit, 1, 1)
  702. end
  703. end
  704. end
  705. end
  706. end
  707. else
  708. do
  709. do
  710. if blocked ~= true and dmg > 0 and not args.noSound then
  711. local hitnum = math.random(1, 6)
  712. if hitnum == 1 then
  713. so("199149137", hit, 1, 1)
  714. else
  715. if hitnum == 2 then
  716. so("199149186", hit, 1, 1)
  717. else
  718. if hitnum == 3 then
  719. so("199149221", hit, 1, 1)
  720. else
  721. if hitnum == 4 then
  722. so("199149235", hit, 1, 1)
  723. else
  724. if hitnum == 5 then
  725. so("199149269", hit, 1, 1)
  726. else
  727. if hitnum == 6 then
  728. so("199149297", hit, 1, 1)
  729. end
  730. end
  731. end
  732. end
  733. end
  734. end
  735. end
  736. dmg = math.floor(dmg)
  737. coroutine.resume(coroutine.create(function(Hum, Dam)
  738. Hum.Health = Hum.Health - Dam
  739. end), h, dmg)
  740. local col = "Damage"
  741. if dmg < 0 then
  742. dmg = dmg * -1
  743. col = "Heal"
  744. end
  745. args.TextColor = col
  746. local disp = dmg
  747. if not DEBUG then
  748. disp = math.floor(dmg + 0.5)
  749. end
  750. showDamage(Target, disp, col)
  751. return dmg, succes
  752. end
  753. end
  754. end
  755. end
  756. end
  757. lerp = function(a, b, k)
  758. return a + (b - a) * k
  759. end
  760. CFrameFromTopBack = function(at, top, back)
  761. local right = top:Cross(back)
  762. return CFrame.new(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  763. end
  764. Triangle = function(a, b, c)
  765. local edg1 = c - a:Dot(b - a.unit)
  766. local edg2 = a - b:Dot(c - b.unit)
  767. local edg3 = b - c:Dot(a - c.unit)
  768. if edg1 <= b - a.magnitude and edg1 >= 0 then
  769. a = a
  770. else
  771. -- DECOMPILER ERROR at PC35: Overwrote pending register: R1 in 'AssignReg'
  772.  
  773. if edg2 <= c - b.magnitude and edg2 >= 0 then
  774. a = b
  775. else
  776. -- DECOMPILER ERROR at PC46: Overwrote pending register: R2 in 'AssignReg'
  777.  
  778. -- DECOMPILER ERROR at PC47: Overwrote pending register: R1 in 'AssignReg'
  779.  
  780. if edg3 <= a - c.magnitude and edg3 >= 0 then
  781. a = c
  782. else
  783. warn("unreachable")
  784. return
  785. end
  786. end
  787. end
  788. local len1 = c - a:Dot(b - a.unit)
  789. local len2 = b - a.magnitude - len1
  790. local width = a + b - a.unit * len1 - c.magnitude
  791. local maincf = CFrameFromTopBack(a, b - a:Cross(c - b).unit, -b - a.unit)
  792. local list = {}
  793. if len1 > 0.01 then
  794. local w1 = Instance.new("WedgePart")
  795. game:GetService("Debris"):AddItem(w1, 5)
  796. w1.BrickColor = BrickColor.new("Sea green")
  797. w1.Transparency = 0
  798. w1.Reflectance = 0
  799. w1.Material = "Neon"
  800. w1.CanCollide = false
  801. NoOutline(w1)
  802. local sz = Vector3.new(0.2, width, len1)
  803. w1.Size = sz
  804. local sp = Instance.new("SpecialMesh", w1)
  805. sp.MeshType = "Wedge"
  806. sp.Scale = Vector3.new(0, 1, 1) * sz / w1.Size
  807. w1:BreakJoints()
  808. w1.Anchored = true
  809. w1.Parent = Character
  810. w1.Transparency = 0.5
  811. w1.CFrame = maincf * CFrame.Angles(math.pi, 0, math.pi / 2) * CFrame.new(0, width / 2, len1 / 2)
  812. table.insert(list, w1)
  813. Effects:add(w1, sp, false, nil, 1, 1)
  814. end
  815. do
  816. if len2 > 0.01 then
  817. local w2 = Instance.new("WedgePart")
  818. game:GetService("Debris"):AddItem(w2, 5)
  819. w2.BrickColor = BrickColor.new("Sea green")
  820. w2.Transparency = 0
  821. w2.Reflectance = 0
  822. w2.Material = "Neon"
  823. w2.CanCollide = false
  824. NoOutline(w2)
  825. local sz = Vector3.new(0.2, width, len2)
  826. w2.Size = sz
  827. local sp = Instance.new("SpecialMesh", w2)
  828. sp.MeshType = "Wedge"
  829. sp.Scale = Vector3.new(0, 1, 1) * sz / w2.Size
  830. w2:BreakJoints()
  831. w2.Anchored = true
  832. w2.Parent = Character
  833. w2.Transparency = 0.5
  834. w2.CFrame = maincf * CFrame.Angles(math.pi, math.pi, -math.pi / 2) * CFrame.new(0, width / 2, -len1 - len2 / 2)
  835. table.insert(list, w2)
  836. Effects:add(w2, sp, false, nil, 1, 1)
  837. end
  838. do
  839. return unpack(list)
  840. end
  841. end
  842. end
  843. local lp = {cf(), cf(), cf(), cf()}
  844. local pop = false
  845. local off1, off2 = cf(0, 0, -1), cf(0, 0, -9)
  846. game:GetService("RunService").RenderStepped:connect(function(step)
  847. if not pop then
  848. return
  849. end
  850. lp[1] = lp[3]
  851. lp[3] = Handle.CFrame * off1
  852. lp[4] = Handle.CFrame * off2
  853. Triangle(lp[1].p, lp[2].p, lp[3].p)
  854. Triangle(lp[3].p, lp[4].p, lp[2].p)
  855. end)
  856. resumeTrail = function()
  857. pop = true
  858. lp[3] = Handle.CFrame * off1
  859. lp[4] = Handle.CFrame * off2
  860. end
  861. stopTrail = function()
  862. pop = false
  863. end
  864. if not Player:FindFirstChild("Assets") or not Player:FindFirstChild("Amaranth") then
  865. if game:GetService("RunService"):IsStudio() == false and game.PlaceId ~= 340744170 then
  866. NS(" \t\tlocal assetId = 421784493\n \t\tasset = require(assetId)()\n\n \t\tasset[1].Parent = script.Parent.Parent\n asset[2].Parent = script.Parent.Parent\n \t", Player.Backpack)
  867. print("Getting models")
  868. Assets = Player:WaitForChild("Assets"):Clone()
  869. print("Got assets")
  870. Hammer = Player:WaitForChild("Amaranth"):Clone()
  871. print("Got tool")
  872. else
  873. asset = require(script:WaitForChild("MainModule"))()
  874. Assets = asset[1]
  875. Hammer = asset[2]
  876. end
  877. else
  878. Assets = Player:FindFirstChild("Assets"):Clone()
  879. Hammer = Player:FindFirstChild("Amaranth"):Clone()
  880. end
  881. Ring = Assets:WaitForChild("Ring")
  882. Diamond = Assets:WaitForChild("Diamond")
  883. DmgPart = Assets:WaitForChild("DmgPart")
  884. Wave = Assets:WaitForChild("Wave")
  885. Handle = Hammer:WaitForChild("Handle")
  886. WeldObjects(Hammer, Handle)
  887. FakeHammer = Hammer:Clone()
  888. local W = Weld(Torso, Handle)
  889. W.C0 = cf(0, 0, 0.5)
  890. W.C1 = cf(0, 0, 0) * angles(0, 0, 1)
  891. local FakeW = Weld(Handle, FakeHammer:WaitForChild("Handle"))
  892. FakeW.C0 = cf()
  893. FakeW.C1 = cf()
  894. MainOrb = {}
  895. local p, m = CreatePart()
  896. p.Transparency = 0.5
  897. p.Anchored = false
  898. p.Material = "Neon"
  899. p.BrickColor = BrickColor.new("Navy blue")
  900. p.Size = vt(0.8, 0.8, 0.8)
  901. m.Scale = vt(1, 1, 1)
  902. m.MeshType = "Sphere"
  903. MainOrb[1] = {p = p, m = m}
  904. local p, m = CreatePart()
  905. p.Transparency = 0.5
  906. p.Anchored = false
  907. p.Material = "Neon"
  908. p.BrickColor = BrickColor.new("Cyan")
  909. p.Size = vt(0.6, 0.6, 0.6)
  910. m.Scale = vt(1, 1, 1)
  911. m.MeshType = "Sphere"
  912. MainOrb[2] = {p = p, m = m}
  913. local p, m = CreatePart()
  914. p.Transparency = 0.5
  915. p.Anchored = false
  916. p.Material = "Neon"
  917. p.BrickColor = BrickColor.new("Pastel light blue")
  918. p.Size = vt(0.3, 0.3, 0.3)
  919. m.Scale = vt(1, 1, 1)
  920. m.MeshType = "Sphere"
  921. MainOrb[3] = {p = p, m = m}
  922. Weld(MainOrb[2].p, MainOrb[1].p, true)
  923. Weld(MainOrb[3].p, MainOrb[1].p, true)
  924. Weld(MainOrb[1].p, Hammer:WaitForChild("OrbPos"), true)
  925. MainOrb[1].p.Parent = Character
  926. MainOrb[2].p.Parent = Character
  927. MainOrb[3].p.Parent = Character
  928. Hammer.Parent = Character
  929. time = 0
  930. gstep = 0
  931. local prevX, prevY = 0, 0
  932. local LookMode = "Camera"
  933. local cols = {"Black", "Pastel light blue", "Cyan", "Navy blue", "Light blue", "Pastel blue"}
  934. lookAtTarget = function()
  935. local pos = N.Part0.CFrame * Vector3.new(0, 1.5, 0)
  936. local hit = nil
  937. if LookMode == "Camera" then
  938. _ = rayCast(Camera.CFrame.p, Camera.CFrame * cf(0, 0, -1).p)
  939. else
  940. -- DECOMPILER ERROR at PC36: Overwrote pending register: R1 in 'AssignReg'
  941.  
  942. end
  943. -- DECOMPILER ERROR at PC49: Overwrote pending register: R1 in 'AssignReg'
  944.  
  945. if LookMode ~= "Mouse" or LookMode == "AtCamera" then
  946. local diff = hit - pos.unit
  947. local lookVector = N.Part0.CFrame.lookVector
  948. local zAn = math.atan2(lookVector.Z, lookVector.X)
  949. local tAn = math.atan2(diff.Z, diff.X)
  950. local xDiff = zAn - tAn
  951. local yDiff = -math.asin(diff.Y)
  952. if math.pi < xDiff then
  953. xDiff = -math.pi * 2 + xDiff
  954. else
  955. if xDiff < -math.pi then
  956. xDiff = math.pi * 2 + (xDiff)
  957. end
  958. end
  959. xDiff = math.max(-1, math.min(1, xDiff))
  960. yDiff = math.max(-0.8, math.min(0.6, yDiff))
  961. prevX = prevX * 0.8 + xDiff * 0.2
  962. prevY = prevY * 0.8 + yDiff * 0.2
  963. prevX = prevX / 4 * 3
  964. prevY = prevY / 4 * 3
  965. N.C0 = clerp(N.C0, DN0 * angles(0, 0, prevX) * angles(prevY, 0, 0), 0.2)
  966. end
  967. end
  968. run = false
  969. ticks = 0
  970. game:GetService("RunService").RenderStepped:connect(function(step)
  971. ticks = ticks + 1
  972. gstep = step
  973. time = time + step
  974. if run and Anim == "Walk" then
  975. Camera.FieldOfView = lerp(Camera.FieldOfView, 85, 0.2)
  976. else
  977. Camera.FieldOfView = lerp(Camera.FieldOfView, 70, 0.05)
  978. end
  979. local cdist = Head.CFrame.p - Camera.CFrame.p.magnitude
  980. if cdist < 3 then
  981. FakeW = Weld(Handle, FakeHammer:WaitForChild("Handle"))
  982. FakeW.C0 = cf()
  983. FakeW.C1 = cf()
  984. FakeHammer.Parent = Camera
  985. else
  986. FakeHammer.Parent = nil
  987. end
  988. if ticks % 30 == 0 then
  989. local p, m = CreatePart()
  990. p.Transparency = 0
  991. p.Anchored = true
  992. p.Material = "Neon"
  993. p.BrickColor = BrickColor.new(cols[math.random(1, #cols)])
  994. p.Size = vt(0.2, 0.2, 0.2)
  995. m.Scale = vt(1, 1, 1)
  996. p.CFrame = Hammer.OrbPos.CFrame
  997. Effects:add(p, m, false, vt(0, 0, 0), 3, nil, p.CFrame * RandomCFRot() * cf(math.random(2, 3), 0, 0) * RandomCFRot(), 0.1)
  998. p.Parent = workspace
  999. local p, m = CreatePart()
  1000. p.Transparency = 0
  1001. p.Anchored = false
  1002. p.Material = "Neon"
  1003. p.BrickColor = BrickColor.new(cols[math.random(1, #cols)])
  1004. p.Size = vt(1, 1, 1)
  1005. m.Scale = vt(0, 0, 0)
  1006. p.CFrame = Hammer.OrbPos.CFrame * RandomCFRot()
  1007. Weld(p, Hammer.OrbPos)
  1008. Effects:add(p, m, false, vt(1, 1, 1), 1)
  1009. p.Parent = workspace
  1010. end
  1011. do
  1012. if not Equipped then
  1013. return
  1014. end
  1015. local torvel = RootPart.Velocity * Vector3.new(1, 0, 1).magnitude
  1016. local velderp = RootPart.Velocity.y
  1017. local hitfloor, posfloor = rayCast2(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1018. if Anim == "Walk" and canwalk then
  1019. if run == false then
  1020. local t = 10 * gstep
  1021. local t2 = torvel / 120 * 100 * gstep
  1022. if t > 0.9 then
  1023. t = 0.9
  1024. end
  1025. if t2 > 0.9 then
  1026. t2 = 0.9
  1027. end
  1028. RH.C1 = clerp(RH.C1, DRH1 * cf(sin(time * 8 + 1) / 2, sin(time * 8 + 1) / 3, 0) * euler(0, 0, sin(time * 8) * 0.9), t2)
  1029. LH.C1 = clerp(LH.C1, DLH1 * cf(sin(time * 8 + 1) / 2, -sin(time * 8 + 1) / 3, 0) * euler(0, 0, sin(time * 8) * 0.9), t2)
  1030. if not deb then
  1031. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(0.2, 0, 0), t)
  1032. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1033. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * angles(0.1, 0, -0.2 + sin(time * 8) / 2) * angles(0, 0, 0), t2)
  1034. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 0.4) * angles(0, 0, 0), t)
  1035. RJ.C1 = clerp(RJ.C1, DRJ1 * cf(0, 0, 0) * angles(-0.1, 0, 0), t)
  1036. N.C1 = clerp(N.C1, DN1 * cf() * angles(0.08 + sin(time * 4) / 25, 0, 0), t)
  1037. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time * 16) / 20) * angles(0, 0, 0), t)
  1038. lookAtTarget()
  1039. LS.C0 = clerp(LS.C0, DLS0 * cf(0, -0.05 + sin(time * 16) / 20, 0) * angles(0, 0, 0), t)
  1040. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time * 16) / 20, 0) * angles(0, 0, 0), t)
  1041. LH.C0 = clerp(LH.C0, DLH0_ * cf(0, -sin(time * 16) / 20, 0) * angles(0, 0, 0), t)
  1042. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time * 16) / 20, 0) * angles(0, 0, 0), t)
  1043. end
  1044. else
  1045. do
  1046. local t = 10 * gstep
  1047. local t2 = torvel / 120 * 100 * gstep
  1048. if t > 1 then
  1049. t = 1
  1050. end
  1051. if t2 > 1 then
  1052. t2 = 1
  1053. end
  1054. RH.C1 = clerp(RH.C1, DRH1 * cf(sin(time * 9 + 1) / 2, sin(time * 9 + 1) / 3, 0) * euler(0, 0, sin(time * 9) * 1.2), t2)
  1055. LH.C1 = clerp(LH.C1, DLH1 * cf(sin(time * 9 + 1) / 2, -sin(time * 9 + 1) / 3, 0) * euler(0, 0, sin(time * 9) * 1.2), t2)
  1056. do
  1057. if not deb then
  1058. local t = 0.1
  1059. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(0.2, 0, 0), t)
  1060. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 4, 0), t)
  1061. RS.C1 = clerp(RS.C1, DRS1 * cf(0, 0, 0) * angles(0.1, 0, -0.2 - sin(time * 9) * 1.4) * angles(0, 0, 0), t2)
  1062. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, -1) * angles(0, 0, 0), t)
  1063. RJ.C1 = clerp(RJ.C1, DRJ1 * cf(0, 0, 0) * angles(-0.3, 0, 0), t)
  1064. N.C1 = clerp(N.C1, DN1 * cf() * angles(0.1 + sin(time * 4) / 25, 0, 0), t)
  1065. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time * 18) / 10) * angles(0, 0, 0), t)
  1066. N.C0 = clerp(N.C0, DN0, t)
  1067. LS.C0 = clerp(LS.C0, DLS0 * cf(0, -0.05 + sin(time * 18) / 20, 0) * angles(0, 0, 0), t)
  1068. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time * 18) / 20, 0) * angles(0, 0, 0), t)
  1069. LH.C0 = clerp(LH.C0, DLH0_ * cf(0, -sin(time * 18) / 10, 0) * angles(0, 0, 0), t)
  1070. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time * 18) / 10, 0) * angles(0, 0, 0), t)
  1071. end
  1072. do
  1073. if Anim == "Idle" then
  1074. local t = 10 * gstep
  1075. if t > 1 then
  1076. t = 1
  1077. end
  1078. if deb == false then
  1079. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(0.2, 0, 0), t)
  1080. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1081. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.15 + sin(time + 1) / 10, 0, 0) * angles(0, 0, 0), t)
  1082. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 1.3) * angles(0, 0, 0), t)
  1083. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0), t)
  1084. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(-0.04 + sin(time + 1) / 15, 0, 0), t)
  1085. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1086. lookAtTarget()
  1087. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1088. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1089. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.05, 0.1, 0) * angles(0, 0, 0), t)
  1090. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.05, -0.1, 0) * angles(0, 0, 0), t)
  1091. end
  1092. if canwalk then
  1093. RH.C1 = clerp(RH.C1, DRH1 * cf() * angles(0, 0, 0), t)
  1094. LH.C1 = clerp(LH.C1, DLH1 * cf() * angles(0, 0, 0), t)
  1095. end
  1096. end
  1097. if RootPart.Velocity.y > 1 and hitfloor == nil then
  1098. Anim = "Jump"
  1099. jumping = true
  1100. if deb == false then
  1101. t = 20 * gstep
  1102. N.C0 = clerp(N.C0, necko * euler(-0.2, 0, 0), 0.1)
  1103. Neck.C1 = clerp(Neck.C1, necko2 * euler(0, 0, 0), 0.1)
  1104. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(-0.2, 0, 0), 0.1)
  1105. RS.C0 = clerp(RS.C0, cf(1.5, 0.5, 0) * euler(-0.8, 0, 0.2), 0.1)
  1106. RS.C1 = clerp(RS.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.1)
  1107. LS.C0 = clerp(LS.C0, cf(-1.5, 0.5, 0) * euler(-0.8, 0, -0.2), 0.1)
  1108. LS.C1 = clerp(LS.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.1)
  1109. RH.C0 = clerp(RH.C0, cf(1, -1, -0.3) * euler(-0.5, 1.57, 0) * euler(-0.2, 0, 0), 0.1)
  1110. LH.C0 = clerp(LH.C0, cf(-1, -1, -0.3) * euler(-0.5, -1.57, 0) * euler(-0.2, 0, 0), 0.1)
  1111. end
  1112. if canwalk then
  1113. LH.C1 = clerp(LH.C1, DLH1, 0.1)
  1114. RH.C1 = clerp(RH.C1, DRH1, 0.1)
  1115. end
  1116. else
  1117. if RootPart.Velocity.y < -1 and hitfloor == nil then
  1118. Anim = "Fall"
  1119. jumping = true
  1120. if deb == false then
  1121. t = 10 * gstep
  1122. Neck.C0 = clerp(Neck.C0, necko * euler(0.4, 0, 0), 0.1)
  1123. Neck.C1 = clerp(Neck.C1, necko2 * euler(0, 0, 0), 0.1)
  1124. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0.2, 0, 0), 0.15)
  1125. RS.C0 = clerp(RS.C0, cf(1.5, 0.5, 0) * euler(0.1, 0, 1), 0.1)
  1126. RS.C1 = clerp(RS.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.1)
  1127. LS.C0 = clerp(LS.C0, cf(-1.5, 0.5, 0) * euler(0.1, 0, -1), 0.1)
  1128. LS.C1 = clerp(LS.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.1)
  1129. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0.4, 1.57, 0), 0.1)
  1130. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(-0.2, -1.57, 0), 0.1)
  1131. end
  1132. if canwalk then
  1133. LH.C1 = clerp(LH.C1, DLH1, 0.1)
  1134. RH.C1 = clerp(RH.C1, DRH1, 0.1)
  1135. end
  1136. else
  1137. if torvel < 1 and hitfloor ~= nil then
  1138. jumping = false
  1139. Anim = "Idle"
  1140. else
  1141. if torvel > 2 and torvel < 100 and hitfloor ~= nil then
  1142. jumping = false
  1143. Anim = "Walk"
  1144. end
  1145. end
  1146. end
  1147. end
  1148. if curkeys ~= "" then
  1149. curinactive = curinactive + step
  1150. end
  1151. if curmaxinactive <= curinactive then
  1152. curinactive = 0
  1153. curkeys = ""
  1154. end
  1155. if safehum then
  1156. Humanoid.PlatformStand = false
  1157. Humanoid.Sit = false
  1158. end
  1159. end
  1160. end
  1161. end
  1162. end
  1163. end
  1164. end
  1165. end)
  1166. genBody = function()
  1167. local n = Create("BodyPosition")({MaxForce = vt(math.huge, math.huge, math.huge), D = 500})
  1168. return n
  1169. end
  1170. local body, body2 = nil, nil
  1171. lasthit = nil
  1172. MagHitInit = function(dmgmin, dmgmax, magargs, dmgargs, callback)
  1173. if (not callback and magargs) or not dmgargs then
  1174. local data = {
  1175. Hit = {}
  1176. , callback = function()
  1177. end, min = dmgmin, max = dmgmax,
  1178. magargs = {}
  1179. ,
  1180. dmgargs = {}
  1181. }
  1182. data.check = function(self, pos, range, minrange)
  1183. local Results = CheckHumanoid(pos, range, minrange or nil, self.magargs)
  1184. for _,Result in ipairs(Results) do
  1185. local go = true
  1186. for _,v in ipairs(self.Hit) do
  1187. if Result.Humanoid == v then
  1188. go = false
  1189. break
  1190. end
  1191. end
  1192. do
  1193. if go then
  1194. table.insert(self.Hit, Result.Humanoid)
  1195. local _, s = takeDamage(Result.Humanoid, self.min, self.max, self.dmgargs)
  1196. if s then
  1197. self.callback(Result)
  1198. end
  1199. end
  1200. do
  1201. -- DECOMPILER ERROR at PC42: LeaveBlock: unexpected jumping out DO_STMT
  1202.  
  1203. end
  1204. end
  1205. end
  1206. end
  1207. data.refresh = function(self)
  1208. self.Hit = {}
  1209. end
  1210. return data
  1211. end
  1212. end
  1213. loop = function(time, func)
  1214. local loopev, ended = nil, nil
  1215. local total = 0
  1216. loopev = game:GetService("RunService").RenderStepped:connect(function(step)
  1217. total = total + step
  1218. func(step, total)
  1219. if time <= total then
  1220. loopev:disconnect()
  1221. ended = true
  1222. end
  1223. end)
  1224. repeat
  1225. wait()
  1226. until ended
  1227. end
  1228. DEBUG = false
  1229. local mouseEnabled = false
  1230. local mouseCombo = 0
  1231. local mouseMax = 0
  1232. mousecombo = function()
  1233. deb = true
  1234. while mouseEnabled do
  1235. if mouseMax < mouseCombo then
  1236. mouseCombo = 0
  1237. end
  1238. if mouseCombo == 0 then
  1239. wait()
  1240. end
  1241. mouseCombo = mouseCombo + 1
  1242. end
  1243. deb = false
  1244. end
  1245. shield = false
  1246. looping = false
  1247. keycombo = function(keys)
  1248. if deb then
  1249. return
  1250. end
  1251. local reset = function()
  1252. curkeys = ""
  1253. curinactive = 0
  1254. end
  1255. if keys == "Z" then
  1256. deb = true
  1257. local parts = {}
  1258. do
  1259. local sp = Stats.Speed:add(nil, -0.5)
  1260. loop(1, function(step, total)
  1261. local t = 5 * step
  1262. if t > 1 then
  1263. t = 1
  1264. end
  1265. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(-0.2, 0, 0), t)
  1266. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1267. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.15 + sin(time + 1) / 10, 0, 0) * angles(0, 0, 0), t)
  1268. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 2) * angles(0, 0, 0), t)
  1269. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0.4), t)
  1270. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(0.2 + sin(time + 1) / 15, 0, -0.3), t)
  1271. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1272. N.C0 = clerp(N.C0, DN0, t)
  1273. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1274. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1275. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1276. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1277. local p, m = CreatePart()
  1278. p.Transparency = 0.5
  1279. p.Anchored = true
  1280. p.Material = "Neon"
  1281. p.BrickColor = BrickColor.new(cols[math.random(1, #cols)])
  1282. p.Size = vt(0.2, 0.2, 0.2)
  1283. m.Scale = vt(1, 1, 1)
  1284. p.CFrame = Hammer.OrbPos.CFrame
  1285. p.Parent = Character
  1286. table.insert(parts, {p = p, m = m, r = math.random(0, pi * 2 * 100) / 100, s = math.random(1, 20) / 10})
  1287. for i,v in ipairs(parts) do
  1288. v.p.CFrame = v.p.CFrame:lerp(cf(Hammer.OrbPos.CFrame.p) * cf(sin(time * 5 + v.r) * (v.s + total), sin(time * 2 + v.r) / 3, cos(time * 5 + v.r) * (v.s + total)), 0.5) * RandomCFRot()
  1289. end
  1290. end)
  1291. local etime = time
  1292. local r = Ring:Clone()
  1293. local rm = r:WaitForChild("Mesh")
  1294. r.CanCollide = false
  1295. r.Anchored = true
  1296. r.BrickColor = BrickColor.new("Pastel light blue")
  1297. r.CFrame = cf(Hammer.OrbPos.CFrame.p) * angles(pi / 2, 0, 0)
  1298. Effects:add(r, rm, false, vt(20, 20, 2), 1)
  1299. r.Parent = Character
  1300. loop(0.2, function(step, total)
  1301. local t = 20 * step
  1302. if t > 1 then
  1303. t = 1
  1304. end
  1305. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(0.2, 0, 0), t)
  1306. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1307. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.15 + sin(time + 1) / 10, 0, 0) * angles(0, 0, 0), t)
  1308. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 1.2) * angles(0, 0, 0), t)
  1309. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0.4), t)
  1310. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(0 + sin(time + 1) / 15, 0, -0.3), t)
  1311. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1312. N.C0 = clerp(N.C0, DN0, t)
  1313. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1314. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1315. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1316. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1317. if r then
  1318. r.CFrame = cf(Hammer.OrbPos.CFrame.p) * angles(pi / 2, 0, 0)
  1319. end
  1320. for i,v in ipairs(parts) do
  1321. v.p.CFrame = v.p.CFrame:lerp(cf(Hammer.OrbPos.CFrame.p) * cf(sin(etime + v.r) * v.s * 4, 0, cos(etime + v.r) * v.s * 4), 0.5) * RandomCFRot()
  1322. end
  1323. end)
  1324. local hit = MagHitInit(20, 30, nil, nil, function(Result)
  1325. KnockBack(Result.Humanoid, 30, nil, Hammer.OrbPos.CFrame.p + vt(0, -5, 0), vt(0, 10, 0))
  1326. end)
  1327. hit:check(Hammer.OrbPos.CFrame.p, 30)
  1328. for i,v in ipairs(parts) do
  1329. local p, m = v.p, v.m
  1330. Effects:add(p, m, false, vt(1, 1, 1), math.random(10, 20) / 100, 60)
  1331. end
  1332. sp:remove()
  1333. deb = false
  1334. reset()
  1335. end
  1336. else
  1337. do
  1338. if keys == "X" then
  1339. deb = true
  1340. local parts = {}
  1341. local cp = function()
  1342. local d = {}
  1343. local p, m = CreatePart()
  1344. p.Transparency = 0.5
  1345. p.Anchored = true
  1346. p.Material = "Neon"
  1347. p.BrickColor = BrickColor.new("Pastel light blue")
  1348. p.Size = vt(0.4, 0.4, 0.4)
  1349. m.Scale = vt(1, 1, 1)
  1350. m.MeshType = "Sphere"
  1351. p.CFrame = Hammer.OrbPos.CFrame
  1352. p.Parent = Character
  1353. d[1] = {p = p, m = m}
  1354. local p, m = CreatePart()
  1355. p.Transparency = 0.5
  1356. p.Anchored = true
  1357. p.Material = "Neon"
  1358. p.BrickColor = BrickColor.new("Cyan")
  1359. p.Size = vt(0.2, 0.2, 0.2)
  1360. m.Scale = vt(1, 1, 1)
  1361. m.MeshType = "Sphere"
  1362. p.CFrame = Hammer.OrbPos.CFrame
  1363. p.Parent = Character
  1364. d[2] = {p = p, m = m}
  1365. local p, m = CreatePart()
  1366. p.Transparency = 0.8
  1367. p.Anchored = true
  1368. p.Material = "Neon"
  1369. p.BrickColor = BrickColor.new("Navy blue")
  1370. p.Size = vt(0.6, 0.6, 0.6)
  1371. m.Scale = vt(1, 1, 1)
  1372. p.CFrame = Hammer.OrbPos.CFrame
  1373. p.Parent = Character
  1374. d[3] = {p = p, m = m}
  1375. table.insert(parts, d)
  1376. return parts[#parts]
  1377. end
  1378. for i = 1, 6 do
  1379. cp()
  1380. end
  1381. loop(1, function(step, total)
  1382. local t = 10 * step
  1383. if t > 1 then
  1384. t = 1
  1385. end
  1386. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(-0.3, 0, 0), t)
  1387. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2 + total * 20, 0), t)
  1388. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.15 + sin(time + 1) / 10, 0, 0) * angles(0, 0, 0), t)
  1389. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 2.5) * angles(0, 0, 0), t)
  1390. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0.4), t)
  1391. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(0.2 + sin(time + 1) / 15, 0, -0.3), t)
  1392. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1393. N.C0 = clerp(N.C0, DN0, t)
  1394. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1395. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1396. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1397. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1398. for i,d in ipairs(parts) do
  1399. d[1].p.CFrame = d[1].p.CFrame:lerp(LeftArm.CFrame * cf(0, -1, 0) * cf(sin(pi2 / #parts * i + time) * 6, 0, cos(pi2 / #parts * i + time) * 6), 0.1)
  1400. d[2].p.CFrame = d[1].p.CFrame
  1401. d[3].p.CFrame = d[1].p.CFrame * RandomCFRot()
  1402. end
  1403. end)
  1404. loop(0.1, function(step, total)
  1405. local t = 20 * step
  1406. if t > 1 then
  1407. t = 1
  1408. end
  1409. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(0, 0, 0), t)
  1410. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1411. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.15 + sin(time + 1) / 10, 0, 0) * angles(0, 0, 0), t)
  1412. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 1.2) * angles(0, 0, 0), t)
  1413. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0.4), t)
  1414. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(0 + sin(time + 1) / 15, 0, -0.3), t)
  1415. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1416. N.C0 = clerp(N.C0, DN0, t)
  1417. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1418. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1419. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1420. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1421. end)
  1422. loop(0.1, function(step, total)
  1423. local t = 20 * step
  1424. if t > 1 then
  1425. t = 1
  1426. end
  1427. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(0, 0, 0), t)
  1428. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1429. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.3, 0, -pi / 2) * angles(0, 0, 0), t)
  1430. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 1.2) * angles(0, 0, 0), t)
  1431. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, -0.4), t)
  1432. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(0 + sin(time + 1) / 15, 0, 0.3), t)
  1433. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1434. N.C0 = clerp(N.C0, DN0, t)
  1435. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1436. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1437. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1438. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1439. end)
  1440. local rp = RootPart.CFrame
  1441. spawn(function()
  1442. local p = cf()
  1443. local hit = MagHitInit(15, 20, nil, nil, function(Result)
  1444. KnockBack(Result.Humanoid, 30, nil, p.p)
  1445. end)
  1446. local seed = math.random(0, 10) / 10
  1447. loop(5, function(step, total)
  1448. local t = 3 * step
  1449. if t > 1 then
  1450. t = 1
  1451. end
  1452. if ticks % 10 == 0 then
  1453. hit:refresh()
  1454. end
  1455. local n = math.abs(math.noise(total / 10) * 10, seed) + 1
  1456. p = rp * cf(0, 0, -total * 10 * 4)
  1457. for i,d in ipairs(parts) do
  1458. d[1].p.CFrame = d[1].p.CFrame:lerp(p * cf(sin(pi2 / #parts * i + time) * n, cos(pi2 / #parts * i + time) * n, 0), t)
  1459. d[2].p.CFrame = d[1].p.CFrame
  1460. d[3].p.CFrame = d[1].p.CFrame * RandomCFRot()
  1461. end
  1462. if ticks % 20 == 0 then
  1463. zapp(parts[math.random(1, #parts)][1].p.CFrame.p, parts[math.random(1, #parts)][1].p.CFrame.p, 4, 1, cols[math.random(1, #cols)], 0.5, "Neon", 0.15, true, 1)
  1464. end
  1465. hit:check(p.p, 10)
  1466. end)
  1467. for i,v in ipairs(parts) do
  1468. for _,d in ipairs(v) do
  1469. local p, m = d.p, d.m
  1470. Effects:add(p, m, false, vt(5, 5, 5), 1, 10)
  1471. end
  1472. end
  1473. end)
  1474. loop(0.2, function(step, total)
  1475. local t = 20 * step
  1476. if t > 1 then
  1477. t = 1
  1478. end
  1479. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(0, 0, 0), t)
  1480. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1481. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0.2, 0) * CFrame.Angles(0.3, 0, -pi / 2) * angles(0, 0, 0), t)
  1482. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 1.2) * angles(0, 0, 0), t)
  1483. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, -0.4), t)
  1484. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(0 + sin(time + 1) / 15, 0, 0.3), t)
  1485. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1486. N.C0 = clerp(N.C0, DN0, t)
  1487. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1488. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1489. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1490. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.2, 0) * angles(0, 0, 0), t)
  1491. end)
  1492. deb = false
  1493. reset()
  1494. else
  1495. do
  1496. if keys == "C" then
  1497. deb = true
  1498. loop(0.2, function(step, total)
  1499. local t = 10 * step
  1500. if t > 1 then
  1501. t = 1
  1502. end
  1503. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(-0.9, 0, 0), t)
  1504. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1505. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.15 + sin(time + 1) / 10, 0, 0) * angles(0, 0, 0), t)
  1506. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 1) * angles(0, 0, 0), t)
  1507. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0.7), t)
  1508. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(-0.1 + sin(time + 1) / 15, 0, -0.6), t)
  1509. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1510. N.C0 = clerp(N.C0, DN0, t)
  1511. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1512. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1513. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.7, 0) * angles(0, 0, 0), t)
  1514. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.7, 0) * angles(0, 0, 0), t)
  1515. end)
  1516. loop(1, function(step, total)
  1517. local t = 10 * step
  1518. if t > 1 then
  1519. t = 1
  1520. end
  1521. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(-0.9, 0, 0), t)
  1522. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1523. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.15 + sin(time + 1) / 10, 0, 0) * angles(0, 0, 0), t)
  1524. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.1, 0, 1) * angles(0, 0, 0), t)
  1525. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0.7), t)
  1526. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(-0.1 + sin(time + 1) / 15, 0, -0.6), t)
  1527. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1528. N.C0 = clerp(N.C0, DN0, t)
  1529. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1530. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1531. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.7, 0) * angles(0, 0, 0), t)
  1532. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.7, 0) * angles(0, 0, 0), t)
  1533. local p, m = CreatePart()
  1534. p.Transparency = 0
  1535. p.Anchored = true
  1536. p.Material = "Neon"
  1537. p.BrickColor = BrickColor.new(cols[math.random(1, #cols)])
  1538. p.Size = vt(1, 1, 1)
  1539. m.Scale = vt(0, 0, 0)
  1540. p.CFrame = Hammer.OrbPos.CFrame * RandomCFRot() * cf(math.random(3, 5), 0, 0) * RandomCFRot()
  1541. Effects:add(p, m, false, vt(1, 1, 1), 1, 1, Hammer.OrbPos.CFrame * RandomCFRot())
  1542. p.Parent = workspace
  1543. end)
  1544. local r = Ring:Clone()
  1545. local rm = r:WaitForChild("Mesh")
  1546. r.CanCollide = false
  1547. r.Anchored = true
  1548. r.BrickColor = BrickColor.new("Pastel light blue")
  1549. r.CFrame = cf(Hammer.OrbPos.CFrame.p) * angles(pi / 2, 0, 0)
  1550. Effects:add(r, rm, false, vt(5, 5, 1), 1, nil, r.CFrame * RandomCFRot(), 0.02)
  1551. r.Parent = Character
  1552. local r = Ring:Clone()
  1553. local rm = r:WaitForChild("Mesh")
  1554. r.CanCollide = false
  1555. r.Anchored = true
  1556. r.BrickColor = BrickColor.new("Pastel light blue")
  1557. r.CFrame = cf(Hammer.OrbPos.CFrame.p) * angles(pi / 2, 0, 0)
  1558. Effects:add(r, rm, false, vt(5, 5, 1), 1, nil, r.CFrame * RandomCFRot(), 0.02)
  1559. r.Parent = Character
  1560. local Orb = {}
  1561. local p, m = CreatePart()
  1562. p.Transparency = 0.7
  1563. p.Anchored = false
  1564. p.Material = "Neon"
  1565. p.BrickColor = BrickColor.new("Navy blue")
  1566. p.Size = vt(1.5, 1.5, 1.5)
  1567. m.Scale = vt(1, 1, 1)
  1568. m.MeshType = "Sphere"
  1569. p.CFrame = Hammer.OrbPos.CFrame
  1570. Orb[1] = {p = p, m = m}
  1571. local p, m = CreatePart()
  1572. p.Transparency = 0.7
  1573. p.Anchored = false
  1574. p.Material = "Neon"
  1575. p.BrickColor = BrickColor.new("Cyan")
  1576. p.Size = vt(1, 1, 1)
  1577. m.Scale = vt(1, 1, 1)
  1578. m.MeshType = "Sphere"
  1579. p.CFrame = Hammer.OrbPos.CFrame
  1580. Orb[2] = {p = p, m = m}
  1581. local p, m = CreatePart()
  1582. p.Transparency = 0.5
  1583. p.Anchored = false
  1584. p.Material = "Neon"
  1585. p.BrickColor = BrickColor.new("Pastel light blue")
  1586. p.Size = vt(0.5, 0.5, 0.5)
  1587. m.Scale = vt(1, 1, 1)
  1588. m.MeshType = "Sphere"
  1589. p.CFrame = Hammer.OrbPos.CFrame
  1590. Orb[3] = {p = p, m = m}
  1591. Weld(Orb[2].p, Orb[1].p, true)
  1592. Weld(Orb[3].p, Orb[1].p, true)
  1593. local o = Weld(Orb[1].p, RootPart)
  1594. Orb[1].p.Parent = Character
  1595. Orb[2].p.Parent = Character
  1596. Orb[3].p.Parent = Character
  1597. loop(0.2, function(step, total)
  1598. local t = 10 * step
  1599. if t > 1 then
  1600. t = 1
  1601. end
  1602. W.C0 = W.C0:lerp(cf(0, -1, 0) * angles(-0.3, 0, 0), t)
  1603. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, pi / 2, 0), t)
  1604. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.15 + sin(time + 1) / 10, 0, 0) * angles(0, 0, 0), t)
  1605. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * CFrame.Angles(0.2, 0, 2) * angles(0, 0, 0), t)
  1606. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * CFrame.Angles(0, 0, 0.8), t)
  1607. N.C1 = clerp(N.C1, DN1 * CFrame.new() * CFrame.Angles(0.2 + sin(time + 1) / 15, 0, -0.7), t)
  1608. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1609. N.C0 = clerp(N.C0, DN0, t)
  1610. LS.C0 = clerp(LS.C0, DLS0 * cf(0, 0, 0) * angles(0, 0, 0), t * 2)
  1611. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t * 2)
  1612. LH.C0 = clerp(LH.C0, DLH0_ * cf(0.1, -sin(time) / 20, 0) * angles(-0.1, 0.8, 0) * angles(0, 0, 0), t)
  1613. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.1, 0.8, 0) * angles(0, 0, 0), t)
  1614. o.C0 = o.C0:lerp(o.C0 * cf(0, -1, 0), 0.5)
  1615. end)
  1616. spawn(function()
  1617. local hit = MagHitInit(5, 15, nil, nil, function(Result)
  1618. KnockBack(Result.Humanoid, 30, nil, Orb[1].p.CFrame.p)
  1619. zapp(Orb[1].p.CFrame.p, Result.HitPart.CFrame.p, 5, 4, cols[math.random(1, #cols)], 0.5, "Neon", 0.5, true, 1)
  1620. end)
  1621. local lastp = Orb[1].p.CFrame.p
  1622. loop(30, function(step, time)
  1623. local t = 5 * step
  1624. if t > 1 then
  1625. t = 1
  1626. end
  1627. hit:refresh()
  1628. o.C0 = o.C0:lerp(cf(), t)
  1629. o.C1 = o.C1:lerp(cf(sin(time) * math.abs(sin(time * 10) * 2 + 5), sin(time / 3) * 1.5, -cos(time) * math.abs(sin(time * 10) * 2 + 5)), t)
  1630. if ticks % 2 == 0 then
  1631. local dist = lastp - Orb[1].p.CFrame.p.magnitude
  1632. local p1, m1 = CreatePart()
  1633. m1.MeshType = "Cylinder"
  1634. p1.CFrame = cf(lastp, Orb[1].p.CFrame.p) * angles(0, pi / 2, 0) * cf(dist / 2, 0, 0)
  1635. p1.Transparency = 0.25
  1636. p1.Anchored = true
  1637. p1.BrickColor = BrickColor.new("Navy blue")
  1638. p1.Material = "Neon"
  1639. m1.Scale = vt(dist * 5, 3, 3)
  1640. Effects:add(p1, m1, false, vt(0, -1, -1), 0.6)
  1641. p1.Parent = Character
  1642. lastp = Orb[1].p.CFrame.p
  1643. end
  1644. do
  1645. if ticks % 60 == 0 then
  1646. hit:check(Orb[1].p.CFrame.p, 100)
  1647. end
  1648. end
  1649. end)
  1650. for i,v in ipairs(Orb) do
  1651. local p, m = v.p, v.m
  1652. Effects:add(p, m, false, vt(-1, -1, -1), 1)
  1653. end
  1654. end)
  1655. deb = false
  1656. reset()
  1657. end
  1658. end
  1659. end
  1660. end
  1661. end
  1662. end
  1663. allowedkeys = {Q = true, E = true, Z = true, X = true, C = true}
  1664. Mouse.KeyDown:connect(function(key)
  1665. if not Equipped then
  1666. return
  1667. end
  1668. if Humanoid.Health == 0 then
  1669. return
  1670. end
  1671. key = key:upper()
  1672. if allowedkeys[key] then
  1673. curinactive = 0
  1674. curkeys = curkeys .. key
  1675. keycombo(curkeys)
  1676. end
  1677. end)
  1678. Mouse.Button1Down:connect(function()
  1679. if not Equipped then
  1680. return
  1681. end
  1682. if deb2 then
  1683. return
  1684. end
  1685. mouseEnabled = true
  1686. end)
  1687. Mouse.Button1Up:connect(function()
  1688. if not Equipped then
  1689. return
  1690. end
  1691. if not deb2 then
  1692. return
  1693. end
  1694. mouseEnabled = false
  1695. end)
  1696. RunSpeed = nil
  1697. local UIS = game:GetService("UserInputService")
  1698. UIS.InputBegan:connect(function(input)
  1699. if not Equipped then
  1700. return
  1701. end
  1702. local key = input.KeyCode
  1703. local type = input.UserInputType
  1704. if key == Enum.KeyCode.LeftShift then
  1705. run = true
  1706. RunSpeed = Stats.Speed:add(nil, 1)
  1707. else
  1708. if key == Enum.KeyCode.P then
  1709. if LookMode == "Camera" then
  1710. LookMode = "Mouse"
  1711. else
  1712. if LookMode == "Mouse" then
  1713. LookMode = "AtCamera"
  1714. else
  1715. LookMode = "Camera"
  1716. end
  1717. end
  1718. end
  1719. end
  1720. end)
  1721. UIS.InputEnded:connect(function(input)
  1722. if not Equipped then
  1723. return
  1724. end
  1725. local key = input.KeyCode
  1726. local type = input.UserInputType
  1727. if key == Enum.KeyCode.LeftShift then
  1728. run = false
  1729. if RunSpeed then
  1730. RunSpeed:remove()
  1731. end
  1732. end
  1733. end)
  1734. Animator = Humanoid:WaitForChild("Animator")
  1735. AnimScript = Character:WaitForChild("Animate")
  1736. print("Generating fake arms")
  1737. local FakeRight, FakeLeft, FakePlayer = nil, nil, nil
  1738. FakePlayer = Instance.new("Model", Camera)
  1739. Instance.new("Humanoid", FakePlayer)
  1740. FakeRight = RightArm:Clone()
  1741. FakeRight:BreakJoints()
  1742. FakeRight.Transparency = 1
  1743. local FakeRightWeld = Weld(FakeRight, RightArm)
  1744. FakeRightWeld.C0 = cf()
  1745. FakeRightWeld.C1 = cf()
  1746. FakeLeft = LeftArm:Clone()
  1747. FakeLeft:BreakJoints()
  1748. FakeLeft.Transparency = 1
  1749. local FakeLeftWeld = Weld(FakeLeft, LeftArm)
  1750. FakeLeftWeld.C0 = cf()
  1751. FakeLeftWeld.C1 = cf()
  1752. FakeRight.Parent = FakePlayer
  1753. FakeLeft.Parent = FakePlayer
  1754. Character:WaitForChild("Body Colors"):Clone().Parent = FakePlayer
  1755. spawn(function()
  1756. Character:WaitForChild("Shirt"):Clone().Parent = FakePlayer
  1757. end)
  1758. spawn(function()
  1759. Character:WaitForChild("Pants"):Clone().Parent = FakePlayer
  1760. end)
  1761. Mouse.KeyDown:connect(function(key)
  1762. if key == "f" then
  1763. deb2 = true
  1764. deb = true
  1765. if Equipped == false then
  1766. Equipped = true
  1767. print("Hammer Equipped")
  1768. FakeRight.Transparency = 0.5
  1769. FakeLeft.Transparency = 0.5
  1770. AnimScript.Disabled = true
  1771. local anims = Humanoid:GetPlayingAnimationTracks()
  1772. for i,v in ipairs(anims) do
  1773. v:Stop()
  1774. end
  1775. loop(0.3, function(step, total)
  1776. local t = 15 * step
  1777. W.C0 = W.C0:lerp(cf(0, 1, -3) * angles(0, 0, 0), t)
  1778. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, 0, pi / 2), t)
  1779. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * angles(0, 0, 0) * angles(0, 0, 0), t)
  1780. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * angles(-0.5, 0, 1.5) * angles(0, 0, 0), t)
  1781. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * angles(-0.1, 0, 0), t)
  1782. N.C1 = clerp(N.C1, DN1 * CFrame.new() * angles(-0.04 + sin(time + 1) / 15, 0, 0), t)
  1783. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1784. N.C0 = clerp(N.C0, DN0, t)
  1785. LS.C0 = clerp(LS.C0, DLS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t)
  1786. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t)
  1787. LH.C0 = clerp(LH.C0, DLH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.05, 0.1, -0.2) * angles(0, 0, 0), t)
  1788. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.05, -0.2, 0) * angles(0, 0, 0), t)
  1789. end)
  1790. W:Destroy()
  1791. W = Weld(LeftArm, Handle)
  1792. else
  1793. do
  1794. print("Hammer Unequipped")
  1795. FakeRight.Transparency = 1
  1796. FakeLeft.Transparency = 1
  1797. Equipped = false
  1798. if run then
  1799. RunSpeed:remove()
  1800. end
  1801. run = false
  1802. Humanoid.WalkSpeed = 16
  1803. mouseEnabled = false
  1804. AnimScript.Disabled = false
  1805. W:Destroy()
  1806. W = Weld(Torso, Handle)
  1807. loop(0.3, function(step, total)
  1808. local t = 15 * step
  1809. W.C0 = W.C0:lerp(cf(0, 1, -3) * angles(0, 0, 0), t)
  1810. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, 0, pi / 2), t)
  1811. RS.C1 = clerp(RS.C1, DRS1 * CFrame.new(0, 0, 0) * angles(0, 0, 0) * angles(0, 0, 0), t)
  1812. LS.C1 = clerp(LS.C1, DLS1 * CFrame.new(0, 0, 0) * angles(-0.5, 0, 1.5) * angles(0, 0, 0), t)
  1813. RJ.C1 = clerp(RJ.C1, DRJ1 * CFrame.new(0, 0, 0) * angles(-0.1, 0, 0), t)
  1814. N.C1 = clerp(N.C1, DN1 * CFrame.new() * angles(-0.04 + sin(time + 1) / 15, 0, 0), t)
  1815. RJ.C0 = clerp(RJ.C0, DRJ0 * cf(0, 0, sin(time) / 20) * angles(0, 0, 0), t)
  1816. N.C0 = clerp(N.C0, DN0, t)
  1817. LS.C0 = clerp(LS.C0, DLS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t)
  1818. RS.C0 = clerp(RS.C0, DRS0 * cf(0, -0.05 + sin(time) / 20, 0) * angles(0, 0, 0), t)
  1819. LH.C0 = clerp(LH.C0, DLH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.05, 0.1, -0.2) * angles(0, 0, 0), t)
  1820. RH.C0 = clerp(RH.C0, DRH0_ * cf(0, -sin(time) / 20, 0) * angles(-0.05, -0.2, 0) * angles(0, 0, 0), t)
  1821. end)
  1822. loop(0.2, function(step, total)
  1823. local t = 20 * step
  1824. W.C0 = W.C0:lerp(cf(0, 0, 0.5), t)
  1825. W.C1 = W.C1:lerp(cf(0, 0, 0) * angles(0, 0, 1), t)
  1826. RS.C1 = clerp(RS.C1, DRS1, t)
  1827. LS.C1 = clerp(LS.C1, DLS1, t)
  1828. RJ.C1 = clerp(RJ.C1, DRJ1, t)
  1829. N.C1 = clerp(N.C1, DN1, t)
  1830. RJ.C0 = clerp(RJ.C0, DRJ0, t)
  1831. N.C0 = clerp(N.C0, DN0, t)
  1832. LS.C0 = clerp(LS.C0, DLS0, t)
  1833. RS.C0 = clerp(RS.C0, DRS0, t)
  1834. LH.C0 = clerp(LH.C0, DLH0_, t)
  1835. RH.C0 = clerp(RH.C0, DRH0_, t)
  1836. RH.C1 = clerp(RH.C1, DRH1, t)
  1837. LH.C1 = clerp(LH.C1, DLH1, t)
  1838. end)
  1839. W.C0 = cf(0, 0, 0.5)
  1840. W.C1 = cf(0, 0, 0) * angles(0, 0, 1)
  1841. deb2 = false
  1842. deb = false
  1843. end
  1844. end
  1845. end
  1846. end)
  1847. print("Amaranth loaded")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement