Advertisement
Theskyler900

Untitled

Oct 16th, 2017
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.34 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.  
  463. end
  464. Bin = script.Parent
  465. if Bin.Name == "Calvar" then
  466. Bin.Name = ""
  467. end
  468. local bodvel = Instance.new("BodyVelocity")
  469. local bg = Instance.new("BodyGyro")
  470. function so(id, par, vol, pit)
  471. local sou = Instance.new("Sound", par or workspace)
  472. sou.Volume = vol
  473. sou.Pitch = pit or 1
  474. sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
  475. sou:play()
  476. game:GetService("Debris"):AddItem(sou, 6)
  477. end
  478. function so2(id, par, vol, pit)
  479. local sou = Instance.new("Sound", par or workspace)
  480. sou.Volume = vol
  481. sou.Pitch = pit or 1
  482. sou.SoundId = id
  483. sou:play()
  484. game:GetService("Debris"):AddItem(sou, 6)
  485. end
  486. function clerp(a, b, t)
  487. local qa = {
  488. QuaternionFromCFrame(a)
  489. }
  490. local qb = {
  491. QuaternionFromCFrame(b)
  492. }
  493. local ax, ay, az = a.x, a.y, a.z
  494. local bx, by, bz = b.x, b.y, b.z
  495. local _t = 1 - t
  496. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  497. end
  498. function QuaternionFromCFrame(cf)
  499. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  500. local trace = m00 + m11 + m22
  501. if trace > 0 then
  502. local s = math.sqrt(1 + trace)
  503. local recip = 0.5 / s
  504. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  505. else
  506. local i = 0
  507. if m00 < m11 then
  508. i = 1
  509. end
  510. if m22 > (i == 0 and m00 or m11) then
  511. i = 2
  512. end
  513. if i == 0 then
  514. local s = math.sqrt(m00 - m11 - m22 + 1)
  515. local recip = 0.5 / s
  516. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  517. elseif i == 1 then
  518. local s = math.sqrt(m11 - m22 - m00 + 1)
  519. local recip = 0.5 / s
  520. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  521. elseif i == 2 then
  522. local s = math.sqrt(m22 - m00 - m11 + 1)
  523. local recip = 0.5 / s
  524. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  525. end
  526. end
  527. end
  528. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  529. local xs, ys, zs = x + x, y + y, z + z
  530. local wx, wy, wz = w * xs, w * ys, w * zs
  531. local xx = x * xs
  532. local xy = x * ys
  533. local xz = x * zs
  534. local yy = y * ys
  535. local yz = y * zs
  536. local zz = z * zs
  537. 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))
  538. end
  539. function QuaternionSlerp(a, b, t)
  540. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  541. local startInterp, finishInterp
  542. if cosTheta >= 1.0E-4 then
  543. if 1 - cosTheta > 1.0E-4 then
  544. local theta = math.acos(cosTheta)
  545. local invSinTheta = 1 / math.sin(theta)
  546. startInterp = math.sin((1 - t) * theta) * invSinTheta
  547. finishInterp = math.sin(t * theta) * invSinTheta
  548. else
  549. startInterp = 1 - t
  550. finishInterp = t
  551. end
  552. elseif 1 + cosTheta > 1.0E-4 then
  553. local theta = math.acos(-cosTheta)
  554. local invSinTheta = 1 / math.sin(theta)
  555. startInterp = math.sin((t - 1) * theta) * invSinTheta
  556. finishInterp = math.sin(t * theta) * invSinTheta
  557. else
  558. startInterp = t - 1
  559. finishInterp = t
  560. end
  561. 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
  562. end
  563. function turntoSans()
  564. if Face ~= nil then
  565. Face.Transparency = 1
  566. end
  567. if mainShirt ~= nil then
  568. mainShirt.Parent = nil
  569. end
  570. if mainPants ~= nil then
  571. mainPants.Parent = nil
  572. end
  573. if mainBColors ~= nil then
  574. mainBColors.Parent = nil
  575. end
  576. sansShirt.Parent = Character
  577. sansPants.Parent = Character
  578. sansBodyColors.Parent = Character
  579. for _, c in pairs(modelzorz:children()) do
  580. if c.className == "Part" then
  581. c.Transparency = 0
  582. end
  583. end
  584. for _, c in pairs(Character:children()) do
  585. Head.Transparency = 1
  586. if c.className == "Hat" then
  587. c.Handle.Transparency = 1
  588. end
  589. end
  590. end
  591. function turnNormal()
  592. if Face ~= nil then
  593. Face.Transparency = 0
  594. end
  595. if mainShirt ~= nil then
  596. mainShirt.Parent = Character
  597. end
  598. if mainPants ~= nil then
  599. mainPants.Parent = Character
  600. end
  601. if mainBColors ~= nil then
  602. mainBColors.Parent = Character
  603. end
  604. sansShirt.Parent = nil
  605. sansPants.Parent = nil
  606. sansBodyColors.Parent = nil
  607. for _, c in pairs(modelzorz:children()) do
  608. if c.className == "Part" then
  609. c.Transparency = 1
  610. end
  611. end
  612. for _, c in pairs(Character:children()) do
  613. Head.Transparency = 0
  614. if c.className == "Hat" then
  615. c.Handle.Transparency = 0
  616. end
  617. end
  618. end
  619. function normalEyes()
  620. hprt3.Transparency = 0
  621. hprt4.Transparency = 0
  622. hprt5.Transparency = 1
  623. end
  624. function glowingEye()
  625. hprt3.Transparency = 1
  626. hprt4.Transparency = 1
  627. hprt5.Transparency = 0
  628. end
  629. function noEyes()
  630. hprt3.Transparency = 1
  631. hprt4.Transparency = 1
  632. hprt5.Transparency = 1
  633. end
  634. turntoSans()
  635. hprt3.Transparency = 0
  636. hprt4.Transparency = 0
  637. hprt5.Transparency = 1
  638. function hideanim()
  639. equipped = false
  640. for i = 0, 1, 0.1 do
  641. swait()
  642. Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0), 0.4)
  643. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.4)
  644. RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 0, 0), 0.4)
  645. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  646. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, 0), 0.4)
  647. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  648. RH.C0 = clerp(RH.C0, RHC0, 0.4)
  649. LH.C0 = clerp(LH.C0, LHC0, 0.4)
  650. end
  651. Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0), 1)
  652. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 1)
  653. RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 0, 0), 1)
  654. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 1)
  655. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, 0), 1)
  656. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 1)
  657. RH.C0 = clerp(RH.C0, RHC0, 1)
  658. LH.C0 = clerp(LH.C0, LHC0, 1)
  659. end
  660. function equipanim()
  661. equipped = true
  662. end
  663. function Clone(duration)
  664. for _, v in pairs(Torso.Parent:children()) do
  665. if v.className == "Part" and v.Name ~= "HumanoidRootPart" then
  666. local c = part(3, workspace, 0, 0.4, BrickColor.new("White"), "Effect", v.Size)
  667. c.Anchored = true
  668. c.CFrame = v.CFrame
  669. game:GetService("Debris"):AddItem(c, 5)
  670. if v.Name == "Head" then
  671. cmsh = mesh("SpecialMesh", c, "Head", "nil", vt(0, 0, 0), v.Mesh.Scale)
  672. end
  673. table.insert(Effects, {
  674. c,
  675. "Disappear",
  676. duration
  677. })
  678. end
  679. end
  680. for _, v in pairs(modelzorz:children()) do
  681. 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
  682. n = v:clone()
  683. for _, b in pairs(n:children()) do
  684. if b.className == "Motor" then
  685. b.Parent = nil
  686. end
  687. end
  688. n.archivable = true
  689. n.Anchored = true
  690. n.CanCollide = false
  691. n.Name = "Effect"
  692. n.BrickColor = BrickColor.new("White")
  693. n.Parent = workspace
  694. n.CFrame = v.CFrame
  695. n.Transparency = 0.4
  696. n:BreakJoints()
  697. table.insert(Effects, {
  698. n,
  699. "Disappear",
  700. duration
  701. })
  702. end
  703. end
  704. end
  705. function StaggerAnim()
  706. glowingEye()
  707. attack = true
  708. local canfloor, telepos, oldpos
  709. local dnum = 5
  710. repeat
  711. dnum = dnum - 1
  712. CF = cf(RootPart.Position) * cf(math.random(-500, 500) / 100, 0, math.random(-500, 500) / 100)
  713. tpos = RootPart.Position + vt(math.random(-5000, 5000) / 100, 20, math.random(-5000, 5000) / 100)
  714. hitfloor3, posfloor3 = rayCast(tpos, CFrame.new(tpos, tpos - Vector3.new(0, 1, 0)).lookVector, 400, Character)
  715. if hitfloor3 ~= nil then
  716. canfloor = true
  717. telepos = cf(posfloor3) * cf(0, 3, 0)
  718. end
  719. until canfloor ~= nil or dnum < 0
  720. Clone(0.01)
  721. if dnum >= 0 then
  722. oldpos = RootPart.Position
  723. RootPart.CFrame = telepos
  724. pos4 = vt(oldpos.X, RootPart.Position.Y, oldpos.Z)
  725. RootPart.CFrame = cf(RootPart.Position, pos4)
  726. else
  727. oldpos = RootPart.Position
  728. RootPart.CFrame = cf(RootPart.Position) * cf(0, 10, 0)
  729. end
  730. for _, c in pairs(workspace:children()) do
  731. if c.Name == "Effect" and c.className == "Model" and c:findFirstChild("Head") ~= nil then
  732. local targ = c.Head.Position - oldpos
  733. local mag = targ.magnitude
  734. if mag <= 10 then
  735. c.Parent = nil
  736. end
  737. end
  738. end
  739. Neck.C0 = necko * euler(0.3, 0, 0) * euler(0, 0, 0)
  740. RootJoint.C0 = RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0)
  741. RW.C0 = cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4)
  742. RW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  743. LW.C0 = cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4)
  744. LW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  745. RH.C0 = cf(1, -0.9, -0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05)
  746. LH.C0 = cf(-1, -0.9, -0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05)
  747. doanim = math.random(1, 2)
  748. if doanim == 1 then
  749. for i = 0, 1, 0.1 do
  750. swait()
  751. Neck.C0 = clerp(Neck.C0, necko * euler(0.2, 0, 0) * euler(0, 0, -0.2), 0.6)
  752. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(0, 0, 0), 0.6)
  753. 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)
  754. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.6)
  755. 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)
  756. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.6)
  757. 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)
  758. 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)
  759. end
  760. normalEyes()
  761. elseif doanim == 2 then
  762. for i = 1, 2 do
  763. if i == 2 then
  764. end
  765. for i = 0, 2, 0.2 do
  766. swait()
  767. Neck.C0 = clerp(Neck.C0, necko * euler(0.5, 0, 0) * euler(0, 0, 0), 0.15)
  768. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.4)
  769. if i <= 1 then
  770. RW.C0 = clerp(RW.C0, cf(1, 0.65, 0.3) * euler(-0.2, 0, -0.5), 0.4)
  771. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  772. LW.C0 = clerp(LW.C0, cf(-1, 0.65, 0.3) * euler(-0.2, 0, 0.5), 0.4)
  773. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  774. else
  775. RW.C0 = clerp(RW.C0, cf(1, 0.45, 0.3) * euler(-0.2, 0, -0.5), 0.4)
  776. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  777. LW.C0 = clerp(LW.C0, cf(-1, 0.45, 0.3) * euler(-0.2, 0, 0.5), 0.4)
  778. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  779. end
  780. 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)
  781. 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)
  782. end
  783. end
  784. normalEyes()
  785. end
  786. attack = false
  787. end
  788. function StaggerHitt()
  789. end
  790. function StunAnim()
  791. end
  792. function attackone()
  793. attack = true
  794. cansound = true
  795. AtkBones = {}
  796. atktype = math.random(1, 2)
  797. if atktype == 1 then
  798. CF = RootPart.CFrame * cf(0, 0, -18)
  799. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  800. refe.Anchored = true
  801. refe.CFrame = CF
  802. game:GetService("Debris"):AddItem(refe, 5)
  803. so("306247739", refe, 1, 1)
  804. for i = -12, 12, 12 do
  805. refe.CFrame = CF * euler(0, 1.57, 0) * cf(0, 0, -8 - i)
  806. for d = -16, 16, 8 do
  807. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  808. ref.Anchored = true
  809. ref.CFrame = refe.CFrame * cf(d, 0, 8)
  810. game:GetService("Debris"):AddItem(ref, 5)
  811. bhitfloor, bposfloor = rayCast(ref.Position, CFrame.new(ref.Position, ref.Position - Vector3.new(0, 1, 0)).lookVector, 100, Character)
  812. local bone1, bhb1 = bone(workspace, 30, 3, 5, -1, 1)
  813. bone1.CFrame = cf(bposfloor) * cf(0, -2, 0) * euler(0, math.random(-50, 50), 0)
  814. bpos = Instance.new("BodyPosition")
  815. bpos.P = 8000
  816. bpos.D = 800
  817. bpos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  818. bpos.Parent = bone1
  819. bpos.position = bposfloor + vt(0, -2, 0)
  820. table.insert(AtkBones, {
  821. bone1,
  822. bhb1,
  823. bpos,
  824. bposfloor
  825. })
  826. ref.Parent = nil
  827. end
  828. end
  829. elseif atktype == 2 then
  830. CF = RootPart.CFrame * cf(0, 0, -15)
  831. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  832. refe.Anchored = true
  833. refe.CFrame = CF
  834. game:GetService("Debris"):AddItem(refe, 5)
  835. so("306247739", refe, 1, 1)
  836. dul = math.random(-50, 50)
  837. for i = 0.785, 2.355, 1.57 do
  838. refe.CFrame = CF * euler(0, dul + i, 0)
  839. for d = -21, 21, 7 do
  840. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  841. ref.Anchored = true
  842. ref.CFrame = refe.CFrame * cf(0, 0, d)
  843. game:GetService("Debris"):AddItem(ref, 5)
  844. bhitfloor, bposfloor = rayCast(ref.Position, CFrame.new(ref.Position, ref.Position - Vector3.new(0, 1, 0)).lookVector, 100, Character)
  845. local bone1, bhb1 = bone(workspace, 30, 3, 5, -1, 1)
  846. bone1.CFrame = cf(bposfloor) * cf(0, -2, 0) * euler(0, math.random(-50, 50), 0)
  847. bpos = Instance.new("BodyPosition")
  848. bpos.P = 8000
  849. bpos.D = 800
  850. bpos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  851. bpos.Parent = bone1
  852. bpos.position = bposfloor + vt(0, -2, 0)
  853. table.insert(AtkBones, {
  854. bone1,
  855. bhb1,
  856. bpos,
  857. bposfloor
  858. })
  859. ref.Parent = nil
  860. end
  861. end
  862. end
  863. for i = 0, 1, 0.3 do
  864. swait()
  865. Neck.C0 = clerp(Neck.C0, necko * euler(0.4, 0, 0) * euler(0, 0, 0), 0.5)
  866. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(-0.05, 0, 0), 0.5)
  867. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.5)
  868. 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)
  869. 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)
  870. 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)
  871. if Stagger.Value == true then
  872. break
  873. end
  874. end
  875. CF = RootPart.CFrame * cf(0, 0, -18)
  876. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  877. refe.Anchored = true
  878. refe.CFrame = CF
  879. game:GetService("Debris"):AddItem(refe, 5)
  880. so("306247749", refe, 1, 1)
  881. for i = 0, 2, 0.1 do
  882. swait()
  883. for i = 1, #AtkBones do
  884. MagniDamage(AtkBones[i][2], 2, 1, 1, 0, "Normal", AtkBones[i][2], 0.01, 1, math.random(2, 4), nil, nil, true)
  885. AtkBones[i][3].position = AtkBones[i][4] + vt(0, 2, 0)
  886. end
  887. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.5)
  888. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * euler(-0.05, 0, 0), 0.5)
  889. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.5)
  890. LW.C0 = clerp(LW.C0, cf(-1.5, 0.6, 0.05) * euler(2.5, 0, 0) * euler(0, -1.57, 0), 0.5)
  891. 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)
  892. 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)
  893. if Stagger.Value == true then
  894. break
  895. end
  896. end
  897. for i = 1, #AtkBones do
  898. AtkBones[i][1].Parent = nil
  899. end
  900. for i = 1, #AtkBones do
  901. table.remove(AtkBones, 1)
  902. end
  903. cansound = false
  904. attack = false
  905. end
  906. function attacktwo()
  907. attack = true
  908. cansound = true
  909. local btprt = part(3, modelzorz, 1, 1, BrickColor.new("White"), "Bone TorsPart", vt())
  910. local btwld1 = weld(btprt, btprt, Torso, cf(0, -2, 2))
  911. so("306247739", btprt, 1, 1)
  912. AtkBones = {}
  913. na = 0
  914. for i = 0.628, 6.28, 0.628 do
  915. swait()
  916. na = na + 0.4
  917. btwld1.C0 = euler(0, 0, na) * cf(0, -4, -2)
  918. local bone1, bhb1 = bone(modelzorz, 20, 3, 5, -1, 2)
  919. local bwld1 = weld(bone1, bone1, btprt, euler(0, 0, 0) * cf(0, -4, 0) * euler(0, 0, i))
  920. randnum = math.random(-1000, 1000) / 100
  921. ran = math.random(0, 500) / 100
  922. table.insert(AtkBones, {
  923. bone1,
  924. bhb1,
  925. bwld1,
  926. i,
  927. randnum,
  928. ran
  929. })
  930. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.4)
  931. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0.1, -0.1) * euler(-0.05, 0, 0), 0.4)
  932. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.4)
  933. 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)
  934. 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)
  935. 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)
  936. if Stagger.Value == true then
  937. break
  938. end
  939. end
  940. so("306247749", btprt, 1, 1)
  941. for i = 0, 1.1, 0.1 do
  942. swait()
  943. na = na + 0.4
  944. for i = 1, #AtkBones do
  945. MagniDamage(AtkBones[i][2], 4, 1, 1, 0, "Normal", AtkBones[i][2], 0.01, 1, math.random(2, 4), nil, nil, true)
  946. if i <= 0.7 then
  947. btwld1.C0 = clerp(btwld1.C0, euler(0, 0, na) * cf(0, -2, 5), 0.05)
  948. 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)
  949. else
  950. btwld1.C0 = clerp(btwld1.C0, euler(0, 0, na) * cf(0, -2, 60), 0.02)
  951. 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)
  952. end
  953. end
  954. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.4)
  955. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, -0.1, -0.1) * euler(-0.05, 0, 0), 0.4)
  956. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.4)
  957. LW.C0 = clerp(LW.C0, cf(-1.2, 0.5, -0.1) * euler(1.57, 0, 0) * euler(0, -1.57, 0), 0.4)
  958. 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)
  959. 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)
  960. if Stagger.Value == true then
  961. break
  962. end
  963. end
  964. for i = 1, #AtkBones do
  965. AtkBones[i][1].Parent = nil
  966. end
  967. for i = 1, #AtkBones do
  968. table.remove(AtkBones, 1)
  969. end
  970. btprt.Parent = nil
  971. cansound = false
  972. attack = false
  973. end
  974. function attackthree()
  975. attack = true
  976. attack = false
  977. end
  978. function attackfour()
  979. attack = true
  980. attack = false
  981. end
  982. function do1()
  983. if attack == true then
  984. return
  985. end
  986. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  987. return
  988. end
  989. attack = true
  990. d = MMouse.Hit.p + vt(0, 2, 0)
  991. if d ~= nil then
  992. thitfloor, tposfloor = rayCast(d, CFrame.new(d, d - Vector3.new(0, 1, 0)).lookVector, 300, Character)
  993. if thitfloor ~= nil then
  994. oldpos = RootPart.Position
  995. game:GetService("Lighting").OutdoorAmbient = Color3.new(0, 0, 0)
  996. game:GetService("Lighting").Brightness = 0
  997. ltime = game:GetService("Lighting").TimeOfDay
  998. game:GetService("Lighting").TimeOfDay = 0
  999. ski = it("Sky", game:GetService("Lighting"))
  1000. ski.StarCount = 0
  1001. swait(10)
  1002. RootPart.CFrame = cf(tposfloor) * cf(0, 3, 0)
  1003. pos4 = vt(oldpos.X, RootPart.Position.Y, oldpos.Z)
  1004. RootPart.CFrame = cf(RootPart.Position, pos4)
  1005. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.4980392156862745, 0.4980392156862745, 0.4980392156862745)
  1006. game:GetService("Lighting").Brightness = 1
  1007. game:GetService("Lighting").TimeOfDay = ltime
  1008. ski.Parent = nil
  1009. end
  1010. end
  1011. attack = false
  1012. end
  1013. function do2()
  1014. if attack == true then
  1015. return
  1016. end
  1017. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1018. return
  1019. end
  1020. attack = true
  1021. attack = false
  1022. end
  1023. function do3()
  1024. if attack == true then
  1025. return
  1026. end
  1027. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1028. return
  1029. end
  1030. attack = true
  1031. attack = false
  1032. end
  1033. function do4()
  1034. if attack == true then
  1035. return
  1036. end
  1037. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1038. return
  1039. end
  1040. attack = true
  1041. cooldowns[4] = 0
  1042. attack = false
  1043. end
  1044. function DecreaseStat(Model, Stat, Amount, Duration)
  1045. if Model:findFirstChild("Stats") ~= nil and Model.Stats[Stat] ~= nil then
  1046. Model.Stats[Stat].Value = Model.Stats[Stat].Value - Amount
  1047. d = Instance.new("NumberValue", Model.Stats.Decrease)
  1048. dur = Instance.new("NumberValue", d)
  1049. dur.Name = "Duration"
  1050. dur.Value = Duration
  1051. game:GetService("Debris"):AddItem(d, 20)
  1052. if Stat == "Damage" then
  1053. d.Name = "DecreaseAtk"
  1054. elseif Stat == "Defense" then
  1055. d.Name = "DecreaseDef"
  1056. elseif Stat == "Movement" then
  1057. d.Name = "DecreaseMvmt"
  1058. end
  1059. if Model:findFirstChild("Torso") ~= nil then
  1060. display = ""
  1061. if Stat == "Damage" then
  1062. if Amount > 0 then
  1063. display = "-Damage"
  1064. else
  1065. display = "+Damage"
  1066. end
  1067. elseif Stat == "Defense" then
  1068. if Amount > 0 then
  1069. display = "-Defense"
  1070. else
  1071. display = "+Defense"
  1072. end
  1073. elseif Stat == "Movement" then
  1074. if Amount > 0 then
  1075. display = "-Movement"
  1076. else
  1077. display = "+Movement"
  1078. end
  1079. end
  1080. showDamage(Model, display, "Debuff")
  1081. end
  1082. d.Value = Amount
  1083. end
  1084. end
  1085. function GetDist(Part1, Part2, magni)
  1086. local targ = Part1.Position - Part2.Position
  1087. local mag = targ.magnitude
  1088. if magni >= mag then
  1089. return true
  1090. else
  1091. return false
  1092. end
  1093. end
  1094. function MagniDamage(Part, magni, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1095. for _, c in pairs(workspace:children()) do
  1096. local hum = c:findFirstChild("Humanoid")
  1097. if hum ~= nil then
  1098. local head
  1099. for _, d in pairs(c:children()) do
  1100. if d.className == "Model" and ranged ~= true then
  1101. head = d:findFirstChild("Hitbox")
  1102. if d.Parent == Character then
  1103. break
  1104. end
  1105. if head ~= nil then
  1106. local targ = head.Position - Part.Position
  1107. local mag = targ.magnitude
  1108. if magni >= mag and c.Name ~= Player.Name then
  1109. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  1110. ref.Anchored = true
  1111. ref.CFrame = cf(head.Position)
  1112. game:GetService("Debris"):AddItem(ref, 1)
  1113. hitnum = math.random(1, 5)
  1114. if hitnum == 1 then
  1115. so("199148971", ref, 1, 1)
  1116. elseif hitnum == 2 then
  1117. so("199149025", ref, 1, 1)
  1118. elseif hitnum == 3 then
  1119. so("199149072", ref, 1, 1)
  1120. elseif hitnum == 4 then
  1121. so("199149109", ref, 1, 1)
  1122. elseif hitnum == 5 then
  1123. so("199149119", ref, 1, 1)
  1124. end
  1125. StaggerHit.Value = true
  1126. end
  1127. end
  1128. end
  1129. if d.className == "Part" then
  1130. head = d
  1131. if head ~= nil then
  1132. local targ = head.Position - Part.Position
  1133. local mag = targ.magnitude
  1134. if magni >= mag and c.Name ~= Player.Name then
  1135. if stun == nil then
  1136. stun = math.random(5, 10)
  1137. end
  1138. local Rang
  1139. if Ranged == false then
  1140. Rang = true
  1141. end
  1142. local stag
  1143. if shbash == true then
  1144. stag = true
  1145. end
  1146. Damagefunc(head, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1147. end
  1148. end
  1149. end
  1150. end
  1151. end
  1152. end
  1153. end
  1154. function rayCast(Pos, Dir, Max, Ignore)
  1155. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1156. end
  1157. function findNearestTorso(pos)
  1158. local list = game.Workspace:children()
  1159. local torso
  1160. local dist = 1000
  1161. local temp, human, temp2
  1162. for x = 1, #list do
  1163. temp2 = list[x]
  1164. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  1165. temp = temp2:findFirstChild("Torso")
  1166. human = temp2:findFirstChild("Humanoid")
  1167. if temp ~= nil and human ~= nil and human.Health > 0 and dist > (temp.Position - pos).magnitude then
  1168. local dohit = true
  1169. if Player.Neutral == false and game.Players:GetPlayerFromCharacter(temp.Parent) ~= nil and game.Players:GetPlayerFromCharacter(temp.Parent).TeamColor == Player.TeamColor then
  1170. dohit = false
  1171. end
  1172. if dohit == true then
  1173. torso = temp
  1174. dist = (temp.Position - pos).magnitude
  1175. end
  1176. end
  1177. end
  1178. end
  1179. return torso, dist
  1180. end
  1181. local Point = Torso.CFrame * cf(0, Torso.Size.Y, 0)
  1182. LastPoint = Point
  1183. function effect(Color, Ref, LP, P1, returnn)
  1184. if LP == nil or P1 == nil then
  1185. return
  1186. end
  1187. local effectsmsh = Instance.new("CylinderMesh")
  1188. effectsmsh.Scale = Vector3.new(0.2, 1, 0.2)
  1189. effectsmsh.Name = "Mesh"
  1190. local effectsg = Instance.new("Part")
  1191. NoOutline(effectsg)
  1192. effectsg.formFactor = 3
  1193. effectsg.CanCollide = false
  1194. effectsg.Name = "Eff"
  1195. effectsg.Locked = true
  1196. effectsg.Anchored = true
  1197. effectsg.Size = Vector3.new(0.5, 1, 0.5)
  1198. effectsg.Parent = workspace
  1199. effectsmsh.Parent = effectsg
  1200. effectsg.BrickColor = BrickColor.new(Color)
  1201. effectsg.Reflectance = Ref
  1202. local point1 = P1
  1203. local mg = (LP.p - point1.p).magnitude
  1204. effectsg.Size = Vector3.new(0.5, mg, 0.5)
  1205. effectsg.CFrame = cf((LP.p + point1.p) / 2, point1.p) * CFrame.Angles(math.rad(90), 0, 0)
  1206. effectsmsh.Scale = Vector3.new(0.2, 1, 0.2)
  1207. game:GetService("Debris"):AddItem(effectsg, 2)
  1208. if returnn then
  1209. return effectsg
  1210. end
  1211. if not returnn then
  1212. table.insert(Effects, {
  1213. effectsg,
  1214. "Cylinder",
  1215. 0.2,
  1216. 0.01,
  1217. 0,
  1218. 0.01,
  1219. effectsmsh
  1220. })
  1221. end
  1222. end
  1223. function MagicBlock(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type, parent, prt2)
  1224. local prt = part(3, parent, 0, 0, brickcolor, "Effect", vt())
  1225. local wld
  1226. prt.CFrame = cframe
  1227. prt.Anchored = true
  1228. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1229. game:GetService("Debris"):AddItem(prt, 10)
  1230. if Type == 1 or Type == nil then
  1231. table.insert(Effects, {
  1232. prt,
  1233. "Block1",
  1234. delay,
  1235. x3,
  1236. y3,
  1237. z3,
  1238. msh
  1239. })
  1240. elseif Type == 2 then
  1241. table.insert(Effects, {
  1242. prt,
  1243. "Block2",
  1244. delay,
  1245. x3,
  1246. y3,
  1247. z3,
  1248. msh
  1249. })
  1250. elseif Type == 3 then
  1251. table.insert(Effects, {
  1252. prt,
  1253. "Block3",
  1254. delay,
  1255. x3,
  1256. y3,
  1257. z3,
  1258. msh,
  1259. cframe,
  1260. prt2
  1261. })
  1262. end
  1263. end
  1264. function MagicSkull(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, goe)
  1265. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1266. prt.Anchored = true
  1267. prt.CFrame = cframe
  1268. msh = mesh("SpecialMesh", prt, "FileMesh", "4770583", vt(0, 0, 0), vt(x1, y1, z1))
  1269. game:GetService("Debris"):AddItem(prt, 10)
  1270. table.insert(Effects, {
  1271. prt,
  1272. "Skull",
  1273. delay,
  1274. x3,
  1275. y3,
  1276. z3,
  1277. msh,
  1278. goe
  1279. })
  1280. end
  1281. function MagicCircle(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1282. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1283. prt.Anchored = true
  1284. prt.CFrame = cframe
  1285. local msh = mesh("SpecialMesh", prt, "Sphere", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1286. game:GetService("Debris"):AddItem(prt, 10)
  1287. table.insert(Effects, {
  1288. prt,
  1289. "Cylinder",
  1290. delay,
  1291. x3,
  1292. y3,
  1293. z3,
  1294. msh
  1295. })
  1296. end
  1297. function MagicCylinder(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1298. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1299. prt.Anchored = true
  1300. prt.CFrame = cframe
  1301. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1302. game:GetService("Debris"):AddItem(prt, 10)
  1303. table.insert(Effects, {
  1304. prt,
  1305. "Cylinder",
  1306. delay,
  1307. x3,
  1308. y3,
  1309. z3,
  1310. msh
  1311. })
  1312. end
  1313. function MagicCylinder3(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1314. local prt = part(3, modelzorz, 0, 0, brickcolor, "Effect", vt())
  1315. prt.Anchored = true
  1316. prt.CFrame = cframe
  1317. local msh = mesh("SpecialMesh", prt, "Head", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1318. game:GetService("Debris"):AddItem(prt, 10)
  1319. table.insert(Effects, {
  1320. prt,
  1321. "Cylinder",
  1322. delay,
  1323. x3,
  1324. y3,
  1325. z3,
  1326. msh
  1327. })
  1328. end
  1329. function MagicCylinder2(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, goe)
  1330. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1331. prt.Anchored = true
  1332. prt.CFrame = cframe
  1333. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1334. game:GetService("Debris"):AddItem(prt, 10)
  1335. table.insert(Effects, {
  1336. prt,
  1337. "Cylinder2",
  1338. delay,
  1339. x3,
  1340. y3,
  1341. z3,
  1342. msh,
  1343. goe
  1344. })
  1345. end
  1346. function MagicHead(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1347. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1348. prt.Anchored = true
  1349. prt.CFrame = cframe
  1350. local msh = mesh("SpecialMesh", prt, "Head", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1351. game:GetService("Debris"):AddItem(prt, 10)
  1352. table.insert(Effects, {
  1353. prt,
  1354. "Cylinder",
  1355. delay,
  1356. x3,
  1357. y3,
  1358. z3,
  1359. msh
  1360. })
  1361. end
  1362. function ClangEffect(brickcolor, cframe, duration, decrease, size, power)
  1363. local prt = part(3, workspace, 0, 1, brickcolor, "Effect", vt())
  1364. prt.Anchored = true
  1365. prt.CFrame = cframe
  1366. local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(5, 5, 5))
  1367. game:GetService("Debris"):AddItem(prt, 10)
  1368. table.insert(Effects, {
  1369. prt,
  1370. "CylinderClang",
  1371. duration,
  1372. decrease,
  1373. size,
  1374. power,
  1375. prt.CFrame,
  1376. nil
  1377. })
  1378. end
  1379. function MagicWave(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1380. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1381. prt.Anchored = true
  1382. prt.CFrame = cframe
  1383. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  1384. game:GetService("Debris"):AddItem(prt, 10)
  1385. table.insert(Effects, {
  1386. prt,
  1387. "Cylinder",
  1388. delay,
  1389. x3,
  1390. y3,
  1391. z3,
  1392. msh
  1393. })
  1394. end
  1395. function MagicRing(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1396. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  1397. prt.Anchored = true
  1398. prt.CFrame = cframe * cf(x2, y2, z2)
  1399. local msh = mesh("SpecialMesh", prt, "FileMesh", "3270017", vt(0, 0, 0), vt(x1, y1, z1))
  1400. game:GetService("Debris"):AddItem(prt, 10)
  1401. table.insert(Effects, {
  1402. prt,
  1403. "Cylinder",
  1404. delay,
  1405. x3,
  1406. y3,
  1407. z3,
  1408. msh
  1409. })
  1410. end
  1411. function MagicRing2(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, prt2)
  1412. local prt = part(3, modelzorz, 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  1413. prt.Anchored = true
  1414. local msh = mesh("SpecialMesh", prt, "FileMesh", "3270017", vt(0, 0, 0), vt(x1, y1, z1))
  1415. game:GetService("Debris"):AddItem(prt, 10)
  1416. table.insert(Effects, {
  1417. prt,
  1418. "Block3",
  1419. delay,
  1420. x3,
  1421. y3,
  1422. z3,
  1423. msh,
  1424. cframe,
  1425. prt2
  1426. })
  1427. end
  1428. function ElecEffect(cff, x, y, z)
  1429. local prt = part(3, workspace, 0, 0, BrickColor.new("Bright red"), "Part", vt(1, 1, 1))
  1430. prt.Anchored = true
  1431. prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  1432. prt.CFrame = cf(prt.Position)
  1433. game:GetService("Debris"):AddItem(prt, 10)
  1434. xval = math.random() / 3
  1435. yval = math.random() / 3
  1436. zval = math.random() / 3
  1437. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
  1438. Effects[#Effects + 1] = {
  1439. prt,
  1440. "Elec",
  1441. 0.2,
  1442. x,
  1443. y,
  1444. z,
  1445. xval,
  1446. yval,
  1447. zval,
  1448. msh
  1449. }
  1450. end
  1451. function Damagefunc(hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1452. if hit.Parent == nil then
  1453. return
  1454. end
  1455. if hit == MovePart then
  1456. Fly = false
  1457. end
  1458. if hit.Name == "Hitbox" and hit.Parent ~= modelzorz and ranged ~= true then
  1459. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  1460. ref.Anchored = true
  1461. ref.CFrame = cf(hit.Position)
  1462. game:GetService("Debris"):AddItem(ref, 1)
  1463. hitnum = math.random(1, 5)
  1464. if hitnum == 1 then
  1465. so("199148971", ref, 1, 1)
  1466. elseif hitnum == 2 then
  1467. so("199149025", ref, 1, 1)
  1468. elseif hitnum == 3 then
  1469. so("199149072", ref, 1, 1)
  1470. elseif hitnum == 4 then
  1471. so("199149109", ref, 1, 1)
  1472. elseif hitnum == 5 then
  1473. so("199149119", ref, 1, 1)
  1474. end
  1475. StaggerHit.Value = true
  1476. end
  1477. h = hit.Parent:FindFirstChild("Humanoid")
  1478. for _, v in pairs(hit.Parent:children()) do
  1479. if v:IsA("Humanoid") then
  1480. h = v
  1481. end
  1482. end
  1483. if hit.Parent.Parent:FindFirstChild("Torso") ~= nil then
  1484. h = hit.Parent.Parent:FindFirstChild("Humanoid")
  1485. end
  1486. if hit.Parent.className == "Hat" then
  1487. hit = hit.Parent.Parent:findFirstChild("Head")
  1488. end
  1489. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  1490. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  1491. return
  1492. end
  1493. if Player.Neutral == false and game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil and game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == Player.TeamColor then
  1494. return
  1495. end
  1496. c = Instance.new("ObjectValue")
  1497. c.Name = "creator"
  1498. c.Value = game:service("Players").LocalPlayer
  1499. c.Parent = h
  1500. RecentEnemy.Value = hit.Parent
  1501. game:GetService("Debris"):AddItem(c, 0.5)
  1502. minim = minim * Atk.Value
  1503. maxim = maxim * Atk.Value
  1504. Damage = 0
  1505. if minim == maxim then
  1506. Damage = maxim
  1507. else
  1508. Damage = math.random(minim, maxim)
  1509. end
  1510. blocked = false
  1511. enblock = nil
  1512. Stats = hit.Parent:findFirstChild("Stats")
  1513. if Stats ~= nil then
  1514. enblock = Stats:findFirstChild("Block")
  1515. if enblock ~= nil and enblock.Value == true then
  1516. blocked = true
  1517. end
  1518. if Stats:findFirstChild("Defense") ~= nil then
  1519. if prechit == false then
  1520. Damage = Damage / Stats.Defense.Value
  1521. else
  1522. Val = Stats.Defense.Value
  1523. if 2 <= Val then
  1524. Val = 2
  1525. end
  1526. print(Val)
  1527. Damage = Damage * Val
  1528. --do break end
  1529. hitnum = math.random(1, 5)
  1530. if hitnum == 1 then
  1531. so("199149321", hit, 1, 1)
  1532. elseif hitnum == 2 then
  1533. so("199149338", hit, 1, 1)
  1534. elseif hitnum == 3 then
  1535. so("199149367", hit, 1, 1)
  1536. elseif hitnum == 4 then
  1537. so("199149409", hit, 1, 1)
  1538. elseif hitnum == 5 then
  1539. so("199149452", hit, 1, 1)
  1540. --do break end
  1541. if cansound == true then
  1542. hitnum = math.random(1, 6)
  1543. if hitnum == 1 then
  1544. so("199149137", hit, 1, 1)
  1545. elseif hitnum == 2 then
  1546. so("199149186", hit, 1, 1)
  1547. elseif hitnum == 3 then
  1548. so("199149221", hit, 1, 1)
  1549. elseif hitnum == 4 then
  1550. so("199149235", hit, 1, 1)
  1551. elseif hitnum == 5 then
  1552. so("199149269", hit, 1, 1)
  1553. elseif hitnum == 6 then
  1554. so("199149297", hit, 1, 1)
  1555. end
  1556. end
  1557. end
  1558. end
  1559. if 3 >= Damage and staghit == true and ranged ~= true then
  1560. StaggerHit.Value = true
  1561. end
  1562. end
  1563. if Stats:findFirstChild("Stun") ~= nil then
  1564. if blocked == true then
  1565. incstun = incstun / 2
  1566. end
  1567. if Stats.Stun.Value < 100 then
  1568. Stats.Stun.Value = Stats.Stun.Value + incstun
  1569. end
  1570. end
  1571. if Stats:findFirstChild("Stagger") ~= nil and stagger == true then
  1572. Stats.Stagger.Value = true
  1573. end
  1574. end
  1575. if blocked == true then
  1576. showDamage(hit.Parent, "Block", "Damage")
  1577. if ranged ~= true then
  1578. enblock.Value = false
  1579. Stagger.Value = true
  1580. hitnum = math.random(1, 2)
  1581. if hitnum == 1 then
  1582. so("199148933", hit, 1, 1)
  1583. elseif hitnum == 2 then
  1584. so("199148947", hit, 1, 1)
  1585. end
  1586. end
  1587. else
  1588. Damage = 1
  1589. coroutine.resume(coroutine.create(function(Hum, Dam)
  1590. Hum:takeDamage(Dam)
  1591. end), h, Damage)
  1592. if move4atk == true then
  1593. sapdef = true
  1594. end
  1595. showDamage(hit.Parent, Damage, "Damage")
  1596. if prechit == true then
  1597. eul = euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1598. MagicCircle(BrickColor.new("White"), cf(hit.Position) * eul, 5, 5, 5, -0.1, 5, -0.1, 0.02)
  1599. MagicCircle(BrickColor.new("White"), cf(hit.Position) * eul * euler(1.57, 0, 0), 5, 5, 5, -0.1, 5, -0.1, 0.02)
  1600. end
  1601. if DecreaseState ~= nil then
  1602. DecreaseStat(hit.Parent, DecreaseState, DecreaseAmount, Duration)
  1603. end
  1604. if Type == "Knockdown" then
  1605. hum = hit.Parent.Humanoid
  1606. hum.PlatformStand = true
  1607. coroutine.resume(coroutine.create(function(HHumanoid)
  1608. swait(1)
  1609. HHumanoid.PlatformStand = false
  1610. end), hum)
  1611. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1612. local bodvol = Instance.new("BodyVelocity")
  1613. bodvol.velocity = angle * knockback
  1614. bodvol.P = 5000
  1615. bodvol.maxForce = Vector3.new(8000, 8000, 8000)
  1616. bodvol.Parent = hit
  1617. rl = Instance.new("BodyAngularVelocity")
  1618. rl.P = 3000
  1619. rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
  1620. rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  1621. rl.Parent = hit
  1622. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1623. game:GetService("Debris"):AddItem(rl, 0.5)
  1624. elseif Type == "Knockdown2" then
  1625. hum = hit.Parent.Humanoid
  1626. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1627. local bodvol = Instance.new("BodyVelocity")
  1628. bodvol.velocity = angle * knockback
  1629. bodvol.P = 5000
  1630. bodvol.maxForce = Vector3.new(8000, 8000, 8000)
  1631. bodvol.Parent = hit
  1632. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1633. elseif Type == "Normal" or Type == "NormalDecreaseMvmt1" then
  1634. vp = Instance.new("BodyVelocity")
  1635. vp.P = 500
  1636. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  1637. if KnockbackType == 1 then
  1638. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  1639. elseif KnockbackType == 2 then
  1640. vp.velocity = Property.CFrame.lookVector * knockback
  1641. end
  1642. game:GetService("Debris"):AddItem(vp, 0.5)
  1643. if knockback > 0 then
  1644. vp.Parent = hit.Parent.Torso
  1645. end
  1646. end
  1647. end
  1648. debounce = Instance.new("BoolValue")
  1649. debounce.Name = "DebounceHit"
  1650. debounce.Parent = hit.Parent
  1651. debounce.Value = true
  1652. game:GetService("Debris"):AddItem(debounce, Delay)
  1653. c = Instance.new("ObjectValue")
  1654. c.Name = "creator"
  1655. c.Value = Player
  1656. c.Parent = h
  1657. game:GetService("Debris"):AddItem(c, 0.5)
  1658. CRIT = false
  1659. end
  1660. end
  1661. function showDamage(Char, Dealt, Type)
  1662. m = Instance.new("Model")
  1663. m.Name = "Effect"
  1664. c = Instance.new("Part")
  1665. c.Transparency = 1
  1666. c.Name = "Head"
  1667. c.TopSurface = 0
  1668. c.BottomSurface = 0
  1669. c.formFactor = "Plate"
  1670. c.Size = Vector3.new(1, 0.4, 1)
  1671. b = Instance.new("BillboardGui", c)
  1672. b.Size = UDim2.new(5, 0, 5, 0)
  1673. b.AlwaysOnTop = true
  1674. damgui = gui("TextLabel", b, tostring(Dealt), 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0))
  1675. if Type == "Damage" then
  1676. damgui.Font = "SourceSans"
  1677. if Dealt == "Block" then
  1678. damgui.TextColor3 = BrickColor.new("Bright blue").Color
  1679. elseif Dealt < 3 then
  1680. damgui.TextColor3 = BrickColor.new("White").Color
  1681. elseif Dealt >= 3 and Dealt < 20 then
  1682. damgui.TextColor3 = BrickColor.new("Bright yellow").Color
  1683. else
  1684. damgui.TextColor3 = BrickColor.new("Really red").Color
  1685. damgui.Font = "SourceSansBold"
  1686. end
  1687. elseif Type == "Debuff" then
  1688. damgui.TextColor3 = BrickColor.new("White").Color
  1689. elseif Type == "Interrupt" then
  1690. damgui.TextColor3 = BrickColor.new("New Yeller").Color
  1691. end
  1692. damgui.TextScaled = true
  1693. ms = Instance.new("CylinderMesh")
  1694. ms.Scale = Vector3.new(0.8, 0.8, 0.8)
  1695. ms.Parent = c
  1696. c.Reflectance = 0
  1697. Instance.new("BodyGyro").Parent = c
  1698. c.Parent = m
  1699. if Char:findFirstChild("Head") ~= nil then
  1700. c.CFrame = cf(Char.Head.CFrame.p + Vector3.new(math.random(-100, 100) / 100, 3, math.random(-100, 100) / 100))
  1701. elseif Char.Parent:findFirstChild("Head") ~= nil then
  1702. c.CFrame = cf(Char.Parent.Head.CFrame.p + Vector3.new(math.random(-100, 100) / 100, 3, math.random(-100, 100) / 100))
  1703. end
  1704. f = Instance.new("BodyPosition")
  1705. f.P = 2000
  1706. f.D = 100
  1707. f.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1708. if Type == "Damage" then
  1709. f.position = c.Position + Vector3.new(0, 3, 0)
  1710. elseif Type == "Debuff" or Type == "Interrupt" then
  1711. f.position = c.Position + Vector3.new(0, 5, 0)
  1712. end
  1713. f.Parent = c
  1714. game:GetService("Debris"):AddItem(m, 5)
  1715. table.insert(Effects, {
  1716. m,
  1717. "showDamage",
  1718. damgui,
  1719. f,
  1720. 10,
  1721. 1,
  1722. 15,
  1723. 50,
  1724. 100
  1725. })
  1726. c.CanCollide = false
  1727. m.Parent = workspace
  1728. c.CanCollide = false
  1729. end
  1730. combo = 0
  1731. function ob1d(mouse)
  1732. if attack == true or equipped == false then
  1733. return
  1734. end
  1735. hold = true
  1736. if combo == 0 then
  1737. combo = 1
  1738. attackone()
  1739. elseif combo == 1 then
  1740. combo = 0
  1741. attacktwo()
  1742. elseif combo == 2 then
  1743. combo = 0
  1744. attackthree()
  1745. elseif combo == 3 then
  1746. combo = 0
  1747. attackfour()
  1748. end
  1749. coroutine.resume(coroutine.create(function()
  1750. for i = 1, 50 do
  1751. if attack == false then
  1752. swait()
  1753. end
  1754. end
  1755. if attack == false then
  1756. combo = 0
  1757. end
  1758. end))
  1759. end
  1760. function ob1u(mouse)
  1761. hold = false
  1762. end
  1763. buttonhold = false
  1764. fenbarmove1.MouseButton1Click:connect(do1)
  1765. fenbarmove2.MouseButton1Click:connect(do2)
  1766. fenbarmove3.MouseButton1Click:connect(do3)
  1767. fenbarmove4.MouseButton1Click:connect(do4)
  1768. eul = 0
  1769. equipped = false
  1770. function key(key)
  1771. if key == "q" then
  1772. Stagger.Value = true
  1773. end
  1774. if attack == true then
  1775. return
  1776. end
  1777. if key == "f" then
  1778. pressedf = true
  1779. fnumb = 0
  1780. attack = true
  1781. if equipped == false then
  1782. equipped = true
  1783. RSH = ch.Torso["Right Shoulder"]
  1784. LSH = ch.Torso["Left Shoulder"]
  1785. RSH.Parent = nil
  1786. LSH.Parent = nil
  1787. RW.Name = "Right Shoulder"
  1788. RW.Part0 = ch.Torso
  1789. RW.C0 = cf(1.5, 0.5, 0)
  1790. RW.C1 = cf(0, 0.5, 0)
  1791. RW.Part1 = ch["Right Arm"]
  1792. RW.Parent = ch.Torso
  1793. LW.Name = "Left Shoulder"
  1794. LW.Part0 = ch.Torso
  1795. LW.C0 = cf(-1.5, 0.5, 0)
  1796. LW.C1 = cf(0, 0.5, 0)
  1797. LW.Part1 = ch["Left Arm"]
  1798. LW.Parent = ch.Torso
  1799. Animate.Parent = nil
  1800. animTrack:Play()
  1801. equipanim()
  1802. else
  1803. equipped = false
  1804. hideanim()
  1805. LH.C1 = LHC1
  1806. RH.C1 = RHC1
  1807. animTrack:Stop()
  1808. Animate.Parent = Character
  1809. swait(0)
  1810. RW.Parent = nil
  1811. LW.Parent = nil
  1812. RSH.Parent = player.Character.Torso
  1813. LSH.Parent = player.Character.Torso
  1814. end
  1815. attack = false
  1816. end
  1817. if equipped == false then
  1818. return
  1819. end
  1820. if key == "e" then
  1821. print(#Bones)
  1822. end
  1823. if key == "g" then
  1824. hprt3.Transparency = 0
  1825. hprt4.Transparency = 0
  1826. hprt5.Transparency = 1
  1827. end
  1828. if key == "h" then
  1829. hprt3.Transparency = 1
  1830. hprt4.Transparency = 1
  1831. hprt5.Transparency = 0
  1832. end
  1833. if key == "j" then
  1834. hprt3.Transparency = 1
  1835. hprt4.Transparency = 1
  1836. hprt5.Transparency = 1
  1837. end
  1838. if key == "z" then
  1839. do1()
  1840. end
  1841. if key == "x" then
  1842. do2()
  1843. end
  1844. if key == "c" then
  1845. do3()
  1846. end
  1847. if key == "v" then
  1848. do4()
  1849. end
  1850. end
  1851. function key2(key)
  1852. end
  1853. function s(mouse)
  1854. mouse.Button1Down:connect(function()
  1855. ob1d(mouse)
  1856. end)
  1857. mouse.Button1Up:connect(function()
  1858. ob1u(mouse)
  1859. end)
  1860. mouse.KeyDown:connect(key)
  1861. mouse.KeyUp:connect(key2)
  1862. player = Player
  1863. ch = Character
  1864. MMouse = mouse
  1865. end
  1866. function ds(mouse)
  1867. end
  1868. Bin.Selected:connect(s)
  1869. Bin.Deselected:connect(ds)
  1870. print("Calvar loaded.")
  1871. local mananum = 0
  1872. local donum = 0
  1873. local stunnum = 0
  1874. local staggeranim = false
  1875. local stunanim = false
  1876. local Point, LastPoint
  1877. local handef = 0
  1878. local walk = 0
  1879. local walkforw = true
  1880. while true do
  1881. swait()
  1882. for _, c in pairs(Character:children()) do
  1883. for _, v in pairs(c:children()) do
  1884. 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
  1885. print("dai")
  1886. v.Parent = nil
  1887. end
  1888. end
  1889. end
  1890. if hprt5.Transparency == 0 then
  1891. parti.Enabled = true
  1892. elseif hprt5.Transparency == 1 then
  1893. parti.Enabled = false
  1894. end
  1895. col = math.random()
  1896. col2 = 1 - col
  1897. hprt5.BrickColor = BrickColor.new(Color3.new(col, math.random(50, 100) / 100, col2))
  1898. parti.Color = cs(hprt5.BrickColor.Color, hprt5.BrickColor.Color)
  1899. if Humanoid.Health <= 0 then
  1900. attack = true
  1901. resumeControl()
  1902. modelzorz.Parent = workspace
  1903. modelzorz.Name = "Weapon Model"
  1904. game:GetService("Debris"):AddItem(modelzorz, 30)
  1905. for i = 1, #Weapon do
  1906. Weapon[i].Parent = modelzorz
  1907. Weapon[i].CanCollide = true
  1908. end
  1909. for i = 1, #Welds do
  1910. if Welds[i].Part0.Parent == Character or Welds[i].Part1.Parent == Character then
  1911. Welds[i].Parent = nil
  1912. else
  1913. Welds[i].Parent = prt1
  1914. end
  1915. end
  1916. end
  1917. if fnumb < 21 then
  1918. fnumb = fnumb + 1
  1919. if pressedf == false then
  1920. fenframe5.BackgroundTransparency = fenframe5.BackgroundTransparency - 0.025
  1921. tellbar.TextTransparency = tellbar.TextTransparency - 0.05
  1922. tellbar.TextStrokeTransparency = tellbar.TextStrokeTransparency - 0.05
  1923. else
  1924. if fnumb == 20 then
  1925. fenframe5.Parent = nil
  1926. print("daigui")
  1927. end
  1928. fenframe5.BackgroundTransparency = fenframe5.BackgroundTransparency + 0.025
  1929. tellbar.TextTransparency = tellbar.TextTransparency + 0.05
  1930. tellbar.TextStrokeTransparency = tellbar.TextStrokeTransparency + 0.05
  1931. end
  1932. end
  1933. hitbox2.Parent = hitbox.Parent
  1934. hitbox2.Size = hitbox.Size
  1935. hitbox2.CFrame = hitboxCF
  1936. hboxpos.position = hitbox2.Position + vt(math.random(-100, 100) / 100, math.random(-100, 100) / 100, math.random(-100, 100) / 100)
  1937. if Stagger.Value == true and staggeranim == false then
  1938. coroutine.resume(coroutine.create(function()
  1939. staggeranim = true
  1940. while attack == true do
  1941. swait()
  1942. end
  1943. StaggerAnim()
  1944. StaggerHit.Value = false
  1945. Stagger.Value = false
  1946. staggeranim = false
  1947. end))
  1948. end
  1949. if StaggerHit.Value == true and staggeranim == false then
  1950. coroutine.resume(coroutine.create(function()
  1951. staggeranim = true
  1952. while attack == true do
  1953. swait()
  1954. end
  1955. StaggerHitt()
  1956. StaggerHit.Value = false
  1957. Stagger.Value = false
  1958. staggeranim = false
  1959. end))
  1960. end
  1961. if Mvmt.Value < 0 or Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1962. Humanoid.WalkSpeed = 0
  1963. else
  1964. Humanoid.WalkSpeed = 16 * Mvmt.Value
  1965. end
  1966. if Stun.Value >= 100 and stunanim == false then
  1967. coroutine.resume(coroutine.create(function()
  1968. stunanim = true
  1969. while attack == true do
  1970. swait()
  1971. end
  1972. StunAnim()
  1973. Stun.Value = 0
  1974. stunanim = false
  1975. end))
  1976. end
  1977. local stunnum2 = 30
  1978. if stunnum >= stunnum2 then
  1979. if Stun.Value > 0 then
  1980. Stun.Value = Stun.Value - 1
  1981. end
  1982. stunnum = 0
  1983. end
  1984. stunnum = stunnum + 1
  1985. if donum >= 0.5 then
  1986. handidle = true
  1987. elseif donum <= 0 then
  1988. handidle = false
  1989. end
  1990. if handidle == false then
  1991. donum = donum + 0.003
  1992. else
  1993. donum = donum - 0.003
  1994. end
  1995. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  1996. local velderp = RootPart.Velocity.y
  1997. hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  1998. if equipped == true then
  1999. if attack == false then
  2000. idle = idle + 1
  2001. else
  2002. idle = 0
  2003. end
  2004. if not (idle >= 500) or attack == false then
  2005. end
  2006. if Anim == "Walk" then
  2007. if walkforw == true then
  2008. RH.C1 = clerp(RH.C1, RHC1 * cf(0.2, -0.2, 0) * euler(0, 0, 1), Mvmt.Value * 10 / 50)
  2009. LH.C1 = clerp(LH.C1, LHC1 * cf(0.1, 0.2, 0) * euler(0, 0, 1), Mvmt.Value * 10 / 50)
  2010. else
  2011. RH.C1 = clerp(RH.C1, RHC1 * cf(-0.1, 0.2, 0) * euler(0, 0, -1), Mvmt.Value * 10 / 50)
  2012. LH.C1 = clerp(LH.C1, LHC1 * cf(-0.2, -0.2, 0) * euler(0, 0, -1), Mvmt.Value * 10 / 50)
  2013. end
  2014. else
  2015. RH.C1 = clerp(RH.C1, RHC1, 0.2)
  2016. LH.C1 = clerp(LH.C1, LHC1, 0.2)
  2017. end
  2018. if RootPart.Velocity.y > 1 and hitfloor == nil then
  2019. Anim = "Jump"
  2020. if attack == false then
  2021. Neck.C0 = clerp(Neck.C0, necko * euler(-0.2, 0, 0), 0.2)
  2022. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.2)
  2023. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2024. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2025. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2026. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2027. RH.C0 = clerp(RH.C0, cf(1, -1, -0.3) * euler(-0.5, 1.57, 0) * euler(-0.2, 0, 0), 0.2)
  2028. LH.C0 = clerp(LH.C0, cf(-1, -1, -0.3) * euler(-0.5, -1.57, 0) * euler(-0.2, 0, 0), 0.2)
  2029. end
  2030. elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  2031. Anim = "Fall"
  2032. if attack == false then
  2033. Neck.C0 = clerp(Neck.C0, necko * euler(0.4, 0, 0), 0.2)
  2034. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.2)
  2035. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2036. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2037. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2038. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2039. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0.4, 1.57, 0), 0.2)
  2040. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(-0.2, -1.57, 0), 0.2)
  2041. end
  2042. elseif torvel < 1 and hitfloor ~= nil then
  2043. Anim = "Idle"
  2044. if attack == false then
  2045. Neck.C0 = clerp(Neck.C0, necko * euler(0.3, 0, 0) * euler(0, 0, 0), 0.2)
  2046. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.2)
  2047. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2048. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2049. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2050. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2051. 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)
  2052. 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)
  2053. end
  2054. elseif torvel > 2 and torvel < 30 and hitfloor ~= nil then
  2055. Anim = "Walk"
  2056. walk = walk + 1
  2057. if walk >= 10 then
  2058. walk = 0
  2059. if walkforw == true then
  2060. walkforw = false
  2061. elseif walkforw == false then
  2062. walkforw = true
  2063. end
  2064. end
  2065. if attack == false then
  2066. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.2)
  2067. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(0, 0, 0), 0.2)
  2068. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.2), 0.2)
  2069. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2070. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.2), 0.2)
  2071. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2072. 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)
  2073. 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)
  2074. end
  2075. elseif torvel >= 30 and hitfloor ~= nil then
  2076. Anim = "Run"
  2077. if attack == false then
  2078. Neck.C0 = clerp(Neck.C0, necko * euler(0.3, 0, 0) * euler(0, 0, 0), 0.2)
  2079. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.2)
  2080. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2081. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2082. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2083. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2084. 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)
  2085. 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)
  2086. end
  2087. end
  2088. end
  2089. if #Effects > 0 then
  2090. for e = 1, #Effects do
  2091. if Effects[e] ~= nil then
  2092. local Thing = Effects[e]
  2093. if Thing ~= nil then
  2094. local Part = Thing[1]
  2095. local Mode = Thing[2]
  2096. local Delay = Thing[3]
  2097. local IncX = Thing[4]
  2098. local IncY = Thing[5]
  2099. local IncZ = Thing[6]
  2100. if Thing[2] == "CylinderClang" then
  2101. if Thing[3] <= 1 then
  2102. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 2.5 * Thing[5], 0) * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  2103. Thing[7] = Thing[1].CFrame
  2104. effect("New Yeller", 0, Thing[8], Thing[7])
  2105. Thing[8] = Thing[7]
  2106. Thing[3] = Thing[3] + Thing[4]
  2107. else
  2108. Part.Parent = nil
  2109. table.remove(Effects, e)
  2110. end
  2111. end
  2112. if Thing[2] == "showDamage" then
  2113. if Thing[6] < Thing[5] then
  2114. Thing[6] = Thing[6] + 1
  2115. elseif Thing[6] < Thing[7] then
  2116. Thing[4].position = Thing[4].position + vt(0, -0.2, 0)
  2117. Thing[6] = Thing[6] + 1
  2118. elseif Thing[6] < Thing[8] then
  2119. Thing[6] = Thing[6] + 1
  2120. elseif Thing[6] < Thing[9] then
  2121. Thing[6] = Thing[6] + 1
  2122. Thing[4].position = Thing[4].position + vt(0, 0.2, 0)
  2123. Thing[3].TextStrokeTransparency = Thing[3].TextStrokeTransparency + 0.1
  2124. Thing[3].TextTransparency = Thing[3].TextTransparency + 0.1
  2125. else
  2126. Thing[1].Parent = nil
  2127. table.remove(Effects, e)
  2128. end
  2129. end
  2130. if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" then
  2131. if Thing[1].Transparency <= 1 then
  2132. if Thing[2] == "Block1" then
  2133. Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  2134. Mesh = Thing[7]
  2135. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2136. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2137. elseif Thing[2] == "Block2" then
  2138. Thing[1].CFrame = Thing[1].CFrame
  2139. Mesh = Thing[7]
  2140. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2141. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2142. elseif Thing[2] == "Block3" then
  2143. Thing[1].CFrame = Thing[9].CFrame * Thing[8] * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  2144. Mesh = Thing[7]
  2145. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2146. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2147. elseif Thing[2] == "Cylinder" then
  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] == "Cylinder2" then
  2152. Thing[1].CFrame = Thing[1].CFrame * cf(0, Thing[8], 0)
  2153. Mesh = Thing[7]
  2154. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2155. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2156. elseif Thing[2] == "Blood" then
  2157. Mesh = Thing[7]
  2158. Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
  2159. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2160. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2161. elseif Thing[2] == "Elec" then
  2162. Mesh = Thing[10]
  2163. Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
  2164. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2165. elseif Thing[2] == "Disappear" then
  2166. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2167. end
  2168. else
  2169. Part.Parent = nil
  2170. table.remove(Effects, e)
  2171. end
  2172. end
  2173. end
  2174. end
  2175. end
  2176. end
  2177. fenbarmana2:TweenSize(UDim2.new(0.4, 0, -4 * mana.Value / 100, 0), nil, 1, 0.4, true)
  2178. fenbarmana4.Text = "Mana(" .. mana.Value .. ")"
  2179. fenbarhp2.BackgroundColor3 = Color3.new(Humanoid.Health / Humanoid.MaxHealth, 0, 0)
  2180. fenbarhp2:TweenSize(UDim2.new(Humanoid.Health / Humanoid.MaxHealth, 0, 1, 0), nil, 1, 0.4, true)
  2181. fenbarhp3.Text = "(" .. math.floor(Humanoid.Health) .. ")"
  2182. fenbarmove1b:TweenSize(UDim2.new(1 * cooldowns[1] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2183. fenbarmove2b:TweenSize(UDim2.new(1 * cooldowns[2] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2184. fenbarmove3b:TweenSize(UDim2.new(1 * cooldowns[3] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2185. fenbarmove4b:TweenSize(UDim2.new(1 * cooldowns[4] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2186. for _, c in pairs(Decrease:children()) do
  2187. if c:findFirstChild("Duration") ~= nil then
  2188. c.Duration.Value = c.Duration.Value - 1
  2189. c.Parent = nil
  2190. end
  2191. if c.Name == "DecreaseAtk" then
  2192. decreaseatk = decreaseatk + c.Value
  2193. elseif c.Name == "DecreaseDef" then
  2194. decreasedef = decreasedef + c.Value
  2195. elseif c.Name == "DecreaseMvmt" then
  2196. decreasemvmt = decreasemvmt + c.Value
  2197. end
  2198. end
  2199. Atk.Value = 1 - decreaseatk
  2200. if Atk.Value <= 0 then
  2201. Atk.Value = 0
  2202. end
  2203. Def.Value = 1 - decreasedef
  2204. if Def.Value <= 0 then
  2205. Def.Value = 0.01
  2206. end
  2207. Mvmt.Value = 1 - decreasemvmt
  2208. if Mvmt.Value <= 0 then
  2209. Mvmt.Value = 0
  2210. end
  2211. decreaseatk = 0
  2212. decreasedef = 0
  2213. decreasemvmt = 0
  2214. AtkVal = Atk.Value * 100
  2215. AtkVal = math.floor(AtkVal)
  2216. AtkVal = AtkVal / 100
  2217. fenbardamage.Text = [[
  2218. Damage
  2219. (]] .. AtkVal .. ")"
  2220. DefVal = Def.Value * 100
  2221. DefVal = math.floor(DefVal)
  2222. DefVal = DefVal / 100
  2223. fenbardef.Text = [[
  2224. Defense
  2225. (]] .. DefVal .. ")"
  2226. MvmtVal = Mvmt.Value * 100
  2227. MvmtVal = math.floor(MvmtVal)
  2228. MvmtVal = MvmtVal / 100
  2229. fenbarmove.Text = [[
  2230. Walkspeed
  2231. (]] .. MvmtVal .. ")"
  2232. if Stun.Value >= 100 then
  2233. fenbarstun2:TweenSize(UDim2.new(0.4, 0, -4, 0), nil, 1, 0.4, true)
  2234. else
  2235. fenbarstun2:TweenSize(UDim2.new(0.4, 0, -4 * Stun.Value / 100, 0), nil, 1, 0.4, true)
  2236. end
  2237. fenbarstun3.Text = "Stun(" .. Stun.Value .. ")"
  2238. if mana.Value >= 100 then
  2239. mana.Value = 100
  2240. elseif mananum <= 9 then
  2241. mananum = mananum + 1
  2242. else
  2243. mananum = 0
  2244. mana.Value = mana.Value + 1
  2245. end
  2246. for i = 1, #cooldowns do
  2247. if cooldownmax <= cooldowns[i] then
  2248. cooldowns[i] = cooldownmax
  2249. else
  2250. cooldowns[i] = cooldowns[i] + cooldownsadd[i]
  2251. end
  2252. end
  2253. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement