Advertisement
Void_scripter0

t pose

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