Advertisement
Guest User

Untitled

a guest
Jan 18th, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86. wait(0.2)
  87. plr = game.Players.LocalPlayer
  88. repeat wait() until plr.Character
  89. char = plr.Character
  90. local Player = owner
  91. local chara = Player.Character
  92. Player=game:GetService("Players").LocalPlayer
  93. Character=Player.Character
  94. PlayerGui=Player.PlayerGui
  95. Backpack=Player.Backpack
  96. Torso=Character.Torso
  97. Head=Character.Head
  98. Humanoid=Character.Humanoid
  99. m=Instance.new('Model',Character)
  100. LeftArm=Character["Left Arm"]
  101. LeftLeg=Character["Left Leg"]
  102. RightArm=Character["Right Arm"]
  103. RightLeg=Character["Right Leg"]
  104. LS=Torso["Left Shoulder"]
  105. LH=Torso["Left Hip"]
  106. RS=Torso["Right Shoulder"]
  107. RH=Torso["Right Hip"]
  108. Face = Head.face
  109. Neck=Torso.Neck
  110. it=Instance.new
  111. attacktype=1
  112. vt=Vector3.new
  113. cf=CFrame.new
  114. cl3=Color3.new
  115. rgb=Color3.fromRGB
  116. bcn=BrickColor.new
  117. euler=CFrame.fromEulerAnglesXYZ
  118. angles=CFrame.Angles
  119. Humanoid.WalkSpeed = 16
  120. Player = game:GetService("Players").LocalPlayer
  121. PlayerGui = Player.PlayerGui
  122. Cam = workspace.CurrentCamera
  123. Backpack = Player.Backpack
  124. Character = Player.Character
  125. Humanoid = Character.Humanoid
  126. Mouse = Player:GetMouse()
  127. RootPart = Character["HumanoidRootPart"]
  128. Torso = Character["Torso"]
  129. Head = Character["Head"]
  130. RightArm = Character["Right Arm"]
  131. LeftArm = Character["Left Arm"]
  132. RightLeg = Character["Right Leg"]
  133. LeftLeg = Character["Left Leg"]
  134. RootJoint = RootPart["RootJoint"]
  135. Neck = Torso["Neck"]
  136. RightShoulder = Torso["Right Shoulder"]
  137. LeftShoulder = Torso["Left Shoulder"]
  138. RightHip = Torso["Right Hip"]
  139. LeftHip = Torso["Left Hip"]
  140. pumpk = Instance.new("Sound")
  141. pumpk.Parent = game.Players.LocalPlayer.Character.Head
  142. pumpk.SoundId = "rbxassetid://1771675015"
  143. pumpk.Volume = 2
  144. pumpk.Looped = true
  145. pumpk:Play()
  146. game.Players.LocalPlayer.Character.Humanoid.MaxHealth = 99999999999999999
  147. game.Players.LocalPlayer.Character.Humanoid.Health = 99999999999999
  148.  
  149. IT = Instance.new
  150. CF = CFrame.new
  151. VT = Vector3.new
  152. RAD = math.rad
  153. C3 = Color3.new
  154. UD2 = UDim2.new
  155. BRICKC = BrickColor.new
  156. ANGLES = CFrame.Angles
  157. EULER = CFrame.fromEulerAnglesXYZ
  158. COS = math.cos
  159. ACOS = math.acos
  160. SIN = math.sin
  161. ASIN = math.asin
  162. ABS = math.abs
  163. MRANDOM = math.random
  164. FLOOR = math.floor
  165. Animation_Speed = 3
  166. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  167. local Speed = 12
  168. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  169. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  170. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  171. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  172. local DAMAGEMULTIPLIER = 1
  173. local ANIM = "Idle"
  174. local ATTACK = false
  175. local EQUIPPED = false
  176. local HOLD = false
  177. local COMBO = 1
  178. local Rooted = false
  179. local SINE = 0
  180. local KEYHOLD = false
  181. local CHANGE = 2 / Animation_Speed
  182. local WALKINGANIM = false
  183. local VALUE1 = false
  184. local VALUE2 = false
  185. local ROBLOXIDLEANIMATION = IT("Animation")
  186. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  187. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  188. --ROBLOXIDLEANIMATION.Parent = Humanoid
  189. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  190. WEAPONGUI.Name = "Weapon GUI"
  191. local Weapon = IT("Model")
  192. Weapon.Name = "Adds"
  193. local Effects = IT("Folder", Weapon)
  194. Effects.Name = "Effects"
  195. local ANIMATOR = Humanoid.Animator
  196. local ANIMATE = Character.Animate
  197. local UNANCHOR = true
  198. local PLAYANIMS = true
  199. ArtificialHB = Instance.new("BindableEvent", script)
  200. ArtificialHB.Name = "ArtificialHB"
  201.  
  202.  
  203. Player_Size = 1 --Size of the player.
  204. Animation_Speed = 3
  205. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  206.  
  207. local Speed = 16
  208. local Effects2 = {}
  209.  
  210.  
  211.  
  212. script:WaitForChild("ArtificialHB")
  213.  
  214. frame = Frame_Speed
  215. tf = 0
  216. allowframeloss = false
  217. tossremainder = false
  218. lastframe = tick()
  219. script.ArtificialHB:Fire()
  220.  
  221. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  222. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  223. end
  224.  
  225. function PositiveAngle(NUMBER)
  226. if NUMBER >= 0 then
  227. NUMBER = 0
  228. end
  229. return NUMBER
  230. end
  231.  
  232. function NegativeAngle(NUMBER)
  233. if NUMBER <= 0 then
  234. NUMBER = 0
  235. end
  236. return NUMBER
  237. end
  238.  
  239. function Swait(NUMBER)
  240. if NUMBER == 0 or NUMBER == nil then
  241. ArtificialHB.Event:wait()
  242. else
  243. for i = 1, NUMBER do
  244. ArtificialHB.Event:wait()
  245. end
  246. end
  247. end
  248.  
  249. function QuaternionFromCFrame(cf)
  250. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  251. local trace = m00 + m11 + m22
  252. if trace > 0 then
  253. local s = math.sqrt(1 + trace)
  254. local recip = 0.5 / s
  255. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  256. else
  257. local i = 0
  258. if m11 > m00 then
  259. i = 1
  260. end
  261. if m22 > (i == 0 and m00 or m11) then
  262. i = 2
  263. end
  264. if i == 0 then
  265. local s = math.sqrt(m00 - m11 - m22 + 1)
  266. local recip = 0.5 / s
  267. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  268. elseif i == 1 then
  269. local s = math.sqrt(m11 - m22 - m00 + 1)
  270. local recip = 0.5 / s
  271. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  272. elseif i == 2 then
  273. local s = math.sqrt(m22 - m00 - m11 + 1)
  274. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  275. end
  276. end
  277. end
  278.  
  279. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  280. local xs, ys, zs = x + x, y + y, z + z
  281. local wx, wy, wz = w * xs, w * ys, w * zs
  282. local xx = x * xs
  283. local xy = x * ys
  284. local xz = x * zs
  285. local yy = y * ys
  286. local yz = y * zs
  287. local zz = z * zs
  288. 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))
  289. end
  290.  
  291. function QuaternionSlerp(a, b, t)
  292. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  293. local startInterp, finishInterp;
  294. if cosTheta >= 0.0001 then
  295. if (1 - cosTheta) > 0.0001 then
  296. local theta = ACOS(cosTheta)
  297. local invSinTheta = 1 / SIN(theta)
  298. startInterp = SIN((1 - t) * theta) * invSinTheta
  299. finishInterp = SIN(t * theta) * invSinTheta
  300. else
  301. startInterp = 1 - t
  302. finishInterp = t
  303. end
  304. else
  305. if (1 + cosTheta) > 0.0001 then
  306. local theta = ACOS(-cosTheta)
  307. local invSinTheta = 1 / SIN(theta)
  308. startInterp = SIN((t - 1) * theta) * invSinTheta
  309. finishInterp = SIN(t * theta) * invSinTheta
  310. else
  311. startInterp = t - 1
  312. finishInterp = t
  313. end
  314. end
  315. 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
  316. end
  317.  
  318. function Clerp(a, b, t)
  319. local qa = {QuaternionFromCFrame(a)}
  320. local qb = {QuaternionFromCFrame(b)}
  321. local ax, ay, az = a.x, a.y, a.z
  322. local bx, by, bz = b.x, b.y, b.z
  323. local _t = 1 - t
  324. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  325. end
  326.  
  327. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  328. local frame = IT("Frame")
  329. frame.BackgroundTransparency = TRANSPARENCY
  330. frame.BorderSizePixel = BORDERSIZEPIXEL
  331. frame.Position = POSITION
  332. frame.Size = SIZE
  333. frame.BackgroundColor3 = COLOR
  334. frame.BorderColor3 = BORDERCOLOR
  335. frame.Name = NAME
  336. frame.Parent = PARENT
  337. return frame
  338. end
  339.  
  340. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  341. local label = IT("TextLabel")
  342. label.BackgroundTransparency = 1
  343. label.Size = UD2(1, 0, 1, 0)
  344. label.Position = UD2(0, 0, 0, 0)
  345. label.TextColor3 = TEXTCOLOR
  346. label.TextStrokeTransparency = STROKETRANSPARENCY
  347. label.TextTransparency = TRANSPARENCY
  348. label.FontSize = TEXTFONTSIZE
  349. label.Font = TEXTFONT
  350. label.BorderSizePixel = BORDERSIZEPIXEL
  351. label.TextScaled = false
  352. label.Text = TEXT
  353. label.Name = NAME
  354. label.Parent = PARENT
  355. return label
  356. end
  357.  
  358. function NoOutlines(PART)
  359. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  360. end
  361.  
  362.  
  363. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  364. local NEWWELD = IT(TYPE)
  365. NEWWELD.Part0 = PART0
  366. NEWWELD.Part1 = PART1
  367. NEWWELD.C0 = C0
  368. NEWWELD.C1 = C1
  369. NEWWELD.Parent = PARENT
  370. return NEWWELD
  371. end
  372.  
  373. local S = IT("Sound")
  374.  
  375. function CreateSound(ID, PARENT, VOLUME, PITCH)
  376. local NEWSOUND = nil
  377. coroutine.resume(coroutine.create(function()
  378. NEWSOUND = S:Clone()
  379. NEWSOUND.Parent = PARENT
  380. NEWSOUND.Volume = VOLUME
  381. NEWSOUND.Pitch = PITCH
  382. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  383. Swait()
  384. NEWSOUND:play()
  385. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  386. end))
  387. return NEWSOUND
  388. end
  389.  
  390. function CFrameFromTopBack(at, top, back)
  391. local right = top:Cross(back)
  392. 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)
  393. end
  394.  
  395. function CreateWave(SIZE,WAIT,CFRAME,DOESROT,ROT,COLOR,GROW)
  396. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  397. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  398. wave.CFrame = CFRAME
  399. coroutine.resume(coroutine.create(function(PART)
  400. for i = 1, WAIT do
  401. Swait()
  402. mesh.Scale = mesh.Scale + GROW
  403. mesh.Offset = VT(0,0,-(mesh.Scale.X/8))
  404. if DOESROT == true then
  405. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  406. end
  407. wave.Transparency = wave.Transparency + (0.5/WAIT)
  408. if wave.Transparency > 0.99 then
  409. wave:remove()
  410. end
  411. end
  412. end))
  413. end
  414.  
  415. function CreateRing(SIZE,DOESROT,ROT,WAIT,CFRAME,COLOR,GROW)
  416. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(0,0,0))
  417. local mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "559831844", "", SIZE, VT(0,0,0))
  418. wave.CFrame = CFRAME
  419. coroutine.resume(coroutine.create(function(PART)
  420. for i = 1, WAIT do
  421. Swait()
  422. mesh.Scale = mesh.Scale + GROW
  423. if DOESROT == true then
  424. wave.CFrame = wave.CFrame * CFrame.fromEulerAnglesXYZ(0,ROT,0)
  425. end
  426. wave.Transparency = wave.Transparency + (0.5/WAIT)
  427. if wave.Transparency > 0.99 then
  428. wave:remove()
  429. end
  430. end
  431. end))
  432. end
  433.  
  434. function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
  435. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  436. local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
  437. wave.CFrame = CFRAME
  438. coroutine.resume(coroutine.create(function(PART)
  439. for i = 1, WAIT do
  440. Swait()
  441. mesh.Scale = mesh.Scale + GROW
  442. wave.Transparency = wave.Transparency + (1/WAIT)
  443. if wave.Transparency > 0.99 then
  444. wave:remove()
  445. end
  446. end
  447. end))
  448. end
  449.  
  450. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  451. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  452. local mesh = nil
  453. if KIND == "Base" then
  454. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  455. elseif KIND == "Thin" then
  456. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  457. elseif KIND == "Round" then
  458. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  459. end
  460. wave.CFrame = CFRAME
  461. coroutine.resume(coroutine.create(function(PART)
  462. for i = 1, WAIT do
  463. Swait()
  464. mesh.Scale = mesh.Scale + GROW/10
  465. wave.Transparency = wave.Transparency + (0.5/WAIT)
  466. if wave.Transparency > 0.99 then
  467. wave:remove()
  468. end
  469. end
  470. end))
  471. end
  472.  
  473. function MakeForm(PART,TYPE)
  474. if TYPE == "Cyl" then
  475. local MSH = IT("CylinderMesh",PART)
  476. elseif TYPE == "Ball" then
  477. local MSH = IT("SpecialMesh",PART)
  478. MSH.MeshType = "Sphere"
  479. elseif TYPE == "Wedge" then
  480. local MSH = IT("SpecialMesh",PART)
  481. MSH.MeshType = "Wedge"
  482. end
  483. end
  484.  
  485.  
  486. function CheckTableForString(Table, String)
  487. for i, v in pairs(Table) do
  488. if string.find(string.lower(String), string.lower(v)) then
  489. return true
  490. end
  491. end
  492. return false
  493. end
  494.  
  495. function CheckIntangible(Hit)
  496. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  497. if Hit and Hit.Parent then
  498. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  499. return true
  500. end
  501. end
  502. return false
  503. end
  504.  
  505. Debris = game:GetService("Debris")
  506.  
  507. function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  508. local Direction = CFrame.new(StartPos, Vec).lookVector
  509. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  510. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  511. if RayHit and CheckIntangible(RayHit) then
  512. if DelayIfHit then
  513. wait()
  514. end
  515. RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  516. end
  517. return RayHit, RayPos, RayNormal
  518. end
  519.  
  520. function turnto(position)
  521. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  522. end
  523.  
  524.  
  525.  
  526. game:GetService("RunService").Heartbeat:connect(function(s, p)
  527. tf = tf + s
  528. if tf >= frame then
  529. if allowframeloss then
  530. script.ArtificialHB:Fire()
  531. lastframe = tick()
  532. else
  533. for i = 1, math.floor(tf / frame) do
  534. script.ArtificialHB:Fire()
  535. end
  536. lastframe = tick()
  537. end
  538. if tossremainder then
  539. tf = 0
  540. else
  541. tf = tf - frame * math.floor(tf / frame)
  542. end
  543. end
  544. end)
  545. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  546. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  547. end
  548.  
  549. function PositiveAngle(NUMBER)
  550. if NUMBER >= 0 then
  551. NUMBER = 0
  552. end
  553. return NUMBER
  554. end
  555.  
  556. function NegativeAngle(NUMBER)
  557. if NUMBER <= 0 then
  558. NUMBER = 0
  559. end
  560. return NUMBER
  561. end
  562.  
  563. function Swait(NUMBER)
  564. if NUMBER == 0 or NUMBER == nil then
  565. ArtificialHB.Event:wait()
  566. else
  567. for i = 1, NUMBER do
  568. ArtificialHB.Event:wait()
  569. end
  570. end
  571. end
  572.  
  573. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  574. local NEWMESH = IT(MESH)
  575. if MESH == "SpecialMesh" then
  576. NEWMESH.MeshType = MESHTYPE
  577. if MESHID ~= "nil" and MESHID ~= "" then
  578. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  579. end
  580. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  581. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  582. end
  583. end
  584. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  585. NEWMESH.Scale = SCALE
  586. NEWMESH.Parent = PARENT
  587. return NEWMESH
  588. end
  589.  
  590. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  591. local NEWPART = IT("Part")
  592. NEWPART.formFactor = FORMFACTOR
  593. NEWPART.Reflectance = REFLECTANCE
  594. NEWPART.Transparency = TRANSPARENCY
  595. NEWPART.CanCollide = false
  596. NEWPART.Locked = true
  597. NEWPART.Anchored = true
  598. if ANCHOR == false then
  599. NEWPART.Anchored = false
  600. end
  601. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  602. NEWPART.Name = NAME
  603. NEWPART.Size = SIZE
  604. NEWPART.Position = Torso.Position
  605. NEWPART.Material = MATERIAL
  606. NEWPART:BreakJoints()
  607. NEWPART.Parent = PARENT
  608. return NEWPART
  609. end
  610.  
  611. local function weldBetween(a, b)
  612. local weldd = Instance.new("ManualWeld")
  613. weldd.Part0 = a
  614. weldd.Part1 = b
  615. weldd.C0 = CFrame.new()
  616. weldd.C1 = b.CFrame:inverse() * a.CFrame
  617. weldd.Parent = a
  618. return weldd
  619. end
  620.  
  621.  
  622. function QuaternionFromCFrame(cf)
  623. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  624. local trace = m00 + m11 + m22
  625. if trace > 0 then
  626. local s = math.sqrt(1 + trace)
  627. local recip = 0.5 / s
  628. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  629. else
  630. local i = 0
  631. if m11 > m00 then
  632. i = 1
  633. end
  634. if m22 > (i == 0 and m00 or m11) then
  635. i = 2
  636. end
  637. if i == 0 then
  638. local s = math.sqrt(m00 - m11 - m22 + 1)
  639. local recip = 0.5 / s
  640. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  641. elseif i == 1 then
  642. local s = math.sqrt(m11 - m22 - m00 + 1)
  643. local recip = 0.5 / s
  644. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  645. elseif i == 2 then
  646. local s = math.sqrt(m22 - m00 - m11 + 1)
  647. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  648. end
  649. end
  650. end
  651.  
  652. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  653. local xs, ys, zs = x + x, y + y, z + z
  654. local wx, wy, wz = w * xs, w * ys, w * zs
  655. local xx = x * xs
  656. local xy = x * ys
  657. local xz = x * zs
  658. local yy = y * ys
  659. local yz = y * zs
  660. local zz = z * zs
  661. 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))
  662. end
  663.  
  664. function QuaternionSlerp(a, b, t)
  665. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  666. local startInterp, finishInterp;
  667. if cosTheta >= 0.0001 then
  668. if (1 - cosTheta) > 0.0001 then
  669. local theta = ACOS(cosTheta)
  670. local invSinTheta = 1 / SIN(theta)
  671. startInterp = SIN((1 - t) * theta) * invSinTheta
  672. finishInterp = SIN(t * theta) * invSinTheta
  673. else
  674. startInterp = 1 - t
  675. finishInterp = t
  676. end
  677. else
  678. if (1 + cosTheta) > 0.0001 then
  679. local theta = ACOS(-cosTheta)
  680. local invSinTheta = 1 / SIN(theta)
  681. startInterp = SIN((t - 1) * theta) * invSinTheta
  682. finishInterp = SIN(t * theta) * invSinTheta
  683. else
  684. startInterp = t - 1
  685. finishInterp = t
  686. end
  687. end
  688. 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
  689. end
  690.  
  691. function Clerp(a, b, t)
  692. local qa = {QuaternionFromCFrame(a)}
  693. local qb = {QuaternionFromCFrame(b)}
  694. local ax, ay, az = a.x, a.y, a.z
  695. local bx, by, bz = b.x, b.y, b.z
  696. local _t = 1 - t
  697. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  698. end
  699.  
  700. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  701. local frame = IT("Frame")
  702. frame.BackgroundTransparency = TRANSPARENCY
  703. frame.BorderSizePixel = BORDERSIZEPIXEL
  704. frame.Position = POSITION
  705. frame.Size = SIZE
  706. frame.BackgroundColor3 = COLOR
  707. frame.BorderColor3 = BORDERCOLOR
  708. frame.Name = NAME
  709. frame.Parent = PARENT
  710. return frame
  711. end
  712.  
  713. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  714. local label = IT("TextLabel")
  715. label.BackgroundTransparency = 1
  716. label.Size = UD2(1, 0, 1, 0)
  717. label.Position = UD2(0, 0, 0, 0)
  718. label.TextColor3 = TEXTCOLOR
  719. label.TextStrokeTransparency = STROKETRANSPARENCY
  720. label.TextTransparency = TRANSPARENCY
  721. label.FontSize = TEXTFONTSIZE
  722. label.Font = TEXTFONT
  723. label.BorderSizePixel = BORDERSIZEPIXEL
  724. label.TextScaled = false
  725. label.Text = TEXT
  726. label.Name = NAME
  727. label.Parent = PARENT
  728. return label
  729. end
  730.  
  731. function NoOutlines(PART)
  732. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  733. end
  734.  
  735. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  736. local NEWWELD = IT(TYPE)
  737. NEWWELD.Part0 = PART0
  738. NEWWELD.Part1 = PART1
  739. NEWWELD.C0 = C0
  740. NEWWELD.C1 = C1
  741. NEWWELD.Parent = PARENT
  742. return NEWWELD
  743. end
  744.  
  745. local S = IT("Sound")
  746. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  747. local NEWSOUND = nil
  748. coroutine.resume(coroutine.create(function()
  749. NEWSOUND = S:Clone()
  750. NEWSOUND.Parent = PARENT
  751. NEWSOUND.Volume = VOLUME
  752. NEWSOUND.Pitch = PITCH
  753. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  754. NEWSOUND:play()
  755. if DOESLOOP == true then
  756. NEWSOUND.Looped = true
  757. else
  758. repeat wait(1) until NEWSOUND.Playing == false
  759. NEWSOUND:remove()
  760. end
  761. end))
  762. return NEWSOUND
  763. end
  764.  
  765. function MakeForm(PART,TYPE)
  766. if TYPE == "Cyl" then
  767. local MSH = IT("CylinderMesh",PART)
  768. elseif TYPE == "Ball" then
  769. local MSH = IT("SpecialMesh",PART)
  770. MSH.MeshType = "Sphere"
  771. elseif TYPE == "Wedge" then
  772. local MSH = IT("SpecialMesh",PART)
  773. MSH.MeshType = "Wedge"
  774. end
  775. end
  776.  
  777. function CFrameFromTopBack(at, top, back)
  778. local right = top:Cross(back)
  779. 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)
  780. end
  781.  
  782. function PuddleOfBlood(Position,MaxDrop,Model,MaxSize)
  783. local HITFLOOR, HITPOS, NORMAL = Raycast(Position, (CF(Position, Position + VT(0, -1, 0))).lookVector, MaxDrop, Model)
  784. if HITFLOOR ~= nil then
  785. if HITFLOOR.Parent ~= Weapon and HITFLOOR.Parent ~= Character then
  786. if HITFLOOR.Name == "BloodPuddle" then
  787. local DIST = (Position - HITFLOOR.Position).Magnitude
  788. if (HITFLOOR.Size.Z <= 5 and HITFLOOR.Size.Z < MaxSize) or (HITFLOOR.Size.Z > 5 and HITFLOOR.Size.Z < MaxSize and DIST < HITFLOOR.Size.Z/3) then
  789. HITFLOOR.Size = HITFLOOR.Size + VT(0.1,0,0.1)
  790. end
  791. else
  792. if HITFLOOR.Anchored == true then
  793. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(2,0,2))
  794. BLOOD.CFrame = CF(HITPOS,HITPOS+NORMAL)*ANGLES(RAD(90),RAD(0),RAD(0))
  795. MakeForm(BLOOD,"Cyl")
  796. coroutine.resume(coroutine.create(function()
  797. Swait(75)
  798. while true do
  799. Swait()
  800. BLOOD.Size = BLOOD.Size - VT(0.02,0,0.02)
  801. if BLOOD.Size.Z < 0.051 then
  802. BLOOD:remove()
  803. break
  804. end
  805. end
  806. end))
  807. end
  808. end
  809. end
  810. end
  811. end
  812.  
  813. function SprayBlood(POSITION,DIRECTION,BloodSize)
  814. local BLOOD = CreatePart(3, Effects, "Glass", 0, 0, "Maroon", "BloodPuddle", VT(0.3,0.3,0.3),false)
  815. BLOOD.CFrame = CF(POSITION)
  816. MakeForm(BLOOD,"Ball")
  817. local bv = Instance.new("BodyVelocity",BLOOD)
  818. bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  819. bv.velocity = CF(POSITION,DIRECTION+VT(MRANDOM(-3,3)/30,MRANDOM(-3,3)/30,MRANDOM(-3,3)/30)).lookVector*75
  820. bv.Name = "MOVE"
  821. Debris:AddItem(bv,0.05)
  822. coroutine.resume(coroutine.create(function()
  823. local HASTOUCHEDGROUND = false
  824. local HIT = BLOOD.Touched:Connect(function(hit)
  825. if hit.Anchored == true then
  826. HASTOUCHEDGROUND = true
  827. PuddleOfBlood(BLOOD.Position+VT(0,1,0),2,BLOOD,BloodSize)
  828. end
  829. end)
  830. wait(5)
  831. if HASTOUCHEDGROUND == false then
  832. BLOOD:remove()
  833. end
  834. end))
  835. end
  836.  
  837. Debris = game:GetService("Debris")
  838.  
  839. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  840. local DIRECTION = CF(StartPos,EndPos).lookVector
  841. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  842. end
  843.  
  844. function turnto(position)
  845. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  846. end
  847.  
  848. function recurse(root,callback,i)
  849. i= i or 0
  850. for _,v in pairs(root:GetChildren()) do
  851. i = i + 1
  852. callback(i,v)
  853.  
  854. if #v:GetChildren() > 0 then
  855. i = recurse(v,callback,i)
  856. end
  857. end
  858.  
  859. return i
  860. end
  861.  
  862. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  863. attachmentName = attachmentName.."RigAttachment"
  864. local constraint = Instance.new(className.."Constraint")
  865. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  866. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  867. constraint.Name = "RagdollConstraint"..part1.Name
  868.  
  869. for _,propertyData in next,properties or {} do
  870. constraint[propertyData[1]] = propertyData[2]
  871. end
  872.  
  873. constraint.Parent = character
  874. end
  875.  
  876. function getAttachment0(character, attachmentName)
  877. for _,child in next,character:GetChildren() do
  878. local attachment = child:FindFirstChild(attachmentName)
  879. if attachment then
  880. return attachment
  881. end
  882. end
  883. end
  884.  
  885. function R15Ragdoll(character)
  886. recurse(character, function(_,v)
  887. if v:IsA("Attachment") then
  888. v.Axis = Vector3.new(0, 1, 0)
  889. v.SecondaryAxis = Vector3.new(0, 0, 1)
  890. v.Rotation = Vector3.new(0, 0, 0)
  891. end
  892. end)
  893. for _,child in next,character:GetChildren() do
  894. if child:IsA("Accoutrement") then
  895. for _,part in next,child:GetChildren() do
  896. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  897. local attachment1 = part:FindFirstChildOfClass("Attachment")
  898. local attachment0 = getAttachment0(character,attachment1.Name)
  899. if attachment0 and attachment1 then
  900. local constraint = Instance.new("HingeConstraint")
  901. constraint.Attachment0 = attachment0
  902. constraint.Attachment1 = attachment1
  903. constraint.LimitsEnabled = true
  904. constraint.UpperAngle = 0
  905. constraint.LowerAngle = 0
  906. constraint.Parent = character
  907. end
  908. elseif part.Name == "HumanoidRootPart" then
  909. part:remove()
  910. end
  911. end
  912. end
  913. end
  914.  
  915. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  916. {"LimitsEnabled",true};
  917. {"UpperAngle",5};
  918. })
  919. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  920. {"LimitsEnabled",true};
  921. {"UpperAngle",15};
  922. })
  923.  
  924. local handProperties = {
  925. {"LimitsEnabled", true};
  926. {"UpperAngle",0};
  927. {"LowerAngle",0};
  928. }
  929. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  930. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  931.  
  932. local shinProperties = {
  933. {"LimitsEnabled", true};
  934. {"UpperAngle", 0};
  935. {"LowerAngle", -75};
  936. }
  937. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  938. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  939.  
  940. local footProperties = {
  941. {"LimitsEnabled", true};
  942. {"UpperAngle", 15};
  943. {"LowerAngle", -45};
  944. }
  945. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  946. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  947.  
  948. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  949. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  950. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  951. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  952. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  953. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  954. end
  955.  
  956. function Ragdoll(Character2,CharTorso)
  957. Character2:BreakJoints()
  958. local hum = Character2:findFirstChild("Humanoid")
  959. hum:remove()
  960. local function Scan(ch)
  961. local e
  962. for e = 1,#ch do
  963. Scan(ch[e]:GetChildren())
  964. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  965. ch[e]:remove()
  966. end
  967. end
  968. end
  969. local NEWHUM = IT("Humanoid")
  970. NEWHUM.Name = "Corpse"
  971. NEWHUM.Health = 0
  972. NEWHUM.MaxHealth = 0
  973. NEWHUM.PlatformStand = true
  974. NEWHUM.Parent = Character2
  975. NEWHUM.DisplayDistanceType = "None"
  976.  
  977. local ch = Character2:GetChildren()
  978. local i
  979. for i = 1,#ch do
  980. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  981. ch[i]:remove()
  982. end
  983. end
  984.  
  985. local Torso2 = Character2.Torso
  986. local movevector = Vector3.new()
  987.  
  988. if Torso2 then
  989. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  990. local Head = Character2:FindFirstChild("Head")
  991. if Head then
  992. local Neck = Instance.new("Weld")
  993. Neck.Name = "Neck"
  994. Neck.Part0 = Torso2
  995. Neck.Part1 = Head
  996. Neck.C0 = CFrame.new(0, 1.5, 0)
  997. Neck.C1 = CFrame.new()
  998. Neck.Parent = Torso2
  999.  
  1000. end
  1001. local Limb = Character2:FindFirstChild("Right Arm")
  1002. if Limb then
  1003.  
  1004. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  1005. local Joint = Instance.new("Glue")
  1006. Joint.Name = "RightShoulder"
  1007. Joint.Part0 = Torso2
  1008. Joint.Part1 = Limb
  1009. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1010. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1011. Joint.Parent = Torso2
  1012.  
  1013. local B = Instance.new("Part")
  1014. B.TopSurface = 0
  1015. B.BottomSurface = 0
  1016. B.formFactor = "Symmetric"
  1017. B.Size = Vector3.new(1, 1, 1)
  1018. B.Transparency = 1
  1019. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1020. B.Parent = Character2
  1021. local W = Instance.new("Weld")
  1022. W.Part0 = Limb
  1023. W.Part1 = B
  1024. W.C0 = CFrame.new(0, -0.5, 0)
  1025. W.Parent = Limb
  1026.  
  1027. end
  1028. local Limb = Character2:FindFirstChild("Left Arm")
  1029. if Limb then
  1030.  
  1031. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  1032. local Joint = Instance.new("Glue")
  1033. Joint.Name = "LeftShoulder"
  1034. Joint.Part0 = Torso2
  1035. Joint.Part1 = Limb
  1036. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1037. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1038. Joint.Parent = Torso2
  1039.  
  1040. local B = Instance.new("Part")
  1041. B.TopSurface = 0
  1042. B.BottomSurface = 0
  1043. B.formFactor = "Symmetric"
  1044. B.Size = Vector3.new(1, 1, 1)
  1045. B.Transparency = 1
  1046. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1047. B.Parent = Character2
  1048. local W = Instance.new("Weld")
  1049. W.Part0 = Limb
  1050. W.Part1 = B
  1051. W.C0 = CFrame.new(0, -0.5, 0)
  1052. W.Parent = Limb
  1053.  
  1054. end
  1055. local Limb = Character2:FindFirstChild("Right Leg")
  1056. if Limb then
  1057.  
  1058. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  1059. local Joint = Instance.new("Glue")
  1060. Joint.Name = "RightHip"
  1061. Joint.Part0 = Torso2
  1062. Joint.Part1 = Limb
  1063. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1064. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1065. Joint.Parent = Torso2
  1066.  
  1067. local B = Instance.new("Part")
  1068. B.TopSurface = 0
  1069. B.BottomSurface = 0
  1070. B.formFactor = "Symmetric"
  1071. B.Size = Vector3.new(1, 1, 1)
  1072. B.Transparency = 1
  1073. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1074. B.Parent = Character2
  1075. local W = Instance.new("Weld")
  1076. W.Part0 = Limb
  1077. W.Part1 = B
  1078. W.C0 = CFrame.new(0, -0.5, 0)
  1079. W.Parent = Limb
  1080.  
  1081. end
  1082. local Limb = Character2:FindFirstChild("Left Leg")
  1083. if Limb then
  1084.  
  1085. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  1086. local Joint = Instance.new("Glue")
  1087. Joint.Name = "LeftHip"
  1088. Joint.Part0 = Torso2
  1089. Joint.Part1 = Limb
  1090. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1091. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1092. Joint.Parent = Torso2
  1093.  
  1094. local B = Instance.new("Part")
  1095. B.TopSurface = 0
  1096. B.BottomSurface = 0
  1097. B.formFactor = "Symmetric"
  1098. B.Size = Vector3.new(1, 1, 1)
  1099. B.Transparency = 1
  1100. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1101. B.Parent = Character2
  1102. local W = Instance.new("Weld")
  1103. W.Part0 = Limb
  1104. W.Part1 = B
  1105. W.C0 = CFrame.new(0, -0.5, 0)
  1106. W.Parent = Limb
  1107.  
  1108. end
  1109. --[
  1110. local Bar = Instance.new("Part")
  1111. Bar.TopSurface = 0
  1112. Bar.BottomSurface = 0
  1113. Bar.formFactor = "Symmetric"
  1114. Bar.Size = Vector3.new(1, 1, 1)
  1115. Bar.Transparency = 1
  1116. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  1117. Bar.Parent = Character2
  1118. local Weld = Instance.new("Weld")
  1119. Weld.Part0 = Torso2
  1120. Weld.Part1 = Bar
  1121. Weld.C0 = CFrame.new(0, 0.5, 0)
  1122. Weld.Parent = Torso2
  1123. --]]
  1124. end
  1125. Character2.Parent = workspace
  1126. Debris:AddItem(Character2,5)
  1127.  
  1128. return Character2,Torso2
  1129. end
  1130.  
  1131. local Gun = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Gun", VT(0, 0, 0),false)
  1132. local HandleMesh = CreateMesh("SpecialMesh", Gun, "FileMesh", "1757389224", "1757405356", VT(0.07,0.07,0.07), VT(0,0, 0))
  1133. local Weld = CreateWeldOrSnapOrMotor("Weld", Gun, LeftArm, Gun, CF(0.2, -1, 0.2) * ANGLES(RAD(330), RAD(0), RAD(20)), CF(0, 0, 0))
  1134.  
  1135. canworld = true
  1136.  
  1137. we = true
  1138.  
  1139. function time()
  1140. CreateSound("907330619", Head, 10, 1)
  1141. wait(1)
  1142. local function weld(lol)
  1143. local weld = Instance.new("Weld", plr.Character.Torso)
  1144. weld.Part0 = plr.Character.Torso
  1145. weld.Part1 = lol
  1146. weld.C0 = plr.Character.Torso.CFrame:inverse()
  1147. weld.C1 = lol.CFrame:inverse()
  1148. end
  1149. wait(1.4)
  1150.  
  1151. for i, v in pairs(game.Players:GetChildren()) do
  1152. t = v.Character:FindFirstChild("Torso")
  1153. if t then
  1154. t.Anchored = true
  1155. plr.Character:FindFirstChild("Torso").Anchored = false
  1156. end
  1157. RA = v.Character:FindFirstChild("Right Arm")
  1158. if RA then
  1159. RA.Anchored = true
  1160. plr.Character:FindFirstChild("Right Arm").Anchored = false
  1161. end
  1162. LA = v.Character:FindFirstChild("Left Arm")
  1163. if LA then
  1164. LA.Anchored = true
  1165. plr.Character:FindFirstChild("Left Arm").Anchored = false
  1166. end
  1167. RL = v.Character:FindFirstChild("Right Leg")
  1168. if RL then
  1169. RL.Anchored = true
  1170. plr.Character:FindFirstChild("Right Leg").Anchored = false
  1171. end
  1172. LL = v.Character:FindFirstChild("Left Leg")
  1173. if LL then
  1174. LL.Anchored = true
  1175. plr.Character:FindFirstChild("Left Leg").Anchored = false
  1176. end
  1177. end
  1178.  
  1179. game.Lighting.TimeOfDay="00:00:00"
  1180. game.Lighting.OutdoorAmbient=Color3.new(50,0,350)
  1181. wait(0.1)
  1182. game.Lighting.OutdoorAmbient=Color3.new(0,114,235)
  1183. wait(0.1)
  1184. game.Lighting.OutdoorAmbient=Color3.new(0,0,235)
  1185. wait(0.1)
  1186. game.Lighting.OutdoorAmbient=Color3.new(0,114,0)
  1187. wait(0.1)
  1188. game.Lighting.OutdoorAmbient=Color3.new(255, 255, 355)
  1189. wait(10)
  1190. for i, v in pairs(game.Players:GetChildren()) do
  1191. t = v.Character:FindFirstChild("Torso")
  1192. if t then
  1193. t.Anchored = false
  1194. end
  1195. RA = v.Character:FindFirstChild("Right Arm")
  1196. if RA then
  1197. RA.Anchored = false
  1198. end
  1199. LA = v.Character:FindFirstChild("Left Arm")
  1200. if LA then
  1201. LA.Anchored = false
  1202. end
  1203. RL = v.Character:FindFirstChild("Right Leg")
  1204. if RL then
  1205. RL.Anchored = false
  1206. end
  1207. LL = v.Character:FindFirstChild("Left Leg")
  1208. if LL then
  1209. LL.Anchored = false
  1210. end
  1211. end
  1212.  
  1213.  
  1214. game.Lighting.OutdoorAmbient=Color3.new(0,114,0)
  1215. wait(0.1)
  1216. game.Lighting.OutdoorAmbient=Color3.new(50,0,350)
  1217. wait(0.1)
  1218. game.Lighting.OutdoorAmbient=Color3.new(0,114,235)
  1219. wait(0.1)
  1220. game.Lighting.OutdoorAmbient=Color3.new(0,0,235)
  1221.  
  1222. game.Lighting.OutdoorAmbient=Color3.new(135/255, 135/255, 128/255)
  1223. game.Lighting.TimeOfDay="15:00:00"
  1224.  
  1225. end
  1226.  
  1227. function Space()
  1228. sky = Instance.new('Sky', game.Lighting)
  1229. sky.MoonTextureId = 'rbxasset://sky/moon.png'
  1230. sky.SkyboxBk = 'http://www.roblox.com/asset/?id=159248188'
  1231. sky.SkyboxDn = 'http://www.roblox.com/asset/?id=159248183'
  1232. sky.SkyboxFt = 'http://www.roblox.com/asset/?id=159248187'
  1233. sky.SkyboxLf = 'http://www.roblox.com/asset/?id=159248173'
  1234. sky.SkyboxRt = 'http://www.roblox.com/asset/?id=159248192'
  1235. sky.SkyboxUp = 'http://www.roblox.com/asset/?id=159248176'
  1236. sky.Name = 'Space'
  1237.  
  1238. for i,v in pairs(workspace:getChildren()) do
  1239. if v.ClassName == 'Part' and v.Name == 'Base' then
  1240. v.Transparency = 1
  1241. v.Size = Vector3.new(2048, 1, 2048)
  1242. end
  1243. end
  1244. workspace.Gravity = 10
  1245. end
  1246.  
  1247.  
  1248. function Space2()
  1249. sky = game.Lighting:findFirstChild('Space')
  1250. sky:Destroy()
  1251.  
  1252. for i,v in pairs(workspace:getChildren()) do
  1253. if v.ClassName == 'Part' and v.Name == 'Base' then
  1254. v.Transparency = 0
  1255. v.Size = Vector3.new(2048, 1, 2048)
  1256. end
  1257. end
  1258. workspace.Gravity = 196.5
  1259. end
  1260. function Mind()
  1261. ATTACK = true
  1262. Rooted = true
  1263. CreateSound("907332856", Head, 10, 1)
  1264. for i=0, 1, 0.1 / Animation_Speed do
  1265. Swait()
  1266. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-20), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1267. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1268. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(90), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1269. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1270. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1271. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1272. end
  1273. for i=0, 1, 0.1 / Animation_Speed do
  1274. Swait()
  1275. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(30), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1276. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1277. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1278. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1279. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1280. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1281. end
  1282. local Wind = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Wind", VT(0, 0, 0),false)
  1283. local HandleMesh = CreateMesh("SpecialMesh", Wind, "FileMesh", "495572467", "495572476", VT(1,1,1), VT(0,0, 0))
  1284. local Weld = CreateWeldOrSnapOrMotor("Weld", Wind, Torso, Wind, CF(0, 0, -15) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1285. for i=0, 1, 0.1 / Animation_Speed do
  1286. Swait()
  1287. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1288. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1289. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1290. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1291. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1292. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1293. end
  1294. Wind:remove()
  1295. local broken = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "broken", VT(0, 0, 0),false)
  1296. local HandleMesh = CreateMesh("SpecialMesh", broken, "FileMesh", "926826971", "926827014", VT(1,1,1), VT(0,0, 0))
  1297. local Weld = CreateWeldOrSnapOrMotor("Weld", broken, Torso, broken, CF(0, 0, -15) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1298. for i=0, 1, 0.1 / Animation_Speed do
  1299. Swait()
  1300. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1301. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1302. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1303. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1304. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1305. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1306. end
  1307. broken:remove()
  1308. ATTACK = false
  1309. Rooted = false
  1310. end
  1311.  
  1312. function power2()
  1313. we = true
  1314. ATTACK = true
  1315. Rooted = true
  1316. CreateSound("1843115950", Head, 10, 1)
  1317. for i=0, 1, 0.1 / Animation_Speed do
  1318. Swait()
  1319. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-20), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1320. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1321. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1322. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(40), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1323. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1324. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1325. end
  1326. for i=0, 1, 0.1 / Animation_Speed do
  1327. Swait()
  1328. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(30), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1329. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1330. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1331. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1332. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1333. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1334. end
  1335. local Wind = CreatePart(3, Character, "SmoothPlastic", 0, 0, "Really black", "Wind", VT(0, 0, 0),false)
  1336. local HandleMesh = CreateMesh("SpecialMesh", Wind, "FileMesh", "433838302", "1031083476", VT(3,3,3), VT(0,0, 0))
  1337. local Weld = CreateWeldOrSnapOrMotor("Weld", Wind, Torso, Wind, CF(0, 0, -5) * ANGLES(RAD(-90), RAD(0), RAD(0)), CF(0, 0, 0))
  1338. game.Players.LocalPlayer.Character["Wind"].Touched:connect(function(hit)
  1339. local humanoid = hit.Parent:findFirstChild("Humanoid")
  1340. if we == true then
  1341. humanoid:TakeDamage(50)
  1342. end
  1343. end)
  1344. for i=0, 1, 0.1 / Animation_Speed do
  1345. Swait()
  1346. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1347. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1348. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1349. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1350. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1351. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1352. end
  1353. for i=0, 1, 0.1 / Animation_Speed do
  1354. Swait()
  1355. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1356. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1357. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1358. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1359. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1360. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1361. end
  1362. we = false
  1363. Wind:remove()
  1364. ATTACK = false
  1365. Rooted = false
  1366. end
  1367.  
  1368. function all_together_now()
  1369. ATTACK = true
  1370. Rooted = true
  1371. CreateSound("907329532", Head, 10, 1)
  1372. for i=0, 1, 0.1 / Animation_Speed do
  1373. Swait()
  1374. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1375. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1376. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1377. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1378. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1379. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1380. end
  1381. for i=0, 1, 0.1 / Animation_Speed do
  1382. Swait()
  1383. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1384. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1385. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1386. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1387. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1388. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1389. end
  1390. for i=0, 1, 0.1 / Animation_Speed do
  1391. Swait()
  1392. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1393. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1394. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1395. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1396. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1397. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1398. end
  1399. for i=0, 1, 0.1 / Animation_Speed do
  1400. Swait()
  1401. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1402. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1403. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1404. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1405. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1406. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1407. end
  1408. CreateSound("217767125", Head, 10, 1)
  1409. for i,v in pairs(workspace:GetChildren()) do
  1410. if v.ClassName == "Model" then
  1411. local human = v:FindFirstChildOfClass("Humanoid")
  1412. if human and human.Parent.Name ~= chara.Name then
  1413. human.Parent:BreakJoints()
  1414. end
  1415. end
  1416. end
  1417.  
  1418. for i=0, 1, 0.1 / Animation_Speed do
  1419. Swait()
  1420. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1421. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1422. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1423. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1424. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1425. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1426. end
  1427. CreateSound("907333294", Head, 10, 1)
  1428. for i=0, 1, 0.1 / Animation_Speed do
  1429. Swait()
  1430. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(20), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1431. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1432. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1433. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1434. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1435. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1436. end
  1437. for i=0, 1, 0.1 / Animation_Speed do
  1438. Swait()
  1439. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(20), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1440. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1441. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1442. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1443. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1444. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1445. end
  1446. for i=0, 1, 0.1 / Animation_Speed do
  1447. Swait()
  1448. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(20), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1449. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1450. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1451. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(90), RAD(444), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1452. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1453. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(20), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1454. end
  1455. ATTACK = false
  1456. Rooted = false
  1457. end
  1458.  
  1459. function Taunt()
  1460. ATTACK = true
  1461. Rooted = true
  1462. CreateSound("907331038", Head, 10, 1)
  1463. for i=0, 1, 0.1 / Animation_Speed do
  1464. Swait()
  1465. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1466. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1467. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1468. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1469. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1470. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1471. end
  1472. for i=0, 1, 0.1 / Animation_Speed do
  1473. Swait()
  1474. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1475. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1476. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1477. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1478. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1479. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1480. end
  1481. for i=0, 1, 0.1 / Animation_Speed do
  1482. Swait()
  1483. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1484. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1485. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1486. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1487. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1488. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1489. end
  1490. for i=0, 1, 0.1 / Animation_Speed do
  1491. Swait()
  1492. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1493. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1494. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(180), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1495. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(180), RAD(0), RAD(30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1496. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1497. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1498. end
  1499. ATTACK = false
  1500. Rooted = false
  1501. end
  1502.  
  1503. function power()
  1504. we = true
  1505. ATTACK = true
  1506. Rooted = true
  1507. CreateSound("1843115950", Head, 10, 1)
  1508. for i=0, 1, 0.1 / Animation_Speed do
  1509. Swait()
  1510. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(-20), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1511. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(20)), 0.15 / Animation_Speed)
  1512. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, -1) * ANGLES(RAD(90), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1513. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 1) * ANGLES(RAD(40), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1514. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1515. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1516. end
  1517. game.Players.LocalPlayer.Character["Gun"].Touched:connect(function(hit)
  1518. local humanoid = hit.Parent:findFirstChild("Humanoid")
  1519. if we == true then
  1520. humanoid:TakeDamage(50)
  1521. end
  1522. end)
  1523. for i=0, 1, 0.1 / Animation_Speed do
  1524. Swait()
  1525. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(30), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1526. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1527. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-30), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1528. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -1) * ANGLES(RAD(40), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1529. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1530. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1531. end
  1532. we = false
  1533. ATTACK = false
  1534. Rooted = false
  1535. end
  1536.  
  1537. function MouseDown(Mouse)
  1538. end
  1539.  
  1540. function MouseUp(Mouse)
  1541. HOLD = false
  1542. end
  1543.  
  1544. function KeyDown(Key)
  1545. KEYHOLD = true
  1546. if Key == "f" and ATTACK == false then
  1547. Taunt()
  1548. end
  1549. if Key == "h" and ATTACK == false then
  1550. all_together_now()
  1551. end
  1552. if Key == "g" and ATTACK == false then
  1553. Mind()
  1554. end
  1555. if Key == "q" and ATTACK == false then
  1556. power()
  1557. end
  1558. if Key == "r" and ATTACK == false then
  1559. Space()
  1560. end
  1561. if Key == "p" and ATTACK == false then
  1562. time()
  1563. end
  1564. if Key == "t" and ATTACK == false then
  1565. Space2()
  1566. end
  1567. if Key == "e" and ATTACK == false then
  1568. power2()
  1569. end
  1570. end
  1571.  
  1572. function KeyUp(Key)
  1573. KEYHOLD = false
  1574. end
  1575.  
  1576. Mouse.Button1Down:connect(function(NEWKEY)
  1577. MouseDown(NEWKEY)
  1578. end)
  1579. Mouse.Button1Up:connect(function(NEWKEY)
  1580. MouseUp(NEWKEY)
  1581. end)
  1582. Mouse.KeyDown:connect(function(NEWKEY)
  1583. KeyDown(NEWKEY)
  1584. end)
  1585. Mouse.KeyUp:connect(function(NEWKEY)
  1586. KeyUp(NEWKEY)
  1587. end)
  1588.  
  1589. while true do
  1590. Swait()
  1591. script.Parent = WEAPONGUI
  1592. ANIMATE.Parent = nil
  1593. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1594. v:Stop();
  1595. end
  1596. SINE = SINE + CHANGE
  1597. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1598. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1599. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1600. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1601. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1602. 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)
  1603. 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)
  1604. 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.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1605. 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.3 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1606. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1607. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1608. 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)
  1609. 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)
  1610. 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)
  1611. end
  1612. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  1613. ANIM = "Jump"
  1614. if PLAYANIMS == true then
  1615. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1616. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1617. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(20)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1618. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1619. 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)
  1620. 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)
  1621. end
  1622. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  1623. ANIM = "Fall"
  1624. if PLAYANIMS == true then
  1625. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1626. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1627. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(100), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.2 / Animation_Speed)
  1628. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-100), RAD(0), RAD(0)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  1629. 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)
  1630. 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)
  1631. end
  1632. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1633. ANIM = "Idle"
  1634. if PLAYANIMS == true then
  1635. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1636. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1637. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1638. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-180), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1639. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1640. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1641. end
  1642. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1643. ANIM = "Walk"
  1644. if PLAYANIMS == true then
  1645. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1646. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1647. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-90 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(30)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1648. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-180), RAD(0), RAD(-30)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  1649. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0.2) * ANGLES(RAD(90 * COS(SINE / WALKSPEEDVALUE)), RAD(90), RAD(0)), 1)
  1650. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0.2) * ANGLES(RAD(-90 * COS(SINE / WALKSPEEDVALUE)), RAD(-90), RAD(0)), 1)
  1651. end
  1652. end
  1653. end
  1654. if Rooted == false then
  1655. Disable_Jump = false
  1656. Humanoid.WalkSpeed = Speed
  1657. elseif Rooted == true then
  1658. Disable_Jump = true
  1659. Humanoid.WalkSpeed = 0
  1660. end
  1661.  
  1662. Humanoid.Health = Humanoid.Health + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement