Advertisement
pakin2549

Untitled

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