Advertisement
affady65

Untitled

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