Advertisement
Guest User

Sans script

a guest
Jun 29th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 130.24 KB | None | 0 0
  1. Player = game:GetService("Players").LocalPlayer
  2. Character = Player.Character
  3. PlayerGui = Player.PlayerGui
  4. Backpack = Player.Backpack
  5. Torso = Character.Torso
  6. Head = Character.Head
  7. Humanoid = Character.Humanoid
  8. Face = Head.face
  9. mainShirt = nil
  10. mainPants = nil
  11. mainBColors = nil
  12. if Character:findFirstChild("Shirt") ~= nil then
  13. mainShirt = Character.Shirt
  14. end
  15. if Character:findFirstChild("Pants") ~= nil then
  16. mainPants = Character.Pants
  17. end
  18. if Character:findFirstChild("Body Colors") ~= nil then
  19. mainBColors = Character["Body Colors"]
  20. end
  21. for _, c in pairs(Character:children()) do
  22. if c.className == "Accessory" then
  23. c.Parent = nil
  24. end
  25. end
  26. LeftArm = Character["Left Arm"]
  27. LeftLeg = Character["Left Leg"]
  28. RightArm = Character["Right Arm"]
  29. RightLeg = Character["Right Leg"]
  30. LS = Torso["Left Shoulder"]
  31. LH = Torso["Left Hip"]
  32. RS = Torso["Right Shoulder"]
  33. RH = Torso["Right Hip"]
  34. Neck = Torso.Neck
  35. it = Instance.new
  36. vt = Vector3.new
  37. cf = CFrame.new
  38. euler = CFrame.fromEulerAnglesXYZ
  39. angles = CFrame.Angles
  40. necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  41. necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  42. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  43. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  44. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  45. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  46. RootPart = Character.HumanoidRootPart
  47. RootJoint = RootPart.RootJoint
  48. RootCF = euler(-1.57, 0, 3.14)
  49. attack = false
  50. attackdebounce = false
  51. MMouse = nil
  52. combo = 0
  53. local hitfloor, posfloor
  54. local idle = 0
  55. local Anim = "Idle"
  56. local Effects = {}
  57. local Weapon = {}
  58. local Welds = {}
  59. local Bones = {}
  60. local stance = false
  61. local triangparent = workspace
  62. local prechit = false
  63. local MovePart
  64. local Fly = false
  65. local prop = Instance.new("RocketPropulsion")
  66. local move4atk = false
  67. local sapdef = false
  68. local cansound = false
  69. local decreaseatk = 0
  70. local decreasedef = 0
  71. local decreasemvmt = 0
  72. local move1 = [[
  73. (Z)
  74. Teleport]]
  75. local move2 = [[
  76. (X)
  77. Blue Heart]]
  78. local move3 = [[
  79. (C)
  80. Boneyard]]
  81. local move4 = [[
  82. (V)
  83. Havin' a Bad Time]]
  84. local cooldowns = {}
  85. local cooldown1 = 0
  86. table.insert(cooldowns, cooldown1)
  87. local cooldown2 = 0
  88. table.insert(cooldowns, cooldown2)
  89. local cooldown3 = 0
  90. table.insert(cooldowns, cooldown3)
  91. local cooldown4 = 0
  92. table.insert(cooldowns, cooldown4)
  93. local cooldownsadd = {}
  94. local cooldownadd1 = 0.3
  95. table.insert(cooldownsadd, cooldownadd1)
  96. local cooldownadd2 = 0.3
  97. table.insert(cooldownsadd, cooldownadd2)
  98. local cooldownadd3 = 0.3
  99. table.insert(cooldownsadd, cooldownadd3)
  100. local cooldownadd4 = 0.3
  101. table.insert(cooldownsadd, cooldownadd4)
  102. local cooldownmax = 100
  103. player = nil
  104. RSH, LSH = nil, nil
  105. RW, LW = Instance.new("Motor"), Instance.new("Motor")
  106. RW.Name = "Right Shoulder"
  107. LW.Name = "Left Shoulder"
  108. LH = Torso["Left Hip"]
  109. RH = Torso["Right Hip"]
  110. TorsoColor = Torso.BrickColor
  111. TorsoRed = TorsoColor.Color.r
  112. TorsoGreen = TorsoColor.Color.g
  113. TorsoBlue = TorsoColor.Color.b
  114. sansShirt = it("Shirt")
  115. sansShirt.Name = "Shirt"
  116. sansShirt.ShirtTemplate = "http://www.roblox.com/asset/?id=302011210"
  117. sansPants = it("Pants")
  118. sansPants.Name = "Pants"
  119. sansPants.PantsTemplate = "http://www.roblox.com/asset/?id=286482064"
  120. sansBodyColors = it("BodyColors")
  121. sansBodyColors.HeadColor = BrickColor.new("Really black")
  122. sansBodyColors.LeftArmColor = BrickColor.new("Institutional white")
  123. sansBodyColors.LeftLegColor = BrickColor.new("Institutional white")
  124. sansBodyColors.RightArmColor = BrickColor.new("Institutional white")
  125. sansBodyColors.RightLegColor = BrickColor.new("Institutional white")
  126. sansBodyColors.TorsoColor = BrickColor.new("Institutional white")
  127. local Animate = Character.Animate
  128. local animation = Instance.new("Animation")
  129. animation.AnimationId = "http://www.roblox.com/Asset?ID=180435571"
  130. local animTrack = Humanoid:LoadAnimation(animation)
  131. local canjump = true
  132. function removeControl()
  133. canjump = false
  134. end
  135. function resumeControl()
  136. canjump = true
  137. end
  138. Player.Character.Humanoid.Changed:connect(function()
  139. if canjump == false then
  140. Player.Character.Humanoid.Jump = false
  141. end
  142. end)
  143. function swait(num)
  144. if num == 0 or num == nil then
  145. wait()
  146. else
  147. for i = 0, num do
  148. wait()
  149. end
  150. end
  151. end
  152. if Character:findFirstChild("Sans", true) ~= nil then
  153. Character:findFirstChild("Sans", true).Parent = nil
  154. end
  155. if Player.PlayerGui:findFirstChild("WeaponGUI", true) ~= nil then
  156. Player.PlayerGui:findFirstChild("WeaponGUI", true).Parent = nil
  157. end
  158. if Character:findFirstChild("Stats", true) ~= nil then
  159. Character:findFirstChild("Stats", true).Parent = nil
  160. end
  161. local Stats = Instance.new("BoolValue")
  162. Stats.Name = "Stats"
  163. Stats.Parent = Character
  164. local Atk = Instance.new("NumberValue")
  165. Atk.Name = "Damage"
  166. Atk.Parent = Stats
  167. Atk.Value = 1
  168. local Def = Instance.new("NumberValue")
  169. Def.Name = "Defense"
  170. Def.Parent = Stats
  171. Def.Value = 1
  172. local Mvmt = Instance.new("NumberValue")
  173. Mvmt.Name = "Movement"
  174. Mvmt.Parent = Stats
  175. Mvmt.Value = 1
  176. local Block = Instance.new("BoolValue")
  177. Block.Name = "Block"
  178. Block.Parent = Stats
  179. Block.Value = false
  180. local Stun = Instance.new("NumberValue")
  181. Stun.Name = "Stun"
  182. Stun.Parent = Stats
  183. Stun.Value = 0
  184. local Stunned = Instance.new("BoolValue")
  185. Stunned.Name = "Stunned"
  186. Stunned.Parent = Stats
  187. Stunned.Value = false
  188. local Stagger = Instance.new("BoolValue")
  189. Stagger.Name = "Stagger"
  190. Stagger.Parent = Stats
  191. Stagger.Value = false
  192. local StaggerHit = Instance.new("BoolValue")
  193. StaggerHit.Name = "StaggerHit"
  194. StaggerHit.Parent = Stats
  195. StaggerHit.Value = false
  196. local RecentEnemy = Instance.new("ObjectValue")
  197. RecentEnemy.Name = "RecentEnemy"
  198. RecentEnemy.Parent = Stats
  199. RecentEnemy.Value = nil
  200. local Decrease = Instance.new("BoolValue")
  201. Decrease.Name = "Decrease"
  202. Decrease.Parent = Stats
  203. Decrease.Value = false
  204. local mana = Instance.new("NumberValue")
  205. mana.Name = "Mana"
  206. mana.Parent = Stats
  207. mana.Value = 0
  208. local passive1 = Instance.new("NumberValue", Decrease)
  209. passive1.Name = "DecreaseAtk"
  210. passive1.Value = 0.4
  211. local passive2 = Instance.new("NumberValue", Decrease)
  212. passive2.Name = "DecreaseDef"
  213. passive2.Value = 0.8
  214. local passive3 = Instance.new("NumberValue", Decrease)
  215. passive3.Name = "DecreaseMvmt"
  216. passive3.Value = 0.6
  217. local sans = it("BoolValue", Stats)
  218. sans.Name = "Sans"
  219. sans.Value = true
  220. function NoOutline(Part)
  221. Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
  222. end
  223. function part(formfactor, parent, reflectance, transparency, brickcolor, name, size)
  224. local fp = it("Part")
  225. fp.formFactor = formfactor
  226. fp.Parent = parent
  227. fp.Reflectance = reflectance
  228. fp.Transparency = transparency
  229. fp.CanCollide = false
  230. fp.Locked = true
  231. fp.BrickColor = brickcolor
  232. fp.Name = name
  233. fp.Size = size
  234. fp.Position = Torso.Position
  235. NoOutline(fp)
  236. fp.Material = "SmoothPlastic"
  237. fp:BreakJoints()
  238. return fp
  239. end
  240. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  241. local mesh = it(Mesh)
  242. mesh.Parent = part
  243. if Mesh == "SpecialMesh" then
  244. mesh.MeshType = meshtype
  245. if meshid ~= "nil" then
  246. mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid
  247. end
  248. end
  249. mesh.Offset = offset
  250. mesh.Scale = scale
  251. return mesh
  252. end
  253. function weld(parent, part0, part1, c0)
  254. local weld = it("Motor")
  255. weld.Parent = parent
  256. weld.Part0 = part0
  257. weld.Part1 = part1
  258. weld.C0 = c0
  259. return weld
  260. end
  261. function bone(bParent, bp1l, bp1w, bp2s, bhwy, bside)
  262. bpart1 = part(3, bParent, 0, 0, BrickColor.new("Institutional white"), "Bone", vt())
  263. bmsh1 = mesh("CylinderMesh", bpart1, "nil", "nil", vt(0, 0, 0), vt(bp1w, bp1l, bp1w))
  264. for d = 1, bside do
  265. nan = -1
  266. if d == 2 then
  267. nan = 1
  268. end
  269. for i = 1, 2 do
  270. nen = 1
  271. if i == 2 then
  272. nen = -1
  273. elseif i == 3 then
  274. nen = 0
  275. end
  276. da = bp2s / 1.5
  277. da2 = bp2s
  278. if i == 3 then
  279. da2 = bp1w
  280. da = da2
  281. end
  282. bpart2 = part(3, bpart1, 0, 0, BrickColor.new("Institutional white"), "Bone2", vt())
  283. bmsh2 = mesh("SpecialMesh", bpart2, "Sphere", "nil", vt(0, 0, 0), vt(da2, da2, da))
  284. bwld2 = weld(bpart2, bpart2, bpart1, cf(bp1l / 100 * nen, bp1l / 10 * nan, 0))
  285. end
  286. end
  287. bhitbox = part(3, bpart1, 0, 1, BrickColor.new("Black"), "BoneHitbox", vt())
  288. bh = mesh("BlockMesh", bhitbox, "nil", "nil", vt(0, 0, 0), vt(5, 5, 5))
  289. bhwld = weld(bhitbox, bhitbox, bpart1, cf(0, bhwy, 0))
  290. return bpart1, bhitbox
  291. end
  292. function GBlaster(gParent, gp1s1, gp1s2, gp1s3)
  293. gprt1 = part(3, gParent, 0, 0, BrickColor.new("Institutional white"), "Gaster Blaster", vt())
  294. gmsh1 = mesh("SpecialMesh", gprt1, "FileMesh", "14028428", vt(0, 0, 0), vt(gp1s1, gp1s2, gp1s3))
  295. gprt2 = part(3, gprt1, 0, 0, BrickColor.new("Institutional white"), "GBPart 2", vt())
  296. gmsh2 = mesh("SpecialMesh", gprt2, "FileMesh", "14028428", vt(0, 0, 0), vt(gp1s1, gp1s2 / 5, gp1s3))
  297. gbwld2 = weld(gprt2, gprt2, gprt1, euler(0, 0, 3.14) * cf(0, gp1s2, 0))
  298. return gprt1
  299. end
  300. function gui(GuiType, parent, text, backtrans, backcol, pos, size)
  301. local gui = it(GuiType)
  302. gui.Parent = parent
  303. gui.Text = text
  304. gui.BackgroundTransparency = backtrans
  305. gui.BackgroundColor3 = backcol
  306. gui.SizeConstraint = "RelativeXY"
  307. gui.TextXAlignment = "Center"
  308. gui.TextYAlignment = "Center"
  309. gui.Position = pos
  310. gui.Size = size
  311. gui.Font = "SourceSans"
  312. gui.FontSize = "Size14"
  313. gui.TextWrapped = false
  314. gui.TextStrokeTransparency = 0
  315. gui.TextColor = BrickColor.new("White")
  316. return gui
  317. end
  318. local Color1 = Torso.BrickColor
  319. local fengui = it("GuiMain")
  320. fengui.Parent = Player.PlayerGui
  321. fengui.Name = "WeaponGUI"
  322. local fenframe = it("Frame")
  323. fenframe.Parent = fengui
  324. fenframe.BackgroundColor3 = Color3.new(255, 255, 255)
  325. fenframe.BackgroundTransparency = 1
  326. fenframe.BorderColor3 = Color3.new(17, 17, 17)
  327. fenframe.Size = UDim2.new(0.1, 0, 0.1, 0)
  328. fenframe.Position = UDim2.new(0.95, 0, 0.7, 0)
  329. local fenframe2 = it("Frame")
  330. fenframe2.Parent = fengui
  331. fenframe2.BackgroundColor3 = Color3.new(255, 255, 255)
  332. fenframe2.BackgroundTransparency = 1
  333. fenframe2.BorderColor3 = Color3.new(17, 17, 17)
  334. fenframe2.Size = UDim2.new(0.2, 0, 0.1, 0)
  335. fenframe2.Position = UDim2.new(0.4, 0, 0.85, 0)
  336. local fenframe3 = it("Frame")
  337. fenframe3.Parent = fengui
  338. fenframe3.BackgroundColor3 = Color3.new(255, 255, 255)
  339. fenframe3.BackgroundTransparency = 1
  340. fenframe3.BorderColor3 = Color3.new(17, 17, 17)
  341. fenframe3.Size = UDim2.new(0.2, 0, 0.2, 0)
  342. fenframe3.Position = UDim2.new(0.8, 0, 0.8, 0)
  343. fenframe3.Name = "MoveFrame"
  344. local fenframe4 = it("Frame")
  345. fenframe4.Parent = fengui
  346. fenframe4.BackgroundColor3 = Color3.new(255, 255, 255)
  347. fenframe4.BackgroundTransparency = 1
  348. fenframe4.BorderColor3 = Color3.new(17, 17, 17)
  349. fenframe4.Size = UDim2.new(0.1, 0, 0.1, 0)
  350. fenframe4.Position = UDim2.new(0, 0, 0.7, 0)
  351. local pressedf = false
  352. local fenframe5 = it("Frame")
  353. fenframe5.Parent = fengui
  354. fenframe5.Parent = nil
  355. fenframe5.BackgroundColor3 = Color3.new(0, 0, 0)
  356. fenframe5.BackgroundTransparency = 1
  357. fenframe5.BorderColor3 = Color3.new(0, 0, 0)
  358. fenframe5.Size = UDim2.new(1, 0, 1, 0)
  359. fenframe5.Position = UDim2.new(0, 0, 0, 0)
  360. fenframe5.ZIndex = 2
  361. local tellbar = gui("TextLabel", fenframe5, "Press 'F' to equip your weapon.", 1, Color3.new(0, 0, 0), UDim2.new(0.25, 0, 0.25, 0), UDim2.new(0.5, 0, 0.5, 0))
  362. tellbar.Font = "Arial"
  363. tellbar.TextScaled = true
  364. tellbar.TextTransparency = 1
  365. tellbar.TextStrokeTransparency = 1
  366. tellbar.ZIndex = 2
  367. local fnumb = 0
  368. local fenbarmana1 = gui("TextLabel", fenframe, "", 0, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(0.4, 0, -4, 0))
  369. local fenbarmana2 = gui("TextLabel", fenframe, "", 0, BrickColor.new("White").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0.4, 0, 0, 0))
  370. local fenbarmana4 = gui("TextLabel", fenframe, "Mana(" .. mana.Value .. ")", 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0.2, 0), UDim2.new(0.4, 0, 0.2, 0))
  371. local fenbardamage = gui("TextLabel", fenframe2, "Damage", 0.55, Color3.new(0.6078431372549019, 0, 0), UDim2.new(-0.23, 0, 0, 0), UDim2.new(0.2, 0, 1, 0))
  372. local fenbardef = gui("TextLabel", fenframe2, "Defense", 0.55, Color3.new(0, 0, 0.6078431372549019), UDim2.new(-0.46, 0, 0, 0), UDim2.new(0.2, 0, 1, 0))
  373. local fenbarmove = gui("TextLabel", fenframe2, "Walkspeed", 0.55, Color3.new(0, 0.6078431372549019, 0), UDim2.new(1.03, 0, 0, 0), UDim2.new(0.2, 0, 1, 0))
  374. local fenbarhp1 = gui("TextLabel", fenframe2, "", 0, Color3.new(0, 0, 0), UDim2.new(-0.46, 0, 1, 0), UDim2.new(1.92, 0, 0.4, 0))
  375. local fenbarhp2 = gui("TextLabel", fenbarhp1, "", 0, Color3.new(1, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  376. local fenbarhp3 = gui("TextLabel", fenbarhp1, "(100)", 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0))
  377. local fenbarstun1 = gui("TextLabel", fenframe4, "", 0, Color3.new(0, 0, 0), UDim2.new(0.2, 0, 0, 0), UDim2.new(0.4, 0, -4, 0))
  378. local fenbarstun2 = gui("TextLabel", fenframe4, "", 0, Color3.new(0.960784, 0.803922, 0.188235), UDim2.new(0.2, 0, 0, 0), UDim2.new(0.4, 0, 0, 0))
  379. local fenbarstun3 = gui("TextLabel", fenframe4, "Stun(" .. Stun.Value .. ")", 1, Color3.new(0.960784, 0.803922, 0.188235), UDim2.new(0.2, 0, 0.2, 0), UDim2.new(0.4, 0, 0.2, 0))
  380. local fenbarmove1 = gui("TextButton", fenframe3, move1, 0.55, Color3.new(0.5, 0.5, 0.5), UDim2.new(0.1, 0, 0.1, 0), UDim2.new(0.4, 0, 0.4, 0))
  381. fenbarmove1.ZIndex = 2
  382. local fenbarmove1b = gui("TextLabel", fenbarmove1, "", 0.55, BrickColor.new("Black").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  383. local fenbarmove2 = gui("TextButton", fenframe3, move2, 0.55, Color3.new(0.5, 0.5, 0.5), UDim2.new(0.6, 0, 0.1, 0), UDim2.new(0.4, 0, 0.4, 0))
  384. fenbarmove2.ZIndex = 2
  385. local fenbarmove2b = gui("TextLabel", fenbarmove2, "", 0.55, BrickColor.new("Black").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  386. local fenbarmove3 = gui("TextButton", fenframe3, move3, 0.55, Color3.new(0.5, 0.5, 0.5), UDim2.new(0.1, 0, 0.6, 0), UDim2.new(0.4, 0, 0.4, 0))
  387. fenbarmove3.ZIndex = 2
  388. local fenbarmove3b = gui("TextLabel", fenbarmove3, "", 0.55, BrickColor.new("Black").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  389. local fenbarmove4 = gui("TextButton", fenframe3, move4, 0.55, Color3.new(0.5, 0.5, 0.5), UDim2.new(0.6, 0, 0.6, 0), UDim2.new(0.4, 0, 0.4, 0))
  390. fenbarmove4.ZIndex = 2
  391. local fenbarmove4b = gui("TextLabel", fenbarmove4, "", 0.55, BrickColor.new("Black").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  392. local modelzorz = Instance.new("Model")
  393. modelzorz.Parent = Character
  394. modelzorz.Name = "Sans"
  395. local hprt1 = part(3, modelzorz, 0, 0, BrickColor.new("Really black"), "Head Part01", vt())
  396. local hprt2 = part(3, modelzorz, 0, 0, BrickColor.new("Institutional white"), "Head Part02", vt())
  397. local hprt3 = part(3, modelzorz, 0, 1, BrickColor.new("Institutional white"), "Head Part03", vt())
  398. local hprt4 = part(3, modelzorz, 0, 1, BrickColor.new("Institutional white"), "Head Part04", vt())
  399. local hprt5 = part(3, modelzorz, 1, 0, BrickColor.new("Pink"), "Head Part05", vt())
  400. hprt5.Material = "Neon"
  401. hmsh1 = mesh("SpecialMesh", hprt1, "Head", "nil", vt(0, 0, 0), vt(6.25, 6.25, 6.25))
  402. hmsh2 = mesh("SpecialMesh", hprt2, "FileMesh", "4770583", vt(0, 0, 0), vt(3.2, 3.2, 3.2))
  403. hmsh3 = mesh("SpecialMesh", hprt3, "Sphere", "nil", vt(0, 0, 0), vt(1, 1, 1))
  404. hmsh4 = mesh("SpecialMesh", hprt4, "Sphere", "nil", vt(0, 0, 0), vt(1, 1, 1))
  405. hmsh5 = mesh("SpecialMesh", hprt5, "Sphere", "nil", vt(0, 0, 0), vt(1.5, 1.5, 1.5))
  406. local hwld1 = weld(hprt1, hprt1, Head, cf(0, 0, 0))
  407. local hwld2 = weld(hprt1, hprt2, hprt1, cf(0, -0.2, 0))
  408. local hwld3 = weld(hprt1, hprt3, hprt2, euler(0, 0, 0) * cf(0.25, -0.05, 0.47))
  409. local hwld4 = weld(hprt1, hprt4, hprt2, euler(0, 0, 0) * cf(-0.25, -0.05, 0.47))
  410. local hwld5 = weld(hprt1, hprt5, hprt2, euler(0, 0, 0) * cf(0.25, -0.05, 0.47))
  411. local nr = NumberRange.new
  412. local ns = NumberSequence.new
  413. local cs = ColorSequence.new
  414. local parti = it("ParticleEmitter")
  415. parti.Color = cs(BrickColor.new("White").Color, BrickColor.new("White").Color)
  416. parti.LightEmission = 1
  417. parti.Texture = "rbxasset://textures/particles/sparkles_main.dds"
  418. sizeseq = ns({
  419. NumberSequenceKeypoint.new(0, 2),
  420. NumberSequenceKeypoint.new(1, 0)
  421. })
  422. transseq = ns({
  423. NumberSequenceKeypoint.new(0, 0.8),
  424. NumberSequenceKeypoint.new(1, 1)
  425. })
  426. parti.Transparency = transseq
  427. parti.Size = sizeseq
  428. parti.Acceleration = vt(0, 0, 0)
  429. parti.Lifetime = nr(0.5, 0.5)
  430. parti.Rate = 60
  431. parti.Rotation = nr(0, 360)
  432. parti.RotSpeed = nr(-100, 100)
  433. parti.Speed = nr(0)
  434. parti.VelocitySpread = 0
  435. parti.Parent = hprt5
  436. parti.Enabled = true
  437. parti.LockedToPart = true
  438. parti.ZOffset = 1
  439. for _, c in pairs(modelzorz:children()) do
  440. table.insert(Weapon, c)
  441. end
  442. for _, c in pairs(hprt1:children()) do
  443. if c.className == "Motor" then
  444. table.insert(Welds, c)
  445. end
  446. end
  447. local hitbox = part(3, modelzorz, 0, 1, BrickColor.new("Black"), "Hitbox2", vt())
  448. hitbox.Anchored = false
  449. local hbwld = weld(hitbox, hitbox, RootPart, euler(0, 0, 0) * cf(0, 0, 0))
  450. local hitbox2 = part(3, nil, 0, 1, BrickColor.new("Black"), "Hitbox", vt(1, 1, 1))
  451. hitbox2.Anchored = true
  452. local hitboxCF = cf(0, 0, 0)
  453. hboxpos = Instance.new("BodyPosition", nil)
  454. hboxpos.P = 2000
  455. hboxpos.D = 100
  456. hboxpos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  457. function hitboxweld()
  458. hbwld.Parent = modelzorz
  459. hbwld.Part0 = hitbox
  460. hbwld.Part1 = prt6
  461. end
  462. if script.Parent.className ~= "HopperBin" then
  463. Tool = Instance.new("HopperBin")
  464. Tool.Parent = Backpack
  465. Tool.Name = ""
  466. script.Parent = Tool
  467. end
  468. Bin = script.Parent
  469. if Bin.Name == "Calvar" then
  470. Bin.Name = ""
  471. end
  472. local bodvel = Instance.new("BodyVelocity")
  473. local bg = Instance.new("BodyGyro")
  474. function so(id, par, vol, pit)
  475. local sou = Instance.new("Sound", par or workspace)
  476. sou.Volume = vol
  477. sou.Pitch = pit or 1
  478. sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
  479. sou:play()
  480. game:GetService("Debris"):AddItem(sou, 6)
  481. end
  482. function so2(id, par, vol, pit)
  483. local sou = Instance.new("Sound", par or workspace)
  484. sou.Volume = vol
  485. sou.Pitch = pit or 1
  486. sou.SoundId = id
  487. sou:play()
  488. game:GetService("Debris"):AddItem(sou, 6)
  489. end
  490. function clerp(a, b, t)
  491. local qa = {
  492. QuaternionFromCFrame(a)
  493. }
  494. local qb = {
  495. QuaternionFromCFrame(b)
  496. }
  497. local ax, ay, az = a.x, a.y, a.z
  498. local bx, by, bz = b.x, b.y, b.z
  499. local _t = 1 - t
  500. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  501. end
  502. function QuaternionFromCFrame(cf)
  503. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  504. local trace = m00 + m11 + m22
  505. if trace > 0 then
  506. local s = math.sqrt(1 + trace)
  507. local recip = 0.5 / s
  508. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  509. else
  510. local i = 0
  511. if m00 < m11 then
  512. i = 1
  513. end
  514. if m22 > (i == 0 and m00 or m11) then
  515. i = 2
  516. end
  517. if i == 0 then
  518. local s = math.sqrt(m00 - m11 - m22 + 1)
  519. local recip = 0.5 / s
  520. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  521. elseif i == 1 then
  522. local s = math.sqrt(m11 - m22 - m00 + 1)
  523. local recip = 0.5 / s
  524. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  525. elseif i == 2 then
  526. local s = math.sqrt(m22 - m00 - m11 + 1)
  527. local recip = 0.5 / s
  528. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  529. end
  530. end
  531. end
  532. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  533. local xs, ys, zs = x + x, y + y, z + z
  534. local wx, wy, wz = w * xs, w * ys, w * zs
  535. local xx = x * xs
  536. local xy = x * ys
  537. local xz = x * zs
  538. local yy = y * ys
  539. local yz = y * zs
  540. local zz = z * zs
  541. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  542. end
  543. function QuaternionSlerp(a, b, t)
  544. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  545. local startInterp, finishInterp
  546. if cosTheta >= 1.0E-4 then
  547. if 1 - cosTheta > 1.0E-4 then
  548. local theta = math.acos(cosTheta)
  549. local invSinTheta = 1 / math.sin(theta)
  550. startInterp = math.sin((1 - t) * theta) * invSinTheta
  551. finishInterp = math.sin(t * theta) * invSinTheta
  552. else
  553. startInterp = 1 - t
  554. finishInterp = t
  555. end
  556. elseif 1 + cosTheta > 1.0E-4 then
  557. local theta = math.acos(-cosTheta)
  558. local invSinTheta = 1 / math.sin(theta)
  559. startInterp = math.sin((t - 1) * theta) * invSinTheta
  560. finishInterp = math.sin(t * theta) * invSinTheta
  561. else
  562. startInterp = t - 1
  563. finishInterp = t
  564. end
  565. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  566. end
  567. function turntoSans()
  568. if Face ~= nil then
  569. Face.Transparency = 1
  570. end
  571. if mainShirt ~= nil then
  572. mainShirt.Parent = nil
  573. end
  574. if mainPants ~= nil then
  575. mainPants.Parent = nil
  576. end
  577. if mainBColors ~= nil then
  578. mainBColors.Parent = nil
  579. end
  580. sansShirt.Parent = Character
  581. sansPants.Parent = Character
  582. sansBodyColors.Parent = Character
  583. for _, c in pairs(modelzorz:children()) do
  584. if c.className == "Part" then
  585. c.Transparency = 0
  586. end
  587. end
  588. for _, c in pairs(Character:children()) do
  589. Head.Transparency = 1
  590. if c.className == "Hat" then
  591. c.Handle.Transparency = 1
  592. end
  593. end
  594. end
  595. function turnNormal()
  596. if Face ~= nil then
  597. Face.Transparency = 0
  598. end
  599. if mainShirt ~= nil then
  600. mainShirt.Parent = Character
  601. end
  602. if mainPants ~= nil then
  603. mainPants.Parent = Character
  604. end
  605. if mainBColors ~= nil then
  606. mainBColors.Parent = Character
  607. end
  608. sansShirt.Parent = nil
  609. sansPants.Parent = nil
  610. sansBodyColors.Parent = nil
  611. for _, c in pairs(modelzorz:children()) do
  612. if c.className == "Part" then
  613. c.Transparency = 1
  614. end
  615. end
  616. for _, c in pairs(Character:children()) do
  617. Head.Transparency = 0
  618. if c.className == "Hat" then
  619. c.Handle.Transparency = 0
  620. end
  621. end
  622. end
  623. function normalEyes()
  624. hprt3.Transparency = 0
  625. hprt4.Transparency = 0
  626. hprt5.Transparency = 1
  627. end
  628. function glowingEye()
  629. hprt3.Transparency = 1
  630. hprt4.Transparency = 1
  631. hprt5.Transparency = 0
  632. end
  633. function noEyes()
  634. hprt3.Transparency = 1
  635. hprt4.Transparency = 1
  636. hprt5.Transparency = 1
  637. end
  638. turntoSans()
  639. hprt3.Transparency = 0
  640. hprt4.Transparency = 0
  641. hprt5.Transparency = 1
  642. function hideanim()
  643. equipped = false
  644. for i = 0, 1, 0.1 do
  645. swait()
  646. Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0), 0.4)
  647. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.4)
  648. RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 0, 0), 0.4)
  649. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  650. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, 0), 0.4)
  651. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  652. RH.C0 = clerp(RH.C0, RHC0, 0.4)
  653. LH.C0 = clerp(LH.C0, LHC0, 0.4)
  654. end
  655. Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0), 1)
  656. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 1)
  657. RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 0, 0), 1)
  658. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 1)
  659. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, 0), 1)
  660. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 1)
  661. RH.C0 = clerp(RH.C0, RHC0, 1)
  662. LH.C0 = clerp(LH.C0, LHC0, 1)
  663. end
  664. function equipanim()
  665. equipped = true
  666. end
  667. function Clone(duration)
  668. for _, v in pairs(Torso.Parent:children()) do
  669. if v.className == "Part" and v.Name ~= "HumanoidRootPart" then
  670. local c = part(3, workspace, 0, 0.4, BrickColor.new("White"), "Effect", v.Size)
  671. c.Anchored = true
  672. c.CFrame = v.CFrame
  673. game:GetService("Debris"):AddItem(c, 5)
  674. if v.Name == "Head" then
  675. cmsh = mesh("SpecialMesh", c, "Head", "nil", vt(0, 0, 0), v.Mesh.Scale)
  676. end
  677. table.insert(Effects, {
  678. c,
  679. "Disappear",
  680. duration
  681. })
  682. end
  683. end
  684. for _, v in pairs(modelzorz:children()) do
  685. if v.className == "Part" and v.Name ~= "Hitbox" and v.Name ~= "Hitbox2" and v.Name ~= "Head Part03" and v.Name ~= "Head Part04" and v.Name ~= "Head Part05" then
  686. n = v:clone()
  687. for _, b in pairs(n:children()) do
  688. if b.className == "Motor" then
  689. b.Parent = nil
  690. end
  691. end
  692. n.archivable = true
  693. n.Anchored = true
  694. n.CanCollide = false
  695. n.Name = "Effect"
  696. n.BrickColor = BrickColor.new("White")
  697. n.Parent = workspace
  698. n.CFrame = v.CFrame
  699. n.Transparency = 0.4
  700. n:BreakJoints()
  701. table.insert(Effects, {
  702. n,
  703. "Disappear",
  704. duration
  705. })
  706. end
  707. end
  708. end
  709. function StaggerAnim()
  710. glowingEye()
  711. attack = true
  712. local canfloor, telepos, oldpos
  713. local dnum = 5
  714. repeat
  715. dnum = dnum - 1
  716. CF = cf(RootPart.Position) * cf(math.random(-500, 500) / 100, 0, math.random(-500, 500) / 100)
  717. tpos = RootPart.Position + vt(math.random(-5000, 5000) / 100, 20, math.random(-5000, 5000) / 100)
  718. hitfloor3, posfloor3 = rayCast(tpos, CFrame.new(tpos, tpos - Vector3.new(0, 1, 0)).lookVector, 400, Character)
  719. if hitfloor3 ~= nil then
  720. canfloor = true
  721. telepos = cf(posfloor3) * cf(0, 3, 0)
  722. end
  723. until canfloor ~= nil or dnum < 0
  724. Clone(0.01)
  725. if dnum >= 0 then
  726. oldpos = RootPart.Position
  727. RootPart.CFrame = telepos
  728. pos4 = vt(oldpos.X, RootPart.Position.Y, oldpos.Z)
  729. RootPart.CFrame = cf(RootPart.Position, pos4)
  730. else
  731. oldpos = RootPart.Position
  732. RootPart.CFrame = cf(RootPart.Position) * cf(0, 10, 0)
  733. end
  734. for _, c in pairs(workspace:children()) do
  735. if c.Name == "Effect" and c.className == "Model" and c:findFirstChild("Head") ~= nil then
  736. local targ = c.Head.Position - oldpos
  737. local mag = targ.magnitude
  738. if mag <= 10 then
  739. c.Parent = nil
  740. end
  741. end
  742. end
  743. Neck.C0 = necko * euler(0.3, 0, 0) * euler(0, 0, 0)
  744. RootJoint.C0 = RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0)
  745. RW.C0 = cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4)
  746. RW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  747. LW.C0 = cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4)
  748. LW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  749. RH.C0 = cf(1, -0.9, -0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05)
  750. LH.C0 = cf(-1, -0.9, -0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05)
  751. doanim = math.random(1, 2)
  752. if doanim == 1 then
  753. for i = 0, 1, 0.1 do
  754. swait()
  755. Neck.C0 = clerp(Neck.C0, necko * euler(0.2, 0, 0) * euler(0, 0, -0.2), 0.6)
  756. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(0, 0, 0), 0.6)
  757. RW.C0 = clerp(RW.C0, cf(1.2, 0.4, 0.1) * euler(0, 0, 1.8) * euler(0.5, 0, 0) * euler(0, 3.14, 0), 0.6)
  758. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.6)
  759. LW.C0 = clerp(LW.C0, cf(-1.2, 0.4, 0.1) * euler(0, 0, -1.8) * euler(0.5, 0, 0) * euler(0, 3.14, 0), 0.6)
  760. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.6)
  761. RH.C0 = clerp(RH.C0, cf(1, -0.9, -0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, 0), 0.6)
  762. LH.C0 = clerp(LH.C0, cf(-1, -0.9, -0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0), 0.6)
  763. end
  764. normalEyes()
  765. elseif doanim == 2 then
  766. for i = 1, 2 do
  767. if i == 2 then
  768. end
  769. for i = 0, 2, 0.2 do
  770. swait()
  771. Neck.C0 = clerp(Neck.C0, necko * euler(0.5, 0, 0) * euler(0, 0, 0), 0.15)
  772. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.4)
  773. if i <= 1 then
  774. RW.C0 = clerp(RW.C0, cf(1, 0.65, 0.3) * euler(-0.2, 0, -0.5), 0.4)
  775. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  776. LW.C0 = clerp(LW.C0, cf(-1, 0.65, 0.3) * euler(-0.2, 0, 0.5), 0.4)
  777. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  778. else
  779. RW.C0 = clerp(RW.C0, cf(1, 0.45, 0.3) * euler(-0.2, 0, -0.5), 0.4)
  780. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  781. LW.C0 = clerp(LW.C0, cf(-1, 0.45, 0.3) * euler(-0.2, 0, 0.5), 0.4)
  782. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  783. end
  784. RH.C0 = clerp(RH.C0, cf(1, -0.9, -0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05), 0.4)
  785. LH.C0 = clerp(LH.C0, cf(-1, -0.9, -0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05), 0.4)
  786. end
  787. end
  788. normalEyes()
  789. end
  790. attack = false
  791. end
  792. function StaggerHitt()
  793. end
  794. function StunAnim()
  795. end
  796. function attackone()
  797. attack = true
  798. cansound = true
  799. AtkBones = {}
  800. atktype = math.random(1, 2)
  801. if atktype == 1 then
  802. CF = RootPart.CFrame * cf(0, 0, -18)
  803. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  804. refe.Anchored = true
  805. refe.CFrame = CF
  806. game:GetService("Debris"):AddItem(refe, 5)
  807. so("306247739", refe, 1, 1)
  808. for i = -12, 12, 12 do
  809. refe.CFrame = CF * euler(0, 1.57, 0) * cf(0, 0, -8 - i)
  810. for d = -16, 16, 8 do
  811. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  812. ref.Anchored = true
  813. ref.CFrame = refe.CFrame * cf(d, 0, 8)
  814. game:GetService("Debris"):AddItem(ref, 5)
  815. bhitfloor, bposfloor = rayCast(ref.Position, CFrame.new(ref.Position, ref.Position - Vector3.new(0, 1, 0)).lookVector, 100, Character)
  816. local bone1, bhb1 = bone(workspace, 30, 3, 5, -1, 1)
  817. bone1.CFrame = cf(bposfloor) * cf(0, -2, 0) * euler(0, math.random(-50, 50), 0)
  818. bpos = Instance.new("BodyPosition")
  819. bpos.P = 8000
  820. bpos.D = 800
  821. bpos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  822. bpos.Parent = bone1
  823. bpos.position = bposfloor + vt(0, -2, 0)
  824. table.insert(AtkBones, {
  825. bone1,
  826. bhb1,
  827. bpos,
  828. bposfloor
  829. })
  830. ref.Parent = nil
  831. end
  832. end
  833. elseif atktype == 2 then
  834. CF = RootPart.CFrame * cf(0, 0, -15)
  835. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  836. refe.Anchored = true
  837. refe.CFrame = CF
  838. game:GetService("Debris"):AddItem(refe, 5)
  839. so("306247739", refe, 1, 1)
  840. dul = math.random(-50, 50)
  841. for i = 0.785, 2.355, 1.57 do
  842. refe.CFrame = CF * euler(0, dul + i, 0)
  843. for d = -21, 21, 7 do
  844. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  845. ref.Anchored = true
  846. ref.CFrame = refe.CFrame * cf(0, 0, d)
  847. game:GetService("Debris"):AddItem(ref, 5)
  848. bhitfloor, bposfloor = rayCast(ref.Position, CFrame.new(ref.Position, ref.Position - Vector3.new(0, 1, 0)).lookVector, 100, Character)
  849. local bone1, bhb1 = bone(workspace, 30, 3, 5, -1, 1)
  850. bone1.CFrame = cf(bposfloor) * cf(0, -2, 0) * euler(0, math.random(-50, 50), 0)
  851. bpos = Instance.new("BodyPosition")
  852. bpos.P = 8000
  853. bpos.D = 800
  854. bpos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  855. bpos.Parent = bone1
  856. bpos.position = bposfloor + vt(0, -2, 0)
  857. table.insert(AtkBones, {
  858. bone1,
  859. bhb1,
  860. bpos,
  861. bposfloor
  862. })
  863. ref.Parent = nil
  864. end
  865. end
  866. end
  867. for i = 0, 1, 0.3 do
  868. swait()
  869. Neck.C0 = clerp(Neck.C0, necko * euler(0.4, 0, 0) * euler(0, 0, 0), 0.5)
  870. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(-0.05, 0, 0), 0.5)
  871. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.5)
  872. LW.C0 = clerp(LW.C0, cf(-1.3, 0.4, 0.1) * euler(0.4, 0, 0.1) * euler(0, -1.57, 0), 0.5)
  873. RH.C0 = clerp(RH.C0, cf(1, -0.8, -0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05), 0.5)
  874. LH.C0 = clerp(LH.C0, cf(-1, -0.8, -0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05), 0.5)
  875. if Stagger.Value == true then
  876. break
  877. end
  878. end
  879. CF = RootPart.CFrame * cf(0, 0, -18)
  880. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  881. refe.Anchored = true
  882. refe.CFrame = CF
  883. game:GetService("Debris"):AddItem(refe, 5)
  884. so("306247749", refe, 1, 1)
  885. for i = 0, 2, 0.1 do
  886. swait()
  887. for i = 1, #AtkBones do
  888. MagniDamage(AtkBones[i][2], 2, 1, 1, 0, "Normal", AtkBones[i][2], 0.01, 1, math.random(2, 4), nil, nil, true)
  889. AtkBones[i][3].position = AtkBones[i][4] + vt(0, 2, 0)
  890. end
  891. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.5)
  892. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * euler(-0.05, 0, 0), 0.5)
  893. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.5)
  894. LW.C0 = clerp(LW.C0, cf(-1.5, 0.6, 0.05) * euler(2.5, 0, 0) * euler(0, -1.57, 0), 0.5)
  895. RH.C0 = clerp(RH.C0, cf(1, -1, -0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05), 0.5)
  896. LH.C0 = clerp(LH.C0, cf(-1, -1, -0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05), 0.5)
  897. if Stagger.Value == true then
  898. break
  899. end
  900. end
  901. for i = 1, #AtkBones do
  902. AtkBones[i][1].Parent = nil
  903. end
  904. for i = 1, #AtkBones do
  905. table.remove(AtkBones, 1)
  906. end
  907. cansound = false
  908. attack = false
  909. end
  910. function attacktwo()
  911. attack = true
  912. cansound = true
  913. local btprt = part(3, modelzorz, 1, 1, BrickColor.new("White"), "Bone TorsPart", vt())
  914. local btwld1 = weld(btprt, btprt, Torso, cf(0, -2, 2))
  915. so("306247739", btprt, 1, 1)
  916. AtkBones = {}
  917. na = 0
  918. for i = 0.628, 6.28, 0.628 do
  919. swait()
  920. na = na + 0.4
  921. btwld1.C0 = euler(0, 0, na) * cf(0, -4, -2)
  922. local bone1, bhb1 = bone(modelzorz, 20, 3, 5, -1, 2)
  923. local bwld1 = weld(bone1, bone1, btprt, euler(0, 0, 0) * cf(0, -4, 0) * euler(0, 0, i))
  924. randnum = math.random(-1000, 1000) / 100
  925. ran = math.random(0, 500) / 100
  926. table.insert(AtkBones, {
  927. bone1,
  928. bhb1,
  929. bwld1,
  930. i,
  931. randnum,
  932. ran
  933. })
  934. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.4)
  935. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0.1, -0.1) * euler(-0.05, 0, 0), 0.4)
  936. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.4)
  937. LW.C0 = clerp(LW.C0, cf(-1.1, 0.5, 0.4) * euler(1.4, 0, 0.1) * euler(0, -1.57, 0), 0.4)
  938. RH.C0 = clerp(RH.C0, cf(1, -0.9, -0.15) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05), 0.4)
  939. LH.C0 = clerp(LH.C0, cf(-1, -0.9, -0.15) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05), 0.4)
  940. if Stagger.Value == true then
  941. break
  942. end
  943. end
  944. so("306247749", btprt, 1, 1)
  945. for i = 0, 1.1, 0.1 do
  946. swait()
  947. na = na + 0.4
  948. for i = 1, #AtkBones do
  949. MagniDamage(AtkBones[i][2], 4, 1, 1, 0, "Normal", AtkBones[i][2], 0.01, 1, math.random(2, 4), nil, nil, true)
  950. if i <= 0.7 then
  951. btwld1.C0 = clerp(btwld1.C0, euler(0, 0, na) * cf(0, -2, 5), 0.05)
  952. AtkBones[i][3].C0 = clerp(AtkBones[i][3].C0, euler(1.57, 0, 0) * cf(0, -3, AtkBones[i][5]) * euler(0, 0, AtkBones[i][4]), 0.3)
  953. else
  954. btwld1.C0 = clerp(btwld1.C0, euler(0, 0, na) * cf(0, -2, 60), 0.02)
  955. AtkBones[i][3].C0 = clerp(AtkBones[i][3].C0, euler(1.57, 0, 0) * cf(0, -4 - AtkBones[i][6], AtkBones[i][5]) * euler(0, 0, AtkBones[i][4]), 0.2)
  956. end
  957. end
  958. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.4)
  959. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, -0.1, -0.1) * euler(-0.05, 0, 0), 0.4)
  960. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.4)
  961. LW.C0 = clerp(LW.C0, cf(-1.2, 0.5, -0.1) * euler(1.57, 0, 0) * euler(0, -1.57, 0), 0.4)
  962. RH.C0 = clerp(RH.C0, cf(1, -0.9, 0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05), 0.4)
  963. LH.C0 = clerp(LH.C0, cf(-1, -0.9, 0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05), 0.4)
  964. if Stagger.Value == true then
  965. break
  966. end
  967. end
  968. for i = 1, #AtkBones do
  969. AtkBones[i][1].Parent = nil
  970. end
  971. for i = 1, #AtkBones do
  972. table.remove(AtkBones, 1)
  973. end
  974. btprt.Parent = nil
  975. cansound = false
  976. attack = false
  977. end
  978. function attackthree()
  979. attack = true
  980. attack = false
  981. end
  982. function attackfour()
  983. attack = true
  984. attack = false
  985. end
  986. function do1()
  987. if attack == true then
  988. return
  989. end
  990. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  991. return
  992. end
  993. attack = true
  994. d = MMouse.Hit.p + vt(0, 2, 0)
  995. if d ~= nil then
  996. thitfloor, tposfloor = rayCast(d, CFrame.new(d, d - Vector3.new(0, 1, 0)).lookVector, 300, Character)
  997. if thitfloor ~= nil then
  998. oldpos = RootPart.Position
  999. game:GetService("Lighting").OutdoorAmbient = Color3.new(0, 0, 0)
  1000. game:GetService("Lighting").Brightness = 0
  1001. ltime = game:GetService("Lighting").TimeOfDay
  1002. game:GetService("Lighting").TimeOfDay = 0
  1003. ski = it("Sky", game:GetService("Lighting"))
  1004. ski.StarCount = 0
  1005. swait(10)
  1006. RootPart.CFrame = cf(tposfloor) * cf(0, 3, 0)
  1007. pos4 = vt(oldpos.X, RootPart.Position.Y, oldpos.Z)
  1008. RootPart.CFrame = cf(RootPart.Position, pos4)
  1009. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.4980392156862745, 0.4980392156862745, 0.4980392156862745)
  1010. game:GetService("Lighting").Brightness = 1
  1011. game:GetService("Lighting").TimeOfDay = ltime
  1012. ski.Parent = nil
  1013. end
  1014. end
  1015. attack = false
  1016. end
  1017. function do2()
  1018. if attack == true then
  1019. return
  1020. end
  1021. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1022. return
  1023. end
  1024. attack = true
  1025. attack = false
  1026. end
  1027. function do3()
  1028. if attack == true then
  1029. return
  1030. end
  1031. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1032. return
  1033. end
  1034. attack = true
  1035. attack = false
  1036. end
  1037. function do4()
  1038. if attack == true then
  1039. return
  1040. end
  1041. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1042. return
  1043. end
  1044. attack = true
  1045. cooldowns[4] = 0
  1046. attack = false
  1047. end
  1048. function DecreaseStat(Model, Stat, Amount, Duration)
  1049. if Model:findFirstChild("Stats") ~= nil and Model.Stats[Stat] ~= nil then
  1050. Model.Stats[Stat].Value = Model.Stats[Stat].Value - Amount
  1051. d = Instance.new("NumberValue", Model.Stats.Decrease)
  1052. dur = Instance.new("NumberValue", d)
  1053. dur.Name = "Duration"
  1054. dur.Value = Duration
  1055. game:GetService("Debris"):AddItem(d, 20)
  1056. if Stat == "Damage" then
  1057. d.Name = "DecreaseAtk"
  1058. elseif Stat == "Defense" then
  1059. d.Name = "DecreaseDef"
  1060. elseif Stat == "Movement" then
  1061. d.Name = "DecreaseMvmt"
  1062. end
  1063. if Model:findFirstChild("Torso") ~= nil then
  1064. display = ""
  1065. if Stat == "Damage" then
  1066. if Amount > 0 then
  1067. display = "-Damage"
  1068. else
  1069. display = "+Damage"
  1070. end
  1071. elseif Stat == "Defense" then
  1072. if Amount > 0 then
  1073. display = "-Defense"
  1074. else
  1075. display = "+Defense"
  1076. end
  1077. elseif Stat == "Movement" then
  1078. if Amount > 0 then
  1079. display = "-Movement"
  1080. else
  1081. display = "+Movement"
  1082. end
  1083. end
  1084. showDamage(Model, display, "Debuff")
  1085. end
  1086. d.Value = Amount
  1087. end
  1088. end
  1089. function GetDist(Part1, Part2, magni)
  1090. local targ = Part1.Position - Part2.Position
  1091. local mag = targ.magnitude
  1092. if magni >= mag then
  1093. return true
  1094. else
  1095. return false
  1096. end
  1097. end
  1098. function MagniDamage(Part, magni, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1099. for _, c in pairs(workspace:children()) do
  1100. local hum = c:findFirstChild("Humanoid")
  1101. if hum ~= nil then
  1102. local head
  1103. for _, d in pairs(c:children()) do
  1104. if d.className == "Model" and ranged ~= true then
  1105. head = d:findFirstChild("Hitbox")
  1106. if d.Parent == Character then
  1107. break
  1108. end
  1109. if head ~= nil then
  1110. local targ = head.Position - Part.Position
  1111. local mag = targ.magnitude
  1112. if magni >= mag and c.Name ~= Player.Name then
  1113. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  1114. ref.Anchored = true
  1115. ref.CFrame = cf(head.Position)
  1116. game:GetService("Debris"):AddItem(ref, 1)
  1117. hitnum = math.random(1, 5)
  1118. if hitnum == 1 then
  1119. so("199148971", ref, 1, 1)
  1120. elseif hitnum == 2 then
  1121. so("199149025", ref, 1, 1)
  1122. elseif hitnum == 3 then
  1123. so("199149072", ref, 1, 1)
  1124. elseif hitnum == 4 then
  1125. so("199149109", ref, 1, 1)
  1126. elseif hitnum == 5 then
  1127. so("199149119", ref, 1, 1)
  1128. end
  1129. StaggerHit.Value = true
  1130. end
  1131. end
  1132. end
  1133. if d.className == "Part" then
  1134. head = d
  1135. if head ~= nil then
  1136. local targ = head.Position - Part.Position
  1137. local mag = targ.magnitude
  1138. if magni >= mag and c.Name ~= Player.Name then
  1139. if stun == nil then
  1140. stun = math.random(5, 10)
  1141. end
  1142. local Rang
  1143. if Ranged == false then
  1144. Rang = true
  1145. end
  1146. local stag
  1147. if shbash == true then
  1148. stag = true
  1149. end
  1150. Damagefunc(head, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1151. end
  1152. end
  1153. end
  1154. end
  1155. end
  1156. end
  1157. end
  1158. function rayCast(Pos, Dir, Max, Ignore)
  1159. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1160. end
  1161. function findNearestTorso(pos)
  1162. local list = game.Workspace:children()
  1163. local torso
  1164. local dist = 1000
  1165. local temp, human, temp2
  1166. for x = 1, #list do
  1167. temp2 = list[x]
  1168. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  1169. temp = temp2:findFirstChild("Torso")
  1170. human = temp2:findFirstChild("Humanoid")
  1171. if temp ~= nil and human ~= nil and human.Health > 0 and dist > (temp.Position - pos).magnitude then
  1172. local dohit = true
  1173. if Player.Neutral == false and game.Players:GetPlayerFromCharacter(temp.Parent) ~= nil and game.Players:GetPlayerFromCharacter(temp.Parent).TeamColor == Player.TeamColor then
  1174. dohit = false
  1175. end
  1176. if dohit == true then
  1177. torso = temp
  1178. dist = (temp.Position - pos).magnitude
  1179. end
  1180. end
  1181. end
  1182. end
  1183. return torso, dist
  1184. end
  1185. local Point = Torso.CFrame * cf(0, Torso.Size.Y, 0)
  1186. LastPoint = Point
  1187. function effect(Color, Ref, LP, P1, returnn)
  1188. if LP == nil or P1 == nil then
  1189. return
  1190. end
  1191. local effectsmsh = Instance.new("CylinderMesh")
  1192. effectsmsh.Scale = Vector3.new(0.2, 1, 0.2)
  1193. effectsmsh.Name = "Mesh"
  1194. local effectsg = Instance.new("Part")
  1195. NoOutline(effectsg)
  1196. effectsg.formFactor = 3
  1197. effectsg.CanCollide = false
  1198. effectsg.Name = "Eff"
  1199. effectsg.Locked = true
  1200. effectsg.Anchored = true
  1201. effectsg.Size = Vector3.new(0.5, 1, 0.5)
  1202. effectsg.Parent = workspace
  1203. effectsmsh.Parent = effectsg
  1204. effectsg.BrickColor = BrickColor.new(Color)
  1205. effectsg.Reflectance = Ref
  1206. local point1 = P1
  1207. local mg = (LP.p - point1.p).magnitude
  1208. effectsg.Size = Vector3.new(0.5, mg, 0.5)
  1209. effectsg.CFrame = cf((LP.p + point1.p) / 2, point1.p) * CFrame.Angles(math.rad(90), 0, 0)
  1210. effectsmsh.Scale = Vector3.new(0.2, 1, 0.2)
  1211. game:GetService("Debris"):AddItem(effectsg, 2)
  1212. if returnn then
  1213. return effectsg
  1214. end
  1215. if not returnn then
  1216. table.insert(Effects, {
  1217. effectsg,
  1218. "Cylinder",
  1219. 0.2,
  1220. 0.01,
  1221. 0,
  1222. 0.01,
  1223. effectsmsh
  1224. })
  1225. end
  1226. end
  1227. function MagicBlock(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type, parent, prt2)
  1228. local prt = part(3, parent, 0, 0, brickcolor, "Effect", vt())
  1229. local wld
  1230. prt.CFrame = cframe
  1231. prt.Anchored = true
  1232. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1233. game:GetService("Debris"):AddItem(prt, 10)
  1234. if Type == 1 or Type == nil then
  1235. table.insert(Effects, {
  1236. prt,
  1237. "Block1",
  1238. delay,
  1239. x3,
  1240. y3,
  1241. z3,
  1242. msh
  1243. })
  1244. elseif Type == 2 then
  1245. table.insert(Effects, {
  1246. prt,
  1247. "Block2",
  1248. delay,
  1249. x3,
  1250. y3,
  1251. z3,
  1252. msh
  1253. })
  1254. elseif Type == 3 then
  1255. table.insert(Effects, {
  1256. prt,
  1257. "Block3",
  1258. delay,
  1259. x3,
  1260. y3,
  1261. z3,
  1262. msh,
  1263. cframe,
  1264. prt2
  1265. })
  1266. end
  1267. end
  1268. function MagicSkull(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, goe)
  1269. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1270. prt.Anchored = true
  1271. prt.CFrame = cframe
  1272. msh = mesh("SpecialMesh", prt, "FileMesh", "4770583", vt(0, 0, 0), vt(x1, y1, z1))
  1273. game:GetService("Debris"):AddItem(prt, 10)
  1274. table.insert(Effects, {
  1275. prt,
  1276. "Skull",
  1277. delay,
  1278. x3,
  1279. y3,
  1280. z3,
  1281. msh,
  1282. goe
  1283. })
  1284. end
  1285. function MagicCircle(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1286. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1287. prt.Anchored = true
  1288. prt.CFrame = cframe
  1289. local msh = mesh("SpecialMesh", prt, "Sphere", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1290. game:GetService("Debris"):AddItem(prt, 10)
  1291. table.insert(Effects, {
  1292. prt,
  1293. "Cylinder",
  1294. delay,
  1295. x3,
  1296. y3,
  1297. z3,
  1298. msh
  1299. })
  1300. end
  1301. function MagicCylinder(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1302. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1303. prt.Anchored = true
  1304. prt.CFrame = cframe
  1305. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1306. game:GetService("Debris"):AddItem(prt, 10)
  1307. table.insert(Effects, {
  1308. prt,
  1309. "Cylinder",
  1310. delay,
  1311. x3,
  1312. y3,
  1313. z3,
  1314. msh
  1315. })
  1316. end
  1317. function MagicCylinder3(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1318. local prt = part(3, modelzorz, 0, 0, brickcolor, "Effect", vt())
  1319. prt.Anchored = true
  1320. prt.CFrame = cframe
  1321. local msh = mesh("SpecialMesh", prt, "Head", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1322. game:GetService("Debris"):AddItem(prt, 10)
  1323. table.insert(Effects, {
  1324. prt,
  1325. "Cylinder",
  1326. delay,
  1327. x3,
  1328. y3,
  1329. z3,
  1330. msh
  1331. })
  1332. end
  1333. function MagicCylinder2(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, goe)
  1334. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1335. prt.Anchored = true
  1336. prt.CFrame = cframe
  1337. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1338. game:GetService("Debris"):AddItem(prt, 10)
  1339. table.insert(Effects, {
  1340. prt,
  1341. "Cylinder2",
  1342. delay,
  1343. x3,
  1344. y3,
  1345. z3,
  1346. msh,
  1347. goe
  1348. })
  1349. end
  1350. function MagicHead(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1351. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1352. prt.Anchored = true
  1353. prt.CFrame = cframe
  1354. local msh = mesh("SpecialMesh", prt, "Head", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1355. game:GetService("Debris"):AddItem(prt, 10)
  1356. table.insert(Effects, {
  1357. prt,
  1358. "Cylinder",
  1359. delay,
  1360. x3,
  1361. y3,
  1362. z3,
  1363. msh
  1364. })
  1365. end
  1366. function ClangEffect(brickcolor, cframe, duration, decrease, size, power)
  1367. local prt = part(3, workspace, 0, 1, brickcolor, "Effect", vt())
  1368. prt.Anchored = true
  1369. prt.CFrame = cframe
  1370. local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(5, 5, 5))
  1371. game:GetService("Debris"):AddItem(prt, 10)
  1372. table.insert(Effects, {
  1373. prt,
  1374. "CylinderClang",
  1375. duration,
  1376. decrease,
  1377. size,
  1378. power,
  1379. prt.CFrame,
  1380. nil
  1381. })
  1382. end
  1383. function MagicWave(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1384. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1385. prt.Anchored = true
  1386. prt.CFrame = cframe
  1387. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  1388. game:GetService("Debris"):AddItem(prt, 10)
  1389. table.insert(Effects, {
  1390. prt,
  1391. "Cylinder",
  1392. delay,
  1393. x3,
  1394. y3,
  1395. z3,
  1396. msh
  1397. })
  1398. end
  1399. function MagicRing(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1400. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  1401. prt.Anchored = true
  1402. prt.CFrame = cframe * cf(x2, y2, z2)
  1403. local msh = mesh("SpecialMesh", prt, "FileMesh", "3270017", vt(0, 0, 0), vt(x1, y1, z1))
  1404. game:GetService("Debris"):AddItem(prt, 10)
  1405. table.insert(Effects, {
  1406. prt,
  1407. "Cylinder",
  1408. delay,
  1409. x3,
  1410. y3,
  1411. z3,
  1412. msh
  1413. })
  1414. end
  1415. function MagicRing2(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, prt2)
  1416. local prt = part(3, modelzorz, 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  1417. prt.Anchored = true
  1418. local msh = mesh("SpecialMesh", prt, "FileMesh", "3270017", vt(0, 0, 0), vt(x1, y1, z1))
  1419. game:GetService("Debris"):AddItem(prt, 10)
  1420. table.insert(Effects, {
  1421. prt,
  1422. "Block3",
  1423. delay,
  1424. x3,
  1425. y3,
  1426. z3,
  1427. msh,
  1428. cframe,
  1429. prt2
  1430. })
  1431. end
  1432. function ElecEffect(cff, x, y, z)
  1433. local prt = part(3, workspace, 0, 0, BrickColor.new("Bright red"), "Part", vt(1, 1, 1))
  1434. prt.Anchored = true
  1435. prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  1436. prt.CFrame = cf(prt.Position)
  1437. game:GetService("Debris"):AddItem(prt, 10)
  1438. xval = math.random() / 3
  1439. yval = math.random() / 3
  1440. zval = math.random() / 3
  1441. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
  1442. Effects[#Effects + 1] = {
  1443. prt,
  1444. "Elec",
  1445. 0.2,
  1446. x,
  1447. y,
  1448. z,
  1449. xval,
  1450. yval,
  1451. zval,
  1452. msh
  1453. }
  1454. end
  1455. function Damagefunc(hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1456. if hit.Parent == nil then
  1457. return
  1458. end
  1459. if hit == MovePart then
  1460. Fly = false
  1461. end
  1462. if hit.Name == "Hitbox" and hit.Parent ~= modelzorz and ranged ~= true then
  1463. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  1464. ref.Anchored = true
  1465. ref.CFrame = cf(hit.Position)
  1466. game:GetService("Debris"):AddItem(ref, 1)
  1467. hitnum = math.random(1, 5)
  1468. if hitnum == 1 then
  1469. so("199148971", ref, 1, 1)
  1470. elseif hitnum == 2 then
  1471. so("199149025", ref, 1, 1)
  1472. elseif hitnum == 3 then
  1473. so("199149072", ref, 1, 1)
  1474. elseif hitnum == 4 then
  1475. so("199149109", ref, 1, 1)
  1476. elseif hitnum == 5 then
  1477. so("199149119", ref, 1, 1)
  1478. end
  1479. StaggerHit.Value = true
  1480. end
  1481. h = hit.Parent:FindFirstChild("Humanoid")
  1482. for _, v in pairs(hit.Parent:children()) do
  1483. if v:IsA("Humanoid") then
  1484. h = v
  1485. end
  1486. end
  1487. if hit.Parent.Parent:FindFirstChild("Torso") ~= nil then
  1488. h = hit.Parent.Parent:FindFirstChild("Humanoid")
  1489. end
  1490. if hit.Parent.className == "Hat" then
  1491. hit = hit.Parent.Parent:findFirstChild("Head")
  1492. end
  1493. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  1494. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  1495. return
  1496. end
  1497. if Player.Neutral == false and game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil and game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == Player.TeamColor then
  1498. return
  1499. end
  1500. c = Instance.new("ObjectValue")
  1501. c.Name = "creator"
  1502. c.Value = game:service("Players").LocalPlayer
  1503. c.Parent = h
  1504. RecentEnemy.Value = hit.Parent
  1505. game:GetService("Debris"):AddItem(c, 0.5)
  1506. minim = minim * Atk.Value
  1507. maxim = maxim * Atk.Value
  1508. Damage = 0
  1509. if minim == maxim then
  1510. Damage = maxim
  1511. else
  1512. Damage = math.random(minim, maxim)
  1513. end
  1514. blocked = false
  1515. enblock = nil
  1516. Stats = hit.Parent:findFirstChild("Stats")
  1517. if Stats ~= nil then
  1518. enblock = Stats:findFirstChild("Block")
  1519. if enblock ~= nil and enblock.Value == true then
  1520. blocked = true
  1521. end
  1522. if Stats:findFirstChild("Defense") ~= nil then
  1523. if prechit == false then
  1524. Damage = Damage / Stats.Defense.Value
  1525. else
  1526. Val = Stats.Defense.Value
  1527. if 2 <= Val then
  1528. Val = 2
  1529. end
  1530. print(Val)
  1531. Damage = Damage * Val
  1532. --do break end
  1533. hitnum = math.random(1, 5)
  1534. if hitnum == 1 then
  1535. so("199149321", hit, 1, 1)
  1536. elseif hitnum == 2 then
  1537. so("199149338", hit, 1, 1)
  1538. elseif hitnum == 3 then
  1539. so("199149367", hit, 1, 1)
  1540. elseif hitnum == 4 then
  1541. so("199149409", hit, 1, 1)
  1542. elseif hitnum == 5 then
  1543. so("199149452", hit, 1, 1)
  1544. --do break end
  1545. if cansound == true then
  1546. hitnum = math.random(1, 6)
  1547. if hitnum == 1 then
  1548. so("199149137", hit, 1, 1)
  1549. elseif hitnum == 2 then
  1550. so("199149186", hit, 1, 1)
  1551. elseif hitnum == 3 then
  1552. so("199149221", hit, 1, 1)
  1553. elseif hitnum == 4 then
  1554. so("199149235", hit, 1, 1)
  1555. elseif hitnum == 5 then
  1556. so("199149269", hit, 1, 1)
  1557. elseif hitnum == 6 then
  1558. so("199149297", hit, 1, 1)
  1559. end
  1560. end
  1561. end
  1562. end
  1563. if 3 >= Damage and staghit == true and ranged ~= true then
  1564. StaggerHit.Value = true
  1565. end
  1566. end
  1567. if Stats:findFirstChild("Stun") ~= nil then
  1568. if blocked == true then
  1569. incstun = incstun / 2
  1570. end
  1571. if Stats.Stun.Value < 100 then
  1572. Stats.Stun.Value = Stats.Stun.Value + incstun
  1573. end
  1574. end
  1575. if Stats:findFirstChild("Stagger") ~= nil and stagger == true then
  1576. Stats.Stagger.Value = true
  1577. end
  1578. end
  1579. if blocked == true then
  1580. showDamage(hit.Parent, "Block", "Damage")
  1581. if ranged ~= true then
  1582. enblock.Value = false
  1583. Stagger.Value = true
  1584. hitnum = math.random(1, 2)
  1585. if hitnum == 1 then
  1586. so("199148933", hit, 1, 1)
  1587. elseif hitnum == 2 then
  1588. so("199148947", hit, 1, 1)
  1589. end
  1590. end
  1591. else
  1592. Damage = 1
  1593. coroutine.resume(coroutine.create(function(Hum, Dam)
  1594. Hum:takeDamage(Dam)
  1595. end), h, Damage)
  1596. if move4atk == true then
  1597. sapdef = true
  1598. end
  1599. showDamage(hit.Parent, Damage, "Damage")
  1600. if prechit == true then
  1601. eul = euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1602. MagicCircle(BrickColor.new("White"), cf(hit.Position) * eul, 5, 5, 5, -0.1, 5, -0.1, 0.02)
  1603. MagicCircle(BrickColor.new("White"), cf(hit.Position) * eul * euler(1.57, 0, 0), 5, 5, 5, -0.1, 5, -0.1, 0.02)
  1604. end
  1605. if DecreaseState ~= nil then
  1606. DecreaseStat(hit.Parent, DecreaseState, DecreaseAmount, Duration)
  1607. end
  1608. if Type == "Knockdown" then
  1609. hum = hit.Parent.Humanoid
  1610. hum.PlatformStand = true
  1611. coroutine.resume(coroutine.create(function(HHumanoid)
  1612. swait(1)
  1613. HHumanoid.PlatformStand = false
  1614. end), hum)
  1615. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1616. local bodvol = Instance.new("BodyVelocity")
  1617. bodvol.velocity = angle * knockback
  1618. bodvol.P = 5000
  1619. bodvol.maxForce = Vector3.new(8000, 8000, 8000)
  1620. bodvol.Parent = hit
  1621. rl = Instance.new("BodyAngularVelocity")
  1622. rl.P = 3000
  1623. rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
  1624. rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  1625. rl.Parent = hit
  1626. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1627. game:GetService("Debris"):AddItem(rl, 0.5)
  1628. elseif Type == "Knockdown2" then
  1629. hum = hit.Parent.Humanoid
  1630. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1631. local bodvol = Instance.new("BodyVelocity")
  1632. bodvol.velocity = angle * knockback
  1633. bodvol.P = 5000
  1634. bodvol.maxForce = Vector3.new(8000, 8000, 8000)
  1635. bodvol.Parent = hit
  1636. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1637. elseif Type == "Normal" or Type == "NormalDecreaseMvmt1" then
  1638. vp = Instance.new("BodyVelocity")
  1639. vp.P = 500
  1640. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  1641. if KnockbackType == 1 then
  1642. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  1643. elseif KnockbackType == 2 then
  1644. vp.velocity = Property.CFrame.lookVector * knockback
  1645. end
  1646. game:GetService("Debris"):AddItem(vp, 0.5)
  1647. if knockback > 0 then
  1648. vp.Parent = hit.Parent.Torso
  1649. end
  1650. end
  1651. end
  1652. debounce = Instance.new("BoolValue")
  1653. debounce.Name = "DebounceHit"
  1654. debounce.Parent = hit.Parent
  1655. debounce.Value = true
  1656. game:GetService("Debris"):AddItem(debounce, Delay)
  1657. c = Instance.new("ObjectValue")
  1658. c.Name = "creator"
  1659. c.Value = Player
  1660. c.Parent = h
  1661. game:GetService("Debris"):AddItem(c, 0.5)
  1662. CRIT = false
  1663. end
  1664. end
  1665. function showDamage(Char, Dealt, Type)
  1666. m = Instance.new("Model")
  1667. m.Name = "Effect"
  1668. c = Instance.new("Part")
  1669. c.Transparency = 1
  1670. c.Name = "Head"
  1671. c.TopSurface = 0
  1672. c.BottomSurface = 0
  1673. c.formFactor = "Plate"
  1674. c.Size = Vector3.new(1, 0.4, 1)
  1675. b = Instance.new("BillboardGui", c)
  1676. b.Size = UDim2.new(5, 0, 5, 0)
  1677. b.AlwaysOnTop = true
  1678. damgui = gui("TextLabel", b, tostring(Dealt), 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0))
  1679. if Type == "Damage" then
  1680. damgui.Font = "SourceSans"
  1681. if Dealt == "Block" then
  1682. damgui.TextColor3 = BrickColor.new("Bright blue").Color
  1683. elseif Dealt < 3 then
  1684. damgui.TextColor3 = BrickColor.new("White").Color
  1685. elseif Dealt >= 3 and Dealt < 20 then
  1686. damgui.TextColor3 = BrickColor.new("Bright yellow").Color
  1687. else
  1688. damgui.TextColor3 = BrickColor.new("Really red").Color
  1689. damgui.Font = "SourceSansBold"
  1690. end
  1691. elseif Type == "Debuff" then
  1692. damgui.TextColor3 = BrickColor.new("White").Color
  1693. elseif Type == "Interrupt" then
  1694. damgui.TextColor3 = BrickColor.new("New Yeller").Color
  1695. end
  1696. damgui.TextScaled = true
  1697. ms = Instance.new("CylinderMesh")
  1698. ms.Scale = Vector3.new(0.8, 0.8, 0.8)
  1699. ms.Parent = c
  1700. c.Reflectance = 0
  1701. Instance.new("BodyGyro").Parent = c
  1702. c.Parent = m
  1703. if Char:findFirstChild("Head") ~= nil then
  1704. c.CFrame = cf(Char.Head.CFrame.p + Vector3.new(math.random(-100, 100) / 100, 3, math.random(-100, 100) / 100))
  1705. elseif Char.Parent:findFirstChild("Head") ~= nil then
  1706. c.CFrame = cf(Char.Parent.Head.CFrame.p + Vector3.new(math.random(-100, 100) / 100, 3, math.random(-100, 100) / 100))
  1707. end
  1708. f = Instance.new("BodyPosition")
  1709. f.P = 2000
  1710. f.D = 100
  1711. f.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1712. if Type == "Damage" then
  1713. f.position = c.Position + Vector3.new(0, 3, 0)
  1714. elseif Type == "Debuff" or Type == "Interrupt" then
  1715. f.position = c.Position + Vector3.new(0, 5, 0)
  1716. end
  1717. f.Parent = c
  1718. game:GetService("Debris"):AddItem(m, 5)
  1719. table.insert(Effects, {
  1720. m,
  1721. "showDamage",
  1722. damgui,
  1723. f,
  1724. 10,
  1725. 1,
  1726. 15,
  1727. 50,
  1728. 100
  1729. })
  1730. c.CanCollide = false
  1731. m.Parent = workspace
  1732. c.CanCollide = false
  1733. end
  1734. combo = 0
  1735. function ob1d(mouse)
  1736. if attack == true or equipped == false then
  1737. return
  1738. end
  1739. hold = true
  1740. if combo == 0 then
  1741. combo = 1
  1742. attackone()
  1743. elseif combo == 1 then
  1744. combo = 0
  1745. attacktwo()
  1746. elseif combo == 2 then
  1747. combo = 0
  1748. attackthree()
  1749. elseif combo == 3 then
  1750. combo = 0
  1751. attackfour()
  1752. end
  1753. coroutine.resume(coroutine.create(function()
  1754. for i = 1, 50 do
  1755. if attack == false then
  1756. swait()
  1757. end
  1758. end
  1759. if attack == false then
  1760. combo = 0
  1761. end
  1762. end))
  1763. end
  1764. function ob1u(mouse)
  1765. hold = false
  1766. end
  1767. buttonhold = false
  1768. fenbarmove1.MouseButton1Click:connect(do1)
  1769. fenbarmove2.MouseButton1Click:connect(do2)
  1770. fenbarmove3.MouseButton1Click:connect(do3)
  1771. fenbarmove4.MouseButton1Click:connect(do4)
  1772. eul = 0
  1773. equipped = false
  1774. function key(key)
  1775. if key == "q" then
  1776. Stagger.Value = true
  1777. end
  1778. if attack == true then
  1779. return
  1780. end
  1781. if key == "f" then
  1782. pressedf = true
  1783. fnumb = 0
  1784. attack = true
  1785. if equipped == false then
  1786. equipped = true
  1787. RSH = ch.Torso["Right Shoulder"]
  1788. LSH = ch.Torso["Left Shoulder"]
  1789. RSH.Parent = nil
  1790. LSH.Parent = nil
  1791. RW.Name = "Right Shoulder"
  1792. RW.Part0 = ch.Torso
  1793. RW.C0 = cf(1.5, 0.5, 0)
  1794. RW.C1 = cf(0, 0.5, 0)
  1795. RW.Part1 = ch["Right Arm"]
  1796. RW.Parent = ch.Torso
  1797. LW.Name = "Left Shoulder"
  1798. LW.Part0 = ch.Torso
  1799. LW.C0 = cf(-1.5, 0.5, 0)
  1800. LW.C1 = cf(0, 0.5, 0)
  1801. LW.Part1 = ch["Left Arm"]
  1802. LW.Parent = ch.Torso
  1803. Animate.Parent = nil
  1804. animTrack:Play()
  1805. equipanim()
  1806. else
  1807. equipped = false
  1808. hideanim()
  1809. LH.C1 = LHC1
  1810. RH.C1 = RHC1
  1811. animTrack:Stop()
  1812. Animate.Parent = Character
  1813. swait(0)
  1814. RW.Parent = nil
  1815. LW.Parent = nil
  1816. RSH.Parent = player.Character.Torso
  1817. LSH.Parent = player.Character.Torso
  1818. end
  1819. attack = false
  1820. end
  1821. if equipped == false then
  1822. return
  1823. end
  1824. if key == "e" then
  1825. print(#Bones)
  1826. end
  1827. if key == "g" then
  1828. hprt3.Transparency = 0
  1829. hprt4.Transparency = 0
  1830. hprt5.Transparency = 1
  1831. end
  1832. if key == "h" then
  1833. hprt3.Transparency = 1
  1834. hprt4.Transparency = 1
  1835. hprt5.Transparency = 0
  1836. end
  1837. if key == "j" then
  1838. hprt3.Transparency = 1
  1839. hprt4.Transparency = 1
  1840. hprt5.Transparency = 1
  1841. end
  1842. if key == "z" then
  1843. do1()
  1844. end
  1845. if key == "x" then
  1846. do2()
  1847. end
  1848. if key == "c" then
  1849. do3()
  1850. end
  1851. if key == "v" then
  1852. do4()
  1853. end
  1854. end
  1855. function key2(key)
  1856. end
  1857. function s(mouse)
  1858. mouse.Button1Down:connect(function()
  1859. ob1d(mouse)
  1860. end)
  1861. mouse.Button1Up:connect(function()
  1862. ob1u(mouse)
  1863. end)
  1864. mouse.KeyDown:connect(key)
  1865. mouse.KeyUp:connect(key2)
  1866. player = Player
  1867. ch = Character
  1868. MMouse = mouse
  1869. end
  1870. function ds(mouse)
  1871. end
  1872. Bin.Selected:connect(s)
  1873. Bin.Deselected:connect(ds)
  1874. print("Calvar loaded.")
  1875. local mananum = 0
  1876. local donum = 0
  1877. local stunnum = 0
  1878. local staggeranim = false
  1879. local stunanim = false
  1880. local Point, LastPoint
  1881. local handef = 0
  1882. local walk = 0
  1883. local walkforw = true
  1884. while true do
  1885. swait()
  1886. for _, c in pairs(Character:children()) do
  1887. for _, v in pairs(c:children()) do
  1888. if (v.className == "BodyGyro" or v.className == "BodyPosition" or v.className == "BodyVelocity" or v.className == "BodyAngularVelocity") and v.Name ~= "MyGyro" and v.Name ~= "MyPos" then
  1889. print("dai")
  1890. v.Parent = nil
  1891. end
  1892. end
  1893. end
  1894. if hprt5.Transparency == 0 then
  1895. parti.Enabled = true
  1896. elseif hprt5.Transparency == 1 then
  1897. parti.Enabled = false
  1898. end
  1899. col = math.random()
  1900. col2 = 1 - col
  1901. hprt5.BrickColor = BrickColor.new(Color3.new(col, math.random(50, 100) / 100, col2))
  1902. parti.Color = cs(hprt5.BrickColor.Color, hprt5.BrickColor.Color)
  1903. if Humanoid.Health <= 0 then
  1904. attack = true
  1905. resumeControl()
  1906. modelzorz.Parent = workspace
  1907. modelzorz.Name = "Weapon Model"
  1908. game:GetService("Debris"):AddItem(modelzorz, 30)
  1909. for i = 1, #Weapon do
  1910. Weapon[i].Parent = modelzorz
  1911. Weapon[i].CanCollide = true
  1912. end
  1913. for i = 1, #Welds do
  1914. if Welds[i].Part0.Parent == Character or Welds[i].Part1.Parent == Character then
  1915. Welds[i].Parent = nil
  1916. else
  1917. Welds[i].Parent = prt1
  1918. end
  1919. end
  1920. end
  1921. if fnumb < 21 then
  1922. fnumb = fnumb + 1
  1923. if pressedf == false then
  1924. fenframe5.BackgroundTransparency = fenframe5.BackgroundTransparency - 0.025
  1925. tellbar.TextTransparency = tellbar.TextTransparency - 0.05
  1926. tellbar.TextStrokeTransparency = tellbar.TextStrokeTransparency - 0.05
  1927. else
  1928. if fnumb == 20 then
  1929. fenframe5.Parent = nil
  1930. print("daigui")
  1931. end
  1932. fenframe5.BackgroundTransparency = fenframe5.BackgroundTransparency + 0.025
  1933. tellbar.TextTransparency = tellbar.TextTransparency + 0.05
  1934. tellbar.TextStrokeTransparency = tellbar.TextStrokeTransparency + 0.05
  1935. end
  1936. end
  1937. hitbox2.Parent = hitbox.Parent
  1938. hitbox2.Size = hitbox.Size
  1939. hitbox2.CFrame = hitboxCF
  1940. hboxpos.position = hitbox2.Position + vt(math.random(-100, 100) / 100, math.random(-100, 100) / 100, math.random(-100, 100) / 100)
  1941. if Stagger.Value == true and staggeranim == false then
  1942. coroutine.resume(coroutine.create(function()
  1943. staggeranim = true
  1944. while attack == true do
  1945. swait()
  1946. end
  1947. StaggerAnim()
  1948. StaggerHit.Value = false
  1949. Stagger.Value = false
  1950. staggeranim = false
  1951. end))
  1952. end
  1953. if StaggerHit.Value == true and staggeranim == false then
  1954. coroutine.resume(coroutine.create(function()
  1955. staggeranim = true
  1956. while attack == true do
  1957. swait()
  1958. end
  1959. StaggerHitt()
  1960. StaggerHit.Value = false
  1961. Stagger.Value = false
  1962. staggeranim = false
  1963. end))
  1964. end
  1965. if Mvmt.Value < 0 or Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1966. Humanoid.WalkSpeed = 0
  1967. else
  1968. Humanoid.WalkSpeed = 16 * Mvmt.Value
  1969. end
  1970. if Stun.Value >= 100 and stunanim == false then
  1971. coroutine.resume(coroutine.create(function()
  1972. stunanim = true
  1973. while attack == true do
  1974. swait()
  1975. end
  1976. StunAnim()
  1977. Stun.Value = 0
  1978. stunanim = false
  1979. end))
  1980. end
  1981. local stunnum2 = 30
  1982. if stunnum >= stunnum2 then
  1983. if Stun.Value > 0 then
  1984. Stun.Value = Stun.Value - 1
  1985. end
  1986. stunnum = 0
  1987. end
  1988. stunnum = stunnum + 1
  1989. if donum >= 0.5 then
  1990. handidle = true
  1991. elseif donum <= 0 then
  1992. handidle = false
  1993. end
  1994. if handidle == false then
  1995. donum = donum + 0.003
  1996. else
  1997. donum = donum - 0.003
  1998. end
  1999. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  2000. local velderp = RootPart.Velocity.y
  2001. hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  2002. if equipped == true then
  2003. if attack == false then
  2004. idle = idle + 1
  2005. else
  2006. idle = 0
  2007. end
  2008. if not (idle >= 500) or attack == false then
  2009. end
  2010. if Anim == "Walk" then
  2011. if walkforw == true then
  2012. RH.C1 = clerp(RH.C1, RHC1 * cf(0.2, -0.2, 0) * euler(0, 0, 1), Mvmt.Value * 10 / 50)
  2013. LH.C1 = clerp(LH.C1, LHC1 * cf(0.1, 0.2, 0) * euler(0, 0, 1), Mvmt.Value * 10 / 50)
  2014. else
  2015. RH.C1 = clerp(RH.C1, RHC1 * cf(-0.1, 0.2, 0) * euler(0, 0, -1), Mvmt.Value * 10 / 50)
  2016. LH.C1 = clerp(LH.C1, LHC1 * cf(-0.2, -0.2, 0) * euler(0, 0, -1), Mvmt.Value * 10 / 50)
  2017. end
  2018. else
  2019. RH.C1 = clerp(RH.C1, RHC1, 0.2)
  2020. LH.C1 = clerp(LH.C1, LHC1, 0.2)
  2021. end
  2022. if RootPart.Velocity.y > 1 and hitfloor == nil then
  2023. Anim = "Jump"
  2024. if attack == false then
  2025. Neck.C0 = clerp(Neck.C0, necko * euler(-0.2, 0, 0), 0.2)
  2026. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.2)
  2027. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2028. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2029. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2030. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2031. RH.C0 = clerp(RH.C0, cf(1, -1, -0.3) * euler(-0.5, 1.57, 0) * euler(-0.2, 0, 0), 0.2)
  2032. LH.C0 = clerp(LH.C0, cf(-1, -1, -0.3) * euler(-0.5, -1.57, 0) * euler(-0.2, 0, 0), 0.2)
  2033. end
  2034. elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  2035. Anim = "Fall"
  2036. if attack == false then
  2037. Neck.C0 = clerp(Neck.C0, necko * euler(0.4, 0, 0), 0.2)
  2038. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.2)
  2039. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2040. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2041. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2042. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2043. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0.4, 1.57, 0), 0.2)
  2044. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(-0.2, -1.57, 0), 0.2)
  2045. end
  2046. elseif torvel < 1 and hitfloor ~= nil then
  2047. Anim = "Idle"
  2048. if attack == false then
  2049. Neck.C0 = clerp(Neck.C0, necko * euler(0.3, 0, 0) * euler(0, 0, 0), 0.2)
  2050. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.2)
  2051. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2052. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2053. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2054. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2055. RH.C0 = clerp(RH.C0, cf(1, -0.9, -0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05), 0.2)
  2056. LH.C0 = clerp(LH.C0, cf(-1, -0.9, -0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05), 0.2)
  2057. end
  2058. elseif torvel > 2 and torvel < 30 and hitfloor ~= nil then
  2059. Anim = "Walk"
  2060. walk = walk + 1
  2061. if walk >= 10 then
  2062. walk = 0
  2063. if walkforw == true then
  2064. walkforw = false
  2065. elseif walkforw == false then
  2066. walkforw = true
  2067. end
  2068. end
  2069. if attack == false then
  2070. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.2)
  2071. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(0, 0, 0), 0.2)
  2072. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.2), 0.2)
  2073. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2074. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.2), 0.2)
  2075. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2076. RH.C0 = clerp(RH.C0, cf(1, -0.9, -0.05) * euler(0, 1.57, 0) * euler(0, -0.1, 0) * euler(-0.05, 0, 0), 0.2)
  2077. LH.C0 = clerp(LH.C0, cf(-1, -0.9, -0.05) * euler(0, -1.57, 0) * euler(0, 0.1, 0) * euler(-0.05, 0, 0), 0.2)
  2078. end
  2079. elseif torvel >= 30 and hitfloor ~= nil then
  2080. Anim = "Run"
  2081. if attack == false then
  2082. Neck.C0 = clerp(Neck.C0, necko * euler(0.3, 0, 0) * euler(0, 0, 0), 0.2)
  2083. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.2)
  2084. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2085. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2086. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2087. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2088. RH.C0 = clerp(RH.C0, cf(1, -0.9, -0.1) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05), 0.2)
  2089. LH.C0 = clerp(LH.C0, cf(-1, -0.9, -0.1) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05), 0.2)
  2090. end
  2091. end
  2092. end
  2093. if #Effects > 0 then
  2094. for e = 1, #Effects do
  2095. if Effects[e] ~= nil then
  2096. local Thing = Effects[e]
  2097. if Thing ~= nil then
  2098. local Part = Thing[1]
  2099. local Mode = Thing[2]
  2100. local Delay = Thing[3]
  2101. local IncX = Thing[4]
  2102. local IncY = Thing[5]
  2103. local IncZ = Thing[6]
  2104. if Thing[2] == "CylinderClang" then
  2105. if Thing[3] <= 1 then
  2106. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 2.5 * Thing[5], 0) * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  2107. Thing[7] = Thing[1].CFrame
  2108. effect("New Yeller", 0, Thing[8], Thing[7])
  2109. Thing[8] = Thing[7]
  2110. Thing[3] = Thing[3] + Thing[4]
  2111. else
  2112. Part.Parent = nil
  2113. table.remove(Effects, e)
  2114. end
  2115. end
  2116. if Thing[2] == "showDamage" then
  2117. if Thing[6] < Thing[5] then
  2118. Thing[6] = Thing[6] + 1
  2119. elseif Thing[6] < Thing[7] then
  2120. Thing[4].position = Thing[4].position + vt(0, -0.2, 0)
  2121. Thing[6] = Thing[6] + 1
  2122. elseif Thing[6] < Thing[8] then
  2123. Thing[6] = Thing[6] + 1
  2124. elseif Thing[6] < Thing[9] then
  2125. Thing[6] = Thing[6] + 1
  2126. Thing[4].position = Thing[4].position + vt(0, 0.2, 0)
  2127. Thing[3].TextStrokeTransparency = Thing[3].TextStrokeTransparency + 0.1
  2128. Thing[3].TextTransparency = Thing[3].TextTransparency + 0.1
  2129. else
  2130. Thing[1].Parent = nil
  2131. table.remove(Effects, e)
  2132. end
  2133. end
  2134. if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" then
  2135. if Thing[1].Transparency <= 1 then
  2136. if Thing[2] == "Block1" then
  2137. Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  2138. Mesh = Thing[7]
  2139. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2140. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2141. elseif Thing[2] == "Block2" then
  2142. Thing[1].CFrame = Thing[1].CFrame
  2143. Mesh = Thing[7]
  2144. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2145. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2146. elseif Thing[2] == "Block3" then
  2147. Thing[1].CFrame = Thing[9].CFrame * Thing[8] * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  2148. Mesh = Thing[7]
  2149. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2150. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2151. elseif Thing[2] == "Cylinder" then
  2152. Mesh = Thing[7]
  2153. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2154. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2155. elseif Thing[2] == "Cylinder2" then
  2156. Thing[1].CFrame = Thing[1].CFrame * cf(0, Thing[8], 0)
  2157. Mesh = Thing[7]
  2158. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2159. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2160. elseif Thing[2] == "Blood" then
  2161. Mesh = Thing[7]
  2162. Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
  2163. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2164. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2165. elseif Thing[2] == "Elec" then
  2166. Mesh = Thing[10]
  2167. Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
  2168. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2169. elseif Thing[2] == "Disappear" then
  2170. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2171. end
  2172. else
  2173. Part.Parent = nil
  2174. table.remove(Effects, e)
  2175. end
  2176. end
  2177. end
  2178. end
  2179. end
  2180. end
  2181. fenbarmana2:TweenSize(UDim2.new(0.4, 0, -4 * mana.Value / 100, 0), nil, 1, 0.4, true)
  2182. fenbarmana4.Text = "Mana(" .. mana.Value .. ")"
  2183. fenbarhp2.BackgroundColor3 = Color3.new(Humanoid.Health / Humanoid.MaxHealth, 0, 0)
  2184. fenbarhp2:TweenSize(UDim2.new(Humanoid.Health / Humanoid.MaxHealth, 0, 1, 0), nil, 1, 0.4, true)
  2185. fenbarhp3.Text = "(" .. math.floor(Humanoid.Health) .. ")"
  2186. fenbarmove1b:TweenSize(UDim2.new(1 * cooldowns[1] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2187. fenbarmove2b:TweenSize(UDim2.new(1 * cooldowns[2] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2188. fenbarmove3b:TweenSize(UDim2.new(1 * cooldowns[3] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2189. fenbarmove4b:TweenSize(UDim2.new(1 * cooldowns[4] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2190. for _, c in pairs(Decrease:children()) do
  2191. if c:findFirstChild("Duration") ~= nil then
  2192. c.Duration.Value = c.Duration.Value - 1
  2193. c.Parent = nil
  2194. end
  2195. if c.Name == "DecreaseAtk" then
  2196. decreaseatk = decreaseatk + c.Value
  2197. elseif c.Name == "DecreaseDef" then
  2198. decreasedef = decreasedef + c.Value
  2199. elseif c.Name == "DecreaseMvmt" then
  2200. decreasemvmt = decreasemvmt + c.Value
  2201. end
  2202. end
  2203. Atk.Value = 1 - decreaseatk
  2204. if Atk.Value <= 0 then
  2205. Atk.Value = 0
  2206. end
  2207. Def.Value = 1 - decreasedef
  2208. if Def.Value <= 0 then
  2209. Def.Value = 0.01
  2210. end
  2211. Mvmt.Value = 1 - decreasemvmt
  2212. if Mvmt.Value <= 0 then
  2213. Mvmt.Value = 0
  2214. end
  2215. decreaseatk = 0
  2216. decreasedef = 0
  2217. decreasemvmt = 0
  2218. AtkVal = Atk.Value * 100
  2219. AtkVal = math.floor(AtkVal)
  2220. AtkVal = AtkVal / 100
  2221. fenbardamage.Text = [[
  2222. Damage
  2223. (]] .. AtkVal .. ")"
  2224. DefVal = Def.Value * 100
  2225. DefVal = math.floor(DefVal)
  2226. DefVal = DefVal / 100
  2227. fenbardef.Text = [[
  2228. Defense
  2229. (]] .. DefVal .. ")"
  2230. MvmtVal = Mvmt.Value * 100
  2231. MvmtVal = math.floor(MvmtVal)
  2232. MvmtVal = MvmtVal / 100
  2233. fenbarmove.Text = [[
  2234. Walkspeed
  2235. (]] .. MvmtVal .. ")"
  2236. if Stun.Value >= 100 then
  2237. fenbarstun2:TweenSize(UDim2.new(0.4, 0, -4, 0), nil, 1, 0.4, true)
  2238. else
  2239. fenbarstun2:TweenSize(UDim2.new(0.4, 0, -4 * Stun.Value / 100, 0), nil, 1, 0.4, true)
  2240. end
  2241. fenbarstun3.Text = "Stun(" .. Stun.Value .. ")"
  2242. if mana.Value >= 100 then
  2243. mana.Value = 100
  2244. elseif mananum <= 9 then
  2245. mananum = mananum + 1
  2246. else
  2247. mananum = 0
  2248. mana.Value = mana.Value + 1
  2249. end
  2250. for i = 1, #cooldowns do
  2251. if cooldownmax <= cooldowns[i] then
  2252. cooldowns[i] = cooldownmax
  2253. else
  2254. cooldowns[i] = cooldowns[i] + cooldownsadd[i]
  2255. end
  2256. end
  2257. end
  2258. -- BurnLegion strikes again!
  2259. -- wongxd, this is why you DON'T goto Voidacity's
  2260. -- SLPM has been absent, so I've taken it upon myself to make something
  2261.  
  2262. --------------------------------------------------------
  2263.  
  2264. pls = game:GetService'Players'
  2265. rs = game:GetService'RunService'
  2266. uinps = game:GetService'UserInputService'
  2267. lp = pls.LocalPlayer
  2268. mouse = lp:GetMouse()
  2269. c = lp.Character
  2270. human = c.Humanoid
  2271. human.MaxHealth = 50
  2272. wait()
  2273. human.Health = 50
  2274. c.Health:Destroy()
  2275.  
  2276. --------------------------------------------------------
  2277.  
  2278. Debounces = {
  2279. AnimationCycles = 0;
  2280. FPS = 0;
  2281. scalingDamage = false;
  2282. damageLevel = 0;
  2283. attackNumber = 0;
  2284. isAttacking = false;
  2285. isMoving = false;
  2286. isSprinting = false;
  2287. isBoosting = false;
  2288. isPassive = false;
  2289. isTyping = false;
  2290. }
  2291.  
  2292. --------------------------------------------------------
  2293.  
  2294. numLerp = function(start, goal, alpha)
  2295. return(((goal - start) * alpha) + start)
  2296. end
  2297.  
  2298. CFrameZero = function()
  2299. return CFrame.new(Vector3.new())
  2300. end
  2301.  
  2302. rad = function(value)
  2303. return math.rad(value)
  2304. end
  2305.  
  2306. CFAngles = function(Vector)
  2307. return CFrame.Angles(rad(Vector.x),rad(Vector.y),rad(Vector.z))
  2308. end
  2309.  
  2310. --------------------------------------------------------
  2311.  
  2312. AnimStat = {
  2313. lerpSpeed = .2;
  2314. lerpSpeed2 = .35;
  2315. lerpTween = 0;
  2316. }
  2317.  
  2318. Joints = {
  2319. c.HumanoidRootPart.RootJoint;
  2320. c.Torso.Neck;
  2321. c.Torso['Left Shoulder'];
  2322. c.Torso['Right Shoulder'];
  2323. c.Torso['Left Hip'];
  2324. c.Torso['Right Hip'];
  2325. }
  2326.  
  2327. JointTargets = {
  2328. CFrameZero();
  2329. CFrameZero();
  2330. CFrameZero();
  2331. CFrameZero();
  2332. CFrameZero();
  2333. CFrameZero();
  2334. }
  2335.  
  2336. --------------------------------------------------------
  2337.  
  2338. BodyColors = {
  2339. HeadColor = BrickColor.new("Institutional white");
  2340. LeftArmColor = BrickColor.new("Institutional white");
  2341. RightArmColor = BrickColor.new("Institutional white");
  2342. LeftLegColor = BrickColor.new("Institutional white");
  2343. RightLegColor = BrickColor.new("Institutional white");
  2344. TorsoColor = BrickColor.new("Mid gray");
  2345. }
  2346.  
  2347. Customs = {
  2348. Face = "http://www.roblox.com/asset/?id=8560915";
  2349. Shirt = "http://www.roblox.com/asset/?id=334781688";
  2350. Pants = "http://www.roblox.com/asset/?id=335237283";
  2351. }
  2352.  
  2353. --------------------------------------------------------
  2354.  
  2355. prepareCharacter = function()
  2356. local transPoints = {
  2357. NumberSequenceKeypoint.new(0,.819,.0375),
  2358. NumberSequenceKeypoint.new(.207,.594,.0187),
  2359. NumberSequenceKeypoint.new(.4,.55,.031),
  2360. NumberSequenceKeypoint.new(.57,.619,.05),
  2361. NumberSequenceKeypoint.new(.76,.8,.0375),
  2362. NumberSequenceKeypoint.new(1,1,0),
  2363. }
  2364. local sizePoints = {
  2365. NumberSequenceKeypoint.new(0,.687,0),
  2366. NumberSequenceKeypoint.new(.111,.875,0),
  2367. NumberSequenceKeypoint.new(.327,1.19,0),
  2368. NumberSequenceKeypoint.new(.646,1.56,0),
  2369. NumberSequenceKeypoint.new(.805,1.37,0),
  2370. NumberSequenceKeypoint.new(.905,1.06,0),
  2371. NumberSequenceKeypoint.new(.968,.938,0),
  2372. NumberSequenceKeypoint.new(.984,1.13,0),
  2373. NumberSequenceKeypoint.new(1,1.62,0),
  2374. }
  2375. local Size = NumberSequence.new(sizePoints)
  2376. local Transparency = NumberSequence.new(transPoints)
  2377. rayModel = Instance.new("Model",c)
  2378. efxBlock = Instance.new("Part",c)
  2379. efxBlock.BrickColor = BrickColor.new("Cyan")
  2380. efxBlock.Material = "Neon"
  2381. efxBlock.FormFactor = "Custom"
  2382. efxBlock.Transparency = .3
  2383. efxBlock.Size = Vector3.new(.3,.3,.3)
  2384. local mesh = Instance.new("SpecialMesh",efxBlock)
  2385. mesh.MeshType = Enum.MeshType.Sphere
  2386. mesh.Scale = Vector3.new(1,1,1)
  2387. light = Instance.new("PointLight",c.Head)
  2388. light.Range = 10
  2389. light.Color = Color3.new(0,200/255,1)
  2390. light.Shadows = false
  2391. local particles = Instance.new("ParticleEmitter",efxBlock)
  2392. particles.Color = ColorSequence.new(Color3.new(0,0,225/255),Color3.new(20/255,190/255,205/255))
  2393. particles.LightEmission = .95
  2394. particles.Size = Size
  2395. particles.Name = "Fire"
  2396. particles.Transparency = Transparency
  2397. particles.LockedToPart = true
  2398. particles.VelocityInheritance = .5
  2399. particles.LockedToPart = true
  2400. particles.Rate = 70
  2401. particles.Texture = "rbxassetid://56561915"
  2402. particles.Lifetime = NumberRange.new(2,2)
  2403. particles.RotSpeed = NumberRange.new(100,100)
  2404. particles.Speed = NumberRange.new(7,7)
  2405. script.Parent = efxBlock
  2406. fire = particles
  2407. local offset = Vector3.new(-0.11, .23, -0.5)
  2408. local weld = Instance.new("Weld",c.Head)
  2409. weld.Part0 = c.Head
  2410. weld.Part1 = efxBlock
  2411. weld.C0 = CFrame.new(offset) * CFrame.Angles(math.rad(-40),math.rad(10),math.rad(40))
  2412. efxBlock.Parent = c
  2413. local music = Instance.new("Sound",c)
  2414. music.SoundId = "rbxassetid://316012176"
  2415. music.Looped = true
  2416. music.Volume = 0
  2417. fight = music
  2418. local music2 = Instance.new("Sound",c)
  2419. music2.SoundId = "rbxassetid://316014309"
  2420. music2.Looped = true
  2421. music2.Volume = 0
  2422. sans = music2
  2423. pointGyro = Instance.new("BodyGyro",c.HumanoidRootPart)
  2424. pointGyro.P = 1e7
  2425. pointGyro.D = 1e3
  2426. pointGyro.MaxTorque = Vector3.new(0,1e7,0)
  2427. animator = c.Humanoid:FindFirstChild("Animator")
  2428. if animator then
  2429. animator:Destroy()
  2430. end
  2431. c.Torso.roblox:Destroy()
  2432. for i,v in pairs (c.Head:children()) do
  2433. if v.ClassName == "Sound" then
  2434. v:Destroy()
  2435. end
  2436. end
  2437. for i = 1,#Joints do
  2438. Joints[i].C1 = CFrame.new(Vector3.new())
  2439. end
  2440. human.WalkSpeed = 0
  2441. human.JumpPower = 0
  2442. end
  2443.  
  2444. uinps.InputBegan:connect(function(InputObject)
  2445. if InputObject.KeyCode == Enum.KeyCode.K and Debounces.isTyping == false then
  2446. Debounces.isPassive = not Debounces.isPassive
  2447. end
  2448. end)
  2449.  
  2450. setJointCFrames = function(table)
  2451. for i = 1,#table do
  2452. JointTargets[i] = table[i]
  2453. end
  2454. AnimationCycles = 0
  2455. end
  2456.  
  2457. setLerp = function(speed)
  2458. AnimStat.lerpSpeed = speed
  2459. end
  2460.  
  2461. setTween = function(tween)
  2462. AnimStat.lerpTween = tween
  2463. end
  2464.  
  2465. takeDamage = function(position,damage,distance,platformStand)
  2466. for i,v in pairs (pls:children()) do
  2467. if v.ClassName == "Player" and v:FindFirstChild("Character") then
  2468. local torso = v.Character:FindFirstChild("Torso")
  2469. if torso and (torso.Position - position).magnitude < distance then
  2470. v.Character.Humanoid:TakeDamage(damage)
  2471. if platformStand == true then
  2472. v.Character.PlatformStand = platformStand
  2473. end
  2474. end
  2475. end
  2476. end
  2477. end
  2478.  
  2479. --------------------------------------------------------
  2480.  
  2481. prepareCharacter()
  2482.  
  2483. --------------------------------------------------------
  2484.  
  2485. spawn(function()
  2486. local sine = 0
  2487. while wait() do
  2488. pointGyro.CFrame = CFrame.new(Vector3.new(),(mouse.Hit.p - c.HumanoidRootPart.CFrame.p).unit * 100)
  2489. if Debounces.isAttacking == false and Debounces.isMoving == false and Debounces.isBoosting == false then
  2490. setLerp(.1)
  2491. if Debounces.isPassive == true then
  2492. setJointCFrames({
  2493. CFrame.new(Vector3.new(0, -0.901 + math.sin(tick() * 1.5)/45, 0)) * CFAngles(Vector3.new(-22.001, 0, 0));
  2494. CFrame.new(Vector3.new(-0.001, 1.52 + math.sin(tick() * -1.5)/35, math.sin(tick() * 1.5)/35)) * CFAngles(Vector3.new(-10.861 + math.sin((-tick() + 2) * 1.5) * 5, 13.765, -1.658));
  2495. CFrame.new(Vector3.new(-1.5, -0.1 + math.sin(tick() * 1.5)/15, -0.801)) * CFAngles(Vector3.new(44.999, 0, 0));
  2496. CFrame.new(Vector3.new(1.7, 0.2 + math.sin(tick() * 1.5)/15, 0.199)) * CFAngles(Vector3.new(-15.001, -15.001, 15));
  2497. CFrame.new(Vector3.new(-0.7, -1.8, 0.6)) * CFAngles(Vector3.new(-59.511, 3.84, 0.489));
  2498. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, -0.001));
  2499. })
  2500. else
  2501. setJointCFrames({
  2502. CFrame.new(Vector3.new(0, 0 + math.sin(tick() * 1.5)/25, 0)) * CFAngles(Vector3.new(0, 0, 0));
  2503. CFrame.new(Vector3.new(0, 1.5 + math.sin(tick() * -1.5)/35, math.sin(tick() * 1.5)/35)) * CFAngles(Vector3.new(1.554 + math.sin((-tick() + 2) * 1.5) * 5, -0.001, -0.001));
  2504. CFrame.new(Vector3.new(-1.06, -0.03 + math.sin(tick() * 1.5)/25, 0.449)) * CFAngles(Vector3.new(-29.511, 0, 29.51));
  2505. CFrame.new(Vector3.new(1.059, -0.031 + math.sin(tick() * 1.5)/25, 0.449)) * CFAngles(Vector3.new(-29.511, -3.842, -29.511));
  2506. CFrame.new(Vector3.new(-0.49, -2, -0.05/1.5)) * CFAngles(Vector3.new(0, 8.885, 0));
  2507. CFrame.new(Vector3.new(0.49, -2, -0.05/1.5)) * CFAngles(Vector3.new(-0.001, -8.886, 0));
  2508. })
  2509. end
  2510. elseif Debounces.isAttacking == false and Debounces.isMoving == true and Debounces.isBoosting == false then
  2511. sine = sine + math.rad(12)
  2512. human.WalkSpeed = 15
  2513. setLerp(.15)
  2514. setJointCFrames({
  2515. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, math.sin(sine) * -2.5, 0));
  2516. CFrame.new(Vector3.new(0, 1.499, -0.04)) * CFAngles(Vector3.new(-5.676, -0.001 - math.sin(sine) * 3, -0.001));
  2517. CFrame.new(Vector3.new(-1.97, 0 + math.sin(sine + .5)/20, 0.1 + math.sin(-sine)/2)/1.3) * CFAngles(Vector3.new(-5 + math.sin(sine) * 23, 0, 0));
  2518. CFrame.new(Vector3.new(1.97, 0 - math.sin(sine + .5)/20, 0.1 + math.sin(sine)/2)/1.3) * CFAngles(Vector3.new(-5 + math.sin(-sine) * 23, 0, 0));
  2519. CFrame.new(Vector3.new(-0.5, -1.93 - math.cos(sine)/8.7, 0.2 + math.sin(sine)/2)) * CFAngles(Vector3.new(-15 + math.sin(-sine) * 30, 0, 0));
  2520. CFrame.new(Vector3.new(0.5, -1.93 + math.cos(sine)/8.7, 0.2 + math.sin(-sine)/2)) * CFAngles(Vector3.new(-15 + math.sin(sine) * 30, 0, 0));
  2521. })
  2522. end
  2523. if Debounces.scalingDamage == true then
  2524. takeDamage(c.HumanoidRootPart.Position,Debounces.damageLevel,8,true)
  2525. end
  2526. end
  2527. end)
  2528.  
  2529. human.Changed:connect(function(prop)
  2530. if prop == "MoveDirection" then
  2531. if human.MoveDirection.magnitude > .02 then
  2532. Debounces.isMoving = true
  2533. else
  2534. Debounces.isMoving = false
  2535. end
  2536. end
  2537. end)
  2538.  
  2539. uinps.InputBegan:connect(function(InputObject)
  2540. if InputObject.KeyCode == Enum.KeyCode.A and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  2541. Debounces.isBoosting = true
  2542. Debounces.damageLevel = 10
  2543. Debounces.scalingDamage = true
  2544. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  2545. setLerp(.15)
  2546. setJointCFrames({
  2547. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, 20));
  2548. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-10.372, 28.758, -1.837));
  2549. CFrame.new(Vector3.new(-0.7, -0.2, -0.801)) * CFAngles(Vector3.new(45, 0, 45));
  2550. CFrame.new(Vector3.new(1.7, 0.2, 0.199)) * CFAngles(Vector3.new(-15.001, -15.001, 45));
  2551. CFrame.new(Vector3.new(-0.3, -2, 0.2)) * CFAngles(Vector3.new(-11.283, -17.801, 19.495));
  2552. CFrame.new(Vector3.new(0.9, -2, -0.201)) * CFAngles(Vector3.new(15, -15, 29.999));
  2553. })
  2554. local boostSpeed = 250
  2555. local efx = Instance.new("Sound",c.Head)
  2556. efx.SoundId = "rbxassetid://200632875"
  2557. efx.Pitch = math.random(1100,1300)/1000
  2558. efx.Volume = .5
  2559. efx:Play()
  2560. spawn(function()
  2561. wait(5)
  2562. efx:Destroy()
  2563. end)
  2564. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(1,0,0)).p).unit * boostSpeed
  2565. vel.P = 1e3
  2566. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  2567. wait(.15)
  2568. vel.P = 1000
  2569. vel.MaxForce = Vector3.new(3000,0,3000)
  2570. vel.Velocity = Vector3.new()
  2571. wait(.3)
  2572. setLerp(.3)
  2573. setJointCFrames({
  2574. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, 13));
  2575. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-30.239, 42.47, 11.879));
  2576. CFrame.new(Vector3.new(-1.9, -0.2, -0.401)) * CFAngles(Vector3.new(44.999, 0, -45));
  2577. CFrame.new(Vector3.new(1.5, 0.4, 0.599)) * CFAngles(Vector3.new(-62.058, -21.088, -15.383));
  2578. CFrame.new(Vector3.new(-0.7, -1.8, 0.6)) * CFAngles(Vector3.new(-59.239, -26.158, -14.457));
  2579. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(-0.505, -14.478, -18.968));
  2580. })
  2581. wait(.2)
  2582. vel:Destroy()
  2583. Debounces.damageLevel = 0
  2584. Debounces.scalingDamage = false
  2585. Debounces.isBoosting = false
  2586. end
  2587. end)
  2588.  
  2589. uinps.InputBegan:connect(function(InputObject)
  2590. if InputObject.KeyCode == Enum.KeyCode.D and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  2591. Debounces.isBoosting = true
  2592. Debounces.damageLevel = 10
  2593. Debounces.scalingDamage = true
  2594. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  2595. setLerp(.15)
  2596. setJointCFrames({
  2597. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, -15));
  2598. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-13.603, -45.662, -6.645));
  2599. CFrame.new(Vector3.new(-1.9, 0, -0.201)) * CFAngles(Vector3.new(31.935, -7.436, -60.853));
  2600. CFrame.new(Vector3.new(1.9, 0, 0.399)) * CFAngles(Vector3.new(-3.644, -23.448, 59.102));
  2601. CFrame.new(Vector3.new(-1.1, -1.8, 0)) * CFAngles(Vector3.new(-3.616, -11.936, -29.566));
  2602. CFrame.new(Vector3.new(0.1, -1.6, -0.601)) * CFAngles(Vector3.new(1.943, -7.181, -32.528));
  2603. })
  2604. local boostSpeed = 250
  2605. local efx = Instance.new("Sound",c.Head)
  2606. efx.SoundId = "rbxassetid://200632875"
  2607. efx.Pitch = math.random(1100,1300)/1000
  2608. efx.Volume = .5
  2609. efx:Play()
  2610. spawn(function()
  2611. wait(5)
  2612. efx:Destroy()
  2613. end)
  2614. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(-1,0,0)).p).unit * boostSpeed
  2615. vel.P = 1e3
  2616. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  2617. wait(.15)
  2618. vel.P = 1000
  2619. vel.MaxForce = Vector3.new(3000,0,3000)
  2620. vel.Velocity = Vector3.new()
  2621. wait(.3)
  2622. setLerp(.3)
  2623. setJointCFrames({
  2624. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 0, -13));
  2625. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-12.936, -46.206, -2.327));
  2626. CFrame.new(Vector3.new(-1.9, 0.2, -0.201)) * CFAngles(Vector3.new(45, 0, -60));
  2627. CFrame.new(Vector3.new(1.7, 0, -0.401)) * CFAngles(Vector3.new(14.035, -5.69, 35.342));
  2628. CFrame.new(Vector3.new(-0.3, -1.8, 0.6)) * CFAngles(Vector3.new(-55.479, -10.612, 15.729));
  2629. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, 14.999));
  2630. })
  2631. wait(.2)
  2632. vel:Destroy()
  2633. Debounces.damageLevel = 0
  2634. Debounces.scalingDamage = false
  2635. Debounces.isBoosting = false
  2636. end
  2637. end)
  2638.  
  2639. uinps.InputBegan:connect(function(InputObject)
  2640. if InputObject.KeyCode == Enum.KeyCode.W and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  2641. Debounces.isBoosting = true
  2642. Debounces.damageLevel = 10
  2643. Debounces.scalingDamage = true
  2644. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  2645. setLerp(.15)
  2646. setJointCFrames({
  2647. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-40.001, 0, 5));
  2648. CFrame.new(Vector3.new(-0.001, 1.429, 0.2)) * CFAngles(Vector3.new(25.141, -8.347, 0.878));
  2649. CFrame.new(Vector3.new(-1.5, 0, .101)) * CFAngles(Vector3.new(14.999, -0.001, 0));
  2650. CFrame.new(Vector3.new(1.7, 0.199, -0.401)) * CFAngles(Vector3.new(28.08, -0.358, 21.087));
  2651. CFrame.new(Vector3.new(-0.5, -1.8, 0.6)) * CFAngles(Vector3.new(-29.448, 3.57, -1.5));
  2652. CFrame.new(Vector3.new(0.499, -1.6, -0.401)) * CFAngles(Vector3.new(-0.505, -14.478, -3.968));
  2653. })
  2654. local boostSpeed = 250
  2655. local efx = Instance.new("Sound",c.Head)
  2656. efx.SoundId = "rbxassetid://200632875"
  2657. efx.Pitch = math.random(1100,1300)/1000
  2658. efx.Volume = .5
  2659. efx:Play()
  2660. spawn(function()
  2661. wait(5)
  2662. efx:Destroy()
  2663. end)
  2664. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,1)).p).unit * boostSpeed
  2665. vel.P = 1e3
  2666. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  2667. wait(.15)
  2668. vel.P = 1000
  2669. vel.MaxForce = Vector3.new(3000,0,3000)
  2670. vel.Velocity = Vector3.new()
  2671. wait(.3)
  2672. setLerp(.3)
  2673. setJointCFrames({
  2674. CFrame.new(Vector3.new(0, -0.901, 0)) * CFAngles(Vector3.new(-22.001, 40, -13));
  2675. CFrame.new(Vector3.new(-0.001, 1.52, 0)) * CFAngles(Vector3.new(-12.936, -46.206, -2.327));
  2676. CFrame.new(Vector3.new(-1.9, 0.2, -0.201)) * CFAngles(Vector3.new(45, 0, -60));
  2677. CFrame.new(Vector3.new(1.7, 0, -0.401)) * CFAngles(Vector3.new(14.035, -5.69, 35.342));
  2678. CFrame.new(Vector3.new(-0.3, -1.8, 0.6)) * CFAngles(Vector3.new(-55.479, -10.612, 15.729));
  2679. CFrame.new(Vector3.new(0.5, -1, -0.801)) * CFAngles(Vector3.new(14.999, -15, 14.999));
  2680. })
  2681. wait(.2)
  2682. vel:Destroy()
  2683. Debounces.damageLevel = 0
  2684. Debounces.scalingDamage = false
  2685. Debounces.isBoosting = false
  2686. end
  2687. end)
  2688.  
  2689. uinps.InputBegan:connect(function(InputObject)
  2690. if InputObject.KeyCode == Enum.KeyCode.S and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isBoosting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  2691. Debounces.isBoosting = true
  2692. Debounces.damageLevel = 10
  2693. Debounces.scalingDamage = true
  2694. local vel = Instance.new("BodyVelocity",c.HumanoidRootPart)
  2695. setLerp(.15)
  2696. setJointCFrames({
  2697. CFrame.new(Vector3.new(0, -.3, 0)) * CFAngles(Vector3.new(15, 0, 0));
  2698. CFrame.new(Vector3.new(-0.001, 1.52, -0.03)) * CFAngles(Vector3.new(-5.298, -1.305, -4.093));
  2699. CFrame.new(Vector3.new(-1.7, 0, -0.201)) * CFAngles(Vector3.new(12.112, -6.562, -16.939));
  2700. CFrame.new(Vector3.new(1.7, 0, -0.201)) * CFAngles(Vector3.new(8.817, 8.378, 20.465));
  2701. CFrame.new(Vector3.new(-0.7, -1.8, 0.2)) * CFAngles(Vector3.new(-14.432, 3.06, -2.373));
  2702. CFrame.new(Vector3.new(0.5, -1.8, -0.201)) * CFAngles(Vector3.new(-0.505, -14.478, -3.968));
  2703. })
  2704. local boostSpeed = 150
  2705. local boostSpeed = 250
  2706. local efx = Instance.new("Sound",c.Head)
  2707. efx.SoundId = "rbxassetid://200632875"
  2708. efx.Pitch = math.random(1100,1300)/1000
  2709. efx.Volume = .5
  2710. efx:Play()
  2711. spawn(function()
  2712. wait(5)
  2713. efx:Destroy()
  2714. end)
  2715. vel.Velocity = (c.HumanoidRootPart.Position - c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-1)).p).unit * boostSpeed
  2716. vel.P = 1e3
  2717. vel.MaxForce = Vector3.new(math.huge,0,math.huge)
  2718. wait(.15)
  2719. vel.P = 1000
  2720. vel.MaxForce = Vector3.new(3000,0,3000)
  2721. vel.Velocity = Vector3.new()
  2722. wait(.3)
  2723. setLerp(.3)
  2724. setJointCFrames({
  2725. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(4, 0, 0));
  2726. CFrame.new(Vector3.new(-0.001, 1.52, -0.03)) * CFAngles(Vector3.new(-20.081, 28.752, 3.598));
  2727. CFrame.new(Vector3.new(-1.7, 0.2, -0.601)) * CFAngles(Vector3.new(59.51, -3.841, -14.511));
  2728. CFrame.new(Vector3.new(1.7, 0.2, 0.399)) * CFAngles(Vector3.new(-47.597, -13.104, 17.887));
  2729. CFrame.new(Vector3.new(-0.7, -1.4, 0.2)) * CFAngles(Vector3.new(-44.477, 3.836, -0.524));
  2730. CFrame.new(Vector3.new(0.5, -1.4, -0.601)) * CFAngles(Vector3.new(-15.868, -12.953, -7.631));
  2731. })
  2732. wait(.2)
  2733. vel:Destroy()
  2734. Debounces.damageLevel = 0
  2735. Debounces.scalingDamage = false
  2736. Debounces.isBoosting = false
  2737. end
  2738. end)
  2739.  
  2740. uinps.InputBegan:connect(function(InputObject)
  2741. if InputObject.KeyCode == Enum.KeyCode.Q and Debounces.isAttacking == false and Debounces.isSprinting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  2742. local isLooping = true
  2743. uinps.InputEnded:connect(function(InputObject2)
  2744. if InputObject2.KeyCode == Enum.KeyCode.Q then
  2745. isLooping = false
  2746. end
  2747. end)
  2748. while true do
  2749. if isLooping == false then
  2750. break
  2751. end
  2752. Debounces.attackNumber = Debounces.attackNumber + 1
  2753. local aimPos = mouse.Hit.p
  2754. local head = Instance.new("Part",c)
  2755. head.Size = Vector3.new(12,.2,12)
  2756. head.CanCollide = false
  2757. head.Anchored = true
  2758. head.Transparency = 1
  2759. for i = 1,2 do
  2760. local decal = Instance.new("Decal",head)
  2761. decal.Texture = "rbxassetid://323497117"
  2762. if i == 1 then
  2763. decal.Face = Enum.NormalId.Top
  2764. else
  2765. decal.Face = Enum.NormalId.Bottom
  2766. end
  2767. end
  2768. if Debounces.attackNumber%2 == 1 then
  2769. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(8,8,.5)).p,aimPos)
  2770. else
  2771. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(-8,8,.5)).p,aimPos)
  2772. end
  2773. spawn(function()
  2774. local timer = 0
  2775. while rs.RenderStepped:wait() do
  2776. if timer >= 1.55 then
  2777. break
  2778. end
  2779. head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60)))
  2780. timer = timer + 1/30/(Debounces.FPS/60)
  2781. end
  2782. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  2783. local ray = Ray.new(head.CFrame.p,(aimPos - head.CFrame.p).unit * 999)
  2784. local hit, pos = workspace:FindPartOnRay(ray,c)
  2785. local dis = (head.CFrame.p - pos).magnitude
  2786. local rayPart = Instance.new("Part",rayModel)
  2787. rayPart.Material = "Neon"
  2788. rayPart.FormFactor = "Custom"
  2789. rayPart.BrickColor = BrickColor.new(1,1,1)
  2790. rayPart.Anchored = true
  2791. rayPart.CanCollide = false
  2792. rayPart.Size = Vector3.new(7,7,dis + 400)
  2793. local rayCFrame = CFrame.new(head.CFrame.p + (aimPos - head.CFrame.p).unit * (dis/2 + 200),head.CFrame.p + (aimPos - head.CFrame.p).unit * dis * 2)
  2794. rayPart.CFrame = rayCFrame
  2795. head:Destroy()
  2796. end)
  2797. wait()
  2798. local s = Instance.new("Sound",head)
  2799. s.Volume = 1
  2800. s.SoundId = "rbxassetid://332223043"
  2801. s:Play()
  2802. wait(.04)
  2803. end
  2804. end
  2805. end)
  2806.  
  2807. uinps.InputBegan:connect(function(InputObj)
  2808. if InputObj.KeyCode == Enum.KeyCode.E and Debounces.isAttacking == false and Debounces.isSprinting == false and Debounces.isPassive == true and Debounces.isTyping == false then
  2809. Debounces.isAttacking = true
  2810. local aimPos = c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-999)).p
  2811. local head = Instance.new("Part",c)
  2812. head.Size = Vector3.new(18,.2,18)
  2813. head.CanCollide = false
  2814. head.Anchored = true
  2815. head.CFrame = CFrame.new(c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-9)).p,aimPos)
  2816. head.Transparency = 1
  2817. for i = 1,2 do
  2818. local decal = Instance.new("Decal",head)
  2819. decal.Texture = "rbxassetid://323497117"
  2820. if i == 1 then
  2821. decal.Face = Enum.NormalId.Top
  2822. else
  2823. decal.Face = Enum.NormalId.Bottom
  2824. end
  2825. end
  2826. setLerp(.1)
  2827. setJointCFrames({
  2828. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, 0, 0));
  2829. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, -0.001, -0.001));
  2830. CFrame.new(Vector3.new(-1.7, 0, 0)) * CFAngles(Vector3.new(-12.808, -28.88, -21.502));
  2831. CFrame.new(Vector3.new(1.699, 1.2, 0.599)) * CFAngles(Vector3.new(-146.606, 16.571, 13.928));
  2832. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-60, 0, -0.001));
  2833. CFrame.new(Vector3.new(0.5, -1.4, -0.4)) * CFAngles(Vector3.new(-15.001, -15.001, 0));
  2834. })
  2835. spawn(function()
  2836. local timer = 0
  2837. while rs.RenderStepped:wait() do
  2838. if timer >= 1.55/.8 then
  2839. break
  2840. end
  2841. head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60)))
  2842. timer = timer + 1/30/(Debounces.FPS/60)
  2843. end
  2844. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  2845. local ray = Ray.new(head.CFrame.p,(aimPos - head.CFrame.p).unit * 999)
  2846. local hit, pos = workspace:FindPartOnRay(ray,c)
  2847. local dis = (head.CFrame.p - pos).magnitude
  2848. local rayPart = Instance.new("Part",rayModel)
  2849. rayPart.Material = "Neon"
  2850. rayPart.FormFactor = "Custom"
  2851. rayPart.Name = "Punch"
  2852. rayPart.BrickColor = BrickColor.new(1,1,1)
  2853. rayPart.Anchored = true
  2854. rayPart.CanCollide = false
  2855. rayPart.Size = Vector3.new(28,28,dis + 400)
  2856. local rayCFrame = CFrame.new(head.CFrame.p + (aimPos - head.CFrame.p).unit * (dis/2 + 200),head.CFrame.p + (aimPos - head.CFrame.p).unit * dis * 2)
  2857. rayPart.CFrame = rayCFrame
  2858. head:Destroy()
  2859. end)
  2860. wait()
  2861. local s = Instance.new("Sound",head)
  2862. s.Volume = 1
  2863. s.SoundId = "rbxassetid://332223043"
  2864. s.Pitch = .8
  2865. s:Play()
  2866. wait(.75)
  2867. setLerp(.17)
  2868. setJointCFrames({
  2869. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(-20, 15, 0));
  2870. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, 14.999, -0.001));
  2871. CFrame.new(Vector3.new(-1.7, 0, 0.2)) * CFAngles(Vector3.new(-33.928, -4.374, -38.76));
  2872. CFrame.new(Vector3.new(1.499, 0.4, -0.601)) * CFAngles(Vector3.new(74.335, 25.091, -6.155));
  2873. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-45, 0, -0.001));
  2874. CFrame.new(Vector3.new(0.5, -1.8, -0.4)) * CFAngles(Vector3.new(-15, -15, 0));
  2875. })
  2876. wait(.5)
  2877. Debounces.isAttacking = false
  2878. end
  2879. end)
  2880.  
  2881. reflect = function(d,n)
  2882. local i, n = -1 * d.unit, n.unit
  2883. local dot = n:Dot(i)
  2884. return 2*dot*n - i
  2885. end
  2886.  
  2887. makeReflectionBeam = function(pos,look,isCrit)
  2888. local ray = Ray.new(pos,look)
  2889. local hit,hitpos,norm = workspace:FindPartOnRay(ray,c)
  2890. local e = Instance.new("Part",rayModel)
  2891. e.Anchored = true
  2892. e.CanCollide = false
  2893. e.BrickColor = BrickColor.new("White")
  2894. e.Material = "Neon"
  2895. e.FormFactor = "Custom"
  2896. e.Size = Vector3.new(6,6,(pos - hitpos).magnitude)
  2897. if isCrit == true then
  2898. e.Size = Vector3.new(16,16,(pos - hitpos).magnitude)
  2899. e.Name = "Punch"
  2900. end
  2901. e.CFrame = CFrame.new(pos + (hitpos - pos)/2, pos)
  2902. local e = Instance.new("Sound",c)
  2903. if isCrit == true then
  2904. e.Volume = .5
  2905. else
  2906. e.Volume = .3
  2907. e.Pitch = 1.5
  2908. end
  2909. e.SoundId = "rbxassetid://200632875"
  2910. e:Play()
  2911. spawn(function()
  2912. wait(6)
  2913. e:Destroy()
  2914. end)
  2915. wait(.05)
  2916. if hit ~= nil then
  2917. newDir = reflect(look.unit,norm,isCrit)
  2918. makeReflectionBeam(hitpos,newDir * 999,isCrit)
  2919. end
  2920. end
  2921.  
  2922. uinps.InputBegan:connect(function(InputObject)
  2923. if InputObject.KeyCode == Enum.KeyCode.Q and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isPassive == true and Debounces.isTyping == false then
  2924. local isLooping = true
  2925. uinps.InputEnded:connect(function(InputObject2)
  2926. if InputObject2.KeyCode == Enum.KeyCode.Q then
  2927. isLooping = false
  2928. end
  2929. end)
  2930. while true do
  2931. if isLooping == false then
  2932. break
  2933. end
  2934. Debounces.attackNumber = Debounces.attackNumber + 1
  2935. local aimPos = mouse.Hit.p
  2936. local head = Instance.new("Part",c)
  2937. head.Size = Vector3.new(12,.2,12)
  2938. head.CanCollide = false
  2939. head.Anchored = true
  2940. head.Transparency = 1
  2941. for i = 1,2 do
  2942. local decal = Instance.new("Decal",head)
  2943. decal.Texture = "rbxassetid://323497117"
  2944. if i == 1 then
  2945. decal.Face = Enum.NormalId.Top
  2946. else
  2947. decal.Face = Enum.NormalId.Bottom
  2948. end
  2949. end
  2950. if Debounces.attackNumber%2 == 1 then
  2951. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(8,8,.5)).p,aimPos)
  2952. else
  2953. head.CFrame = CFrame.new(c.Torso.CFrame:toWorldSpace(CFrame.new(-8,8,.5)).p,aimPos)
  2954. end
  2955. spawn(function()
  2956. local timer = 0
  2957. while rs.RenderStepped:wait() do
  2958. if timer >= 1.55 then
  2959. break
  2960. end
  2961. head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60)))
  2962. timer = timer + 1/30/(Debounces.FPS/60)
  2963. end
  2964. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  2965. head:Destroy()
  2966. makeReflectionBeam(head.CFrame.p,(head.CFrame.p - aimPos).unit * -999,false)
  2967. end)
  2968.  
  2969. wait()
  2970. local s = Instance.new("Sound",head)
  2971. s.Volume = 1
  2972. s.SoundId = "rbxassetid://332223043"
  2973. s.Pitch = 1.02
  2974. s:Play()
  2975. wait(.2)
  2976. end
  2977. end
  2978. end)
  2979.  
  2980. uinps.InputBegan:connect(function(InputObj)
  2981. if InputObj.KeyCode == Enum.KeyCode.E and Debounces.isAttacking == false and Debounces.isSprinting == true and Debounces.isPassive == true and Debounces.isTyping == false then
  2982. Debounces.isAttacking = true
  2983. local aimPos = c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-999)).p
  2984. local head = Instance.new("Part",c)
  2985. head.Size = Vector3.new(18,.2,18)
  2986. head.CanCollide = false
  2987. head.Anchored = true
  2988. head.CFrame = CFrame.new(c.HumanoidRootPart.CFrame:toWorldSpace(CFrame.new(0,0,-9)).p,aimPos)
  2989. head.Transparency = 1
  2990. for i = 1,2 do
  2991. local decal = Instance.new("Decal",head)
  2992. decal.Texture = "rbxassetid://323497117"
  2993. if i == 1 then
  2994. decal.Face = Enum.NormalId.Top
  2995. else
  2996. decal.Face = Enum.NormalId.Bottom
  2997. end
  2998. end
  2999. setLerp(.1)
  3000. setJointCFrames({
  3001. CFrame.new(Vector3.new(0, 0, 0)) * CFAngles(Vector3.new(0, 0, 0));
  3002. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, -0.001, -0.001));
  3003. CFrame.new(Vector3.new(-1.7, 0, 0)) * CFAngles(Vector3.new(-12.808, -28.88, -21.502));
  3004. CFrame.new(Vector3.new(1.699, 1.2, 0.599)) * CFAngles(Vector3.new(-146.606, 16.571, 13.928));
  3005. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-60, 0, -0.001));
  3006. CFrame.new(Vector3.new(0.5, -1.4, -0.4)) * CFAngles(Vector3.new(-15.001, -15.001, 0));
  3007. })
  3008. spawn(function()
  3009. local timer = 0
  3010. while rs.RenderStepped:wait() do
  3011. if timer >= 1.55/.8 then
  3012. break
  3013. end
  3014. head.CFrame = head.CFrame * CFrame.Angles(0,0,math.rad(timer * 25/(Debounces.FPS/60)))
  3015. timer = timer + 1/30/(Debounces.FPS/60)
  3016. end
  3017. head.CFrame = CFrame.new(head.CFrame.p,aimPos)
  3018. head:Destroy()
  3019. makeReflectionBeam(head.CFrame.p,(head.CFrame.p - aimPos).unit * -999,true)
  3020. end)
  3021. wait()
  3022. local s = Instance.new("Sound",head)
  3023. s.Volume = 2
  3024. s.SoundId = "rbxassetid://332223043"
  3025. s.Pitch = .8
  3026. s:Play()
  3027. wait(.75)
  3028. setLerp(.17)
  3029. setJointCFrames({
  3030. CFrame.new(Vector3.new(0, -.5, 0)) * CFAngles(Vector3.new(-20, 15, 0));
  3031. CFrame.new(Vector3.new(0, 1.499, -0.09)) * CFAngles(Vector3.new(-11.676, 14.999, -0.001));
  3032. CFrame.new(Vector3.new(-1.7, 0, 0.2)) * CFAngles(Vector3.new(-33.928, -4.374, -38.76));
  3033. CFrame.new(Vector3.new(1.499, 0.4, -0.601)) * CFAngles(Vector3.new(74.335, 25.091, -6.155));
  3034. CFrame.new(Vector3.new(-0.501, -1.601, 0.6)) * CFAngles(Vector3.new(-45, 0, -0.001));
  3035. CFrame.new(Vector3.new(0.5, -1.8, -0.4)) * CFAngles(Vector3.new(-15, -15, 0));
  3036. })
  3037. wait(.5)
  3038. Debounces.isAttacking = false
  3039. end
  3040. end)
  3041.  
  3042. uinps.InputBegan:connect(function(InputObj)
  3043. if InputObj.KeyCode == Enum.KeyCode.Slash then
  3044. local finishEvent = nil
  3045. Debounces.isTyping = true
  3046. finishEvent = uinps.InputBegan:connect(function(InputObj)
  3047. if InputObj.KeyCode == Enum.KeyCode.Return or InputObj.UserInputType == Enum.UserInputType.MouseButton1 then
  3048. Debounces.isTyping = false
  3049. finishEvent:disconnect()
  3050. end
  3051. end)
  3052. end
  3053. end)
  3054.  
  3055. uinps.InputBegan:connect(function(InputObj)
  3056. if InputObj.KeyCode == Enum.KeyCode.LeftShift then
  3057. Debounces.isSprinting = true
  3058. end
  3059. end)
  3060.  
  3061. uinps.InputEnded:connect(function(InputObj)
  3062. if InputObj.KeyCode == Enum.KeyCode.LeftShift then
  3063. Debounces.isSprinting = false
  3064. end
  3065. end)
  3066.  
  3067. rs.RenderStepped:connect(function()
  3068. Debounces.FPS = 1/rs.RenderStepped:wait()
  3069. local FPSLerp = AnimStat.lerpSpeed/(Debounces.FPS/60)
  3070. if Debounces.isPassive == false then
  3071. fire.Enabled = false
  3072. light.Range = 0
  3073. fight:Pause()
  3074. sans:Resume()
  3075. efxBlock.Transparency = 1
  3076. else
  3077. fire.Enabled = true
  3078. light.Range = 10
  3079. fight:Resume()
  3080. sans:Pause()
  3081. efxBlock.Transparency = 0
  3082. end
  3083. for i,v in pairs (rayModel:children()) do
  3084. if v.Transparency >= 1 then
  3085. v:Destroy()
  3086. else
  3087. v.CanCollide = true
  3088. local parts = v:GetTouchingParts()
  3089. v.CanCollide = false
  3090. for i = 1,#parts do
  3091. if parts[i].Parent:FindFirstChild("Humanoid") and parts[i].Parent ~= c and v.Name ~= "Punch" then
  3092. parts[i].Parent.Humanoid:TakeDamage(.5/(Debounces.FPS/60))
  3093. elseif parts[i].Parent:FindFirstChild("Humanoid") and parts[i].Parent ~= c and v.Name == "Punch" then
  3094. parts[i].Parent.Humanoid:TakeDamage(3.1/(Debounces.FPS/60))
  3095. end
  3096. end
  3097. v.Size = v.Size + Vector3.new(1/(Debounces.FPS/60),1/(Debounces.FPS/60),0)
  3098. v.Transparency = v.Transparency + .05/(Debounces.FPS/60)
  3099. end
  3100. end
  3101. for i = 1,#Joints do
  3102. Joints[i].C0 = Joints[i].C0:lerp(JointTargets[i], FPSLerp)
  3103. end
  3104. local sineval = math.sin(tick() * 2) * 3
  3105. fire.Acceleration = Vector3.new(sineval,1,sineval)
  3106. light.Brightness = math.sin(math.cos(tick() * 2) * 1.5)
  3107. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement