Guest User

Untitled

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