Advertisement
Hermaxs

Hat Kid

Feb 26th, 2019
191
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.24 KB | None | 0 0
  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
  6.  
  7.  
  8. warn("if ur reading this ur gay")
  9. Player = game:GetService("Players").LocalPlayer
  10. Mouse = Player:GetMouse()
  11. PlayerGui = Player.PlayerGui
  12. Cam = workspace.CurrentCamera
  13. Backpack = Player.Backpack
  14. Character = Player.Character
  15. Humanoid = Character.Humanoid
  16. RootPart = Character["HumanoidRootPart"]
  17. Torso = Character["Torso"]
  18. Head = Character["Head"]
  19. RightArm = Character["Right Arm"]
  20. LeftArm = Character["Left Arm"]
  21. RightLeg = Character["Right Leg"]
  22. LeftLeg = Character["Left Leg"]
  23. RootJoint = RootPart["RootJoint"]
  24. Neck = Torso["Neck"]
  25. RightShoulder = Torso["Right Shoulder"]
  26. LeftShoulder = Torso["Left Shoulder"]
  27. RightHip = Torso["Right Hip"]
  28. LeftHip = Torso["Left Hip"]
  29. local TIME = 0
  30. local sick = Instance.new("Sound",Torso)
  31.  
  32. IT = Instance.new
  33. CF = CFrame.new
  34. VT = Vector3.new
  35. RAD = math.rad
  36. C3 = Color3.new
  37. UD2 = UDim2.new
  38. BRICKC = BrickColor.new
  39. ANGLES = CFrame.Angles
  40. EULER = CFrame.fromEulerAnglesXYZ
  41. COS = math.cos
  42. ACOS = math.acos
  43. SIN = math.sin
  44. ASIN = math.asin
  45. ABS = math.abs
  46. MRANDOM = math.random
  47. FLOOR = math.floor
  48.  
  49. --//=================================\\
  50. --|| Value shit things
  51. --\\=================================//
  52.  
  53. Animation_Speed = 3
  54. local FORCERESET = false
  55. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  56. local SIZE = 1
  57. local Speed = 24
  58. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  59. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  60. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  61. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  62. local DAMAGEMULTIPLIER = 1
  63. local ANIM = "Idle"
  64. local ATTACK = false
  65. local EQUIPPED = false
  66. local HOLD = false
  67. local COMBO = 1
  68. local Rooted = false
  69. local SINE = 0
  70. local KEYHOLD = false
  71. local CHANGE = 2 / Animation_Speed
  72. local WALKINGANIM = false
  73. local VALUE1 = false
  74. local VALUE2 = false
  75. local ROBLOXIDLEANIMATION = IT("Animation")
  76. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  77. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  78. --ROBLOXIDLEANIMATION.Parent = Humanoid
  79. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  80. WEAPONGUI.Name = "BanishV3Gui"
  81. local Weapon = IT("Model")
  82. Weapon.Name = "Adds"
  83. local Effects = IT("Folder", Weapon)
  84. Effects.Name = "Effects"
  85. local ANIMATOR = Humanoid.Animator
  86. local ANIMATE = Character:FindFirstChild("Animate")
  87. local UNANCHOR = true
  88. local TOBANISH = {}
  89. Player_Size = 1
  90. local kan = Instance.new("Sound",Character)
  91. kan.Volume = 1.25
  92. kan.TimePosition = 0
  93. kan.PlaybackSpeed = 1
  94. kan.Pitch = 1
  95. kan.SoundId = "rbxassetid://614032233"
  96. kan.Name = "wrecked"
  97. kan.Looped = true
  98. kan:Play()
  99. local Mode = 1
  100. local currentThemePlaying = kan.SoundId
  101. local currentPitch = kan.Pitch
  102. local currentVol = kan.Volume
  103. --//=================================\\
  104. --\\=================================//
  105. for i,v in pairs(Character:children()) do
  106. if v:IsA("Accessory") then
  107. v:Destroy()
  108. end
  109. end
  110.  
  111. warn("CREATED BY AlmightyToast#6465")
  112. warn("aka KrYn0MoRe or ShrekBenson")
  113. warn("DOnt rEm0vE tH1s 0r uR gAy")
  114. --//=================================\\
  115. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  116. --\\=================================//
  117.  
  118. ArtificialHB = Instance.new("BindableEvent", script)
  119. ArtificialHB.Name = "ArtificialHB"
  120.  
  121. script:WaitForChild("ArtificialHB")
  122.  
  123. frame = Frame_Speed
  124. tf = 0
  125. allowframeloss = false
  126. tossremainder = false
  127. lastframe = tick()
  128. script.ArtificialHB:Fire()
  129.  
  130. game:GetService("RunService").Heartbeat:connect(function(s, p)
  131. tf = tf + s
  132. if tf >= frame then
  133. if allowframeloss then
  134. script.ArtificialHB:Fire()
  135. lastframe = tick()
  136. else
  137. for i = 1, math.floor(tf / frame) do
  138. script.ArtificialHB:Fire()
  139. end
  140. lastframe = tick()
  141. end
  142. if tossremainder then
  143. tf = 0
  144. else
  145. tf = tf - frame * math.floor(tf / frame)
  146. end
  147. end
  148. end)
  149.  
  150. --//=================================\\
  151. --\\=================================//
  152.  
  153. --//=================================\\
  154. --|| MOST FUNCTIONS
  155. --\\=================================//
  156.  
  157. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  158. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  159. end
  160.  
  161. function PositiveAngle(NUMBER)
  162. if NUMBER >= 0 then
  163. NUMBER = 0
  164. end
  165. return NUMBER
  166. end
  167.  
  168. function NegativeAngle(NUMBER)
  169. if NUMBER <= 0 then
  170. NUMBER = 0
  171. end
  172. return NUMBER
  173. end
  174.  
  175. function Swait(NUMBER)
  176. if NUMBER == 0 or NUMBER == nil then
  177. ArtificialHB.Event:wait()
  178. else
  179. for i = 1, NUMBER do
  180. ArtificialHB.Event:wait()
  181. end
  182. end
  183. end
  184.  
  185. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  186. local NEWMESH = IT(MESH)
  187. if MESH == "SpecialMesh" then
  188. NEWMESH.MeshType = MESHTYPE
  189. if MESHID ~= "nil" and MESHID ~= "" then
  190. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  191. end
  192. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  193. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  194. end
  195. end
  196. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  197. NEWMESH.Scale = SCALE
  198. NEWMESH.Parent = PARENT
  199. return NEWMESH
  200. end
  201.  
  202. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  203. local NEWPART = IT("Part")
  204. NEWPART.formFactor = FORMFACTOR
  205. NEWPART.Reflectance = REFLECTANCE
  206. NEWPART.Transparency = TRANSPARENCY
  207. NEWPART.CanCollide = false
  208. NEWPART.Locked = true
  209. NEWPART.Anchored = true
  210. if ANCHOR == false then
  211. NEWPART.Anchored = false
  212. end
  213. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  214. NEWPART.Name = NAME
  215. NEWPART.Size = SIZE
  216. NEWPART.Position = Torso.Position
  217. NEWPART.Material = MATERIAL
  218. NEWPART:BreakJoints()
  219. NEWPART.Parent = PARENT
  220. return NEWPART
  221. end
  222.  
  223. local function weldBetween(a, b)
  224. local weldd = IT("Weld")
  225. weldd.Part0 = a
  226. weldd.Part1 = b
  227. weldd.C0 = CF()
  228. weldd.C1 = b.CFrame:inverse() * a.CFrame
  229. weldd.Parent = a
  230. return weldd
  231. end
  232.  
  233.  
  234. function QuaternionFromCFrame(cf)
  235. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  236. local trace = m00 + m11 + m22
  237. if trace > 0 then
  238. local s = math.sqrt(1 + trace)
  239. local recip = 0.5 / s
  240. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  241. else
  242. local i = 0
  243. if m11 > m00 then
  244. i = 1
  245. end
  246. if m22 > (i == 0 and m00 or m11) then
  247. i = 2
  248. end
  249. if i == 0 then
  250. local s = math.sqrt(m00 - m11 - m22 + 1)
  251. local recip = 0.5 / s
  252. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  253. elseif i == 1 then
  254. local s = math.sqrt(m11 - m22 - m00 + 1)
  255. local recip = 0.5 / s
  256. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  257. elseif i == 2 then
  258. local s = math.sqrt(m22 - m00 - m11 + 1)
  259. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  260. end
  261. end
  262. end
  263.  
  264. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  265. local xs, ys, zs = x + x, y + y, z + z
  266. local wx, wy, wz = w * xs, w * ys, w * zs
  267. local xx = x * xs
  268. local xy = x * ys
  269. local xz = x * zs
  270. local yy = y * ys
  271. local yz = y * zs
  272. local zz = z * zs
  273. 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))
  274. end
  275.  
  276. function QuaternionSlerp(a, b, t)
  277. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  278. local startInterp, finishInterp;
  279. if cosTheta >= 0.0001 then
  280. if (1 - cosTheta) > 0.0001 then
  281. local theta = ACOS(cosTheta)
  282. local invSinTheta = 1 / SIN(theta)
  283. startInterp = SIN((1 - t) * theta) * invSinTheta
  284. finishInterp = SIN(t * theta) * invSinTheta
  285. else
  286. startInterp = 1 - t
  287. finishInterp = t
  288. end
  289. else
  290. if (1 + cosTheta) > 0.0001 then
  291. local theta = ACOS(-cosTheta)
  292. local invSinTheta = 1 / SIN(theta)
  293. startInterp = SIN((t - 1) * theta) * invSinTheta
  294. finishInterp = SIN(t * theta) * invSinTheta
  295. else
  296. startInterp = t - 1
  297. finishInterp = t
  298. end
  299. end
  300. 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
  301. end
  302.  
  303. function Clerp(a, b, t)
  304. local qa = {QuaternionFromCFrame(a)}
  305. local qb = {QuaternionFromCFrame(b)}
  306. local ax, ay, az = a.x, a.y, a.z
  307. local bx, by, bz = b.x, b.y, b.z
  308. local _t = 1 - t
  309. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  310. end
  311.  
  312. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  313. local frame = IT("Frame")
  314. frame.BackgroundTransparency = TRANSPARENCY
  315. frame.BorderSizePixel = BORDERSIZEPIXEL
  316. frame.Position = POSITION
  317. frame.Size = SIZE
  318. frame.BackgroundColor3 = COLOR
  319. frame.BorderColor3 = BORDERCOLOR
  320. frame.Name = NAME
  321. frame.Parent = PARENT
  322. return frame
  323. end
  324.  
  325. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  326. local label = IT("TextLabel")
  327. label.BackgroundTransparency = 1
  328. label.Size = UD2(1, 0, 1, 0)
  329. label.Position = UD2(0, 0, 0, 0)
  330. label.TextColor3 = TEXTCOLOR
  331. label.TextStrokeTransparency = STROKETRANSPARENCY
  332. label.TextTransparency = TRANSPARENCY
  333. label.FontSize = TEXTFONTSIZE
  334. label.Font = TEXTFONT
  335. label.BorderSizePixel = BORDERSIZEPIXEL
  336. label.TextScaled = false
  337. label.Text = TEXT
  338. label.Name = NAME
  339. label.Parent = PARENT
  340. return label
  341. end
  342.  
  343. function NoOutlines(PART)
  344. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  345. end
  346.  
  347. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  348. local NEWWELD = IT(TYPE)
  349. NEWWELD.Part0 = PART0
  350. NEWWELD.Part1 = PART1
  351. NEWWELD.C0 = C0
  352. NEWWELD.C1 = C1
  353. NEWWELD.Parent = PARENT
  354. return NEWWELD
  355. end
  356.  
  357. local S = IT("Sound")
  358. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  359. local NEWSOUND = nil
  360. coroutine.resume(coroutine.create(function()
  361. NEWSOUND = S:Clone()
  362. NEWSOUND.Parent = PARENT
  363. NEWSOUND.Volume = VOLUME
  364. NEWSOUND.Pitch = PITCH
  365. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  366. NEWSOUND:play()
  367. if DOESLOOP == true then
  368. NEWSOUND.Looped = true
  369. else
  370. repeat wait(1) until NEWSOUND.Playing == false or NEWSOUND.Parent ~= PARENT
  371. NEWSOUND:remove()
  372. end
  373. end))
  374. return NEWSOUND
  375. end
  376.  
  377. function CFrameFromTopBack(at, top, back)
  378. local right = top:Cross(back)
  379. 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)
  380. end
  381.  
  382. --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})
  383. function WACKYEFFECT(Table)
  384. local TYPE = (Table.EffectType or "Sphere")
  385. local SIZE = (Table.Size or VT(1,1,1))
  386. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  387. local TRANSPARENCY = (Table.Transparency or 0)
  388. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  389. local CFRAME = (Table.CFrame or Torso.CFrame)
  390. local MOVEDIRECTION = (Table.MoveToPos or nil)
  391. local ROTATION1 = (Table.RotationX or 0)
  392. local ROTATION2 = (Table.RotationY or 0)
  393. local ROTATION3 = (Table.RotationZ or 0)
  394. local MATERIAL = (Table.Material or "Neon")
  395. local COLOR = (Table.Color or C3(1,1,1))
  396. local TIME = (Table.Time or 45)
  397. local SOUNDID = (Table.SoundID or nil)
  398. local SOUNDPITCH = (Table.SoundPitch or nil)
  399. local SOUNDVOLUME = (Table.SoundVolume or nil)
  400. coroutine.resume(coroutine.create(function()
  401. local PLAYSSOUND = false
  402. local SOUND = nil
  403. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  404. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  405. PLAYSSOUND = true
  406. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  407. end
  408. EFFECT.Color = COLOR
  409. local MSH = nil
  410. if TYPE == "Sphere" then
  411. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  412. elseif TYPE == "Block" then
  413. MSH = IT("BlockMesh",EFFECT)
  414. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  415. elseif TYPE == "Wave" then
  416. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  417. elseif TYPE == "Ring" then
  418. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  419. elseif TYPE == "Slash" then
  420. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  421. elseif TYPE == "Round Slash" then
  422. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  423. elseif TYPE == "Swirl" then
  424. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  425. elseif TYPE == "Skull" then
  426. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  427. elseif TYPE == "Crystal" then
  428. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  429. end
  430. if MSH ~= nil then
  431. local MOVESPEED = nil
  432. if MOVEDIRECTION ~= nil then
  433. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  434. end
  435. local GROWTH = SIZE - ENDSIZE
  436. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  437. if TYPE == "Block" then
  438. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  439. else
  440. EFFECT.CFrame = CFRAME
  441. end
  442. for LOOP = 1, TIME+1 do
  443. Swait()
  444. MSH.Scale = MSH.Scale - GROWTH/TIME
  445. if TYPE == "Wave" then
  446. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  447. end
  448. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  449. if TYPE == "Block" then
  450. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  451. else
  452. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  453. end
  454. if MOVEDIRECTION ~= nil then
  455. local ORI = EFFECT.Orientation
  456. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  457. EFFECT.Orientation = ORI
  458. end
  459. end
  460. if PLAYSSOUND == false then
  461. EFFECT:remove()
  462. else
  463. SOUND.Stopped:Connect(function()
  464. EFFECT:remove()
  465. end)
  466. end
  467. else
  468. if PLAYSSOUND == false then
  469. EFFECT:remove()
  470. else
  471. repeat Swait() until SOUND.Playing == false
  472. EFFECT:remove()
  473. end
  474. end
  475. end))
  476. end
  477.  
  478. function MakeForm(PART,TYPE)
  479. if TYPE == "Cyl" then
  480. local MSH = IT("CylinderMesh",PART)
  481. elseif TYPE == "Ball" then
  482. local MSH = IT("SpecialMesh",PART)
  483. MSH.MeshType = "Sphere"
  484. elseif TYPE == "Wedge" then
  485. local MSH = IT("SpecialMesh",PART)
  486. MSH.MeshType = "Wedge"
  487. end
  488. end
  489.  
  490. function SpawnTrail(FROM,TO,BIG)
  491. local TRAIL = CreatePart(3, Effects, "Neon", 0, 0.5, "New Yeller", "Trail", VT(0,0,0))
  492. MakeForm(TRAIL,"Cyl")
  493. local DIST = (FROM - TO).Magnitude
  494. if BIG == true then
  495. TRAIL.Size = VT(0.5,DIST,0.5)
  496. else
  497. TRAIL.Size = VT(0.25,DIST,0.25)
  498. end
  499. TRAIL.CFrame = CF(FROM, TO) * CF(0, 0, -DIST/2) * ANGLES(RAD(90),RAD(0),RAD(0))
  500. coroutine.resume(coroutine.create(function()
  501. for i = 1, 5 do
  502. Swait()
  503. TRAIL.Transparency = TRAIL.Transparency + 0.1
  504. end
  505. TRAIL:remove()
  506. end))
  507. end
  508.  
  509. Debris = game:GetService("Debris")
  510.  
  511. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  512. local DIRECTION = CF(StartPos,EndPos).lookVector
  513. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  514. end
  515.  
  516. function turnto(position)
  517. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  518. end
  519. local asd = Instance.new("ParticleEmitter")
  520. asd.Color = ColorSequence.new(Color3.new(0.5, 0, 0), Color3.new(.3, 0, 0))
  521. asd.LightEmission = .1
  522. asd.Texture = "http://www.roblox.com/asset/?ID=291880914"
  523. aaa = NumberSequence.new({NumberSequenceKeypoint.new(0, 0.6),NumberSequenceKeypoint.new(1, 2)})
  524. bbb = NumberSequence.new({NumberSequenceKeypoint.new(0, 1),NumberSequenceKeypoint.new(0.0636, 0), NumberSequenceKeypoint.new(1, 1)})
  525. asd.Transparency = bbb
  526. asd.Size = aaa
  527. asd.ZOffset = .9
  528. asd.Acceleration = Vector3.new(0, -15, 0)
  529. asd.LockedToPart = false
  530. asd.EmissionDirection = "Back"
  531. asd.Lifetime = NumberRange.new(1, 2)
  532. asd.Rotation = NumberRange.new(-100, 100)
  533. asd.RotSpeed = NumberRange.new(-100, 100)
  534. asd.Speed = NumberRange.new(10)
  535. asd.Enabled = false
  536. asd.VelocitySpread = 999
  537.  
  538. function getbloody(victim,amount)
  539. local PART = CreatePart(3, Effects, "Neon", 0, 1, "New Yeller", "Blood", victim.Size)
  540. PART.CFrame = victim.CFrame
  541. local HITPLAYERSOUNDS = {"356551938","264486467"}
  542. Debris:AddItem(PART,5)
  543. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  544. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  545. CreateSound(HITPLAYERSOUNDS[MRANDOM(1, #HITPLAYERSOUNDS)], PART, 1, (math.random(8,12)/10))
  546. local prtcl = asd:Clone()
  547. prtcl.Parent = PART
  548. prtcl:Emit(amount*10)
  549. end
  550.  
  551. local Particle = IT("ParticleEmitter",nil)
  552. Particle.Enabled = false
  553. Particle.Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,1),NumberSequenceKeypoint.new(0.3,0.95),NumberSequenceKeypoint.new(1,1)})
  554. Particle.LightEmission = 0.5
  555. Particle.Rate = 150
  556. Particle.ZOffset = 1
  557. Particle.Rotation = NumberRange.new(-180, 180)
  558. Particle.RotSpeed = NumberRange.new(-180, 180)
  559. Particle.Texture = "http://www.roblox.com/asset/?id=304437537"
  560. Particle.Color = ColorSequence.new(C3(0,1,0),C3(0.4,0,0))
  561.  
  562. --ParticleEmitter({Speed = 5, Drag = 0, Size1 = 1, Size2 = 5, Lifetime1 = 1, Lifetime2 = 1.5, Parent = Torso, Emit = 100, Offset = 360, Enabled = false})
  563. function ParticleEmitter(Table)
  564. local PRTCL = Particle:Clone()
  565. local Speed = Table.Speed or 5
  566. local Drag = Table.Drag or 0
  567. local Size1 = Table.Size1 or 1
  568. local Size2 = Table.Size2 or 5
  569. local Lifetime1 = Table.Lifetime1 or 1
  570. local Lifetime2 = Table.Lifetime2 or 1.5
  571. local Parent = Table.Parent or Torso
  572. local Emit = Table.Emit or 100
  573. local Offset = Table.Offset or 360
  574. local Acel = Table.Acel or VT(0,0,0)
  575. local Enabled = Table.Enabled or false
  576. PRTCL.Parent = Parent
  577. PRTCL.Size = NumberSequence.new(Size1,Size2)
  578. PRTCL.Lifetime = NumberRange.new(Lifetime1,Lifetime2)
  579. PRTCL.Speed = NumberRange.new(Speed)
  580. PRTCL.VelocitySpread = Offset
  581. PRTCL.Drag = Drag
  582. PRTCL.Acceleration = Acel
  583. if Enabled == false then
  584. PRTCL:Emit(Emit)
  585. Debris:AddItem(PRTCL,Lifetime2)
  586. else
  587. PRTCL.Enabled = true
  588. end
  589. return PRTCL
  590. end
  591.  
  592. function unanchor()
  593. if UNANCHOR == true then
  594. g = Character:GetChildren()
  595. for i = 1, #g do
  596. if g[i].ClassName == "Part" then
  597. g[i].Anchored = false
  598. end
  599. end
  600. end
  601. end
  602.  
  603. function newTheme(ID,timepos,pitch,vol)
  604. local kanz = kan
  605. --kanz:Stop()
  606. kanz.Volume = vol
  607. --kanz.TimePosition = timepos
  608. kanz.PlaybackSpeed = pitch
  609. kanz.Pitch = pitch
  610. kanz.SoundId = ID
  611. kanz.Name = "wrecked"
  612. kanz.Looped = true
  613. currentThemePlaying = kanz.SoundId
  614. currentVol = kanz.Volume
  615. currentPitch = kanz.Pitch
  616. --kanz:Play()
  617. --coroutine.resume(coroutine.create(function()
  618. --wait(0.05)
  619. --end))
  620. end
  621. newTheme("rbxassetid://1191722766",0,1,1)
  622.  
  623. --//=================================\\
  624. --|| Clothing,Meshes,etc
  625. --\\=================================//
  626. for i,v in pairs(Character:children()) do
  627. if v:IsA("Clothing") then
  628. v:Destroy()
  629. end
  630. end
  631.  
  632. local top = Instance.new("Shirt")
  633. top.ShirtTemplate = "rbxassetid://2370477670"
  634. top.Parent = Character
  635. top.Name = "Shirt"
  636.  
  637. local bottom = Instance.new("Pants")
  638. bottom.PantsTemplate = "rbxassetid://1134873684"
  639. bottom.Parent = Character
  640. bottom.Name = "Pants"
  641.  
  642. local PRT = CreatePart(3, Character, "Neon", 0, 0, "Royale purple", "Top Hat", VT(1,1,1),false)
  643. PRT.Color = C3(0.7,0,1)
  644. local TopHat = CreateWeldOrSnapOrMotor("Weld", Head, Head, PRT, CF(0,0.87,0), CF(0, 0, 0))
  645. CreateMesh("SpecialMesh", PRT, "FileMesh", "1033213385", "", VT(1,1,1)*1.05, VT(0,0,0))
  646. local PRT = CreatePart(3, Character, "Neon", 0, 0, "Royale purple", "Top Hat", VT(1,1,1),false)
  647. PRT.Color = C3(0.7,0,1)
  648.  
  649. local PRT = CreatePart(3, Character, "Neon", 0, 0, "Dirt brown", "Hair", VT(1,1,1),false)
  650. PRT.Color = C3(86,66,54)
  651. local Hair = CreateWeldOrSnapOrMotor("Weld", Head, Head, PRT, CF(0,0,0), ANGLES(0,3.5,0))
  652. CreateMesh("SpecialMesh", PRT, "FileMesh", "1702831244", "1702831287", VT(1,1,1)*1.05, VT(0,0,0))
  653. local PRT = CreatePart(3, Character, "Neon", 0, 0, "Dirt brown", "Hair", VT(1,1,1),false)
  654. PRT.Color = C3(0.86,0.66,0.54)
  655.  
  656. local PRT = CreatePart(3, Character, "Neon", 0, 0, "Dirt brown", "Umbrella", VT(1, 4.1, 0.532),false)
  657. PRT.Color = C3(86,66,54)
  658. local Umbrella = CreateWeldOrSnapOrMotor("Weld", LeftArm, LeftArm, PRT, CF(-1.3,-0.8,0), ANGLES(0,0,-1.5))
  659. CreateMesh("SpecialMesh", PRT, "FileMesh", "1304506613", "1304506638", VT(1,1,1)*1.05, VT(0,0,0))
  660. local PRT = CreatePart(3, Character, "Neon", 0, 0, "Dirt brown", "Umbrella", VT(1,1,1),false)
  661. PRT.Color = C3(0.86,0.66,0.54)
  662.  
  663. for i = 1, 10 do
  664. local FACE = CreatePart(3, Character, "Fabric", 0, 0+(i-1)/35.2, "Dark stone grey", "FAAEC", VT(1.01,0.5,1.01),false)
  665. FACE.Color = C3(0,0,0)
  666. Head:FindFirstChildOfClass("SpecialMesh"):Clone().Parent = FACE
  667. CreateWeldOrSnapOrMotor("Weld", Head, Head, FACE, CF(0,0.35-(i-1)/75,0), CF(0, 0, 0))
  668. end
  669. Head.face.Texture = "http://www.roblox.com/asset/?id=632698682"
  670. --//=================================\\
  671. --|| Attacks
  672. --\\=================================//
  673. function switch()
  674. ATTACK = true
  675. Rooted = true
  676. CreateSound("363808674",workspace,8,1,false)
  677. for i=0, 1.5, 0.1 / Animation_Speed do
  678. Swait()
  679. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(18), RAD(0)), 1 / Animation_Speed)
  680. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-24)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  681. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  682. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  683. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  684. end
  685. CreateSound("363808674",workspace,8,1,false)
  686. for i=0, 1.5, 0.1 / Animation_Speed do
  687. Swait()
  688. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(-18), RAD(0)), 1 / Animation_Speed)
  689. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(-12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  690. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(180), RAD(0), RAD(24)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  691. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  692. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  693. end
  694. if Mode == 1 and Mode ~= 2 then
  695. Mode = 2
  696. Speed = 38
  697. Humanoid.WalkSpeed = Speed
  698. newTheme("rbxassetid://228255592",0,1,1)
  699. elseif Mode == 2 and Mode ~= 1 then
  700. Mode = 1
  701. Speed = 24
  702. Humanoid.WalkSpeed = Speed
  703. newTheme("rbxassetid://1191722766",0,1,1)
  704. end
  705. ATTACK = false
  706. Rooted = false
  707. end
  708.  
  709. function Spinning_Attack()
  710. ATTACK = true
  711. CreatePart("Block",LeftArm,"Plastic",0,1,BrickColor.new(0,0,0),"HitBox",Vector3.new(1,2,1),false)
  712. local HitBox = LeftArm.HitBox
  713. weldBetween(HitBox, LeftArm)
  714. Humanoid.WalkSpeed = 3.01
  715. for i = 0, 1.2, 0.1 do
  716. Swait()
  717. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(-65)), 0.3)
  718. Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1)
  719. RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(10)), 0.1)
  720. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-35), math.rad(0), math.rad(-10)), 0.3)
  721. RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(-25)), 0.3)
  722. LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-0), math.rad(-20)), 0.3)
  723. end
  724. for i = 0, 4.6, 0.1 do
  725. Swait()
  726. CreateSound("2304904662",workspace,3,1,false)
  727. HitBox.Touched:connect(function(hit)
  728. if hit.Parent and hit.Parent ~= Character and hit.Parent:FindFirstChildOfClass('Humanoid') then
  729. hit.Parent:FindFirstChildOfClass('Humanoid').Health = 1 - 9999e+999
  730. end
  731. end)
  732. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CFrame.new(0, -0.5, 0) * ANGLES(math.rad(0), math.rad(0), math.rad(65 + 255.45 * i)), 0.3)
  733. Torso.Neck.C0 = Clerp(Torso.Neck.C0, NECKC0 * ANGLES(math.rad(10), math.rad(0), math.rad(0)), 0.1)
  734. RightShoulder.C0 = Clerp(RightShoulder.C0, CFrame.new(1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(0), math.rad(47)), 0.1)
  735. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CFrame.new(-1.5, 0.5, 0) * ANGLES(math.rad(-90), math.rad(-90), math.rad(-47)), 0.3)
  736. RightHip.C0 = Clerp(RightHip.C0, CFrame.new(1, -1, 0) * RIGHTSHOULDERC0 * ANGLES(math.rad(-2.5), math.rad(-25), math.rad(95)), 0.3)
  737. LeftHip.C0 = Clerp(LeftHip.C0, CFrame.new(-1, -1, 0) * LEFTSHOULDERC0 * ANGLES(math.rad(-4.5), math.rad(0), math.rad(30)), 0.3)
  738. end
  739. ATTACK = false
  740. Humanoid.WalkSpeed = 8
  741. HitBox:Destroy()
  742. end
  743.  
  744. --//=================================\\
  745. --|| Key Functions
  746. --\\=================================//
  747. Mouse.KeyDown:connect(function(k)
  748. if(ATTACK)then return end
  749. if(k == 't')then
  750. switch()
  751. elseif(k == 'v')then
  752. Spinning_Attack()
  753. end
  754. end)
  755. --//=================================\\
  756. --|| Animations
  757. --\\=================================//
  758.  
  759. local CONNECT = nil
  760.  
  761. while true do
  762. Swait()
  763. ANIMATE.Parent = nil
  764. if Character:FindFirstChildOfClass("Humanoid") == nil then
  765. Humanoid = IT("Humanoid",Character)
  766. end
  767. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  768. v:Stop();
  769. end
  770. SINE = SINE + CHANGE
  771. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  772. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  773. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  774. local WALKSPEEDVALUE = 12 / (Humanoid.WalkSpeed / 12)
  775. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  776. 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)
  777. 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)
  778. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ 0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  779. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.125 * COS(SINE / WALKSPEEDVALUE) +0.2+ -0.2 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(76 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  780. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  781. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  782. 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)
  783. 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)
  784. 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)
  785. end
  786. if TORSOVERTICALVELOCITY > 1 and HITFLOOR == nil then
  787. ANIM = "Jump"
  788. if ATTACK == false then
  789. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  790. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(-20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  791. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  792. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-40), RAD(0), RAD(-20)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  793. 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)
  794. 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)
  795. end
  796. elseif TORSOVERTICALVELOCITY < -1 and HITFLOOR == nil then
  797. ANIM = "Fall"
  798. if ATTACK == false then
  799. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  800. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  801. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(45), RAD(0), RAD(25))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  802. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(0), RAD(0), RAD(-60)) * LEFTSHOULDERC0, 0.2 / Animation_Speed)
  803. 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)
  804. 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)
  805. end
  806. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  807. ANIM = "Idle"
  808. if ATTACK == false and Mode == 1 then
  809. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.05 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(-45)), 0.15 / Animation_Speed)
  810. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(45)), 0.15 / Animation_Speed)
  811. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.35, 0.5 + 0.2 * COS(SINE / 12), -0.1 + 0.2) * ANGLES(RAD(220), RAD(45), RAD(-75))* RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  812. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.25, 0.5 + 0.2 * COS(SINE / 12), -0.1 + 0.2) * ANGLES(RAD(-45), RAD(0), RAD(45)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  813. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.1 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(75), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  814. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.1 * COS(SINE / 12), -0.01) * ANGLES(RAD(0), RAD(-50), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  815. end
  816. if Mode == 2 then
  817. ANIM = "Idle"
  818. RightHip.C0=Clerp(RightHip.C0,CF(1,-1 - 0.05 * math.cos(SINE / 32),0)*ANGLES(math.rad(0),math.rad(90),math.rad(0))*ANGLES(math.rad(-3),math.rad(0 - 1 * math.cos(SINE / 56)),math.rad(25 - 2 * math.cos(SINE / 32))),.1)
  819. LeftHip.C0=Clerp(LeftHip.C0,CF(-1,-1 - 0.05 * math.cos(SINE / 32),0)*ANGLES(math.rad(0),math.rad(-90),math.rad(0))*ANGLES(math.rad(-3),math.rad(0 - 1 * math.cos(SINE / 56)),math.rad(-25 + 2 * math.cos(SINE / 32))),.1)
  820. RootJoint.C0=Clerp(RootJoint.C0,ROOTC0*CF(0,-0.25 + 0.02 * math.cos(SINE / 32),-0.1 + 0.05 * math.cos(SINE / 32))*ANGLES(math.rad(25 - 2 * math.cos(SINE / 32)),math.rad(0),math.rad(0)),.1)
  821. Torso.Neck.C0=Clerp(Torso.Neck.C0,NECKC0*ANGLES(math.rad(25 + math.random(-1,1)),math.rad(math.random(-1,1)),math.rad(math.random(-1,1))),0.6)
  822. RightShoulder.C0=Clerp(RightShoulder.C0,CF(1.5,0.7 + 0.025 * math.cos(SINE / 45),-0.5)*ANGLES(math.rad(25 + 5 * math.cos(SINE / 74) + math.random(-1,1)),math.rad(1 - 3 * math.cos(SINE / 53)),math.rad(1 + 3 * math.cos(SINE / 45))),.1)
  823. LeftShoulder.C0=Clerp(LeftShoulder.C0,CF(-1.5,0.7 + 0.025 * math.cos(SINE / 45),-0.5)*ANGLES(math.rad(25 - 3 * math.cos(SINE / 73) + math.random(-1,1)),math.rad(2 - 1 * math.cos(SINE / 55)),math.rad(-3 - 3 * math.cos(SINE / 45))),.1)
  824. end
  825. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  826. ANIM = "Walk"
  827. if ATTACK == false then
  828. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  829. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5 - 8 * SIN(SINE / (WALKSPEEDVALUE / 2))), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  830. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * RIGHTSHOULDERC0, 0.35 / Animation_Speed)
  831. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * LEFTSHOULDERC0, 0.35 / Animation_Speed)
  832. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  833. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  834. end
  835. end
  836. unanchor()
  837. Humanoid.MaxHealth = "inf"
  838. Humanoid.Health = "inf"
  839. if Rooted == false then
  840. Disable_Jump = false
  841. Humanoid.WalkSpeed = Speed
  842. elseif Rooted == true then
  843. Disable_Jump = true
  844. Humanoid.WalkSpeed = 0
  845. end
  846. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement