ScriptBuilderSHEHAB

rip cross hello sans

Dec 27th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.54 KB | None | 0 0
  1. ---- cross has been deleted from the multiverse
  2. Player = game:GetService("Players").LocalPlayer
  3. Character = Player.Character
  4. PlayerGui = Player.PlayerGui
  5. Backpack = Player.Backpack
  6. Torso = Character.Torso
  7. Head = Character.Head
  8. Humanoid = Character.Humanoid
  9. Face = Head.face
  10. mainShirt = nil
  11. mainPants = nil
  12. mainBColors = nil
  13. if Character:findFirstChild("Shirt") ~= nil then
  14. mainShirt = Character.Shirt
  15. end
  16. if Character:findFirstChild("Pants") ~= nil then
  17. mainPants = Character.Pants
  18. end
  19. if Character:findFirstChild("Body Colors") ~= nil then
  20. mainBColors = Character["Body Colors"]
  21. end
  22. for _, c in pairs(Character:children()) do
  23. if c.className == "Accessory" then
  24. c.Parent = nil
  25. end
  26. end
  27. LeftArm = Character["Left Arm"]
  28. LeftLeg = Character["Left Leg"]
  29. RightArm = Character["Right Arm"]
  30. RightLeg = Character["Right Leg"]
  31. LS = Torso["Left Shoulder"]
  32. LH = Torso["Left Hip"]
  33. RS = Torso["Right Shoulder"]
  34. RH = Torso["Right Hip"]
  35. Neck = Torso.Neck
  36. it = Instance.new
  37. vt = Vector3.new
  38. cf = CFrame.new
  39. euler = CFrame.fromEulerAnglesXYZ
  40. angles = CFrame.Angles
  41. necko = cf(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  42. necko2 = cf(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
  43. LHC0 = cf(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  44. LHC1 = cf(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  45. RHC0 = cf(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  46. RHC1 = cf(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  47. RootPart = Character.HumanoidRootPart
  48. RootJoint = RootPart.RootJoint
  49. RootCF = euler(-1.57, 0, 3.14)
  50. attack = false
  51. attackdebounce = false
  52. MMouse = nil
  53. combo = 0
  54. local hitfloor, posfloor
  55. local idle = 0
  56. local Anim = "Idle"
  57. local Effects = {}
  58. local Weapon = {}
  59. local Welds = {}
  60. local Bones = {}
  61. local stance = false
  62. local triangparent = workspace
  63. local prechit = false
  64. local MovePart
  65. local Fly = false
  66. local prop = Instance.new("RocketPropulsion")
  67. local move4atk = false
  68. local sapdef = false
  69. local cansound = false
  70. local decreaseatk = 0
  71. local decreasedef = 0
  72. local decreasemvmt = 0
  73. local move1 = [[
  74. (Z)
  75. Teleport]]
  76. local move2 = [[
  77. (X)
  78. Blue Heart]]
  79. local move3 = [[
  80. (C)
  81. Boneyard]]
  82. local move4 = [[
  83. (V)
  84. Havin' a Bad Time]]
  85. local cooldowns = {}
  86. local cooldown1 = 0
  87. table.insert(cooldowns, cooldown1)
  88. local cooldown2 = 0
  89. table.insert(cooldowns, cooldown2)
  90. local cooldown3 = 0
  91. table.insert(cooldowns, cooldown3)
  92. local cooldown4 = 0
  93. table.insert(cooldowns, cooldown4)
  94. local cooldownsadd = {}
  95. local cooldownadd1 = 0.3
  96. table.insert(cooldownsadd, cooldownadd1)
  97. local cooldownadd2 = 0.3
  98. table.insert(cooldownsadd, cooldownadd2)
  99. local cooldownadd3 = 0.3
  100. table.insert(cooldownsadd, cooldownadd3)
  101. local cooldownadd4 = 0.3
  102. table.insert(cooldownsadd, cooldownadd4)
  103. local cooldownmax = 100
  104. player = nil
  105. RSH, LSH = nil, nil
  106. RW, LW = Instance.new("Motor"), Instance.new("Motor")
  107. RW.Name = "Right Shoulder"
  108. LW.Name = "Left Shoulder"
  109. LH = Torso["Left Hip"]
  110. RH = Torso["Right Hip"]
  111. TorsoColor = Torso.BrickColor
  112. TorsoRed = TorsoColor.Color.r
  113. TorsoGreen = TorsoColor.Color.g
  114. TorsoBlue = TorsoColor.Color.b
  115. sansShirt = it("Shirt")
  116. sansShirt.Name = "Shirt"
  117. sansShirt.ShirtTemplate = "http://www.roblox.com/asset/?id=302011210"
  118. sansPants = it("Pants")
  119. sansPants.Name = "Pants"
  120. sansPants.PantsTemplate = "http://www.roblox.com/asset/?id=286482064"
  121. sansBodyColors = it("BodyColors")
  122. sansBodyColors.HeadColor = BrickColor.new("Really black")
  123. sansBodyColors.LeftArmColor = BrickColor.new("Institutional white")
  124. sansBodyColors.LeftLegColor = BrickColor.new("Institutional white")
  125. sansBodyColors.RightArmColor = BrickColor.new("Institutional white")
  126. sansBodyColors.RightLegColor = BrickColor.new("Institutional white")
  127. sansBodyColors.TorsoColor = BrickColor.new("Institutional white")
  128. local Animate = Character.Animate
  129. local animation = Instance.new("Animation")
  130. animation.AnimationId = "http://www.roblox.com/Asset?ID=180435571"
  131. local animTrack = Humanoid:LoadAnimation(animation)
  132. local canjump = true
  133. function removeControl()
  134. canjump = false
  135. end
  136. function resumeControl()
  137. canjump = true
  138. end
  139. Player.Character.Humanoid.Changed:connect(function()
  140. if canjump == false then
  141. Player.Character.Humanoid.Jump = false
  142. end
  143. end)
  144. function swait(num)
  145. if num == 0 or num == nil then
  146. wait()
  147. else
  148. for i = 0, num do
  149. wait()
  150. end
  151. end
  152. end
  153. if Character:findFirstChild("Sans", true) ~= nil then
  154. Character:findFirstChild("Sans", true).Parent = nil
  155. end
  156. if Player.PlayerGui:findFirstChild("WeaponGUI", true) ~= nil then
  157. Player.PlayerGui:findFirstChild("WeaponGUI", true).Parent = nil
  158. end
  159. if Character:findFirstChild("Stats", true) ~= nil then
  160. Character:findFirstChild("Stats", true).Parent = nil
  161. end
  162. local Stats = Instance.new("BoolValue")
  163. Stats.Name = "Stats"
  164. Stats.Parent = Character
  165. local Atk = Instance.new("NumberValue")
  166. Atk.Name = "Damage"
  167. Atk.Parent = Stats
  168. Atk.Value = 1
  169. local Def = Instance.new("NumberValue")
  170. Def.Name = "Defense"
  171. Def.Parent = Stats
  172. Def.Value = 1
  173. local Mvmt = Instance.new("NumberValue")
  174. Mvmt.Name = "Movement"
  175. Mvmt.Parent = Stats
  176. Mvmt.Value = 1
  177. local Block = Instance.new("BoolValue")
  178. Block.Name = "Block"
  179. Block.Parent = Stats
  180. Block.Value = false
  181. local Stun = Instance.new("NumberValue")
  182. Stun.Name = "Stun"
  183. Stun.Parent = Stats
  184. Stun.Value = 0
  185. local Stunned = Instance.new("BoolValue")
  186. Stunned.Name = "Stunned"
  187. Stunned.Parent = Stats
  188. Stunned.Value = false
  189. local Stagger = Instance.new("BoolValue")
  190. Stagger.Name = "Stagger"
  191. Stagger.Parent = Stats
  192. Stagger.Value = false
  193. local StaggerHit = Instance.new("BoolValue")
  194. StaggerHit.Name = "StaggerHit"
  195. StaggerHit.Parent = Stats
  196. StaggerHit.Value = false
  197. local RecentEnemy = Instance.new("ObjectValue")
  198. RecentEnemy.Name = "RecentEnemy"
  199. RecentEnemy.Parent = Stats
  200. RecentEnemy.Value = nil
  201. local Decrease = Instance.new("BoolValue")
  202. Decrease.Name = "Decrease"
  203. Decrease.Parent = Stats
  204. Decrease.Value = false
  205. local mana = Instance.new("NumberValue")
  206. mana.Name = "Mana"
  207. mana.Parent = Stats
  208. mana.Value = 0
  209. local passive1 = Instance.new("NumberValue", Decrease)
  210. passive1.Name = "DecreaseAtk"
  211. passive1.Value = 0.4
  212. local passive2 = Instance.new("NumberValue", Decrease)
  213. passive2.Name = "DecreaseDef"
  214. passive2.Value = 0.8
  215. local passive3 = Instance.new("NumberValue", Decrease)
  216. passive3.Name = "DecreaseMvmt"
  217. passive3.Value = 0.6
  218. local sans = it("BoolValue", Stats)
  219. sans.Name = "Sans"
  220. sans.Value = true
  221. function NoOutline(Part)
  222. Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10
  223. end
  224. function part(formfactor, parent, reflectance, transparency, brickcolor, name, size)
  225. local fp = it("Part")
  226. fp.formFactor = formfactor
  227. fp.Parent = parent
  228. fp.Reflectance = reflectance
  229. fp.Transparency = transparency
  230. fp.CanCollide = false
  231. fp.Locked = true
  232. fp.BrickColor = brickcolor
  233. fp.Name = name
  234. fp.Size = size
  235. fp.Position = Torso.Position
  236. NoOutline(fp)
  237. fp.Material = "SmoothPlastic"
  238. fp:BreakJoints()
  239. return fp
  240. end
  241. function mesh(Mesh, part, meshtype, meshid, offset, scale)
  242. local mesh = it(Mesh)
  243. mesh.Parent = part
  244. if Mesh == "SpecialMesh" then
  245. mesh.MeshType = meshtype
  246. if meshid ~= "nil" then
  247. mesh.MeshId = "http://www.roblox.com/asset/?id=" .. meshid
  248. end
  249. end
  250. mesh.Offset = offset
  251. mesh.Scale = scale
  252. return mesh
  253. end
  254. function weld(parent, part0, part1, c0)
  255. local weld = it("Motor")
  256. weld.Parent = parent
  257. weld.Part0 = part0
  258. weld.Part1 = part1
  259. weld.C0 = c0
  260. return weld
  261. end
  262. function bone(bParent, bp1l, bp1w, bp2s, bhwy, bside)
  263. bpart1 = part(3, bParent, 0, 0, BrickColor.new("Institutional white"), "Bone", vt())
  264. bmsh1 = mesh("CylinderMesh", bpart1, "nil", "nil", vt(0, 0, 0), vt(bp1w, bp1l, bp1w))
  265. for d = 1, bside do
  266. nan = -1
  267. if d == 2 then
  268. nan = 1
  269. end
  270. for i = 1, 2 do
  271. nen = 1
  272. if i == 2 then
  273. nen = -1
  274. elseif i == 3 then
  275. nen = 0
  276. end
  277. da = bp2s / 1.5
  278. da2 = bp2s
  279. if i == 3 then
  280. da2 = bp1w
  281. da = da2
  282. end
  283. bpart2 = part(3, bpart1, 0, 0, BrickColor.new("Institutional white"), "Bone2", vt())
  284. bmsh2 = mesh("SpecialMesh", bpart2, "Sphere", "nil", vt(0, 0, 0), vt(da2, da2, da))
  285. bwld2 = weld(bpart2, bpart2, bpart1, cf(bp1l / 100 * nen, bp1l / 10 * nan, 0))
  286. end
  287. end
  288. bhitbox = part(3, bpart1, 0, 1, BrickColor.new("Black"), "BoneHitbox", vt())
  289. bh = mesh("BlockMesh", bhitbox, "nil", "nil", vt(0, 0, 0), vt(5, 5, 5))
  290. bhwld = weld(bhitbox, bhitbox, bpart1, cf(0, bhwy, 0))
  291. return bpart1, bhitbox
  292. end
  293. function GBlaster(gParent, gp1s1, gp1s2, gp1s3)
  294. gprt1 = part(3, gParent, 0, 0, BrickColor.new("Institutional white"), "Gaster Blaster", vt())
  295. gmsh1 = mesh("SpecialMesh", gprt1, "FileMesh", "14028428", vt(0, 0, 0), vt(gp1s1, gp1s2, gp1s3))
  296. gprt2 = part(3, gprt1, 0, 0, BrickColor.new("Institutional white"), "GBPart 2", vt())
  297. gmsh2 = mesh("SpecialMesh", gprt2, "FileMesh", "14028428", vt(0, 0, 0), vt(gp1s1, gp1s2 / 5, gp1s3))
  298. gbwld2 = weld(gprt2, gprt2, gprt1, euler(0, 0, 3.14) * cf(0, gp1s2, 0))
  299. return gprt1
  300. end
  301. function gui(GuiType, parent, text, backtrans, backcol, pos, size)
  302. local gui = it(GuiType)
  303. gui.Parent = parent
  304. gui.Text = text
  305. gui.BackgroundTransparency = backtrans
  306. gui.BackgroundColor3 = backcol
  307. gui.SizeConstraint = "RelativeXY"
  308. gui.TextXAlignment = "Center"
  309. gui.TextYAlignment = "Center"
  310. gui.Position = pos
  311. gui.Size = size
  312. gui.Font = "SourceSans"
  313. gui.FontSize = "Size14"
  314. gui.TextWrapped = false
  315. gui.TextStrokeTransparency = 0
  316. gui.TextColor = BrickColor.new("White")
  317. return gui
  318. end
  319. local Color1 = Torso.BrickColor
  320. local fengui = it("GuiMain")
  321. fengui.Parent = Player.PlayerGui
  322. fengui.Name = "WeaponGUI"
  323. local fenframe = it("Frame")
  324. fenframe.Parent = fengui
  325. fenframe.BackgroundColor3 = Color3.new(255, 255, 255)
  326. fenframe.BackgroundTransparency = 1
  327. fenframe.BorderColor3 = Color3.new(17, 17, 17)
  328. fenframe.Size = UDim2.new(0.1, 0, 0.1, 0)
  329. fenframe.Position = UDim2.new(0.95, 0, 0.7, 0)
  330. local fenframe2 = it("Frame")
  331. fenframe2.Parent = fengui
  332. fenframe2.BackgroundColor3 = Color3.new(255, 255, 255)
  333. fenframe2.BackgroundTransparency = 1
  334. fenframe2.BorderColor3 = Color3.new(17, 17, 17)
  335. fenframe2.Size = UDim2.new(0.2, 0, 0.1, 0)
  336. fenframe2.Position = UDim2.new(0.4, 0, 0.85, 0)
  337. local fenframe3 = it("Frame")
  338. fenframe3.Parent = fengui
  339. fenframe3.BackgroundColor3 = Color3.new(255, 255, 255)
  340. fenframe3.BackgroundTransparency = 1
  341. fenframe3.BorderColor3 = Color3.new(17, 17, 17)
  342. fenframe3.Size = UDim2.new(0.2, 0, 0.2, 0)
  343. fenframe3.Position = UDim2.new(0.8, 0, 0.8, 0)
  344. fenframe3.Name = "MoveFrame"
  345. local fenframe4 = it("Frame")
  346. fenframe4.Parent = fengui
  347. fenframe4.BackgroundColor3 = Color3.new(255, 255, 255)
  348. fenframe4.BackgroundTransparency = 1
  349. fenframe4.BorderColor3 = Color3.new(17, 17, 17)
  350. fenframe4.Size = UDim2.new(0.1, 0, 0.1, 0)
  351. fenframe4.Position = UDim2.new(0, 0, 0.7, 0)
  352. local pressedf = false
  353. local fenframe5 = it("Frame")
  354. fenframe5.Parent = fengui
  355. fenframe5.Parent = nil
  356. fenframe5.BackgroundColor3 = Color3.new(0, 0, 0)
  357. fenframe5.BackgroundTransparency = 1
  358. fenframe5.BorderColor3 = Color3.new(0, 0, 0)
  359. fenframe5.Size = UDim2.new(1, 0, 1, 0)
  360. fenframe5.Position = UDim2.new(0, 0, 0, 0)
  361. fenframe5.ZIndex = 2
  362. 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))
  363. tellbar.Font = "Arial"
  364. tellbar.TextScaled = true
  365. tellbar.TextTransparency = 1
  366. tellbar.TextStrokeTransparency = 1
  367. tellbar.ZIndex = 2
  368. local fnumb = 0
  369. local fenbarmana1 = gui("TextLabel", fenframe, "", 0, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(0.4, 0, -4, 0))
  370. local fenbarmana2 = gui("TextLabel", fenframe, "", 0, BrickColor.new("White").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0.4, 0, 0, 0))
  371. 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))
  372. 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))
  373. 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))
  374. 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))
  375. 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))
  376. local fenbarhp2 = gui("TextLabel", fenbarhp1, "", 0, Color3.new(1, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  377. local fenbarhp3 = gui("TextLabel", fenbarhp1, "(100)", 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0))
  378. 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))
  379. 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))
  380. 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))
  381. 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))
  382. fenbarmove1.ZIndex = 2
  383. local fenbarmove1b = gui("TextLabel", fenbarmove1, "", 0.55, BrickColor.new("Black").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  384. 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))
  385. fenbarmove2.ZIndex = 2
  386. local fenbarmove2b = gui("TextLabel", fenbarmove2, "", 0.55, BrickColor.new("Black").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  387. 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))
  388. fenbarmove3.ZIndex = 2
  389. local fenbarmove3b = gui("TextLabel", fenbarmove3, "", 0.55, BrickColor.new("Black").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  390. 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))
  391. fenbarmove4.ZIndex = 2
  392. local fenbarmove4b = gui("TextLabel", fenbarmove4, "", 0.55, BrickColor.new("Black").Color, UDim2.new(0, 0, 0, 0), UDim2.new(0, 0, 1, 0))
  393. local modelzorz = Instance.new("Model")
  394. modelzorz.Parent = Character
  395. modelzorz.Name = "Sans"
  396. local hprt1 = part(3, modelzorz, 0, 0, BrickColor.new("Really black"), "Head Part01", vt())
  397. local hprt2 = part(3, modelzorz, 0, 0, BrickColor.new("Institutional white"), "Head Part02", vt())
  398. local hprt3 = part(3, modelzorz, 0, 1, BrickColor.new("Institutional white"), "Head Part03", vt())
  399. local hprt4 = part(3, modelzorz, 0, 1, BrickColor.new("Institutional white"), "Head Part04", vt())
  400. local hprt5 = part(3, modelzorz, 1, 0, BrickColor.new("Pink"), "Head Part05", vt())
  401. hprt5.Material = "Neon"
  402. hmsh1 = mesh("SpecialMesh", hprt1, "Head", "nil", vt(0, 0, 0), vt(6.25, 6.25, 6.25))
  403. hmsh2 = mesh("SpecialMesh", hprt2, "FileMesh", "4770583", vt(0, 0, 0), vt(3.2, 3.2, 3.2))
  404. hmsh3 = mesh("SpecialMesh", hprt3, "Sphere", "nil", vt(0, 0, 0), vt(1, 1, 1))
  405. hmsh4 = mesh("SpecialMesh", hprt4, "Sphere", "nil", vt(0, 0, 0), vt(1, 1, 1))
  406. hmsh5 = mesh("SpecialMesh", hprt5, "Sphere", "nil", vt(0, 0, 0), vt(1.5, 1.5, 1.5))
  407. local hwld1 = weld(hprt1, hprt1, Head, cf(0, 0, 0))
  408. local hwld2 = weld(hprt1, hprt2, hprt1, cf(0, -0.2, 0))
  409. local hwld3 = weld(hprt1, hprt3, hprt2, euler(0, 0, 0) * cf(0.25, -0.05, 0.47))
  410. local hwld4 = weld(hprt1, hprt4, hprt2, euler(0, 0, 0) * cf(-0.25, -0.05, 0.47))
  411. local hwld5 = weld(hprt1, hprt5, hprt2, euler(0, 0, 0) * cf(0.25, -0.05, 0.47))
  412. local nr = NumberRange.new
  413. local ns = NumberSequence.new
  414. local cs = ColorSequence.new
  415. local parti = it("ParticleEmitter")
  416. parti.Color = cs(BrickColor.new("White").Color, BrickColor.new("White").Color)
  417. parti.LightEmission = 1
  418. parti.Texture = "rbxasset://textures/particles/sparkles_main.dds"
  419. sizeseq = ns({
  420. NumberSequenceKeypoint.new(0, 2),
  421. NumberSequenceKeypoint.new(1, 0)
  422. })
  423. transseq = ns({
  424. NumberSequenceKeypoint.new(0, 0.8),
  425. NumberSequenceKeypoint.new(1, 1)
  426. })
  427. parti.Transparency = transseq
  428. parti.Size = sizeseq
  429. parti.Acceleration = vt(0, 0, 0)
  430. parti.Lifetime = nr(0.5, 0.5)
  431. parti.Rate = 60
  432. parti.Rotation = nr(0, 360)
  433. parti.RotSpeed = nr(-100, 100)
  434. parti.Speed = nr(0)
  435. parti.VelocitySpread = 0
  436. parti.Parent = hprt5
  437. parti.Enabled = true
  438. parti.LockedToPart = true
  439. parti.ZOffset = 1
  440. for _, c in pairs(modelzorz:children()) do
  441. table.insert(Weapon, c)
  442. end
  443. for _, c in pairs(hprt1:children()) do
  444. if c.className == "Motor" then
  445. table.insert(Welds, c)
  446. end
  447. end
  448. local hitbox = part(3, modelzorz, 0, 1, BrickColor.new("Black"), "Hitbox2", vt())
  449. hitbox.Anchored = false
  450. local hbwld = weld(hitbox, hitbox, RootPart, euler(0, 0, 0) * cf(0, 0, 0))
  451. local hitbox2 = part(3, nil, 0, 1, BrickColor.new("Black"), "Hitbox", vt(1, 1, 1))
  452. hitbox2.Anchored = true
  453. local hitboxCF = cf(0, 0, 0)
  454. hboxpos = Instance.new("BodyPosition", nil)
  455. hboxpos.P = 2000
  456. hboxpos.D = 100
  457. hboxpos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  458. function hitboxweld()
  459. hbwld.Parent = modelzorz
  460. hbwld.Part0 = hitbox
  461. hbwld.Part1 = prt6
  462. end
  463. if script.Parent.className ~= "HopperBin" then
  464. Tool = Instance.new("HopperBin")
  465. Tool.Parent = Backpack
  466. Tool.Name = ""
  467. script.Parent = Tool
  468. end
  469. Bin = script.Parent
  470. if Bin.Name == "Calvar" then
  471. Bin.Name = ""
  472. end
  473. local bodvel = Instance.new("BodyVelocity")
  474. local bg = Instance.new("BodyGyro")
  475. function so(id, par, vol, pit)
  476. local sou = Instance.new("Sound", par or workspace)
  477. sou.Volume = vol
  478. sou.Pitch = pit or 1
  479. sou.SoundId = "http://www.roblox.com/asset/?id=" .. id
  480. sou:play()
  481. game:GetService("Debris"):AddItem(sou, 6)
  482. end
  483. function so2(id, par, vol, pit)
  484. local sou = Instance.new("Sound", par or workspace)
  485. sou.Volume = vol
  486. sou.Pitch = pit or 1
  487. sou.SoundId = id
  488. sou:play()
  489. game:GetService("Debris"):AddItem(sou, 6)
  490. end
  491. function clerp(a, b, t)
  492. local qa = {
  493. QuaternionFromCFrame(a)
  494. }
  495. local qb = {
  496. QuaternionFromCFrame(b)
  497. }
  498. local ax, ay, az = a.x, a.y, a.z
  499. local bx, by, bz = b.x, b.y, b.z
  500. local _t = 1 - t
  501. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  502. end
  503. function QuaternionFromCFrame(cf)
  504. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  505. local trace = m00 + m11 + m22
  506. if trace > 0 then
  507. local s = math.sqrt(1 + trace)
  508. local recip = 0.5 / s
  509. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  510. else
  511. local i = 0
  512. if m00 < m11 then
  513. i = 1
  514. end
  515. if m22 > (i == 0 and m00 or m11) then
  516. i = 2
  517. end
  518. if i == 0 then
  519. local s = math.sqrt(m00 - m11 - m22 + 1)
  520. local recip = 0.5 / s
  521. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  522. elseif i == 1 then
  523. local s = math.sqrt(m11 - m22 - m00 + 1)
  524. local recip = 0.5 / s
  525. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  526. elseif i == 2 then
  527. local s = math.sqrt(m22 - m00 - m11 + 1)
  528. local recip = 0.5 / s
  529. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  530. end
  531. end
  532. end
  533. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  534. local xs, ys, zs = x + x, y + y, z + z
  535. local wx, wy, wz = w * xs, w * ys, w * zs
  536. local xx = x * xs
  537. local xy = x * ys
  538. local xz = x * zs
  539. local yy = y * ys
  540. local yz = y * zs
  541. local zz = z * zs
  542. 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))
  543. end
  544. function QuaternionSlerp(a, b, t)
  545. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  546. local startInterp, finishInterp
  547. if cosTheta >= 1.0E-4 then
  548. if 1 - cosTheta > 1.0E-4 then
  549. local theta = math.acos(cosTheta)
  550. local invSinTheta = 1 / math.sin(theta)
  551. startInterp = math.sin((1 - t) * theta) * invSinTheta
  552. finishInterp = math.sin(t * theta) * invSinTheta
  553. else
  554. startInterp = 1 - t
  555. finishInterp = t
  556. end
  557. elseif 1 + cosTheta > 1.0E-4 then
  558. local theta = math.acos(-cosTheta)
  559. local invSinTheta = 1 / math.sin(theta)
  560. startInterp = math.sin((t - 1) * theta) * invSinTheta
  561. finishInterp = math.sin(t * theta) * invSinTheta
  562. else
  563. startInterp = t - 1
  564. finishInterp = t
  565. end
  566. 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
  567. end
  568. function turntoSans()
  569. if Face ~= nil then
  570. Face.Transparency = 1
  571. end
  572. if mainShirt ~= nil then
  573. mainShirt.Parent = nil
  574. end
  575. if mainPants ~= nil then
  576. mainPants.Parent = nil
  577. end
  578. if mainBColors ~= nil then
  579. mainBColors.Parent = nil
  580. end
  581. sansShirt.Parent = Character
  582. sansPants.Parent = Character
  583. sansBodyColors.Parent = Character
  584. for _, c in pairs(modelzorz:children()) do
  585. if c.className == "Part" then
  586. c.Transparency = 0
  587. end
  588. end
  589. for _, c in pairs(Character:children()) do
  590. Head.Transparency = 1
  591. if c.className == "Hat" then
  592. c.Handle.Transparency = 1
  593. end
  594. end
  595. end
  596. function turnNormal()
  597. if Face ~= nil then
  598. Face.Transparency = 0
  599. end
  600. if mainShirt ~= nil then
  601. mainShirt.Parent = Character
  602. end
  603. if mainPants ~= nil then
  604. mainPants.Parent = Character
  605. end
  606. if mainBColors ~= nil then
  607. mainBColors.Parent = Character
  608. end
  609. sansShirt.Parent = nil
  610. sansPants.Parent = nil
  611. sansBodyColors.Parent = nil
  612. for _, c in pairs(modelzorz:children()) do
  613. if c.className == "Part" then
  614. c.Transparency = 1
  615. end
  616. end
  617. for _, c in pairs(Character:children()) do
  618. Head.Transparency = 0
  619. if c.className == "Hat" then
  620. c.Handle.Transparency = 0
  621. end
  622. end
  623. end
  624. function normalEyes()
  625. hprt3.Transparency = 0
  626. hprt4.Transparency = 0
  627. hprt5.Transparency = 1
  628. end
  629. function glowingEye()
  630. hprt3.Transparency = 1
  631. hprt4.Transparency = 1
  632. hprt5.Transparency = 0
  633. end
  634. function noEyes()
  635. hprt3.Transparency = 1
  636. hprt4.Transparency = 1
  637. hprt5.Transparency = 1
  638. end
  639. turntoSans()
  640. hprt3.Transparency = 0
  641. hprt4.Transparency = 0
  642. hprt5.Transparency = 1
  643. function hideanim()
  644. equipped = false
  645. for i = 0, 1, 0.1 do
  646. swait()
  647. Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0), 0.4)
  648. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.4)
  649. RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 0, 0), 0.4)
  650. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  651. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, 0), 0.4)
  652. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  653. RH.C0 = clerp(RH.C0, RHC0, 0.4)
  654. LH.C0 = clerp(LH.C0, LHC0, 0.4)
  655. end
  656. Neck.C0 = clerp(Neck.C0, necko * euler(0, 0, 0), 1)
  657. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 1)
  658. RW.C0 = clerp(RW.C0, cf(1.5, 0.5, 0) * euler(0, 0, 0), 1)
  659. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 1)
  660. LW.C0 = clerp(LW.C0, cf(-1.5, 0.5, 0) * euler(0, 0, 0), 1)
  661. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 1)
  662. RH.C0 = clerp(RH.C0, RHC0, 1)
  663. LH.C0 = clerp(LH.C0, LHC0, 1)
  664. end
  665. function equipanim()
  666. equipped = true
  667. end
  668. function Clone(duration)
  669. for _, v in pairs(Torso.Parent:children()) do
  670. if v.className == "Part" and v.Name ~= "HumanoidRootPart" then
  671. local c = part(3, workspace, 0, 0.4, BrickColor.new("White"), "Effect", v.Size)
  672. c.Anchored = true
  673. c.CFrame = v.CFrame
  674. game:GetService("Debris"):AddItem(c, 5)
  675. if v.Name == "Head" then
  676. cmsh = mesh("SpecialMesh", c, "Head", "nil", vt(0, 0, 0), v.Mesh.Scale)
  677. end
  678. table.insert(Effects, {
  679. c,
  680. "Disappear",
  681. duration
  682. })
  683. end
  684. end
  685. for _, v in pairs(modelzorz:children()) do
  686. 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
  687. n = v:clone()
  688. for _, b in pairs(n:children()) do
  689. if b.className == "Motor" then
  690. b.Parent = nil
  691. end
  692. end
  693. n.archivable = true
  694. n.Anchored = true
  695. n.CanCollide = false
  696. n.Name = "Effect"
  697. n.BrickColor = BrickColor.new("White")
  698. n.Parent = workspace
  699. n.CFrame = v.CFrame
  700. n.Transparency = 0.4
  701. n:BreakJoints()
  702. table.insert(Effects, {
  703. n,
  704. "Disappear",
  705. duration
  706. })
  707. end
  708. end
  709. end
  710. function StaggerAnim()
  711. glowingEye()
  712. attack = true
  713. local canfloor, telepos, oldpos
  714. local dnum = 5
  715. repeat
  716. dnum = dnum - 1
  717. CF = cf(RootPart.Position) * cf(math.random(-500, 500) / 100, 0, math.random(-500, 500) / 100)
  718. tpos = RootPart.Position + vt(math.random(-5000, 5000) / 100, 20, math.random(-5000, 5000) / 100)
  719. hitfloor3, posfloor3 = rayCast(tpos, CFrame.new(tpos, tpos - Vector3.new(0, 1, 0)).lookVector, 400, Character)
  720. if hitfloor3 ~= nil then
  721. canfloor = true
  722. telepos = cf(posfloor3) * cf(0, 3, 0)
  723. end
  724. until canfloor ~= nil or dnum < 0
  725. Clone(0.01)
  726. if dnum >= 0 then
  727. oldpos = RootPart.Position
  728. RootPart.CFrame = telepos
  729. pos4 = vt(oldpos.X, RootPart.Position.Y, oldpos.Z)
  730. RootPart.CFrame = cf(RootPart.Position, pos4)
  731. else
  732. oldpos = RootPart.Position
  733. RootPart.CFrame = cf(RootPart.Position) * cf(0, 10, 0)
  734. end
  735. for _, c in pairs(workspace:children()) do
  736. if c.Name == "Effect" and c.className == "Model" and c:findFirstChild("Head") ~= nil then
  737. local targ = c.Head.Position - oldpos
  738. local mag = targ.magnitude
  739. if mag <= 10 then
  740. c.Parent = nil
  741. end
  742. end
  743. end
  744. Neck.C0 = necko * euler(0.3, 0, 0) * euler(0, 0, 0)
  745. RootJoint.C0 = RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0)
  746. RW.C0 = cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4)
  747. RW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  748. LW.C0 = cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4)
  749. LW.C1 = cf(0, 0.5, 0) * euler(0, 0, 0)
  750. RH.C0 = cf(1, -0.9, -0.05) * euler(0, 1.57, 0) * euler(0, -0.2, 0) * euler(-0.1, 0, -0.05)
  751. LH.C0 = cf(-1, -0.9, -0.05) * euler(0, -1.57, 0) * euler(0, 0.2, 0) * euler(-0.1, 0, 0.05)
  752. doanim = math.random(1, 2)
  753. if doanim == 1 then
  754. for i = 0, 1, 0.1 do
  755. swait()
  756. Neck.C0 = clerp(Neck.C0, necko * euler(0.2, 0, 0) * euler(0, 0, -0.2), 0.6)
  757. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(0, 0, 0), 0.6)
  758. 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)
  759. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.6)
  760. 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)
  761. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.6)
  762. 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)
  763. 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)
  764. end
  765. normalEyes()
  766. elseif doanim == 2 then
  767. for i = 1, 2 do
  768. if i == 2 then
  769. end
  770. for i = 0, 2, 0.2 do
  771. swait()
  772. Neck.C0 = clerp(Neck.C0, necko * euler(0.5, 0, 0) * euler(0, 0, 0), 0.15)
  773. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.4)
  774. if i <= 1 then
  775. RW.C0 = clerp(RW.C0, cf(1, 0.65, 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.65, 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. else
  780. RW.C0 = clerp(RW.C0, cf(1, 0.45, 0.3) * euler(-0.2, 0, -0.5), 0.4)
  781. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  782. LW.C0 = clerp(LW.C0, cf(-1, 0.45, 0.3) * euler(-0.2, 0, 0.5), 0.4)
  783. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.4)
  784. end
  785. 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)
  786. 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)
  787. end
  788. end
  789. normalEyes()
  790. end
  791. attack = false
  792. end
  793. function StaggerHitt()
  794. end
  795. function StunAnim()
  796. end
  797. function attackone()
  798. attack = true
  799. cansound = true
  800. AtkBones = {}
  801. atktype = math.random(1, 2)
  802. if atktype == 1 then
  803. CF = RootPart.CFrame * cf(0, 0, -18)
  804. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  805. refe.Anchored = true
  806. refe.CFrame = CF
  807. game:GetService("Debris"):AddItem(refe, 5)
  808. so("306247739", refe, 1, 1)
  809. for i = -12, 12, 12 do
  810. refe.CFrame = CF * euler(0, 1.57, 0) * cf(0, 0, -8 - i)
  811. for d = -16, 16, 8 do
  812. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  813. ref.Anchored = true
  814. ref.CFrame = refe.CFrame * cf(d, 0, 8)
  815. game:GetService("Debris"):AddItem(ref, 5)
  816. bhitfloor, bposfloor = rayCast(ref.Position, CFrame.new(ref.Position, ref.Position - Vector3.new(0, 1, 0)).lookVector, 100, Character)
  817. local bone1, bhb1 = bone(workspace, 30, 3, 5, -1, 1)
  818. bone1.CFrame = cf(bposfloor) * cf(0, -2, 0) * euler(0, math.random(-50, 50), 0)
  819. bpos = Instance.new("BodyPosition")
  820. bpos.P = 8000
  821. bpos.D = 800
  822. bpos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  823. bpos.Parent = bone1
  824. bpos.position = bposfloor + vt(0, -2, 0)
  825. table.insert(AtkBones, {
  826. bone1,
  827. bhb1,
  828. bpos,
  829. bposfloor
  830. })
  831. ref.Parent = nil
  832. end
  833. end
  834. elseif atktype == 2 then
  835. CF = RootPart.CFrame * cf(0, 0, -15)
  836. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  837. refe.Anchored = true
  838. refe.CFrame = CF
  839. game:GetService("Debris"):AddItem(refe, 5)
  840. so("306247739", refe, 1, 1)
  841. dul = math.random(-50, 50)
  842. for i = 0.785, 2.355, 1.57 do
  843. refe.CFrame = CF * euler(0, dul + i, 0)
  844. for d = -21, 21, 7 do
  845. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  846. ref.Anchored = true
  847. ref.CFrame = refe.CFrame * cf(0, 0, d)
  848. game:GetService("Debris"):AddItem(ref, 5)
  849. bhitfloor, bposfloor = rayCast(ref.Position, CFrame.new(ref.Position, ref.Position - Vector3.new(0, 1, 0)).lookVector, 100, Character)
  850. local bone1, bhb1 = bone(workspace, 30, 3, 5, -1, 1)
  851. bone1.CFrame = cf(bposfloor) * cf(0, -2, 0) * euler(0, math.random(-50, 50), 0)
  852. bpos = Instance.new("BodyPosition")
  853. bpos.P = 8000
  854. bpos.D = 800
  855. bpos.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  856. bpos.Parent = bone1
  857. bpos.position = bposfloor + vt(0, -2, 0)
  858. table.insert(AtkBones, {
  859. bone1,
  860. bhb1,
  861. bpos,
  862. bposfloor
  863. })
  864. ref.Parent = nil
  865. end
  866. end
  867. end
  868. for i = 0, 1, 0.3 do
  869. swait()
  870. Neck.C0 = clerp(Neck.C0, necko * euler(0.4, 0, 0) * euler(0, 0, 0), 0.5)
  871. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.2) * euler(-0.05, 0, 0), 0.5)
  872. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.5)
  873. 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)
  874. 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)
  875. 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)
  876. if Stagger.Value == true then
  877. break
  878. end
  879. end
  880. CF = RootPart.CFrame * cf(0, 0, -18)
  881. refe = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  882. refe.Anchored = true
  883. refe.CFrame = CF
  884. game:GetService("Debris"):AddItem(refe, 5)
  885. so("306247749", refe, 1, 1)
  886. for i = 0, 2, 0.1 do
  887. swait()
  888. for i = 1, #AtkBones do
  889. MagniDamage(AtkBones[i][2], 2, 1, 1, 0, "Normal", AtkBones[i][2], 0.01, 1, math.random(2, 4), nil, nil, true)
  890. AtkBones[i][3].position = AtkBones[i][4] + vt(0, 2, 0)
  891. end
  892. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.5)
  893. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, 0) * euler(-0.05, 0, 0), 0.5)
  894. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.5)
  895. LW.C0 = clerp(LW.C0, cf(-1.5, 0.6, 0.05) * euler(2.5, 0, 0) * euler(0, -1.57, 0), 0.5)
  896. 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)
  897. 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)
  898. if Stagger.Value == true then
  899. break
  900. end
  901. end
  902. for i = 1, #AtkBones do
  903. AtkBones[i][1].Parent = nil
  904. end
  905. for i = 1, #AtkBones do
  906. table.remove(AtkBones, 1)
  907. end
  908. cansound = false
  909. attack = false
  910. end
  911. function attacktwo()
  912. attack = true
  913. cansound = true
  914. local btprt = part(3, modelzorz, 1, 1, BrickColor.new("White"), "Bone TorsPart", vt())
  915. local btwld1 = weld(btprt, btprt, Torso, cf(0, -2, 2))
  916. so("306247739", btprt, 1, 1)
  917. AtkBones = {}
  918. na = 0
  919. for i = 0.628, 6.28, 0.628 do
  920. swait()
  921. na = na + 0.4
  922. btwld1.C0 = euler(0, 0, na) * cf(0, -4, -2)
  923. local bone1, bhb1 = bone(modelzorz, 20, 3, 5, -1, 2)
  924. local bwld1 = weld(bone1, bone1, btprt, euler(0, 0, 0) * cf(0, -4, 0) * euler(0, 0, i))
  925. randnum = math.random(-1000, 1000) / 100
  926. ran = math.random(0, 500) / 100
  927. table.insert(AtkBones, {
  928. bone1,
  929. bhb1,
  930. bwld1,
  931. i,
  932. randnum,
  933. ran
  934. })
  935. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.4)
  936. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0.1, -0.1) * euler(-0.05, 0, 0), 0.4)
  937. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.4)
  938. 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)
  939. 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)
  940. 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)
  941. if Stagger.Value == true then
  942. break
  943. end
  944. end
  945. so("306247749", btprt, 1, 1)
  946. for i = 0, 1.1, 0.1 do
  947. swait()
  948. na = na + 0.4
  949. for i = 1, #AtkBones do
  950. MagniDamage(AtkBones[i][2], 4, 1, 1, 0, "Normal", AtkBones[i][2], 0.01, 1, math.random(2, 4), nil, nil, true)
  951. if i <= 0.7 then
  952. btwld1.C0 = clerp(btwld1.C0, euler(0, 0, na) * cf(0, -2, 5), 0.05)
  953. 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)
  954. else
  955. btwld1.C0 = clerp(btwld1.C0, euler(0, 0, na) * cf(0, -2, 60), 0.02)
  956. 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)
  957. end
  958. end
  959. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.4)
  960. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, -0.1, -0.1) * euler(-0.05, 0, 0), 0.4)
  961. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.4)
  962. LW.C0 = clerp(LW.C0, cf(-1.2, 0.5, -0.1) * euler(1.57, 0, 0) * euler(0, -1.57, 0), 0.4)
  963. 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)
  964. 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)
  965. if Stagger.Value == true then
  966. break
  967. end
  968. end
  969. for i = 1, #AtkBones do
  970. AtkBones[i][1].Parent = nil
  971. end
  972. for i = 1, #AtkBones do
  973. table.remove(AtkBones, 1)
  974. end
  975. btprt.Parent = nil
  976. cansound = false
  977. attack = false
  978. end
  979. function attackthree()
  980. attack = true
  981. attack = false
  982. end
  983. function attackfour()
  984. attack = true
  985. attack = false
  986. end
  987. function do1()
  988. if attack == true then
  989. return
  990. end
  991. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  992. return
  993. end
  994. attack = true
  995. d = MMouse.Hit.p + vt(0, 2, 0)
  996. if d ~= nil then
  997. thitfloor, tposfloor = rayCast(d, CFrame.new(d, d - Vector3.new(0, 1, 0)).lookVector, 300, Character)
  998. if thitfloor ~= nil then
  999. oldpos = RootPart.Position
  1000. game:GetService("Lighting").OutdoorAmbient = Color3.new(0, 0, 0)
  1001. game:GetService("Lighting").Brightness = 0
  1002. ltime = game:GetService("Lighting").TimeOfDay
  1003. game:GetService("Lighting").TimeOfDay = 0
  1004. ski = it("Sky", game:GetService("Lighting"))
  1005. ski.StarCount = 0
  1006. swait(10)
  1007. RootPart.CFrame = cf(tposfloor) * cf(0, 3, 0)
  1008. pos4 = vt(oldpos.X, RootPart.Position.Y, oldpos.Z)
  1009. RootPart.CFrame = cf(RootPart.Position, pos4)
  1010. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.4980392156862745, 0.4980392156862745, 0.4980392156862745)
  1011. game:GetService("Lighting").Brightness = 1
  1012. game:GetService("Lighting").TimeOfDay = ltime
  1013. ski.Parent = nil
  1014. end
  1015. end
  1016. attack = false
  1017. end
  1018. function do2()
  1019. if attack == true then
  1020. return
  1021. end
  1022. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1023. return
  1024. end
  1025. attack = true
  1026. attack = false
  1027. end
  1028. function do3()
  1029. if attack == true then
  1030. return
  1031. end
  1032. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1033. return
  1034. end
  1035. attack = true
  1036. attack = false
  1037. end
  1038. function do4()
  1039. if attack == true then
  1040. return
  1041. end
  1042. if Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1043. return
  1044. end
  1045. attack = true
  1046. cooldowns[4] = 0
  1047. attack = false
  1048. end
  1049. function DecreaseStat(Model, Stat, Amount, Duration)
  1050. if Model:findFirstChild("Stats") ~= nil and Model.Stats[Stat] ~= nil then
  1051. Model.Stats[Stat].Value = Model.Stats[Stat].Value - Amount
  1052. d = Instance.new("NumberValue", Model.Stats.Decrease)
  1053. dur = Instance.new("NumberValue", d)
  1054. dur.Name = "Duration"
  1055. dur.Value = Duration
  1056. game:GetService("Debris"):AddItem(d, 20)
  1057. if Stat == "Damage" then
  1058. d.Name = "DecreaseAtk"
  1059. elseif Stat == "Defense" then
  1060. d.Name = "DecreaseDef"
  1061. elseif Stat == "Movement" then
  1062. d.Name = "DecreaseMvmt"
  1063. end
  1064. if Model:findFirstChild("Torso") ~= nil then
  1065. display = ""
  1066. if Stat == "Damage" then
  1067. if Amount > 0 then
  1068. display = "-Damage"
  1069. else
  1070. display = "+Damage"
  1071. end
  1072. elseif Stat == "Defense" then
  1073. if Amount > 0 then
  1074. display = "-Defense"
  1075. else
  1076. display = "+Defense"
  1077. end
  1078. elseif Stat == "Movement" then
  1079. if Amount > 0 then
  1080. display = "-Movement"
  1081. else
  1082. display = "+Movement"
  1083. end
  1084. end
  1085. showDamage(Model, display, "Debuff")
  1086. end
  1087. d.Value = Amount
  1088. end
  1089. end
  1090. function GetDist(Part1, Part2, magni)
  1091. local targ = Part1.Position - Part2.Position
  1092. local mag = targ.magnitude
  1093. if magni >= mag then
  1094. return true
  1095. else
  1096. return false
  1097. end
  1098. end
  1099. function MagniDamage(Part, magni, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1100. for _, c in pairs(workspace:children()) do
  1101. local hum = c:findFirstChild("Humanoid")
  1102. if hum ~= nil then
  1103. local head
  1104. for _, d in pairs(c:children()) do
  1105. if d.className == "Model" and ranged ~= true then
  1106. head = d:findFirstChild("Hitbox")
  1107. if d.Parent == Character then
  1108. break
  1109. end
  1110. if head ~= nil then
  1111. local targ = head.Position - Part.Position
  1112. local mag = targ.magnitude
  1113. if magni >= mag and c.Name ~= Player.Name then
  1114. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  1115. ref.Anchored = true
  1116. ref.CFrame = cf(head.Position)
  1117. game:GetService("Debris"):AddItem(ref, 1)
  1118. hitnum = math.random(1, 5)
  1119. if hitnum == 1 then
  1120. so("199148971", ref, 1, 1)
  1121. elseif hitnum == 2 then
  1122. so("199149025", ref, 1, 1)
  1123. elseif hitnum == 3 then
  1124. so("199149072", ref, 1, 1)
  1125. elseif hitnum == 4 then
  1126. so("199149109", ref, 1, 1)
  1127. elseif hitnum == 5 then
  1128. so("199149119", ref, 1, 1)
  1129. end
  1130. StaggerHit.Value = true
  1131. end
  1132. end
  1133. end
  1134. if d.className == "Part" then
  1135. head = d
  1136. if head ~= nil then
  1137. local targ = head.Position - Part.Position
  1138. local mag = targ.magnitude
  1139. if magni >= mag and c.Name ~= Player.Name then
  1140. if stun == nil then
  1141. stun = math.random(5, 10)
  1142. end
  1143. local Rang
  1144. if Ranged == false then
  1145. Rang = true
  1146. end
  1147. local stag
  1148. if shbash == true then
  1149. stag = true
  1150. end
  1151. Damagefunc(head, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1152. end
  1153. end
  1154. end
  1155. end
  1156. end
  1157. end
  1158. end
  1159. function rayCast(Pos, Dir, Max, Ignore)
  1160. return game:service("Workspace"):FindPartOnRay(Ray.new(Pos, Dir.unit * (Max or 999.999)), Ignore)
  1161. end
  1162. function findNearestTorso(pos)
  1163. local list = game.Workspace:children()
  1164. local torso
  1165. local dist = 1000
  1166. local temp, human, temp2
  1167. for x = 1, #list do
  1168. temp2 = list[x]
  1169. if temp2.className == "Model" and temp2.Name ~= Character.Name then
  1170. temp = temp2:findFirstChild("Torso")
  1171. human = temp2:findFirstChild("Humanoid")
  1172. if temp ~= nil and human ~= nil and human.Health > 0 and dist > (temp.Position - pos).magnitude then
  1173. local dohit = true
  1174. if Player.Neutral == false and game.Players:GetPlayerFromCharacter(temp.Parent) ~= nil and game.Players:GetPlayerFromCharacter(temp.Parent).TeamColor == Player.TeamColor then
  1175. dohit = false
  1176. end
  1177. if dohit == true then
  1178. torso = temp
  1179. dist = (temp.Position - pos).magnitude
  1180. end
  1181. end
  1182. end
  1183. end
  1184. return torso, dist
  1185. end
  1186. local Point = Torso.CFrame * cf(0, Torso.Size.Y, 0)
  1187. LastPoint = Point
  1188. function effect(Color, Ref, LP, P1, returnn)
  1189. if LP == nil or P1 == nil then
  1190. return
  1191. end
  1192. local effectsmsh = Instance.new("CylinderMesh")
  1193. effectsmsh.Scale = Vector3.new(0.2, 1, 0.2)
  1194. effectsmsh.Name = "Mesh"
  1195. local effectsg = Instance.new("Part")
  1196. NoOutline(effectsg)
  1197. effectsg.formFactor = 3
  1198. effectsg.CanCollide = false
  1199. effectsg.Name = "Eff"
  1200. effectsg.Locked = true
  1201. effectsg.Anchored = true
  1202. effectsg.Size = Vector3.new(0.5, 1, 0.5)
  1203. effectsg.Parent = workspace
  1204. effectsmsh.Parent = effectsg
  1205. effectsg.BrickColor = BrickColor.new(Color)
  1206. effectsg.Reflectance = Ref
  1207. local point1 = P1
  1208. local mg = (LP.p - point1.p).magnitude
  1209. effectsg.Size = Vector3.new(0.5, mg, 0.5)
  1210. effectsg.CFrame = cf((LP.p + point1.p) / 2, point1.p) * CFrame.Angles(math.rad(90), 0, 0)
  1211. effectsmsh.Scale = Vector3.new(0.2, 1, 0.2)
  1212. game:GetService("Debris"):AddItem(effectsg, 2)
  1213. if returnn then
  1214. return effectsg
  1215. end
  1216. if not returnn then
  1217. table.insert(Effects, {
  1218. effectsg,
  1219. "Cylinder",
  1220. 0.2,
  1221. 0.01,
  1222. 0,
  1223. 0.01,
  1224. effectsmsh
  1225. })
  1226. end
  1227. end
  1228. function MagicBlock(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type, parent, prt2)
  1229. local prt = part(3, parent, 0, 0, brickcolor, "Effect", vt())
  1230. local wld
  1231. prt.CFrame = cframe
  1232. prt.Anchored = true
  1233. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1234. game:GetService("Debris"):AddItem(prt, 10)
  1235. if Type == 1 or Type == nil then
  1236. table.insert(Effects, {
  1237. prt,
  1238. "Block1",
  1239. delay,
  1240. x3,
  1241. y3,
  1242. z3,
  1243. msh
  1244. })
  1245. elseif Type == 2 then
  1246. table.insert(Effects, {
  1247. prt,
  1248. "Block2",
  1249. delay,
  1250. x3,
  1251. y3,
  1252. z3,
  1253. msh
  1254. })
  1255. elseif Type == 3 then
  1256. table.insert(Effects, {
  1257. prt,
  1258. "Block3",
  1259. delay,
  1260. x3,
  1261. y3,
  1262. z3,
  1263. msh,
  1264. cframe,
  1265. prt2
  1266. })
  1267. end
  1268. end
  1269. function MagicSkull(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, goe)
  1270. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1271. prt.Anchored = true
  1272. prt.CFrame = cframe
  1273. msh = mesh("SpecialMesh", prt, "FileMesh", "4770583", vt(0, 0, 0), vt(x1, y1, z1))
  1274. game:GetService("Debris"):AddItem(prt, 10)
  1275. table.insert(Effects, {
  1276. prt,
  1277. "Skull",
  1278. delay,
  1279. x3,
  1280. y3,
  1281. z3,
  1282. msh,
  1283. goe
  1284. })
  1285. end
  1286. function MagicCircle(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1287. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1288. prt.Anchored = true
  1289. prt.CFrame = cframe
  1290. local msh = mesh("SpecialMesh", prt, "Sphere", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1291. game:GetService("Debris"):AddItem(prt, 10)
  1292. table.insert(Effects, {
  1293. prt,
  1294. "Cylinder",
  1295. delay,
  1296. x3,
  1297. y3,
  1298. z3,
  1299. msh
  1300. })
  1301. end
  1302. function MagicCylinder(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1303. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1304. prt.Anchored = true
  1305. prt.CFrame = cframe
  1306. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1307. game:GetService("Debris"):AddItem(prt, 10)
  1308. table.insert(Effects, {
  1309. prt,
  1310. "Cylinder",
  1311. delay,
  1312. x3,
  1313. y3,
  1314. z3,
  1315. msh
  1316. })
  1317. end
  1318. function MagicCylinder3(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1319. local prt = part(3, modelzorz, 0, 0, brickcolor, "Effect", vt())
  1320. prt.Anchored = true
  1321. prt.CFrame = cframe
  1322. local msh = mesh("SpecialMesh", prt, "Head", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1323. game:GetService("Debris"):AddItem(prt, 10)
  1324. table.insert(Effects, {
  1325. prt,
  1326. "Cylinder",
  1327. delay,
  1328. x3,
  1329. y3,
  1330. z3,
  1331. msh
  1332. })
  1333. end
  1334. function MagicCylinder2(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, goe)
  1335. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1336. prt.Anchored = true
  1337. prt.CFrame = cframe
  1338. local msh = mesh("CylinderMesh", prt, "", "", vt(0, 0, 0), vt(x1, y1, z1))
  1339. game:GetService("Debris"):AddItem(prt, 10)
  1340. table.insert(Effects, {
  1341. prt,
  1342. "Cylinder2",
  1343. delay,
  1344. x3,
  1345. y3,
  1346. z3,
  1347. msh,
  1348. goe
  1349. })
  1350. end
  1351. function MagicHead(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1352. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1353. prt.Anchored = true
  1354. prt.CFrame = cframe
  1355. local msh = mesh("SpecialMesh", prt, "Head", "nil", vt(0, 0, 0), vt(x1, y1, z1))
  1356. game:GetService("Debris"):AddItem(prt, 10)
  1357. table.insert(Effects, {
  1358. prt,
  1359. "Cylinder",
  1360. delay,
  1361. x3,
  1362. y3,
  1363. z3,
  1364. msh
  1365. })
  1366. end
  1367. function ClangEffect(brickcolor, cframe, duration, decrease, size, power)
  1368. local prt = part(3, workspace, 0, 1, brickcolor, "Effect", vt())
  1369. prt.Anchored = true
  1370. prt.CFrame = cframe
  1371. local msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(5, 5, 5))
  1372. game:GetService("Debris"):AddItem(prt, 10)
  1373. table.insert(Effects, {
  1374. prt,
  1375. "CylinderClang",
  1376. duration,
  1377. decrease,
  1378. size,
  1379. power,
  1380. prt.CFrame,
  1381. nil
  1382. })
  1383. end
  1384. function MagicWave(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1385. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt())
  1386. prt.Anchored = true
  1387. prt.CFrame = cframe
  1388. local msh = mesh("SpecialMesh", prt, "FileMesh", "http://www.roblox.com/asset/?id=20329976", vt(0, 0, 0), vt(x1, y1, z1))
  1389. game:GetService("Debris"):AddItem(prt, 10)
  1390. table.insert(Effects, {
  1391. prt,
  1392. "Cylinder",
  1393. delay,
  1394. x3,
  1395. y3,
  1396. z3,
  1397. msh
  1398. })
  1399. end
  1400. function MagicRing(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  1401. local prt = part(3, workspace, 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  1402. prt.Anchored = true
  1403. prt.CFrame = cframe * cf(x2, y2, z2)
  1404. local msh = mesh("SpecialMesh", prt, "FileMesh", "3270017", vt(0, 0, 0), vt(x1, y1, z1))
  1405. game:GetService("Debris"):AddItem(prt, 10)
  1406. table.insert(Effects, {
  1407. prt,
  1408. "Cylinder",
  1409. delay,
  1410. x3,
  1411. y3,
  1412. z3,
  1413. msh
  1414. })
  1415. end
  1416. function MagicRing2(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, prt2)
  1417. local prt = part(3, modelzorz, 0, 0, brickcolor, "Effect", vt(0.5, 0.5, 0.5))
  1418. prt.Anchored = true
  1419. local msh = mesh("SpecialMesh", prt, "FileMesh", "3270017", vt(0, 0, 0), vt(x1, y1, z1))
  1420. game:GetService("Debris"):AddItem(prt, 10)
  1421. table.insert(Effects, {
  1422. prt,
  1423. "Block3",
  1424. delay,
  1425. x3,
  1426. y3,
  1427. z3,
  1428. msh,
  1429. cframe,
  1430. prt2
  1431. })
  1432. end
  1433. function ElecEffect(cff, x, y, z)
  1434. local prt = part(3, workspace, 0, 0, BrickColor.new("Bright red"), "Part", vt(1, 1, 1))
  1435. prt.Anchored = true
  1436. prt.CFrame = cff * cf(math.random(-x, x), math.random(-y, y), math.random(-z, z))
  1437. prt.CFrame = cf(prt.Position)
  1438. game:GetService("Debris"):AddItem(prt, 10)
  1439. xval = math.random() / 3
  1440. yval = math.random() / 3
  1441. zval = math.random() / 3
  1442. msh = mesh("BlockMesh", prt, "", "", vt(0, 0, 0), vt(xval, yval, zval))
  1443. Effects[#Effects + 1] = {
  1444. prt,
  1445. "Elec",
  1446. 0.2,
  1447. x,
  1448. y,
  1449. z,
  1450. xval,
  1451. yval,
  1452. zval,
  1453. msh
  1454. }
  1455. end
  1456. function Damagefunc(hit, minim, maxim, knockback, Type, Property, Delay, KnockbackType, incstun, stagger, staghit, ranged, DecreaseState, DecreaseAmount, Duration)
  1457. if hit.Parent == nil then
  1458. return
  1459. end
  1460. if hit == MovePart then
  1461. Fly = false
  1462. end
  1463. if hit.Name == "Hitbox" and hit.Parent ~= modelzorz and ranged ~= true then
  1464. ref = part(3, workspace, 0, 1, BrickColor.new("Black"), "Reference", vt())
  1465. ref.Anchored = true
  1466. ref.CFrame = cf(hit.Position)
  1467. game:GetService("Debris"):AddItem(ref, 1)
  1468. hitnum = math.random(1, 5)
  1469. if hitnum == 1 then
  1470. so("199148971", ref, 1, 1)
  1471. elseif hitnum == 2 then
  1472. so("199149025", ref, 1, 1)
  1473. elseif hitnum == 3 then
  1474. so("199149072", ref, 1, 1)
  1475. elseif hitnum == 4 then
  1476. so("199149109", ref, 1, 1)
  1477. elseif hitnum == 5 then
  1478. so("199149119", ref, 1, 1)
  1479. end
  1480. StaggerHit.Value = true
  1481. end
  1482. h = hit.Parent:FindFirstChild("Humanoid")
  1483. for _, v in pairs(hit.Parent:children()) do
  1484. if v:IsA("Humanoid") then
  1485. h = v
  1486. end
  1487. end
  1488. if hit.Parent.Parent:FindFirstChild("Torso") ~= nil then
  1489. h = hit.Parent.Parent:FindFirstChild("Humanoid")
  1490. end
  1491. if hit.Parent.className == "Hat" then
  1492. hit = hit.Parent.Parent:findFirstChild("Head")
  1493. end
  1494. if h ~= nil and hit.Parent.Name ~= Character.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  1495. if hit.Parent:findFirstChild("DebounceHit") ~= nil and hit.Parent.DebounceHit.Value == true then
  1496. return
  1497. end
  1498. if Player.Neutral == false and game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil and game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == Player.TeamColor then
  1499. return
  1500. end
  1501. c = Instance.new("ObjectValue")
  1502. c.Name = "creator"
  1503. c.Value = game:service("Players").LocalPlayer
  1504. c.Parent = h
  1505. RecentEnemy.Value = hit.Parent
  1506. game:GetService("Debris"):AddItem(c, 0.5)
  1507. minim = minim * Atk.Value
  1508. maxim = maxim * Atk.Value
  1509. Damage = 0
  1510. if minim == maxim then
  1511. Damage = maxim
  1512. else
  1513. Damage = math.random(minim, maxim)
  1514. end
  1515. blocked = false
  1516. enblock = nil
  1517. Stats = hit.Parent:findFirstChild("Stats")
  1518. if Stats ~= nil then
  1519. enblock = Stats:findFirstChild("Block")
  1520. if enblock ~= nil and enblock.Value == true then
  1521. blocked = true
  1522. end
  1523. if Stats:findFirstChild("Defense") ~= nil then
  1524. if prechit == false then
  1525. Damage = Damage / Stats.Defense.Value
  1526. else
  1527. Val = Stats.Defense.Value
  1528. if 2 <= Val then
  1529. Val = 2
  1530. end
  1531. print(Val)
  1532. Damage = Damage * Val
  1533. --do break end
  1534. hitnum = math.random(1, 5)
  1535. if hitnum == 1 then
  1536. so("199149321", hit, 1, 1)
  1537. elseif hitnum == 2 then
  1538. so("199149338", hit, 1, 1)
  1539. elseif hitnum == 3 then
  1540. so("199149367", hit, 1, 1)
  1541. elseif hitnum == 4 then
  1542. so("199149409", hit, 1, 1)
  1543. elseif hitnum == 5 then
  1544. so("199149452", hit, 1, 1)
  1545. --do break end
  1546. if cansound == true then
  1547. hitnum = math.random(1, 6)
  1548. if hitnum == 1 then
  1549. so("199149137", hit, 1, 1)
  1550. elseif hitnum == 2 then
  1551. so("199149186", hit, 1, 1)
  1552. elseif hitnum == 3 then
  1553. so("199149221", hit, 1, 1)
  1554. elseif hitnum == 4 then
  1555. so("199149235", hit, 1, 1)
  1556. elseif hitnum == 5 then
  1557. so("199149269", hit, 1, 1)
  1558. elseif hitnum == 6 then
  1559. so("199149297", hit, 1, 1)
  1560. end
  1561. end
  1562. end
  1563. end
  1564. if 3 >= Damage and staghit == true and ranged ~= true then
  1565. StaggerHit.Value = true
  1566. end
  1567. end
  1568. if Stats:findFirstChild("Stun") ~= nil then
  1569. if blocked == true then
  1570. incstun = incstun / 2
  1571. end
  1572. if Stats.Stun.Value < 100 then
  1573. Stats.Stun.Value = Stats.Stun.Value + incstun
  1574. end
  1575. end
  1576. if Stats:findFirstChild("Stagger") ~= nil and stagger == true then
  1577. Stats.Stagger.Value = true
  1578. end
  1579. end
  1580. if blocked == true then
  1581. showDamage(hit.Parent, "Block", "Damage")
  1582. if ranged ~= true then
  1583. enblock.Value = false
  1584. Stagger.Value = true
  1585. hitnum = math.random(1, 2)
  1586. if hitnum == 1 then
  1587. so("199148933", hit, 1, 1)
  1588. elseif hitnum == 2 then
  1589. so("199148947", hit, 1, 1)
  1590. end
  1591. end
  1592. else
  1593. Damage = 1
  1594. coroutine.resume(coroutine.create(function(Hum, Dam)
  1595. Hum:takeDamage(Dam)
  1596. end), h, Damage)
  1597. if move4atk == true then
  1598. sapdef = true
  1599. end
  1600. showDamage(hit.Parent, Damage, "Damage")
  1601. if prechit == true then
  1602. eul = euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1603. MagicCircle(BrickColor.new("White"), cf(hit.Position) * eul, 5, 5, 5, -0.1, 5, -0.1, 0.02)
  1604. MagicCircle(BrickColor.new("White"), cf(hit.Position) * eul * euler(1.57, 0, 0), 5, 5, 5, -0.1, 5, -0.1, 0.02)
  1605. end
  1606. if DecreaseState ~= nil then
  1607. DecreaseStat(hit.Parent, DecreaseState, DecreaseAmount, Duration)
  1608. end
  1609. if Type == "Knockdown" then
  1610. hum = hit.Parent.Humanoid
  1611. hum.PlatformStand = true
  1612. coroutine.resume(coroutine.create(function(HHumanoid)
  1613. swait(1)
  1614. HHumanoid.PlatformStand = false
  1615. end), hum)
  1616. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1617. local bodvol = Instance.new("BodyVelocity")
  1618. bodvol.velocity = angle * knockback
  1619. bodvol.P = 5000
  1620. bodvol.maxForce = Vector3.new(8000, 8000, 8000)
  1621. bodvol.Parent = hit
  1622. rl = Instance.new("BodyAngularVelocity")
  1623. rl.P = 3000
  1624. rl.maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000
  1625. rl.angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
  1626. rl.Parent = hit
  1627. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1628. game:GetService("Debris"):AddItem(rl, 0.5)
  1629. elseif Type == "Knockdown2" then
  1630. hum = hit.Parent.Humanoid
  1631. local angle = hit.Position - (Property.Position + Vector3.new(0, 0, 0)).unit
  1632. local bodvol = Instance.new("BodyVelocity")
  1633. bodvol.velocity = angle * knockback
  1634. bodvol.P = 5000
  1635. bodvol.maxForce = Vector3.new(8000, 8000, 8000)
  1636. bodvol.Parent = hit
  1637. game:GetService("Debris"):AddItem(bodvol, 0.5)
  1638. elseif Type == "Normal" or Type == "NormalDecreaseMvmt1" then
  1639. vp = Instance.new("BodyVelocity")
  1640. vp.P = 500
  1641. vp.maxForce = Vector3.new(math.huge, 0, math.huge)
  1642. if KnockbackType == 1 then
  1643. vp.velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05
  1644. elseif KnockbackType == 2 then
  1645. vp.velocity = Property.CFrame.lookVector * knockback
  1646. end
  1647. game:GetService("Debris"):AddItem(vp, 0.5)
  1648. if knockback > 0 then
  1649. vp.Parent = hit.Parent.Torso
  1650. end
  1651. end
  1652. end
  1653. debounce = Instance.new("BoolValue")
  1654. debounce.Name = "DebounceHit"
  1655. debounce.Parent = hit.Parent
  1656. debounce.Value = true
  1657. game:GetService("Debris"):AddItem(debounce, Delay)
  1658. c = Instance.new("ObjectValue")
  1659. c.Name = "creator"
  1660. c.Value = Player
  1661. c.Parent = h
  1662. game:GetService("Debris"):AddItem(c, 0.5)
  1663. CRIT = false
  1664. end
  1665. end
  1666. function showDamage(Char, Dealt, Type)
  1667. m = Instance.new("Model")
  1668. m.Name = "Effect"
  1669. c = Instance.new("Part")
  1670. c.Transparency = 1
  1671. c.Name = "Head"
  1672. c.TopSurface = 0
  1673. c.BottomSurface = 0
  1674. c.formFactor = "Plate"
  1675. c.Size = Vector3.new(1, 0.4, 1)
  1676. b = Instance.new("BillboardGui", c)
  1677. b.Size = UDim2.new(5, 0, 5, 0)
  1678. b.AlwaysOnTop = true
  1679. damgui = gui("TextLabel", b, tostring(Dealt), 1, Color3.new(0, 0, 0), UDim2.new(0, 0, 0, 0), UDim2.new(1, 0, 1, 0))
  1680. if Type == "Damage" then
  1681. damgui.Font = "SourceSans"
  1682. if Dealt == "Block" then
  1683. damgui.TextColor3 = BrickColor.new("Bright blue").Color
  1684. elseif Dealt < 3 then
  1685. damgui.TextColor3 = BrickColor.new("White").Color
  1686. elseif Dealt >= 3 and Dealt < 20 then
  1687. damgui.TextColor3 = BrickColor.new("Bright yellow").Color
  1688. else
  1689. damgui.TextColor3 = BrickColor.new("Really red").Color
  1690. damgui.Font = "SourceSansBold"
  1691. end
  1692. elseif Type == "Debuff" then
  1693. damgui.TextColor3 = BrickColor.new("White").Color
  1694. elseif Type == "Interrupt" then
  1695. damgui.TextColor3 = BrickColor.new("New Yeller").Color
  1696. end
  1697. damgui.TextScaled = true
  1698. ms = Instance.new("CylinderMesh")
  1699. ms.Scale = Vector3.new(0.8, 0.8, 0.8)
  1700. ms.Parent = c
  1701. c.Reflectance = 0
  1702. Instance.new("BodyGyro").Parent = c
  1703. c.Parent = m
  1704. if Char:findFirstChild("Head") ~= nil then
  1705. c.CFrame = cf(Char.Head.CFrame.p + Vector3.new(math.random(-100, 100) / 100, 3, math.random(-100, 100) / 100))
  1706. elseif Char.Parent:findFirstChild("Head") ~= nil then
  1707. c.CFrame = cf(Char.Parent.Head.CFrame.p + Vector3.new(math.random(-100, 100) / 100, 3, math.random(-100, 100) / 100))
  1708. end
  1709. f = Instance.new("BodyPosition")
  1710. f.P = 2000
  1711. f.D = 100
  1712. f.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  1713. if Type == "Damage" then
  1714. f.position = c.Position + Vector3.new(0, 3, 0)
  1715. elseif Type == "Debuff" or Type == "Interrupt" then
  1716. f.position = c.Position + Vector3.new(0, 5, 0)
  1717. end
  1718. f.Parent = c
  1719. game:GetService("Debris"):AddItem(m, 5)
  1720. table.insert(Effects, {
  1721. m,
  1722. "showDamage",
  1723. damgui,
  1724. f,
  1725. 10,
  1726. 1,
  1727. 15,
  1728. 50,
  1729. 100
  1730. })
  1731. c.CanCollide = false
  1732. m.Parent = workspace
  1733. c.CanCollide = false
  1734. end
  1735. combo = 0
  1736. function ob1d(mouse)
  1737. if attack == true or equipped == false then
  1738. return
  1739. end
  1740. hold = true
  1741. if combo == 0 then
  1742. combo = 1
  1743. attackone()
  1744. elseif combo == 1 then
  1745. combo = 0
  1746. attacktwo()
  1747. elseif combo == 2 then
  1748. combo = 0
  1749. attackthree()
  1750. elseif combo == 3 then
  1751. combo = 0
  1752. attackfour()
  1753. end
  1754. coroutine.resume(coroutine.create(function()
  1755. for i = 1, 50 do
  1756. if attack == false then
  1757. swait()
  1758. end
  1759. end
  1760. if attack == false then
  1761. combo = 0
  1762. end
  1763. end))
  1764. end
  1765. function ob1u(mouse)
  1766. hold = false
  1767. end
  1768. buttonhold = false
  1769. fenbarmove1.MouseButton1Click:connect(do1)
  1770. fenbarmove2.MouseButton1Click:connect(do2)
  1771. fenbarmove3.MouseButton1Click:connect(do3)
  1772. fenbarmove4.MouseButton1Click:connect(do4)
  1773. eul = 0
  1774. equipped = false
  1775. function key(key)
  1776. if key == "q" then
  1777. Stagger.Value = true
  1778. end
  1779. if attack == true then
  1780. return
  1781. end
  1782. if key == "f" then
  1783. pressedf = true
  1784. fnumb = 0
  1785. attack = true
  1786. if equipped == false then
  1787. equipped = true
  1788. RSH = ch.Torso["Right Shoulder"]
  1789. LSH = ch.Torso["Left Shoulder"]
  1790. RSH.Parent = nil
  1791. LSH.Parent = nil
  1792. RW.Name = "Right Shoulder"
  1793. RW.Part0 = ch.Torso
  1794. RW.C0 = cf(1.5, 0.5, 0)
  1795. RW.C1 = cf(0, 0.5, 0)
  1796. RW.Part1 = ch["Right Arm"]
  1797. RW.Parent = ch.Torso
  1798. LW.Name = "Left Shoulder"
  1799. LW.Part0 = ch.Torso
  1800. LW.C0 = cf(-1.5, 0.5, 0)
  1801. LW.C1 = cf(0, 0.5, 0)
  1802. LW.Part1 = ch["Left Arm"]
  1803. LW.Parent = ch.Torso
  1804. Animate.Parent = nil
  1805. animTrack:Play()
  1806. equipanim()
  1807. else
  1808. equipped = false
  1809. hideanim()
  1810. LH.C1 = LHC1
  1811. RH.C1 = RHC1
  1812. animTrack:Stop()
  1813. Animate.Parent = Character
  1814. swait(0)
  1815. RW.Parent = nil
  1816. LW.Parent = nil
  1817. RSH.Parent = player.Character.Torso
  1818. LSH.Parent = player.Character.Torso
  1819. end
  1820. attack = false
  1821. end
  1822. if equipped == false then
  1823. return
  1824. end
  1825. if key == "e" then
  1826. print(#Bones)
  1827. end
  1828. if key == "g" then
  1829. hprt3.Transparency = 0
  1830. hprt4.Transparency = 0
  1831. hprt5.Transparency = 1
  1832. end
  1833. if key == "h" then
  1834. hprt3.Transparency = 1
  1835. hprt4.Transparency = 1
  1836. hprt5.Transparency = 0
  1837. end
  1838. if key == "j" then
  1839. hprt3.Transparency = 1
  1840. hprt4.Transparency = 1
  1841. hprt5.Transparency = 1
  1842. end
  1843. if key == "z" then
  1844. do1()
  1845. end
  1846. if key == "x" then
  1847. do2()
  1848. end
  1849. if key == "c" then
  1850. do3()
  1851. end
  1852. if key == "v" then
  1853. do4()
  1854. end
  1855. end
  1856. function key2(key)
  1857. end
  1858. function s(mouse)
  1859. mouse.Button1Down:connect(function()
  1860. ob1d(mouse)
  1861. end)
  1862. mouse.Button1Up:connect(function()
  1863. ob1u(mouse)
  1864. end)
  1865. mouse.KeyDown:connect(key)
  1866. mouse.KeyUp:connect(key2)
  1867. player = Player
  1868. ch = Character
  1869. MMouse = mouse
  1870. end
  1871. function ds(mouse)
  1872. end
  1873. Bin.Selected:connect(s)
  1874. Bin.Deselected:connect(ds)
  1875. print("Calvar loaded.")
  1876. local mananum = 0
  1877. local donum = 0
  1878. local stunnum = 0
  1879. local staggeranim = false
  1880. local stunanim = false
  1881. local Point, LastPoint
  1882. local handef = 0
  1883. local walk = 0
  1884. local walkforw = true
  1885. while true do
  1886. swait()
  1887. for _, c in pairs(Character:children()) do
  1888. for _, v in pairs(c:children()) do
  1889. 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
  1890. print("dai")
  1891. v.Parent = nil
  1892. end
  1893. end
  1894. end
  1895. if hprt5.Transparency == 0 then
  1896. parti.Enabled = true
  1897. elseif hprt5.Transparency == 1 then
  1898. parti.Enabled = false
  1899. end
  1900. col = math.random()
  1901. col2 = 1 - col
  1902. hprt5.BrickColor = BrickColor.new(Color3.new(col, math.random(50, 100) / 100, col2))
  1903. parti.Color = cs(hprt5.BrickColor.Color, hprt5.BrickColor.Color)
  1904. if Humanoid.Health <= 0 then
  1905. attack = true
  1906. resumeControl()
  1907. modelzorz.Parent = workspace
  1908. modelzorz.Name = "Weapon Model"
  1909. game:GetService("Debris"):AddItem(modelzorz, 30)
  1910. for i = 1, #Weapon do
  1911. Weapon[i].Parent = modelzorz
  1912. Weapon[i].CanCollide = true
  1913. end
  1914. for i = 1, #Welds do
  1915. if Welds[i].Part0.Parent == Character or Welds[i].Part1.Parent == Character then
  1916. Welds[i].Parent = nil
  1917. else
  1918. Welds[i].Parent = prt1
  1919. end
  1920. end
  1921. end
  1922. if fnumb < 21 then
  1923. fnumb = fnumb + 1
  1924. if pressedf == false then
  1925. fenframe5.BackgroundTransparency = fenframe5.BackgroundTransparency - 0.025
  1926. tellbar.TextTransparency = tellbar.TextTransparency - 0.05
  1927. tellbar.TextStrokeTransparency = tellbar.TextStrokeTransparency - 0.05
  1928. else
  1929. if fnumb == 20 then
  1930. fenframe5.Parent = nil
  1931. print("daigui")
  1932. end
  1933. fenframe5.BackgroundTransparency = fenframe5.BackgroundTransparency + 0.025
  1934. tellbar.TextTransparency = tellbar.TextTransparency + 0.05
  1935. tellbar.TextStrokeTransparency = tellbar.TextStrokeTransparency + 0.05
  1936. end
  1937. end
  1938. hitbox2.Parent = hitbox.Parent
  1939. hitbox2.Size = hitbox.Size
  1940. hitbox2.CFrame = hitboxCF
  1941. hboxpos.position = hitbox2.Position + vt(math.random(-100, 100) / 100, math.random(-100, 100) / 100, math.random(-100, 100) / 100)
  1942. if Stagger.Value == true and staggeranim == false then
  1943. coroutine.resume(coroutine.create(function()
  1944. staggeranim = true
  1945. while attack == true do
  1946. swait()
  1947. end
  1948. StaggerAnim()
  1949. StaggerHit.Value = false
  1950. Stagger.Value = false
  1951. staggeranim = false
  1952. end))
  1953. end
  1954. if StaggerHit.Value == true and staggeranim == false then
  1955. coroutine.resume(coroutine.create(function()
  1956. staggeranim = true
  1957. while attack == true do
  1958. swait()
  1959. end
  1960. StaggerHitt()
  1961. StaggerHit.Value = false
  1962. Stagger.Value = false
  1963. staggeranim = false
  1964. end))
  1965. end
  1966. if Mvmt.Value < 0 or Stagger.Value == true or Stun.Value >= 100 or StaggerHit.Value == true then
  1967. Humanoid.WalkSpeed = 0
  1968. else
  1969. Humanoid.WalkSpeed = 16 * Mvmt.Value
  1970. end
  1971. if Stun.Value >= 100 and stunanim == false then
  1972. coroutine.resume(coroutine.create(function()
  1973. stunanim = true
  1974. while attack == true do
  1975. swait()
  1976. end
  1977. StunAnim()
  1978. Stun.Value = 0
  1979. stunanim = false
  1980. end))
  1981. end
  1982. local stunnum2 = 30
  1983. if stunnum >= stunnum2 then
  1984. if Stun.Value > 0 then
  1985. Stun.Value = Stun.Value - 1
  1986. end
  1987. stunnum = 0
  1988. end
  1989. stunnum = stunnum + 1
  1990. if donum >= 0.5 then
  1991. handidle = true
  1992. elseif donum <= 0 then
  1993. handidle = false
  1994. end
  1995. if handidle == false then
  1996. donum = donum + 0.003
  1997. else
  1998. donum = donum - 0.003
  1999. end
  2000. local torvel = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  2001. local velderp = RootPart.Velocity.y
  2002. hitfloor, posfloor = rayCast(RootPart.Position, CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0)).lookVector, 4, Character)
  2003. if equipped == true then
  2004. if attack == false then
  2005. idle = idle + 1
  2006. else
  2007. idle = 0
  2008. end
  2009. if not (idle >= 500) or attack == false then
  2010. end
  2011. if Anim == "Walk" then
  2012. if walkforw == true then
  2013. RH.C1 = clerp(RH.C1, RHC1 * cf(0.2, -0.2, 0) * euler(0, 0, 1), Mvmt.Value * 10 / 50)
  2014. LH.C1 = clerp(LH.C1, LHC1 * cf(0.1, 0.2, 0) * euler(0, 0, 1), Mvmt.Value * 10 / 50)
  2015. else
  2016. RH.C1 = clerp(RH.C1, RHC1 * cf(-0.1, 0.2, 0) * euler(0, 0, -1), Mvmt.Value * 10 / 50)
  2017. LH.C1 = clerp(LH.C1, LHC1 * cf(-0.2, -0.2, 0) * euler(0, 0, -1), Mvmt.Value * 10 / 50)
  2018. end
  2019. else
  2020. RH.C1 = clerp(RH.C1, RHC1, 0.2)
  2021. LH.C1 = clerp(LH.C1, LHC1, 0.2)
  2022. end
  2023. if RootPart.Velocity.y > 1 and hitfloor == nil then
  2024. Anim = "Jump"
  2025. if attack == false then
  2026. Neck.C0 = clerp(Neck.C0, necko * euler(-0.2, 0, 0), 0.2)
  2027. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.2)
  2028. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2029. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2030. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2031. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2032. RH.C0 = clerp(RH.C0, cf(1, -1, -0.3) * euler(-0.5, 1.57, 0) * euler(-0.2, 0, 0), 0.2)
  2033. LH.C0 = clerp(LH.C0, cf(-1, -1, -0.3) * euler(-0.5, -1.57, 0) * euler(-0.2, 0, 0), 0.2)
  2034. end
  2035. elseif RootPart.Velocity.y < -1 and hitfloor == nil then
  2036. Anim = "Fall"
  2037. if attack == false then
  2038. Neck.C0 = clerp(Neck.C0, necko * euler(0.4, 0, 0), 0.2)
  2039. RootJoint.C0 = clerp(RootJoint.C0, RootCF * euler(0, 0, 0), 0.2)
  2040. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2041. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2042. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2043. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2044. RH.C0 = clerp(RH.C0, cf(1, -1, 0) * euler(0.4, 1.57, 0), 0.2)
  2045. LH.C0 = clerp(LH.C0, cf(-1, -1, 0) * euler(-0.2, -1.57, 0), 0.2)
  2046. end
  2047. elseif torvel < 1 and hitfloor ~= nil then
  2048. Anim = "Idle"
  2049. if attack == false then
  2050. Neck.C0 = clerp(Neck.C0, necko * euler(0.3, 0, 0) * euler(0, 0, 0), 0.2)
  2051. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.2)
  2052. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2053. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2054. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2055. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2056. 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)
  2057. 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)
  2058. end
  2059. elseif torvel > 2 and torvel < 30 and hitfloor ~= nil then
  2060. Anim = "Walk"
  2061. walk = walk + 1
  2062. if walk >= 10 then
  2063. walk = 0
  2064. if walkforw == true then
  2065. walkforw = false
  2066. elseif walkforw == false then
  2067. walkforw = true
  2068. end
  2069. end
  2070. if attack == false then
  2071. Neck.C0 = clerp(Neck.C0, necko * euler(0.1, 0, 0) * euler(0, 0, 0), 0.2)
  2072. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(0, 0, 0), 0.2)
  2073. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.2), 0.2)
  2074. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2075. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.2), 0.2)
  2076. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2077. 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)
  2078. 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)
  2079. end
  2080. elseif torvel >= 30 and hitfloor ~= nil then
  2081. Anim = "Run"
  2082. if attack == false then
  2083. Neck.C0 = clerp(Neck.C0, necko * euler(0.3, 0, 0) * euler(0, 0, 0), 0.2)
  2084. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cf(0, 0, -0.1) * euler(-0.05, 0, 0), 0.2)
  2085. RW.C0 = clerp(RW.C0, cf(1.1, 0.45, 0.3) * euler(-0.2, 0, -0.4), 0.2)
  2086. RW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2087. LW.C0 = clerp(LW.C0, cf(-1.1, 0.45, 0.3) * euler(-0.2, 0, 0.4), 0.2)
  2088. LW.C1 = clerp(LW.C1, cf(0, 0.5, 0) * euler(0, 0, 0), 0.2)
  2089. 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)
  2090. 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)
  2091. end
  2092. end
  2093. end
  2094. if #Effects > 0 then
  2095. for e = 1, #Effects do
  2096. if Effects[e] ~= nil then
  2097. local Thing = Effects[e]
  2098. if Thing ~= nil then
  2099. local Part = Thing[1]
  2100. local Mode = Thing[2]
  2101. local Delay = Thing[3]
  2102. local IncX = Thing[4]
  2103. local IncY = Thing[5]
  2104. local IncZ = Thing[6]
  2105. if Thing[2] == "CylinderClang" then
  2106. if Thing[3] <= 1 then
  2107. Thing[1].CFrame = Thing[1].CFrame * CFrame.new(0, 2.5 * Thing[5], 0) * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  2108. Thing[7] = Thing[1].CFrame
  2109. effect("New Yeller", 0, Thing[8], Thing[7])
  2110. Thing[8] = Thing[7]
  2111. Thing[3] = Thing[3] + Thing[4]
  2112. else
  2113. Part.Parent = nil
  2114. table.remove(Effects, e)
  2115. end
  2116. end
  2117. if Thing[2] == "showDamage" then
  2118. if Thing[6] < Thing[5] then
  2119. Thing[6] = Thing[6] + 1
  2120. elseif Thing[6] < Thing[7] then
  2121. Thing[4].position = Thing[4].position + vt(0, -0.2, 0)
  2122. Thing[6] = Thing[6] + 1
  2123. elseif Thing[6] < Thing[8] then
  2124. Thing[6] = Thing[6] + 1
  2125. elseif Thing[6] < Thing[9] then
  2126. Thing[6] = Thing[6] + 1
  2127. Thing[4].position = Thing[4].position + vt(0, 0.2, 0)
  2128. Thing[3].TextStrokeTransparency = Thing[3].TextStrokeTransparency + 0.1
  2129. Thing[3].TextTransparency = Thing[3].TextTransparency + 0.1
  2130. else
  2131. Thing[1].Parent = nil
  2132. table.remove(Effects, e)
  2133. end
  2134. end
  2135. if Thing[2] ~= "Shoot" and Thing[2] ~= "DecreaseStat" and Thing[2] ~= "showDamage" then
  2136. if Thing[1].Transparency <= 1 then
  2137. if Thing[2] == "Block1" then
  2138. Thing[1].CFrame = Thing[1].CFrame * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  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] == "Block2" then
  2143. Thing[1].CFrame = Thing[1].CFrame
  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] == "Block3" then
  2148. Thing[1].CFrame = Thing[9].CFrame * Thing[8] * euler(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  2149. Mesh = Thing[7]
  2150. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2151. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2152. elseif Thing[2] == "Cylinder" then
  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] == "Cylinder2" then
  2157. Thing[1].CFrame = Thing[1].CFrame * cf(0, Thing[8], 0)
  2158. Mesh = Thing[7]
  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] == "Blood" then
  2162. Mesh = Thing[7]
  2163. Thing[1].CFrame = Thing[1].CFrame * cf(0, 0.5, 0)
  2164. Mesh.Scale = Mesh.Scale + vt(Thing[4], Thing[5], Thing[6])
  2165. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2166. elseif Thing[2] == "Elec" then
  2167. Mesh = Thing[10]
  2168. Mesh.Scale = Mesh.Scale + vt(Thing[7], Thing[8], Thing[9])
  2169. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2170. elseif Thing[2] == "Disappear" then
  2171. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  2172. end
  2173. else
  2174. Part.Parent = nil
  2175. table.remove(Effects, e)
  2176. end
  2177. end
  2178. end
  2179. end
  2180. end
  2181. end
  2182. fenbarmana2:TweenSize(UDim2.new(0.4, 0, -4 * mana.Value / 100, 0), nil, 1, 0.4, true)
  2183. fenbarmana4.Text = "Mana(" .. mana.Value .. ")"
  2184. fenbarhp2.BackgroundColor3 = Color3.new(Humanoid.Health / Humanoid.MaxHealth, 0, 0)
  2185. fenbarhp2:TweenSize(UDim2.new(Humanoid.Health / Humanoid.MaxHealth, 0, 1, 0), nil, 1, 0.4, true)
  2186. fenbarhp3.Text = "(" .. math.floor(Humanoid.Health) .. ")"
  2187. fenbarmove1b:TweenSize(UDim2.new(1 * cooldowns[1] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2188. fenbarmove2b:TweenSize(UDim2.new(1 * cooldowns[2] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2189. fenbarmove3b:TweenSize(UDim2.new(1 * cooldowns[3] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2190. fenbarmove4b:TweenSize(UDim2.new(1 * cooldowns[4] / cooldownmax, 0, 1, 0), nil, 1, 0.4, true)
  2191. for _, c in pairs(Decrease:children()) do
  2192. if c:findFirstChild("Duration") ~= nil then
  2193. c.Duration.Value = c.Duration.Value - 1
  2194. c.Parent = nil
  2195. end
  2196. if c.Name == "DecreaseAtk" then
  2197. decreaseatk = decreaseatk + c.Value
  2198. elseif c.Name == "DecreaseDef" then
  2199. decreasedef = decreasedef + c.Value
  2200. elseif c.Name == "DecreaseMvmt" then
  2201. decreasemvmt = decreasemvmt + c.Value
  2202. end
  2203. end
  2204. Atk.Value = 1 - decreaseatk
  2205. if Atk.Value <= 0 then
  2206. Atk.Value = 0
  2207. end
  2208. Def.Value = 1 - decreasedef
  2209. if Def.Value <= 0 then
  2210. Def.Value = 0.01
  2211. end
  2212. Mvmt.Value = 1 - decreasemvmt
  2213. if Mvmt.Value <= 0 then
  2214. Mvmt.Value = 0
  2215. end
  2216. decreaseatk = 0
  2217. decreasedef = 0
  2218. decreasemvmt = 0
  2219. AtkVal = Atk.Value * 100
  2220. AtkVal = math.floor(AtkVal)
  2221. AtkVal = AtkVal / 100
  2222. fenbardamage.Text = [[
  2223. Damage
  2224. (]] .. AtkVal .. ")"
  2225. DefVal = Def.Value * 100
  2226. DefVal = math.floor(DefVal)
  2227. DefVal = DefVal / 100
  2228. fenbardef.Text = [[
  2229. Defense
  2230. (]] .. DefVal .. ")"
  2231. MvmtVal = Mvmt.Value * 100
  2232. MvmtVal = math.floor(MvmtVal)
  2233. MvmtVal = MvmtVal / 100
  2234. fenbarmove.Text = [[
  2235. Walkspeed
  2236. (]] .. MvmtVal .. ")"
  2237. if Stun.Value >= 100 then
  2238. fenbarstun2:TweenSize(UDim2.new(0.4, 0, -4, 0), nil, 1, 0.4, true)
  2239. else
  2240. fenbarstun2:TweenSize(UDim2.new(0.4, 0, -4 * Stun.Value / 100, 0), nil, 1, 0.4, true)
  2241. end
  2242. fenbarstun3.Text = "Stun(" .. Stun.Value .. ")"
  2243. if mana.Value >= 100 then
  2244. mana.Value = 100
  2245. elseif mananum <= 9 then
  2246. mananum = mananum + 1
  2247. else
  2248. mananum = 0
  2249. mana.Value = mana.Value + 1
  2250. end
  2251. for i = 1, #cooldowns do
  2252. if cooldownmax <= cooldowns[i] then
  2253. cooldowns[i] = cooldownmax
  2254. else
  2255. cooldowns[i] = cooldowns[i] + cooldownsadd[i]
  2256. end
  2257. end
  2258. end
Add Comment
Please, Sign In to add comment