Advertisement
lafur

SSSSS

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