Advertisement
pakin2549

Untitled

Jul 13th, 2019
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  5.  
  6.  
  7. local player = owner
  8. local Cha = player.Character
  9. local mouse = player:GetMouse()
  10. local henshine = false
  11. local RAC = Cha.Torso:WaitForChild("Right Shoulder")
  12. local LAC = Cha.Torso:WaitForChild("Left Shoulder")
  13. local RA = Cha:FindFirstChild("Right Arm")
  14. local LA = Cha:FindFirstChild("Left Arm")
  15. local Torso = Cha.Torso
  16. local Head = Cha.Head
  17. local RL = Cha:FindFirstChild("Right Leg")
  18. local LL = Cha:FindFirstChild("Left Leg")
  19. local Humanoid = Cha.Humanoid
  20.  
  21. function Driver()
  22.  
  23. local Driver = Instance.new("Part")
  24. Driver.Parent = Cha.Torso
  25. Driver.BrickColor = BrickColor.new("New Yeller")
  26. Driver.CanCollide = false
  27. Driver.Material = "Neon"
  28. local weld = Instance.new("Weld")
  29. weld.Part0 = Cha.Torso
  30. weld.Part1 = Driver
  31. weld.C1 = CFrame.new(0,0.7,0.1)
  32. weld.Parent = Driver
  33. local BeyondDriver = Instance.new("SpecialMesh")
  34. BeyondDriver.MeshType = "FileMesh"
  35. BeyondDriver.MeshId = "rbxassetid://3101785948"
  36. BeyondDriver.Parent = Driver
  37. local Black = Instance.new("Part")
  38. Black.Parent = Cha.Torso
  39. Black.BrickColor = BrickColor.new("Really black")
  40. Black.CanCollide = false
  41. Black.Material = "Neon"
  42. local weld1 = Instance.new("Weld")
  43. weld1.Part0 = Cha.Torso
  44. weld1.Part1 = Black
  45. weld1.C1 = CFrame.new(0.3,0.7,0.6)
  46. weld1.Parent = Black
  47. local E = Instance.new("SpecialMesh")
  48. E.MeshType = "FileMesh"
  49. E.MeshId = "rbxassetid://3101791766"
  50. E.Parent = Black
  51. local SongDriver = Instance.new("Sound")
  52. SongDriver.Parent = Cha.Torso
  53. SongDriver.SoundId = "rbxassetid://3096751301"
  54. SongDriver.Volume = 15
  55. SongDriver:Play()
  56. wait(2.6)
  57. SongDriver:Destroy()
  58.  
  59. end
  60.  
  61.  
  62. Driver()
  63.  
  64. function henshin()
  65. local SongDriver1 = Instance.new("Sound")
  66. SongDriver1.Parent = Cha.Torso
  67. SongDriver1.SoundId = "rbxassetid://3096751301"
  68. SongDriver1.Volume = 0
  69. SongDriver1:Play()
  70. wait(2.6)
  71. SongDriver1.Volume = 15
  72. wait(3.5)
  73. local Watch1 = Instance.new("Part")
  74. Watch1.Parent = Cha.Torso
  75. Watch1.CFrame = Cha.Torso.CFrame*CFrame.new(0,4,5)
  76. Watch1.BrickColor = BrickColor.new("New Yeller")
  77. Watch1.CanCollide = false
  78. Watch1.Material = "Neon"
  79. Watch1.Anchored = true
  80. local Screen = Instance.new("Part")
  81. Screen.Parent = Cha.Torso
  82. Screen.CFrame = Cha.Torso.CFrame*CFrame.new(0,4,4.3)
  83. Screen.BrickColor = BrickColor.new("White")
  84. Screen.CanCollide = false
  85. Screen.Material = "Neon"
  86. Screen.Anchored = true
  87. Screen.Size = Vector3.new(7.84, 7.24, 0.05)
  88. Screen.Transparency = 1
  89. local E = Instance.new("Part")
  90. E.Parent = Cha.Torso
  91. E.CFrame = Cha.Torso.CFrame*CFrame.new(0,2,0)
  92. E.Shape = "Cylinder"
  93. E.BrickColor = BrickColor.new("New Yeller")
  94. E.CanCollide = false
  95. E.Material = "Neon"
  96. E.Anchored = true
  97. E.Size = Vector3.new(19.06,19.06,19.06)
  98. E.Transparency = 1
  99. game:GetService('RunService').Stepped:Connect(function()
  100. E.CFrame = E.CFrame*CFrame.fromEulerAnglesXYZ(0,0,0.1)
  101. end)
  102. local ParticleEmitter0 = Instance.new("ParticleEmitter")
  103. ParticleEmitter0.Name = "FireParticle"
  104. ParticleEmitter0.Parent = E
  105. ParticleEmitter0.Speed = NumberRange.new(0, 0)
  106. ParticleEmitter0.Rotation = NumberRange.new(50, 50)
  107. ParticleEmitter0.Color = ColorSequence.new(Color3.new(0.268666, 1, 0.254551),Color3.new(0.268666, 1, 0.254551))
  108. ParticleEmitter0.LightEmission = 0.20000000298023
  109. ParticleEmitter0.Texture = "rbxasset://textures/particles/explosion01_implosion_main.dds"
  110. ParticleEmitter0.Size = NumberSequence.new(1.9999998807907,0.75,0.3846150636673,0)
  111. ParticleEmitter0.EmissionDirection = Enum.NormalId.Front
  112. ParticleEmitter0.Lifetime = NumberRange.new(1, 1)
  113. ParticleEmitter0.LockedToPart = true
  114. ParticleEmitter0.Rate = 200
  115. ParticleEmitter0.RotSpeed = NumberRange.new(50, 50)
  116. local Watch = Instance.new("SpecialMesh")
  117. Watch.MeshType = "FileMesh"
  118. Watch.MeshId = "rbxassetid://3096963282"
  119. Watch.Parent = Watch1
  120. Watch.Scale = Watch.Scale*Vector3.new(0.1,0.1,0,1)
  121. local Gear1 = Instance.new("Part")
  122. Gear1.Parent = Cha.Torso
  123. Gear1.CFrame = Cha.Torso.CFrame*CFrame.new(-6,4,5)
  124. Gear1.CanCollide = false
  125. Gear1.Material = "Neon"
  126. Gear1.Anchored = true
  127. local Gear = Instance.new("SpecialMesh")
  128. Gear.MeshType = "FileMesh"
  129. Gear.MeshId = "rbxassetid://3097437816"
  130. Gear.Parent = Gear1
  131. Gear.Scale = Vector3.new(0.1,0.1,0.1)
  132. wait(0.5)
  133. for i = 1, 10 do wait(0.1)
  134. Watch.Scale = Watch.Scale+Vector3.new(0.1,0.1,0.1)
  135. Gear.Scale = Gear.Scale+Vector3.new(0.1,0.1,0.1)
  136. Screen.Transparency = Screen.Transparency - 0.1
  137. end
  138. game:GetService('RunService').Stepped:Connect(function()
  139. Gear1.CFrame = Gear1.CFrame*CFrame.fromEulerAnglesXYZ(0.1,0,0)
  140. end)
  141.  
  142. local walkspeed = Cha.Humanoid
  143. walkspeed.WalkSpeed = 0
  144. for i = 1,4 do wait(0.2)
  145. Screen.BrickColor = BrickColor.new("Really black")
  146. wait(1)
  147. Screen.BrickColor = BrickColor.new("Lily white")
  148. wait(1)
  149. Screen.BrickColor = BrickColor.new("Really black")
  150. wait(1)
  151. Screen.BrickColor = BrickColor.new("Lily white")
  152. end
  153. wait(3)
  154. if Cha:FindFirstChild("Shirt") then
  155. Cha["Shirt"]:remove()
  156. end
  157. if Cha:FindFirstChild("Pants") then
  158. Cha["Pants"]:remove()
  159. end
  160. wait(2)
  161. local shirt = Instance.new("Shirt",Cha)
  162. shirt.ShirtTemplate = "rbxassetid://3101417338"
  163. local pants = Instance.new("Pants",Cha)
  164. pants.PantsTemplate = "rbxassetid://3101418478"
  165. local walkspeed = Cha.Humanoid
  166. local Effect1 = Instance.new("Part")
  167. Effect1.Parent = Cha.Torso
  168. Effect1.CFrame = Cha.Torso.CFrame
  169. Effect1.BrickColor = BrickColor.new("New Yeller")
  170. Effect1.CanCollide = false
  171. Effect1.Material = "Neon"
  172. Effect1.Anchored = true
  173. local Mesh1 = Instance.new("SpecialMesh")
  174. Mesh1.MeshType = "FileMesh"
  175. Mesh1.MeshId = "rbxassetid://3096884346"
  176. Mesh1.Parent = Effect1
  177. local Effect2 = Instance.new("Part")
  178. Effect2.Parent = Cha.Torso
  179. Effect2.BrickColor = BrickColor.new("New Yeller")
  180. Effect2.CanCollide = false
  181. Effect2.Material = "Neon"
  182. Effect2.Anchored = true
  183. Effect2.CFrame = Cha.Torso.CFrame
  184. local Mesh2 = Instance.new("SpecialMesh")
  185. Mesh2.MeshType = "FileMesh"
  186. Mesh2.MeshId = "rbxassetid://3096900577"
  187. Mesh2.Parent = Effect2
  188. local headr = Instance.new("SpecialMesh")
  189. headr.MeshType = "FileMesh"
  190. headr.MeshId = "rbxassetid://3463707401"
  191. headr.Parent = Blackhead
  192. local Blackhead = Instance.new("Part")
  193. Blackhead.Parent = Cha.Head
  194. Blackhead.BrickColor = BrickColor.new("New Yeller")
  195. Blackhead.CanCollide = false
  196. local weldhead1 = Instance.new("Weld")
  197. weldhead1.Part0 = Cha.Head
  198. weldhead1.Part1 = Blackhead
  199. weldhead1.C1 = Cha.Head.CFrame
  200. weldhead1.Parent = Blackhead
  201.  
  202. game:GetService('RunService').Stepped:Connect(function()
  203. Effect1.CFrame = Effect2.CFrame*CFrame.fromEulerAnglesXYZ(0,0.1,0)
  204. Effect2.CFrame = Effect2.CFrame*CFrame.fromEulerAnglesXYZ(0.1,0.1,0.1)
  205.  
  206.  
  207. end)
  208.  
  209. wait(9)
  210. Effect2:Destroy()
  211. Effect1:Destroy()
  212. walkspeed.WalkSpeed = 16
  213. Gear1:Destroy()
  214. E:Destroy()
  215. Watch1:Destroy()
  216. Screen:Destroy()
  217. for i,e in pairs (Humanoid:GetPlayingAnimationTracks()) do
  218. e:Play()
  219. end
  220.  
  221. local SongDriver15 = Instance.new("Sound")
  222. SongDriver15.Parent = Cha.Torso
  223. SongDriver15.SoundId = "rbxassetid://3096751301"
  224. SongDriver15.Volume = 3
  225. SongDriver15:Play()
  226. Player = owner
  227. Mouse = Player:GetMouse()
  228. PlayerGui = Player.PlayerGui
  229. Cam = workspace.CurrentCamera
  230. Backpack = Player.Backpack
  231. Character = Player.Character
  232. Humanoid = Character.Humanoid
  233. RootPart = Character["HumanoidRootPart"]
  234. Torso = Character["Torso"]
  235. Head = Character["Head"]
  236. RightArm = Character["Right Arm"]
  237. LeftArm = Character["Left Arm"]
  238. RightLeg = Character["Right Leg"]
  239. LeftLeg = Character["Left Leg"]
  240. RootJoint = RootPart["RootJoint"]
  241. Neck = Torso["Neck"]
  242. RightShoulder = Torso["Right Shoulder"]
  243. LeftShoulder = Torso["Left Shoulder"]
  244. RightHip = Torso["Right Hip"]
  245. LeftHip = Torso["Left Hip"]
  246. local TIME = 0
  247. local sick = Instance.new("Sound",Torso)
  248.  
  249. IT = Instance.new
  250. CF = CFrame.new
  251. VT = Vector3.new
  252. RAD = math.rad
  253. C3 = Color3.new
  254. UD2 = UDim2.new
  255. BRICKC = BrickColor.new
  256. ANGLES = CFrame.Angles
  257. EULER = CFrame.fromEulerAnglesXYZ
  258. COS = math.cos
  259. ACOS = math.acos
  260. SIN = math.sin
  261. ASIN = math.asin
  262. ABS = math.abs
  263. MRANDOM = math.random
  264. FLOOR = math.floor
  265.  
  266. --//=================================\\
  267. --|| Value shit things
  268. --\\=================================//
  269.  
  270. Animation_Speed = 3
  271. local FORCERESET = false
  272. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  273. local SIZE = 1
  274. local Speed = 24
  275. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  276. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  277. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  278. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  279. local DAMAGEMULTIPLIER = 1
  280. local ANIM = "Idle"
  281. local ATTACK = false
  282. local EQUIPPED = false
  283. local HOLD = false
  284. local COMBO = 1
  285. local Rooted = false
  286. local SINE = 0
  287. local KEYHOLD = false
  288. local CHANGE = 2 / Animation_Speed
  289. local WALKINGANIM = false
  290. local VALUE1 = false
  291. local VALUE2 = false
  292. local ROBLOXIDLEANIMATION = IT("Animation")
  293. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  294. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  295. --ROBLOXIDLEANIMATION.Parent = Humanoid
  296. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  297. WEAPONGUI.Name = "BanishV3Gui"
  298. local Weapon = IT("Model")
  299. Weapon.Name = "Adds"
  300. local Effects = IT("Folder", Weapon)
  301. Effects.Name = "Effects"
  302. local ANIMATOR = Humanoid.Animator
  303. local ANIMATE = Character:FindFirstChild("Animate")
  304. local UNANCHOR = true
  305. local TOBANISH = {}
  306. Player_Size = 1
  307. local kan = Instance.new("Sound",Character)
  308. kan.Volume = 1.25
  309. kan.TimePosition = 0
  310. kan.PlaybackSpeed = 1
  311. kan.Pitch = 1
  312. kan.SoundId = "rbxassetid://614032233"
  313. kan.Name = "wrecked"
  314. kan.Looped = true
  315. kan:Play()
  316. local Mode = 1
  317. local currentThemePlaying = kan.SoundId
  318. local currentPitch = kan.Pitch
  319. local currentVol = kan.Volume
  320. --//=================================\\
  321. --\\=================================//
  322. for i,v in pairs(Character:children()) do
  323. if v:IsA("Accessory") then
  324. v:Destroy()
  325. end
  326. end
  327.  
  328. warn("CREATED BY AlmightyToast#6465")
  329. warn("aka KrYn0MoRe or ShrekBenson")
  330. warn("DOnt rEm0vE tH1s 0r uR gAy")
  331. --//=================================\\
  332. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  333. --\\=================================//
  334.  
  335. ArtificialHB = Instance.new("BindableEvent", script)
  336. ArtificialHB.Name = "ArtificialHB"
  337.  
  338. script:WaitForChild("ArtificialHB")
  339.  
  340. frame = Frame_Speed
  341. tf = 0
  342. allowframeloss = false
  343. tossremainder = false
  344. lastframe = tick()
  345. script.ArtificialHB:Fire()
  346.  
  347. game:GetService("RunService").Heartbeat:connect(function(s, p)
  348. tf = tf + s
  349. if tf >= frame then
  350. if allowframeloss then
  351. script.ArtificialHB:Fire()
  352. lastframe = tick()
  353. else
  354. for i = 1, math.floor(tf / frame) do
  355. script.ArtificialHB:Fire()
  356. end
  357. lastframe = tick()
  358. end
  359. if tossremainder then
  360. tf = 0
  361. else
  362. tf = tf - frame * math.floor(tf / frame)
  363. end
  364. end
  365. end)
  366.  
  367. --//=================================\\
  368. --\\=================================//
  369.  
  370. --//=================================\\
  371. --|| MOST FUNCTIONS
  372. --\\=================================//
  373.  
  374. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  375. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  376. end
  377.  
  378. function PositiveAngle(NUMBER)
  379. if NUMBER >= 0 then
  380. NUMBER = 0
  381. end
  382. return NUMBER
  383. end
  384.  
  385. function NegativeAngle(NUMBER)
  386. if NUMBER <= 0 then
  387. NUMBER = 0
  388. end
  389. return NUMBER
  390. end
  391.  
  392. function Swait(NUMBER)
  393. if NUMBER == 0 or NUMBER == nil then
  394. ArtificialHB.Event:wait()
  395. else
  396. for i = 1, NUMBER do
  397. ArtificialHB.Event:wait()
  398. end
  399. end
  400. end
  401.  
  402. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  403. local NEWMESH = IT(MESH)
  404. if MESH == "SpecialMesh" then
  405. NEWMESH.MeshType = MESHTYPE
  406. if MESHID ~= "nil" and MESHID ~= "" then
  407. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  408. end
  409. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  410. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  411. end
  412. end
  413. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  414. NEWMESH.Scale = SCALE
  415. NEWMESH.Parent = PARENT
  416. return NEWMESH
  417. end
  418.  
  419. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  420. local NEWPART = IT("Part")
  421. NEWPART.formFactor = FORMFACTOR
  422. NEWPART.Reflectance = REFLECTANCE
  423. NEWPART.Transparency = TRANSPARENCY
  424. NEWPART.CanCollide = false
  425. NEWPART.Locked = true
  426. NEWPART.Anchored = true
  427. if ANCHOR == false then
  428. NEWPART.Anchored = false
  429. end
  430. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  431. NEWPART.Name = NAME
  432. NEWPART.Size = SIZE
  433. NEWPART.Position = Torso.Position
  434. NEWPART.Material = MATERIAL
  435. NEWPART:BreakJoints()
  436. NEWPART.Parent = PARENT
  437. return NEWPART
  438. end
  439.  
  440. local function weldBetween(a, b)
  441. local weldd = IT("Weld")
  442. weldd.Part0 = a
  443. weldd.Part1 = b
  444. weldd.C0 = CF()
  445. weldd.C1 = b.CFrame:inverse() * a.CFrame
  446. weldd.Parent = a
  447. return weldd
  448. end
  449.  
  450.  
  451. function QuaternionFromCFrame(cf)
  452. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  453. local trace = m00 + m11 + m22
  454. if trace > 0 then
  455. local s = math.sqrt(1 + trace)
  456. local recip = 0.5 / s
  457. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  458. else
  459. local i = 0
  460. if m11 > m00 then
  461. i = 1
  462. end
  463. if m22 > (i == 0 and m00 or m11) then
  464. i = 2
  465. end
  466. if i == 0 then
  467. local s = math.sqrt(m00 - m11 - m22 + 1)
  468. local recip = 0.5 / s
  469. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  470. elseif i == 1 then
  471. local s = math.sqrt(m11 - m22 - m00 + 1)
  472. local recip = 0.5 / s
  473. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  474. elseif i == 2 then
  475. local s = math.sqrt(m22 - m00 - m11 + 1)
  476. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  477. end
  478. end
  479. end
  480.  
  481. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  482. local xs, ys, zs = x + x, y + y, z + z
  483. local wx, wy, wz = w * xs, w * ys, w * zs
  484. local xx = x * xs
  485. local xy = x * ys
  486. local xz = x * zs
  487. local yy = y * ys
  488. local yz = y * zs
  489. local zz = z * zs
  490. 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))
  491. end
  492.  
  493. function QuaternionSlerp(a, b, t)
  494. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  495. local startInterp, finishInterp;
  496. if cosTheta >= 0.0001 then
  497. if (1 - cosTheta) > 0.0001 then
  498. local theta = ACOS(cosTheta)
  499. local invSinTheta = 1 / SIN(theta)
  500. startInterp = SIN((1 - t) * theta) * invSinTheta
  501. finishInterp = SIN(t * theta) * invSinTheta
  502. else
  503. startInterp = 1 - t
  504. finishInterp = t
  505. end
  506. else
  507. if (1 + cosTheta) > 0.0001 then
  508. local theta = ACOS(-cosTheta)
  509. local invSinTheta = 1 / SIN(theta)
  510. startInterp = SIN((t - 1) * theta) * invSinTheta
  511. finishInterp = SIN(t * theta) * invSinTheta
  512. else
  513. startInterp = t - 1
  514. finishInterp = t
  515. end
  516. end
  517. 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
  518. end
  519.  
  520. function Clerp(a, b, t)
  521. local qa = {QuaternionFromCFrame(a)}
  522. local qb = {QuaternionFromCFrame(b)}
  523. local ax, ay, az = a.x, a.y, a.z
  524. local bx, by, bz = b.x, b.y, b.z
  525. local _t = 1 - t
  526. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  527. end
  528.  
  529. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  530. local frame = IT("Frame")
  531. frame.BackgroundTransparency = TRANSPARENCY
  532. frame.BorderSizePixel = BORDERSIZEPIXEL
  533. frame.Position = POSITION
  534. frame.Size = SIZE
  535. frame.BackgroundColor3 = COLOR
  536. frame.BorderColor3 = BORDERCOLOR
  537. frame.Name = NAME
  538. frame.Parent = PARENT
  539. return frame
  540. end
  541.  
  542. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  543. local label = IT("TextLabel")
  544. label.BackgroundTransparency = 1
  545. label.Size = UD2(1, 0, 1, 0)
  546. label.Position = UD2(0, 0, 0, 0)
  547. label.TextColor3 = TEXTCOLOR
  548. label.TextStrokeTransparency = STROKETRANSPARENCY
  549. label.TextTransparency = TRANSPARENCY
  550. label.FontSize = TEXTFONTSIZE
  551. label.Font = TEXTFONT
  552. label.BorderSizePixel = BORDERSIZEPIXEL
  553. label.TextScaled = false
  554. label.Text = TEXT
  555. label.Name = NAME
  556. label.Parent = PARENT
  557. return label
  558. end
  559.  
  560. function NoOutlines(PART)
  561. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  562. end
  563.  
  564. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  565. local NEWWELD = IT(TYPE)
  566. NEWWELD.Part0 = PART0
  567. NEWWELD.Part1 = PART1
  568. NEWWELD.C0 = C0
  569. NEWWELD.C1 = C1
  570. NEWWELD.Parent = PARENT
  571. return NEWWELD
  572. end
  573.  
  574. local S = IT("Sound")
  575. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  576. local NEWSOUND = nil
  577. coroutine.resume(coroutine.create(function()
  578. NEWSOUND = S:Clone()
  579. NEWSOUND.Parent = PARENT
  580. NEWSOUND.Volume = VOLUME
  581. NEWSOUND.Pitch = PITCH
  582. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  583. NEWSOUND:play()
  584. if DOESLOOP == true then
  585. NEWSOUND.Looped = true
  586. else
  587. repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
  588. NEWSOUND:remove()
  589. end
  590. end))
  591. return NEWSOUND
  592. end
  593.  
  594. function CFrameFromTopBack(at, top, back)
  595. local right = top:Cross(back)
  596. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  597. end
  598.  
  599. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  600. function WACKYEFFECT(Table)
  601. local TYPE = (Table.EffectType or "Sphere")
  602. local SIZE = (Table.Size or VT(1,1,1))
  603. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  604. local TRANSPARENCY = (Table.Transparency or 0)
  605. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  606. local CFRAME = (Table.CFrame or Torso.CFrame)
  607. local MOVEDIRECTION = (Table.MoveToPos or nil)
  608. local ROTATION1 = (Table.RotationX or 0)
  609. local ROTATION2 = (Table.RotationY or 0)
  610. local ROTATION3 = (Table.RotationZ or 0)
  611. local MATERIAL = (Table.Material or "Neon")
  612. local COLOR = (Table.Color or C3(1,1,1))
  613. local TIME = (Table.Time or 45)
  614. local SOUNDID = (Table.SoundID or nil)
  615. local SOUNDPITCH = (Table.SoundPitch or nil)
  616. local SOUNDVOLUME = (Table.SoundVolume or nil)
  617. coroutine.resume(coroutine.create(function()
  618. local PLAYSSOUND = false
  619. local SOUND = nil
  620. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  621. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  622. PLAYSSOUND = true
  623. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  624. end
  625. EFFECT.Color = COLOR
  626. local MSH = nil
  627. if TYPE == "Sphere" then
  628. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  629. elseif TYPE == "Block" then
  630. MSH = IT("BlockMesh",EFFECT)
  631. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  632. elseif TYPE == "Wave" then
  633. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  634. elseif TYPE == "Ring" then
  635. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  636. elseif TYPE == "Slash" then
  637. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  638. elseif TYPE == "Round Slash" then
  639. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  640. elseif TYPE == "Swirl" then
  641. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  642. elseif TYPE == "Skull" then
  643. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  644. elseif TYPE == "Crystal" then
  645. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  646. end
  647. if MSH ~= nil then
  648. local MOVESPEED = nil
  649. if MOVEDIRECTION ~= nil then
  650. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  651. end
  652. local GROWTH = SIZE - ENDSIZE
  653. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  654. if TYPE == "Block" then
  655. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  656. else
  657. EFFECT.CFrame = CFRAME
  658. end
  659. for LOOP = 1, TIME+1 do
  660. Swait()
  661. MSH.Scale = MSH.Scale - GROWTH/TIME
  662. if TYPE == "Wave" then
  663. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  664. end
  665. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  666. if TYPE == "Block" then
  667. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  668. else
  669. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  670. end
  671. if MOVEDIRECTION ~= nil then
  672. local ORI = EFFECT.Orientation
  673. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  674. EFFECT.Orientation = ORI
  675. end
  676. end
  677. if PLAYSSOUND == false then
  678. EFFECT:remove()
  679. else
  680. SOUND.Stopped:Connect(function()
  681. EFFECT:remove()
  682. end)
  683. end
  684. else
  685. if PLAYSSOUND == false then
  686. EFFECT:remove()
  687. else
  688. repeat Swait() until SOUND.Playing == false
  689. EFFECT:remove()
  690. end
  691. end
  692. end))
  693. end
  694.  
  695. function MakeForm(PART,TYPE)
  696. if TYPE == "Cyl" then
  697. local MSH = IT("CylinderMesh",PART)
  698. elseif TYPE == "Ball" then
  699. local MSH = IT("SpecialMesh",PART)
  700. MSH.MeshType = "Sphere"
  701. elseif TYPE == "Wedge" then
  702. local MSH = IT("SpecialMesh",PART)
  703. MSH.MeshType = "Wedge"
  704. end
  705. end
  706.  
  707. function SpawnTrail(FROM,TO,BIG)
  708. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "New Yeller", "Trail", VT(0,0,0))
  709. MakeForm(TRAIL,"Cyl")
  710. local DIST = (FROM - TO).Magnitude
  711. if BIG == true then
  712. TRAIL.Size = VT(0.5,DIST,0.5)
  713. else
  714. TRAIL.Size = VT(0.25,DIST,0.25)
  715. end
  716. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  717. coroutine.resume(coroutine.create(function()
  718. for i = 1, 5 do
  719. Swait()
  720. TRAIL.Transparency = TRAIL.Transparency + 0.1
  721. end
  722. TRAIL:remove()
  723. end))
  724. end
  725.  
  726. Debris = game:GetService("Debris")
  727.  
  728. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  729. local DIRECTION = CF(StartPos,EndPos).lookVector
  730. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  731. end
  732.  
  733. function turnto(position)
  734. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  735. end
  736. local asd = Instance.new("ParticleEmitter")
  737. asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0))
  738. asd.LightEmission = .1
  739. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  740. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
  741. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  742. asd.Transparency = bbb
  743. asd.Size = aaa
  744. asd.ZOffset = .9
  745. asd.Acceleration = Vector3.new(0, -15, 0)
  746. asd.LockedToPart = false
  747. asd.EmissionDirection = "Back"
  748. asd.Lifetime = NumberRange.new(1, 2)
  749. asd.Rotation = NumberRange.new(-100, 100)
  750. asd.RotSpeed = NumberRange.new(-100, 100)
  751. asd.Speed = NumberRange.new(10)
  752. asd.Enabled = false
  753. asd.VelocitySpread = 999
  754.  
  755. function getbloody(victim,amount)
  756. local PART = CreatePart(3, Effects, "Neon", 0, 1, "New Yeller", "Blood", victim.Size)
  757. PART.CFrame = victim.CFrame
  758. local HITPLAYERSOUNDS = {"356551938","264486467"}
  759. Debris:AddItem(PART,5)
  760. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  761. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  762. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  763. local prtcl = asd:Clone()
  764. prtcl.Parent = PART
  765. prtcl:Emit(amount*10)
  766. end
  767.  
  768. local Particle = IT("ParticleEmitter",nil)
  769. Particle.Enabled = false
  770. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)})
  771. Particle.LightEmission = 0.5
  772. Particle.Rate = 150
  773. Particle.ZOffset = 1
  774. Particle.Rotation = NumberRange.new(-180, 180)
  775. Particle.RotSpeed = NumberRange.new(-180, 180)
  776. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  777. Particle.Color = ColorSequence.new(C3(0,1,0),C3(0.4,0,0))
  778.  
  779. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  780. function ParticleEmitter(Table)
  781. local PRTCL = Particle:Clone()
  782. local Speed = Table.Speed or 5
  783. local Drag = Table.Drag or 0
  784. local Size1 = Table.Size1 or 1
  785. local Size2 = Table.Size2 or 5
  786. local Lifetime1 = Table.Lifetime1 or 1
  787. local Lifetime2 = Table.Lifetime2 or 1.5
  788. local Parent = Table.Parent or Torso
  789. local Emit = Table.Emit or 100
  790. local Offset = Table.Offset or 360
  791. local Acel = Table.Acel or VT(0,0,0)
  792. local Enabled = Table.Enabled or false
  793. PRTCL.Parent = Parent
  794. PRTCL.Size = NumberSequence.new(Size1,Size2)
  795. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  796. PRTCL.Speed = NumberRange.new(Speed)
  797. PRTCL.VelocitySpread = Offset
  798. PRTCL.Drag = Drag
  799. PRTCL.Acceleration = Acel
  800. if Enabled == false then
  801. PRTCL:Emit(Emit)
  802. Debris:AddItem(PRTCL,Lifetime2)
  803. else
  804. PRTCL.Enabled = true
  805. end
  806. return PRTCL
  807. end
  808.  
  809. function unanchor()
  810. if UNANCHOR == true then
  811. g = Character:GetChildren()
  812. for i = 1, #g do
  813. if g[i].ClassName == "Part" then
  814. g[i].Anchored = false
  815. end
  816. end
  817. end
  818. end
  819.  
  820. function newTheme(ID,timepos,pitch,vol)
  821. local kanz = kan
  822. --kanz:Stop()
  823. kanz.Volume = vol
  824. --kanz.TimePosition = timepos
  825. kanz.PlaybackSpeed = pitch
  826. kanz.Pitch = pitch
  827. kanz.SoundId = ID
  828. kanz.Name = "wrecked"
  829. kanz.Looped = true
  830. currentThemePlaying = kanz.SoundId
  831. currentVol = kanz.Volume
  832. currentPitch = kanz.Pitch
  833. --kanz:Play()
  834. --coroutine.resume(coroutine.create(function()
  835. --wait(0.05)
  836. --end))
  837. end
  838. newTheme("rbxassetid://1191722766",0,1,1)
  839.  
  840. --//=================================\\
  841. --|| Attacks
  842. --\\=================================//
  843. function switch()
  844. ATTACK = true
  845. Rooted = true
  846. CreateSound("363808674",workspace,8,1,false)
  847. for i=0, 1.5, 0.1 / Animation_Speed do
  848. Swait()
  849. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(18), RAD(0)), 1 / Animation_Speed)
  850. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-24)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  851. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  852. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  853. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  854. end
  855. CreateSound("363808674",workspace,8,1,false)
  856. for i=0, 1.5, 0.1 / Animation_Speed do
  857. Swait()
  858. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(-18), RAD(0)), 1 / Animation_Speed)
  859. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  860. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(24)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  861. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  862. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  863. end
  864. if Mode == 1 and Mode ~= 2 then
  865. Mode = 2
  866. Speed = 38
  867. Humanoid.WalkSpeed = Speed
  868. newTheme("rbxassetid://228255592",0,1,1)
  869. elseif Mode == 2 and Mode ~= 1 then
  870. Mode = 1
  871. Speed = 24
  872. Humanoid.WalkSpeed = Speed
  873. newTheme("rbxassetid://1191722766",0,1,1)
  874. end
  875. ATTACK = false
  876. Rooted = false
  877. end
  878.  
  879. function Spinning_Attack()
  880. ATTACK = true
  881. CreatePart("Block",LeftArm,"Plastic",0,1,BrickColor.new(0,0,0),"HitBox",Vector3.new(1,2,1),false)
  882. local HitBox = LeftArm.HitBox
  883. weldBetween(HitBox, LeftArm)
  884. Humanoid.WalkSpeed = 3.01
  885. for i = 0, 1.2, 0.1 do
  886. Swait()
  887. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(-65)), 0.3)
  888. Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1)
  889. RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(10)), 0.1)
  890. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-35), math.rad(0), math.rad(-10)), 0.3)
  891. RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(-25)), 0.3)
  892. LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-0), math.rad(-20)), 0.3)
  893. end
  894. for i = 0, 4.6, 0.1 do
  895. Swait()
  896. CreateSound("2304904662",workspace,3,1,false)
  897. HitBox.Touched:connect(function(hit)
  898. if hit.Parent and hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass('Humanoid') then
  899. hit.Parent:FindFirstChildOfClass('Humanoid').Health = 1 - 9999e+999
  900. end
  901. end)
  902. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(65 + 255.45 * i)), 0.3)
  903. Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1)
  904. RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(0), math.rad(47)), 0.1)
  905. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(-90), math.rad(-47)), 0.3)
  906. RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(95)), 0.3)
  907. LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-4.5), math.rad(0), math.rad(30)), 0.3)
  908. end
  909. ATTACK = false
  910. Humanoid.WalkSpeed = 8
  911. HitBox:Destroy()
  912. end
  913.  
  914. --//=================================\\
  915. --|| Key Functions
  916. --\\=================================//
  917. Mouse.KeyDown:connect(function(k)
  918. if(ATTACK)then return end
  919. if(k == 't')then
  920. switch()
  921. elseif(k == 'v')then
  922. Spinning_Attack()
  923. end
  924. end)
  925. --//=================================\\
  926. --|| Animations
  927. --\\=================================//
  928.  
  929. local CONNECT = nil
  930.  
  931. while true do
  932. Swait()
  933. ANIMATE.Parent = nil
  934. if Character:FindFirstChildOfClass("Humanoid") == nil then
  935. Humanoid = IT("Humanoid",Character)
  936. end
  937. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  938. v:Stop();
  939. end
  940. SINE = SINE + CHANGE
  941. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  942. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  943. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  944. local WALKSPEEDVALUE = 12 / (Humanoid.WalkSpeed / 12)
  945. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  946. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 2))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  947. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  948. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  949. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  950. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  951. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  952. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  953. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  954. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  955. end
  956. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  957. ANIM = "Jump"
  958. if ATTACK == false then
  959. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  960. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  961. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  962. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  963. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.3) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(-20)), 0.2 / Animation_Speed)
  964. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.3) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  965. end
  966. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  967. ANIM = "Fall"
  968. if ATTACK == false then
  969. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  970. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  971. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  972. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  973. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.2 / Animation_Speed)
  974. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(10)), 0.2 / Animation_Speed)
  975. end
  976. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  977. ANIM = "Idle"
  978. if ATTACK == false and Mode == 1 then
  979. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
  980. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  981. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5 + 0.2 * COS(SINE / 12), -0.1 + 0.2) * ANGLES(RAD(220), RAD(45), RAD(-75))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  982. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.2 * COS(SINE / 12), -0.1 + 0.2) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  983. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.1 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  984. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.1 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  985. end
  986. if Mode == 2 then
  987. ANIM = "Idle"
  988. RightHip.C0=Clerp(RightHip.C0,CF(1,-1 - 0.05 * math.cos(SINE / 32),0)*ANGLES(math.rad(0),math.rad(90),math.rad(0))*ANGLES(math.rad(-3),math.rad(0 - 1 * math.cos(SINE / 56)),math.rad(25 - 2 * math.cos(SINE / 32))),.1)
  989. LeftHip.C0=Clerp(LeftHip.C0,CF(-1,-1 - 0.05 * math.cos(SINE / 32),0)*ANGLES(math.rad(0),math.rad(-90),math.rad(0))*ANGLES(math.rad(-3),math.rad(0 - 1 * math.cos(SINE / 56)),math.rad(-25 + 2 * math.cos(SINE / 32))),.1)
  990. RootJoint.C0=Clerp(RootJoint.C0,ROOTC0*CF(0,-0.25 + 0.02 * math.cos(SINE / 32),-0.1 + 0.05 * math.cos(SINE / 32))*ANGLES(math.rad(25 - 2 * math.cos(SINE / 32)),math.rad(0),math.rad(0)),.1)
  991. Torso.Neck.C0=Clerp(Torso.Neck.C0,NECKC0*ANGLES(math.rad(25 + math.random(-1,1)),math.rad(math.random(-1,1)),math.rad(math.random(-1,1))),0.6)
  992. RightShoulder.C0=Clerp(RightShoulder.C0,CF(1.5,0.7 + 0.025 * math.cos(SINE / 45),-0.5)*ANGLES(math.rad(25 + 5 * math.cos(SINE / 74) + math.random(-1,1)),math.rad(1 - 3 * math.cos(SINE / 53)),math.rad(1 + 3 * math.cos(SINE / 45))),.1)
  993. LeftShoulder.C0=Clerp(LeftShoulder.C0,CF(-1.5,0.7 + 0.025 * math.cos(SINE / 45),-0.5)*ANGLES(math.rad(25 - 3 * math.cos(SINE / 73) + math.random(-1,1)),math.rad(2 - 1 * math.cos(SINE / 55)),math.rad(-3 - 3 * math.cos(SINE / 45))),.1)
  994. end
  995. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  996. ANIM = "Walk"
  997. if ATTACK == false then
  998. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  999. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1000. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed)
  1001. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  1002. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  1003. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  1004. end
  1005. end
  1006. unanchor()
  1007. Humanoid.MaxHealth = "inf"
  1008. Humanoid.Health = "inf"
  1009. if Rooted == false then
  1010. Disable_Jump = false
  1011. Humanoid.WalkSpeed = Speed
  1012. elseif Rooted == true then
  1013. Disable_Jump = true
  1014. Humanoid.WalkSpeed = 0
  1015. end
  1016. end
  1017.  
  1018. end
  1019.  
  1020.  
  1021. mouse.KeyDown:connect(function(key)
  1022. if key == "e" and henshine == false then
  1023. henshin()
  1024. henshine = true
  1025.  
  1026. end
  1027. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement