UltimateGate

EnmaU

Aug 12th, 2017
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 46.14 KB | None | 0 0
  1. --[[NIGHTOWLACE_WEAPONRY]]--
  2. wait(1 / 60)
  3. Effects = { }
  4. local Player = game.Players.localPlayer
  5. local Character = Player.Character
  6. local Humanoid = Character.Humanoid
  7. local mouse = Player:GetMouse()
  8. local m = Instance.new('Model', Character)
  9. m.Name = "WeaponModel"
  10. local LeftArm = Character["Left Arm"]
  11. local RightArm = Character["Right Arm"]
  12. local LeftLeg = Character["Left Leg"]
  13. local RightLeg = Character["Right Leg"]
  14. local Head = Character.Head
  15. local Torso = Character.Torso
  16. local cam = game.Workspace.CurrentCamera
  17. local RootPart = Character.HumanoidRootPart
  18. local RootJoint = RootPart.RootJoint
  19. local equipped = false
  20. local attack = false
  21. local Anim = 'Idle'
  22. local idle = 0
  23. local attacktype = 1
  24. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  25. local velocity = RootPart.Velocity.y
  26. local sine = 0
  27. local change = 1
  28. local grabbed = false
  29. local cn = CFrame.new
  30. local mr = math.rad
  31. local angles = CFrame.Angles
  32. local ud = UDim2.new
  33. local c3 = Color3.new
  34.  
  35. local NeckCF = cn(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  36. Humanoid.Animator:Destroy()
  37. Character.Animate:Destroy()
  38.  
  39. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  40. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  41. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  42.  
  43. RSH, LSH = nil, nil
  44.  
  45. RW = Instance.new("Weld")
  46. LW = Instance.new("Weld")
  47.  
  48. RH = Torso["Right Hip"]
  49. LH = Torso["Left Hip"]
  50.  
  51. RSH = Torso["Right Shoulder"]
  52. LSH = Torso["Left Shoulder"]
  53.  
  54. RSH.Parent = nil
  55. LSH.Parent = nil
  56.  
  57. RW.Name = "RW"
  58. RW.Part0 = Torso
  59. RW.C0 = cn(1.5, 0.5, 0)
  60. RW.C1 = cn(0, 0.5, 0)
  61. RW.Part1 = RightArm
  62. RW.Parent = Torso
  63.  
  64. LW.Name = "LW"
  65. LW.Part0 = Torso
  66. LW.C0 = cn(-1.5, 0.5, 0)
  67. LW.C1 = cn(0, 0.5, 0)
  68. LW.Part1 = LeftArm
  69. LW.Parent = Torso
  70.  
  71. function clerp(a, b, t)
  72. local qa = {
  73. QuaternionFromCFrame(a)
  74. }
  75. local qb = {
  76. QuaternionFromCFrame(b)
  77. }
  78. local ax, ay, az = a.x, a.y, a.z
  79. local bx, by, bz = b.x, b.y, b.z
  80. local _t = 1 - t
  81. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  82. end
  83.  
  84. function QuaternionFromCFrame(cf)
  85. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  86. local trace = m00 + m11 + m22
  87. if trace > 0 then
  88. local s = math.sqrt(1 + trace)
  89. local recip = 0.5 / s
  90. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  91. else
  92. local i = 0
  93. if m11 > m00 then
  94. i = 1
  95. end
  96. if m22 > (i == 0 and m00 or m11) then
  97. i = 2
  98. end
  99. if i == 0 then
  100. local s = math.sqrt(m00 - m11 - m22 + 1)
  101. local recip = 0.5 / s
  102. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  103. elseif i == 1 then
  104. local s = math.sqrt(m11 - m22 - m00 + 1)
  105. local recip = 0.5 / s
  106. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  107. elseif i == 2 then
  108. local s = math.sqrt(m22 - m00 - m11 + 1)
  109. local recip = 0.5 / s
  110. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  111. end
  112. end
  113. end
  114.  
  115. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  116. local xs, ys, zs = x + x, y + y, z + z
  117. local wx, wy, wz = w * xs, w * ys, w * zs
  118. local xx = x * xs
  119. local xy = x * ys
  120. local xz = x * zs
  121. local yy = y * ys
  122. local yz = y * zs
  123. local zz = z * zs
  124. 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))
  125. end
  126.  
  127. function QuaternionSlerp(a, b, t)
  128. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  129. local startInterp, finishInterp;
  130. if cosTheta >= 0.0001 then
  131. if (1 - cosTheta) > 0.0001 then
  132. local theta = math.acos(cosTheta)
  133. local invSinTheta = 1 / math.sin(theta)
  134. startInterp = math.sin((1 - t) * theta) * invSinTheta
  135. finishInterp = math.sin(t * theta) * invSinTheta
  136. else
  137. startInterp = 1 - t
  138. finishInterp = t
  139. end
  140. else
  141. if (1 + cosTheta) > 0.0001 then
  142. local theta = math.acos(-cosTheta)
  143. local invSinTheta = 1 / math.sin(theta)
  144. startInterp = math.sin((t - 1) * theta) * invSinTheta
  145. finishInterp = math.sin(t * theta) * invSinTheta
  146. else
  147. startInterp = t - 1
  148. finishInterp = t
  149. end
  150. end
  151. 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
  152. end
  153.  
  154. function swait(num)
  155. if num == 0 or num == nil then
  156. game:service'RunService'.RenderStepped:wait(0)
  157. else
  158. for i = 0, num do
  159. game:service'RunService'.RenderStepped:wait(0)
  160. end
  161. end
  162. end
  163.  
  164. local RbxUtility = LoadLibrary("RbxUtility")
  165. local Create = RbxUtility.Create
  166.  
  167. function RemoveOutlines(part)
  168. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  169. end
  170.  
  171. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  172. local Part = Create("Part"){
  173. formFactor = FormFactor,
  174. Parent = Parent,
  175. Reflectance = Reflectance,
  176. Transparency = Transparency,
  177. CanCollide = false,
  178. Locked = true,
  179. BrickColor = BrickColor.new(tostring(BColor)),
  180. Name = Name,
  181. Size = Size,
  182. Material = Material,
  183. }
  184. RemoveOutlines(Part)
  185. return Part
  186. end
  187.  
  188. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  189. local Msh = Create(Mesh){
  190. Parent = Part,
  191. Offset = OffSet,
  192. Scale = Scale,
  193. }
  194. if Mesh == "SpecialMesh" then
  195. Msh.MeshType = MeshType
  196. Msh.MeshId = MeshId
  197. end
  198. return Msh
  199. end
  200.  
  201. function CreateWeld(Parent, Part0, Part1, C0, C1)
  202. local Weld = Create("Weld"){
  203. Parent = Parent,
  204. Part0 = Part0,
  205. Part1 = Part1,
  206. C0 = C0,
  207. C1 = C1,
  208. }
  209. return Weld
  210. end
  211.  
  212. function rayCast(Position, Direction, Range, Ignore)
  213. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  214. end
  215.  
  216. function CreateSound(id, par, vol, pit)
  217. coroutine.resume(coroutine.create(function()
  218. local sou = Instance.new("Sound", par or workspace)
  219. sou.Volume = vol
  220. sou.Pitch = pit or 1
  221. sou.SoundId = id
  222. swait()
  223. sou:play()
  224. game:GetService("Debris"):AddItem(sou, 6)
  225. end))
  226. end
  227.  
  228. local function getclosest(obj, distance)
  229. local last, lastx = distance + 1
  230. for i, v in pairs(workspace:GetChildren()) do
  231. if v:IsA'Model' and v ~= Character and v:findFirstChild('Humanoid') and v:findFirstChild('Torso') and v:findFirstChild('Humanoid').Health > 0 then
  232. local t = v.Torso
  233. local dist = (t.Position - obj.Position).magnitude
  234. if dist <= distance then
  235. if dist < last then
  236. last = dist
  237. lastx = v
  238. end
  239. end
  240. end
  241. end
  242. return lastx
  243. end
  244.  
  245. function Damage(hit, damage, cooldown, Color1, Color2, HSound, HPitch)
  246. for i, v in pairs(hit:GetChildren()) do
  247. if v:IsA("Humanoid") and hit.Name ~= Character.Name then
  248. local find = v:FindFirstChild("Hitz")
  249. if not find then
  250. if v.Parent:findFirstChild("Head") then
  251. local BillG = Create("BillboardGui"){
  252. Parent = v.Parent.Head,
  253. Size = UDim2.new(1, 0, 1, 0),
  254. Adornee = v.Parent.Head,
  255. StudsOffset = Vector3.new(math.random(-3, 3), math.random(3, 5), math.random(-3, 3)),
  256. }
  257. local TL = Create("TextLabel"){
  258. Parent = BillG,
  259. Size = UDim2.new(3, 3, 3, 3),
  260. BackgroundTransparency = 1,
  261. Text = tostring(damage).."-",
  262. TextColor3 = Color1.Color,
  263. TextStrokeColor3 = Color2.Color,
  264. TextStrokeTransparency = 0,
  265. TextXAlignment = Enum.TextXAlignment.Center,
  266. TextYAlignment = Enum.TextYAlignment.Center,
  267. FontSize = Enum.FontSize.Size18,
  268. Font = "ArialBold",
  269. }
  270. coroutine.resume(coroutine.create(function()
  271. swait(1)
  272. for i = 0, 1, .1 do
  273. swait(.1)
  274. BillG.StudsOffset = BillG.StudsOffset + Vector3.new(0, .1, 0)
  275. end
  276. BillG:Destroy()
  277. end))
  278. end
  279. v.Health = v.Health - damage
  280. local bool = Create("BoolValue"){
  281. Parent = v,
  282. Name = 'Hitz',
  283. }
  284. if HSound ~= nil and HPitch ~= nil then
  285. CreateSound(HSound, hit, 1, HPitch)
  286. end
  287. game:GetService("Debris"):AddItem(bool, cooldown)
  288. end
  289. end
  290. end
  291. end
  292.  
  293. Handle = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 1, "Black", "Handle", Vector3.new(0.5, 2.0999999, 0.200000003))
  294. HandleWeld = CreateWeld(m, Character["Right Arm"], Handle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.988736868, 0.384963989, -0.0709247589, -5.7466209e-006, -0.999994397, 3.26470035e-005, 5.88346529e-006, -3.26468544e-005, -1, 1, -5.74639671e-006, 5.8836531e-006))
  295. CreateMesh("SpecialMesh", Handle, Enum.MeshType.Head, "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  296. FakeHandle = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "FakeHandle", Vector3.new(0.5, 2.5, 0.200000003))
  297. FakeHandleWeld = CreateWeld(m, Handle, FakeHandle, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.0171542168, -0.000101089478, -1.52587891e-005, 1, -4.94255801e-008, 6.54397758e-010, 4.94255801e-008, 1, -9.78161552e-009, -6.54065802e-010, 9.78116077e-009, 1))
  298. CreateMesh("SpecialMesh", FakeHandle, Enum.MeshType.Head, "", Vector3.new(0, 0, 0), Vector3.new(1, 1, 1))
  299. Hitbox = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 1, "Royal purple", "Hitbox", Vector3.new(3.39999962, 6.40000057, 0.200000003))
  300. Hitboxweld = CreateWeld(m, FakeHandle, Hitbox, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.599976897, 3.78106308, -0.00105857849, 1, 9.17869329e-007, -3.09853681e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853635e-006, 3.59749265e-007, 1))
  301. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 2))
  302. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.00199222565, -1.36688352, 0.91988945, -1.07260448e-005, 5.24271636e-005, 1, 1, 7.52143824e-005, 1.07221013e-005, -7.52138149e-005, 1, -5.24279676e-005))
  303. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.273375034, 0.273375034))
  304. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 2))
  305. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.0020980835, -1.36713505, -0.373126984, -3.42016392e-005, 3.30372723e-006, -1, 1, 6.92866306e-005, -3.420141e-005, 6.92865142e-005, -1, -3.30609691e-006))
  306. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.273375034, 0.273375034))
  307. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  308. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.36701512, 0.647027969, -0.00205993652, 1, 9.17869329e-007, -3.09853681e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853635e-006, 3.59749265e-007, 1))
  309. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.364500016, 0.364500016, 0.364500016))
  310. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 2))
  311. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00208091736, -0.729172707, 1.46697998, 2.14775646e-005, 6.49265075e-006, -1, -1, -6.24730383e-005, -2.14779684e-005, -6.24731765e-005, 1, 6.49130925e-006))
  312. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.364500016, 0.273375034))
  313. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 2))
  314. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00208473206, -1.36713862, 0.919971466, 2.14782158e-005, 6.48287187e-006, -1, -1, -6.25224275e-005, -2.14786214e-005, -6.2522573e-005, 1, 6.48152945e-006))
  315. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.273375034, 0.273375034))
  316. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  317. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.78813934e-005, 1.37602234, -0.00105953217, 1, 7.86549208e-007, -2.881829e-006, -7.86552846e-007, 1, -3.39721282e-007, 2.881829e-006, 3.39723101e-007, 1))
  318. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.911249995, 0.364500016, 0.364500016))
  319. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  320. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.50203705e-005, 1.37602234, -0.00106143951, 1, 7.86403689e-007, -2.88184356e-006, -7.86407327e-007, 1, -3.39764483e-007, 2.88184356e-006, 3.39766302e-007, 1))
  321. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.364500016, 0.911249995, 0.364500016))
  322. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 1))
  323. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.182015419, 1.46701622, -0.00105762482, 1, 8.6833461e-007, -3.09789539e-006, -8.68338248e-007, 1, -3.69564077e-007, 3.09789493e-006, 3.69566806e-007, 1))
  324. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.364500016, 0.273375034, 0.273375034))
  325. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 2))
  326. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00203514099, 0.728891611, -0.919963837, -3.42016392e-005, 3.30372177e-006, -1, 1, 6.92866452e-005, -3.420141e-005, 6.92865287e-005, -1, -3.30609146e-006))
  327. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.364500016, 0.273375034))
  328. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 2))
  329. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.00205993652, -1.36701274, -0.374061584, -6.38305073e-006, -2.04226171e-006, 1, -1, 1.39180702e-006, -6.383048e-006, -1.39179247e-006, -1, -2.04227035e-006))
  330. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.273375034, 0.273375034))
  331. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  332. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.36696672, 0.647037506, -0.00205039978, 1, 9.17869329e-007, -3.09853681e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853635e-006, 3.59749265e-007, 1))
  333. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.364500016, 0.364500016, 0.364500016))
  334. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  335. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-5.48362732e-006, 1.74000549, -0.00106716156, 1, 8.31929356e-007, -3.09747497e-006, -8.55670805e-007, 1, -3.76769094e-007, 3.09776465e-006, 3.7206155e-007, 1))
  336. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.546750069, 0.273375034))
  337. Part = CreatePart(Enum.FormFactor.Custom, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 0.5, 1))
  338. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-2.57492065e-005, -1.53996277, -0.0020532608, 1, 9.17869329e-007, -3.09853681e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853635e-006, 3.59749265e-007, 1))
  339. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=3270017", Vector3.new(0, 0, 0), Vector3.new(0.637875021, 0.637875021, 1.09350014))
  340. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 2))
  341. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00115871429, -3.30009842, 0.999759197, -4.33876921e-005, 1.81356409e-005, -1, 6.59307698e-005, -1, -1.81385021e-005, -1, -6.59315556e-005, 4.33864952e-005))
  342. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0.800000012, -0.5), Vector3.new(0.0844999999, 2, 0.5))
  343. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  344. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.38282776e-005, 3.38105774, -0.00105476379, 1, 9.17869329e-007, -3.09853317e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853272e-006, 3.59749265e-007, 1))
  345. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.182250008, 2.55150008, 0.291599989))
  346. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  347. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.18200779, 3.38004494, -0.00105571747, 1, 9.17869329e-007, -3.09853499e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853453e-006, 3.59749265e-007, 1))
  348. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.182250008, 2.55150008, 0.182250008))
  349. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 1))
  350. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-5.31673431e-005, -0.00191497803, -4.11003494, 1, -1.81591931e-005, -3.91808044e-006, 3.9186757e-006, 3.27668895e-005, 1, -1.81590622e-005, -1, 3.27669622e-005))
  351. CreateMesh("CylinderMesh", Part, "", "", Vector3.new(0, 0, 1.10000002), Vector3.new(1.09399998, 0.0480000004, 1.09399998))
  352. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 1))
  353. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-6.31809235e-005, -0.00191688538, -4.10998535, 1, -1.81591786e-005, -3.91808044e-006, 3.9186757e-006, 3.27668859e-005, 1, -1.81590476e-005, -1, 3.2766955e-005))
  354. CreateMesh("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0.75), Vector3.new(2.18700027, 0.0437400006, 2.18700027))
  355. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 2))
  356. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.00211715698, -5.9500494, -0.0851407051, 4.76346322e-005, -9.64188985e-006, 1, -1.57094873e-005, -1, -9.64114042e-006, 1, -1.5709029e-005, -4.76347814e-005))
  357. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.0860000029, 1, 1))
  358. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 2))
  359. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00209140778, -6.52481937, 2.01444435, 7.50156905e-005, 0.000124422018, -1, 1.20043878e-005, -1, -0.000124421131, -1, -1.19950528e-005, -7.50171821e-005))
  360. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.0860000029, 0.425000012, 0.349999994))
  361. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 1))
  362. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(2.47955322e-005, 3.38104248, -0.00105476379, 1, 9.17869329e-007, -3.09853681e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853635e-006, 3.59749265e-007, 1))
  363. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(1.09350014, 1.82249999, 0.091125004))
  364. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(0.5, 0.5, 0.5))
  365. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(1.97887421e-005, 0.100036621, -0.00205230713, 1, 9.17869329e-007, -3.09853681e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853635e-006, 3.59749265e-007, 1))
  366. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=1033714", Vector3.new(0, 0, 0), Vector3.new(0.200474992, 3.64499998, 0.200474992))
  367. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 1))
  368. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(2.88486481e-005, 5.20302105, -0.00205039978, 1, 9.17869329e-007, -3.09853681e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853635e-006, 3.59749265e-007, 1))
  369. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=3270017", Vector3.new(0, 0, 0), Vector3.new(1.09350014, 1.09350014, 1.09350014))
  370. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 1))
  371. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(2.47955322e-005, 3.38104248, -0.00105476379, 1, 9.17869329e-007, -3.09853681e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853635e-006, 3.59749265e-007, 1))
  372. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0.300000012, 0), Vector3.new(2.1500001, 1.85000002, 0.0728999972))
  373. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 2))
  374. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00115871429, -3.30009842, 0.999759197, -4.33876921e-005, 1.81356409e-005, -1, 6.59307698e-005, -1, -1.81385021e-005, -1, -6.59315556e-005, 4.33864952e-005))
  375. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0.5, -0.370000005), Vector3.new(0.0850000009, 3.1400001, 0.300000012))
  376. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  377. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.181978226, 3.38004112, -0.00105857849, 1, 9.17869329e-007, -3.09853499e-006, -9.17872967e-007, 1, -3.59746082e-007, 3.09853453e-006, 3.59749265e-007, 1))
  378. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.182250008, 2.55150008, 0.182250008))
  379. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 2))
  380. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00208759308, -2.14117122, -5.4559269, 7.50156905e-005, 0.000124422018, -1, 1, 1.21837293e-005, 7.50172112e-005, 1.21930643e-005, -1, -0.000124421102))
  381. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.0860000029, 0.219999999, 0.300000012))
  382. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 2))
  383. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00212001801, -1.77485621, -1.80015564, -3.42009844e-005, 3.29393743e-006, -1, 1, 6.93360635e-005, -3.42007552e-005, 6.9335947e-005, -1, -3.29630893e-006))
  384. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.0860000029, 0.219999999, 0.300000012))
  385. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 2, 2))
  386. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(0.00212955475, -1.77469087, -4.10015297, -3.42009844e-005, 3.29393743e-006, -1, 1, 6.93360635e-005, -3.42007552e-005, 6.9335947e-005, -1, -3.29630893e-006))
  387. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0.104999997, 1.82500005), Vector3.new(0.0850000009, 0.485000014, 0.173999995))
  388. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 1, 1))
  389. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-1.74045563e-005, -1.74000549, 0.00106239319, 1, 7.09867891e-007, -3.47113655e-006, 7.18398951e-007, -1, 1.90790615e-007, -3.47124728e-006, -1.89104412e-007, -1))
  390. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/asset/?id=1033714", Vector3.new(0, 0, 0), Vector3.new(0.200000003, 0.728999972, 0.200000003))
  391. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Royal purple", "Part", Vector3.new(1, 1, 1))
  392. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-3.09944153e-005, -1.5399704, -0.00205135345, 1, 8.40984285e-007, -3.09759139e-006, -9.45463398e-007, 1, -3.74972387e-007, 3.09895586e-006, 3.54291842e-007, 1))
  393. CreateMesh("SpecialMesh", Part, Enum.MeshType.FileMesh, "http://www.roblox.com/Asset/?id=9756362", Vector3.new(0, 0, 0), Vector3.new(0.182250008, 0.364500016, 0.182250008))
  394. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 1))
  395. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.182011604, 1.46700859, -0.00105857849, 1, 8.68320058e-007, -3.09790266e-006, -8.68323696e-007, 1, -3.69571353e-007, 3.09790221e-006, 3.69574082e-007, 1))
  396. CreateMesh("BlockMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.364500016, 0.273375034, 0.273375034))
  397. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Really black", "Part", Vector3.new(1, 1, 1))
  398. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-2.07424164e-005, 0.647010803, -0.00105762482, 1, 8.68501957e-007, -3.09789175e-006, -8.68505595e-007, 1, -3.69520876e-007, 3.09789129e-006, 3.69523605e-007, 1))
  399. CreateMesh("CylinderMesh", Part, "", "", Vector3.new(0, 0, 0), Vector3.new(0.620000005, 0.100000001, 0.620000005))
  400. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 2))
  401. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.000971794128, -0.728844762, 1.46681595, -1.07260448e-005, 5.24271709e-005, 1, 1, 7.52143824e-005, 1.07221013e-005, -7.52138221e-005, 1, -5.24279749e-005))
  402. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.364500016, 0.273375034))
  403. Part = CreatePart(Enum.FormFactor.Symmetric, m, Enum.Material.SmoothPlastic, 0, 0, "Black", "Part", Vector3.new(1, 2, 2))
  404. Partweld = CreateWeld(m, FakeHandle, Part, CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1), CFrame.new(-0.00204944611, 0.728974223, -0.920038223, -6.38304891e-006, -2.04226171e-006, 1, -1, 1.39180702e-006, -6.38304618e-006, -1.39179247e-006, -1, -2.04227035e-006))
  405. CreateMesh("SpecialMesh", Part, Enum.MeshType.Wedge, "", Vector3.new(0, 0, 0), Vector3.new(0.273375034, 0.364500016, 0.273375034))
  406.  
  407. for i,v in pairs(Character:GetChildren()) do
  408. if v:IsA'Model' then
  409. for _,c in pairs(v:GetChildren()) do
  410. if c:IsA'Part' then
  411. c.CustomPhysicalProperties = PhysicalProperties.new(0.001,0.001,0.001,0.001,0.001)
  412. end
  413. end
  414. end
  415. end
  416.  
  417. function BlockEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  418. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  419. prt.Anchored = true
  420. prt.CFrame = cframe
  421. local msh = CreateMesh("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  422. game:GetService("Debris"):AddItem(prt, 10)
  423. if Type == 1 or Type == nil then
  424. table.insert(Effects, {
  425. prt,
  426. "Block1",
  427. delay,
  428. x3,
  429. y3,
  430. z3,
  431. msh
  432. })
  433. elseif Type == 2 then
  434. table.insert(Effects, {
  435. prt,
  436. "Block2",
  437. delay,
  438. x3,
  439. y3,
  440. z3,
  441. msh
  442. })
  443. end
  444. end
  445.  
  446. function SphereEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  447. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  448. prt.Anchored = true
  449. prt.CFrame = cframe
  450. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  451. game:GetService("Debris"):AddItem(prt, 10)
  452. table.insert(Effects, {
  453. prt,
  454. "Cylinder",
  455. delay,
  456. x3,
  457. y3,
  458. z3,
  459. msh
  460. })
  461. end
  462.  
  463. function RingEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  464. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  465. prt.Anchored = true
  466. prt.CFrame = cframe * CFrame.new(x1, y1, z1)
  467. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  468. game:GetService("Debris"):AddItem(prt, 10)
  469. table.insert(Effects, {
  470. prt,
  471. "Cylinder",
  472. delay,
  473. x3,
  474. y3,
  475. z3,
  476. msh
  477. })
  478. end
  479.  
  480. function CylinderEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  481. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  482. prt.Anchored = true
  483. prt.CFrame = cframe
  484. local msh = CreateMesh("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  485. game:GetService("Debris"):AddItem(prt, 10)
  486. table.insert(Effects, {
  487. prt,
  488. "Cylinder",
  489. delay,
  490. x3,
  491. y3,
  492. z3,
  493. msh
  494. })
  495. end
  496.  
  497. function WaveEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  498. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  499. prt.Anchored = true
  500. prt.CFrame = cframe
  501. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "20329976", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  502. game:GetService("Debris"):AddItem(prt, 10)
  503. table.insert(Effects, {
  504. prt,
  505. "Cylinder",
  506. delay,
  507. x3,
  508. y3,
  509. z3,
  510. msh
  511. })
  512. end
  513.  
  514. function SpecialEffect(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  515. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  516. prt.Anchored = true
  517. prt.CFrame = cframe
  518. local msh = CreateMesh("SpecialMesh", prt, "FileMesh", "24388358", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  519. game:GetService("Debris"):AddItem(prt, 10)
  520. table.insert(Effects, {
  521. prt,
  522. "Cylinder",
  523. delay,
  524. x3,
  525. y3,
  526. z3,
  527. msh
  528. })
  529. end
  530.  
  531. function BreakEffect(brickcolor, cframe, x1, y1, z1)
  532. local prt = CreatePart(3, workspace, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  533. prt.Anchored = true
  534. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  535. local msh = CreateMesh("SpecialMesh", prt, "Sphere", "nil", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  536. local num = math.random(10, 50) / 1000
  537. game:GetService("Debris"):AddItem(prt, 10)
  538. table.insert(Effects, {
  539. prt,
  540. "Shatter",
  541. num,
  542. prt.CFrame,
  543. math.random() - math.random(),
  544. 0,
  545. math.random(50, 100) / 100
  546. })
  547. end
  548.  
  549. function DeadSpike()
  550. attack = true
  551. gyro.Parent = nil
  552. Humanoid.WalkSpeed = 0
  553. for i = 0, 1, 0.1 do
  554. swait(1)
  555. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-70)), .3)
  556. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(70)), .3)
  557. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-40), math.rad(0), math.rad(30)), .3)
  558. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(70), math.rad(0), math.rad(-20)), .3)
  559. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(50), math.rad(0)), .3)
  560. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(50), math.rad(0)), .3)
  561. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), .3)
  562. end
  563. CreateSound("rbxassetid://382880737", Hitbox, 1, .9)
  564. for i = 0, 1, 0.1 do
  565. swait(1)
  566. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(80)), .3)
  567. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-80)), .3)
  568. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(20), math.rad(120)), .3)
  569. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50), math.rad(0), math.rad(-50)), .3)
  570. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(-50), math.rad(0)), .3)
  571. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(-50), math.rad(0)), .3)
  572. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(100)), .3)
  573. end
  574. local POS = RootPart.Position + RootPart.CFrame.lookVector * 15 - Vector3.new(0, 2, 0)
  575. local p = Instance.new("Part")
  576. p.TopSurface = 0
  577. p.BottomSurface = 0
  578. p.CanCollide = false
  579. p.Anchored = true
  580. p.Material = "SmoothPlastic"
  581. p.BrickColor = BrickColor:Black()
  582. p.formFactor = "Symmetric"
  583. p.Size = Vector3.new(1, 1, 1)
  584. p.CFrame = CFrame.new(POS)
  585. p.Parent = Character
  586. m = Instance.new("SpecialMesh",p)
  587. m.Name = "Triangle"
  588. m.MeshId = "http://www.roblox.com/asset/?id=6547801"
  589. m.MeshType = "FileMesh"
  590. m.Scale = Vector3.new(0.1, 0.001, 0.1)
  591. coroutine.resume(coroutine.create(function(p)
  592. for i = 1, 10 do
  593. p.Triangle.Scale = p.Triangle.Scale + Vector3.new(.05, 0, .05)
  594. p.CFrame = p.CFrame * CFrame.fromEulerAnglesXYZ(0, .1, 0)
  595. swait(1)
  596. end
  597. for i = 1, 30 do
  598. p.CFrame = p.CFrame * CFrame.fromEulerAnglesXYZ(0, .1, 0)
  599. swait(1)
  600. end
  601. for i = 1, 10 do
  602. p.Triangle.Scale = p.Triangle.Scale - Vector3.new(.06, 0, .06)
  603. p.Transparency = i / 10
  604. p.CFrame = p.CFrame * CFrame.fromEulerAnglesXYZ(0, .5, 0)
  605. swait(1)
  606. end
  607. p.Parent = nil
  608. end), p)
  609. local p = Instance.new("Part")
  610. p.TopSurface = 0
  611. p.BottomSurface = 0
  612. p.CanCollide = false
  613. p.Anchored = true
  614. p.Transparency = .5
  615. p.Material = "SmoothPlastic"
  616. p.BrickColor = BrickColor:Black()
  617. p.formFactor = "Symmetric"
  618. p.Size = Vector3.new(1, 1, 1)
  619. p.CFrame = CFrame.new(POS)
  620. p.Parent = Character
  621. m = Instance.new("SpecialMesh",p)
  622. m.Name = "Triangle"
  623. m.MeshId = "http://www.roblox.com/asset/?id=6547801"
  624. m.MeshType = "FileMesh"
  625. m.Scale = Vector3.new(0.1, 0.001, 0.1)
  626. coroutine.resume(coroutine.create(function(p)
  627. for i = 1, 10 do
  628. p.Triangle.Scale = p.Triangle.Scale + Vector3.new(.06, 0, .06)
  629. p.CFrame = p.CFrame * CFrame.fromEulerAnglesXYZ(0, -.15, 0)
  630. swait(1)
  631. end
  632. for i = 1, 32 do
  633. p.CFrame = p.CFrame * CFrame.fromEulerAnglesXYZ(0, 0, 0)
  634. swait(1)
  635. end
  636. for i = 1, 10 do
  637. p.Triangle.Scale = p.Triangle.Scale - Vector3.new(.06, 0, .06)
  638. p.Transparency = i / 10
  639. p.CFrame = p.CFrame * CFrame.fromEulerAnglesXYZ(0, -.5, 0)
  640. swait(1)
  641. end
  642. p.Parent = nil
  643. end), p)
  644. local p = Instance.new("Part")
  645. p.TopSurface = 0
  646. p.BottomSurface = 0
  647. p.CanCollide = false
  648. p.Anchored = true
  649. p.Transparency = 0
  650. p.Material = "SmoothPlastic"
  651. p.BrickColor = BrickColor:Black()
  652. p.formFactor = "Symmetric"
  653. p.Size = Vector3.new(1, 1, 1)
  654. p.CFrame = CFrame.new(POS) - Vector3.new(0, 15, 0)
  655. p.Parent = Character
  656. m = Instance.new("SpecialMesh",p)
  657. m.Name = "SpikeMesh"
  658. m.MeshId = "http://www.roblox.com/asset/?id=1033714"
  659. m.MeshType = "FileMesh"
  660. m.Scale = Vector3.new(5, 60, 5)
  661. CreateSound("rbxassetid://382885887", p, 1, .7)
  662. coroutine.resume(coroutine.create(function(p, o)
  663. for i = 1, 5 do
  664. p.CFrame = CFrame.new(p.Position:Lerp(o, i / 5), p.Position:Lerp(o, (i + 1) / 5)) * CFrame.fromEulerAnglesXYZ(-math.pi / 2, 0, 0)
  665. swait(1)
  666. end
  667. swait(10)
  668. for i = 1, 5 do
  669. p.CFrame = CFrame.new(o:Lerp(o - Vector3.new(0, 10, 0), i / 5), o:Lerp(o - Vector3.new(0, 10, 0), (i - 1) / 5)) * CFrame.fromEulerAnglesXYZ(-math.pi / 2, 0, 0)
  670. swait(1)
  671. end
  672. p.Parent = nil
  673. end), p, POS + Vector3.new(0, 5, 0))
  674. for i = 1, 5 do
  675. swait(1)
  676. local hpos = POS + Vector3.new(0, 4, 0)
  677. local maxdec = 8
  678. for il = 1, 7 do
  679. local p = Instance.new("Part")
  680. p.TopSurface = 0
  681. p.BottomSurface = 0
  682. p.CanCollide = false
  683. p.Anchored = true
  684. p.Transparency = 0
  685. p.Material = "SmoothPlastic"
  686. p.BrickColor = BrickColor:Black()
  687. p.formFactor = "Symmetric"
  688. p.Size = Vector3.new(1, 1, 1)
  689. p.CFrame = CFrame.new(POS) - Vector3.new(math.random(-6, 6), 15, math.random(-6, 6))
  690. p.Parent = Character
  691. m = Instance.new("SpecialMesh",p)
  692. m.Name = "SpikeMesh"
  693. m.MeshId = "http://www.roblox.com/asset/?id=1033714"
  694. m.MeshType = "FileMesh"
  695. m.Scale = Vector3.new(1, 40, 1)
  696. CreateSound("rbxassetid://382891851", p, 1, .9)
  697. coroutine.resume(coroutine.create(function(p, o)
  698. for i = 1, 5 do
  699. p.CFrame = CFrame.new(p.Position:Lerp(o, i / 5), p.Position:Lerp(o, (i + 1) / 5)) * CFrame.fromEulerAnglesXYZ(-math.pi / 2, 0, 0)
  700. swait(1)
  701. end
  702. swait(5.25)
  703. for i = 1, 5 do
  704. p.CFrame = CFrame.new(o:Lerp(o - Vector3.new(0, 10, 0), i / 5), o:Lerp(o - Vector3.new(0, 10, 0), (i - 1) / 5)) * CFrame.fromEulerAnglesXYZ(-math.pi / 2, 0, 0)
  705. swait(1)
  706. end
  707. p.Parent = nil
  708. end), p, POS + Vector3.new(math.random(-i, i), i * 2.5, math.random(-i, i)))
  709. end
  710. end
  711. for i = 0, 1, 0.1 do
  712. swait(1)
  713. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(75)), .3)
  714. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(0), math.rad(0), math.rad(-75)), .3)
  715. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(0), math.rad(20), math.rad(120)), .3)
  716. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(-50), math.rad(0), math.rad(-50)), .3)
  717. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-5), math.rad(-50), math.rad(0)), .3)
  718. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-5), math.rad(-50), math.rad(0)), .3)
  719. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(100)), .3)
  720. end
  721. Humanoid.WalkSpeed = 16
  722. gyro.Parent = RootPart
  723. attack = false
  724. end
  725.  
  726. keypress = false
  727. input = ""
  728.  
  729. mouse.KeyDown:connect(function(k)
  730. k = k:lower()
  731. if k == 'a' or k == 's' or k == 'd' or k == 'q' or k == 'e' or k == 'z' or k == 'x' or k == 'c' or k == 'v' and attack == false --[[and cooldown3 >= co3 and stamina>=skill3stam]] then
  732. input = input..k
  733. print(input)
  734. coroutine.resume(coroutine.create(function()
  735. while keypress == true do
  736. swait()
  737. end
  738. for i = 1, 50 do
  739. if keypress == false then
  740. swait()
  741. end
  742. end
  743. input = ''
  744. end))
  745. end
  746. if input == 'asdq' and attack == false then
  747. DeadSpike()
  748. end
  749. end)
  750.  
  751. getDirection = function()
  752. if Character == nil then
  753. return {
  754. CFrame.new(0, 0, 0),
  755. CFrame.new(0, 0, 0)
  756. }
  757. end
  758. local Cam = workspace.CurrentCamera
  759. return {
  760. CFrame.new(RootPart.Position, Vector3.new(Cam.CoordinateFrame.x, RootPart.Position.y, Cam.CoordinateFrame.z)) * CFrame.fromEulerAnglesXYZ(0, math.pi, 0),
  761. Vector3.new(Cam.CoordinateFrame.p.x, RootPart.CFrame.p.y, Cam.CoordinateFrame.p.z)
  762. }
  763. end
  764.  
  765. gyro = Create("BodyGyro"){
  766. Parent = RootPart,
  767. P = 1e7,
  768. D = 1e3,
  769. MaxTorque = Vector3.new(0, 1e7, 0),
  770. }
  771.  
  772. while true do
  773. swait(1)
  774. Humanoid.JumpPower = 60
  775. gyro.cframe = getDirection()[1]
  776. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  777. velocity = RootPart.Velocity.y
  778. sine = sine + change
  779. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  780. if equipped == true or equipped == false then
  781. if RootPart.Velocity.y > 1 and hit == nil then
  782. Anim = "Jump"
  783. if attack == false then
  784. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(-5), math.rad(0), math.rad(0)), .3)
  785. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-10), math.rad(0), math.rad(0)), .3)
  786. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(20)), .3)
  787. LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5, 0) * angles(math.rad(-20), math.rad(0), math.rad(-20)), .3)
  788. RH.C0 = clerp(RH.C0, cn(1, -.4, -.5) * RHCF * angles(math.rad(3), math.rad(0), math.rad(-20)), .3)
  789. LH.C0 = clerp(LH.C0, cn(-1, -.8, -.2) * LHCF * angles(math.rad(3), math.rad(0), math.rad(30)), .3)
  790. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(30)), .3)
  791. end
  792. elseif RootPart.Velocity.y < -1 and hit == nil then
  793. Anim = "Fall"
  794. if attack == false then
  795. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(0)), .3)
  796. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(20), math.rad(0), math.rad(0)), .3)
  797. RW.C0 = clerp(RW.C0, CFrame.new(1.4, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(40)), .3)
  798. LW.C0 = clerp(LW.C0, CFrame.new(-1.4, 0.5, 0) * angles(math.rad(-30), math.rad(0), math.rad(-40)), .3)
  799. RH.C0 = clerp(RH.C0, cn(1, -.8, -.2) * RHCF * angles(math.rad(-3), math.rad(0), math.rad(20)), .3)
  800. LH.C0 = clerp(LH.C0, cn(-1, -1, -.3) * LHCF * angles(math.rad(-3), math.rad(0), math.rad(-30)), .3)
  801. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(0), math.rad(-30)), .3)
  802. end
  803. elseif Torsovelocity < 1 and hit ~= nil then
  804. Anim = "Idle"
  805. if attack == false then
  806. change = 2
  807. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, -.1 + .1 * math.cos(sine / 40)) * angles(math.rad(0), math.rad(0), math.rad(-30)), .3)
  808. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(5 - 2 * math.cos(sine / 40)), math.rad(5), math.rad(30)), .3)
  809. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(-15), math.rad(0), math.rad(10 + 3 * math.cos(sine / 40))), .3)
  810. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0) * angles(math.rad(5), math.rad(0), math.rad(-8 - 2 * math.cos(sine / 40))), .3)
  811. RH.C0 = clerp(RH.C0, cn(1, -.9 - .1 * math.cos(sine / 40), 0) * RHCF * angles(math.rad(-3.5 - 1 * math.cos(sine / 40)), math.rad(20), math.rad(0)), .3)
  812. LH.C0 = clerp(LH.C0, cn(-1, -.9 - .1 * math.cos(sine / 40), 0) * LHCF * angles(math.rad(-3.5 - 1 * math.cos(sine / 40)), math.rad(20), math.rad(0)), .3)
  813. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(10), math.rad(0), math.rad(13)), .3)
  814. end
  815. elseif Torsovelocity > 2 and hit ~= nil then
  816. Anim = "Walk"
  817. if attack == false then
  818. change = 1
  819. RootJoint.C0 = clerp(RootJoint.C0, RootCF * cn(0, 0, 0) * angles(math.rad(30 + 3 * math.cos(sine / 6)), math.rad(0), math.rad(0)), .3)
  820. Torso.Neck.C0 = clerp(Torso.Neck.C0, NeckCF * angles(math.rad(-20 - 3 * math.cos(sine / 6)), math.rad(0), math.rad(0)), .3)
  821. RW.C0 = clerp(RW.C0, CFrame.new(1.5, 0.5, 0) * angles(math.rad(20 + 3 * math.cos(sine / 6)), math.rad(0), math.rad(10 + 3 * math.cos(sine / 15))), .3)
  822. LW.C0 = clerp(LW.C0, CFrame.new(-1.5, 0.5, 0 - .5 * math.cos(sine / 5)) * angles(math.rad(50 * math.cos(sine / 5)), math.rad(0), math.rad(15 * math.cos(sine / 5))), .3)
  823. RH.C0 = clerp(RH.C0, cn(1, -1, 0) * RHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  824. LH.C0 = clerp(LH.C0, cn(-1, -1, 0) * LHCF * angles(math.rad(-2), math.rad(0), math.rad(50 * math.cos(sine / 4))), .3)
  825. FakeHandleWeld.C0 = clerp(FakeHandleWeld.C0, CFrame.new(0, 0, 0) * angles(math.rad(0), math.rad(-10), math.rad(12)), .3)
  826. end
  827. end
  828. end
  829. BlockEffect(BrickColor.new("Black"), LeftArm.CFrame*CFrame.new(0,-1,0), 1, 1, 1, 1, 1, 1, .1, 1)
  830. if #Effects > 0 then
  831. for e = 1, #Effects do
  832. if Effects[e] ~= nil then
  833. local Thing = Effects[e]
  834. if Thing ~= nil then
  835. local Part = Thing[1]
  836. local Mode = Thing[2]
  837. local Delay = Thing[3]
  838. local IncX = Thing[4]
  839. local IncY = Thing[5]
  840. local IncZ = Thing[6]
  841. if Thing[1].Transparency <= 1 then
  842. if Thing[2] == "Block1" then
  843. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  844. Mesh = Thing[1].Mesh
  845. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  846. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  847. elseif Thing[2] == "Block2" then
  848. Thing[1].CFrame = Thing[1].CFrame
  849. Mesh = Thing[7]
  850. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  851. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  852. elseif Thing[2] == "Cylinder" then
  853. Mesh = Thing[1].Mesh
  854. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  855. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  856. elseif Thing[2] == "Blood" then
  857. Mesh = Thing[7]
  858. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  859. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  860. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  861. elseif Thing[2] == "Elec" then
  862. Mesh = Thing[1].Mesh
  863. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  864. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  865. elseif Thing[2] == "Disappear" then
  866. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  867. elseif Thing[2] == "Shatter" then
  868. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  869. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  870. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  871. Thing[6] = Thing[6] + Thing[5]
  872. end
  873. else
  874. Part.Parent = nil
  875. table.remove(Effects, e)
  876. end
  877. end
  878. end
  879. end
  880. end
  881. end
Add Comment
Please, Sign In to add comment