Advertisement
HenloMyDude

Spinel (Steven Universe)

Oct 12th, 2019
2,506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.83 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  3. local RealPlayer = Player
  4. 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
  5.  
  6. --Spinel by youngmacka123 and mangleplays2--
  7.  
  8. plr = owner
  9. mouse = plr:GetMouse()
  10. char = plr.Character
  11. tors = char.Torso
  12. hed = char.Head
  13. ra = char["Right Arm"]
  14. la = char["Left Arm"]
  15. rl = char["Right Leg"]
  16. ll = char["Left Leg"]
  17.  
  18. --Outfit--
  19.  
  20. print("outfit by mangleplays2. hair welded by youngmacka123.")
  21.  
  22. size1 = 0.0555
  23. size2 = 0.25
  24. color = "Carnation pink"
  25.  
  26. function hair()
  27. --Converted with ttyyuu12345's model to script plugin v4
  28. function sandbox(var,func)
  29. local env = getfenv(func)
  30. local newenv = setmetatable({},{
  31. __index = function(self,k)
  32. if k=="script" then
  33. return var
  34. else
  35. return env[k]
  36. end
  37. end,
  38. })
  39. setfenv(func,newenv)
  40. return func
  41. end
  42. cors = {}
  43. mas = Instance.new("Model",game:GetService("Lighting"))
  44. Hat0 = Instance.new("Hat")
  45. MeshPart1 = Instance.new("Part")
  46. MeshPart2 = Instance.new("Part")
  47. MeshPart3 = Instance.new("Part")
  48. Weld4 = Instance.new("Weld")
  49. Weld5 = Instance.new("Weld")
  50. Hat0.Parent = mas
  51. Hat0.AttachmentForward = Vector3.new(0.0221017301, 0.044932276, -0.998745561)
  52. Hat0.AttachmentPoint = CFrame.new(-0.0280543175, 0.443446904, -0.111091971, 0.999755204, -0.000994084869, -0.0221017301, 0, 0.998990059, -0.044932276, 0.0221240669, 0.0449212752, 0.998745561)
  53. Hat0.AttachmentPos = Vector3.new(-0.0280543175, 0.443446904, -0.111091971)
  54. Hat0.AttachmentRight = Vector3.new(0.999755204, 0, 0.0221240669)
  55. Hat0.AttachmentUp = Vector3.new(-0.000994084869, 0.998990059, 0.0449212752)
  56. MeshPart1.Name = "Handle"
  57. MeshPart1.Parent = Hat0
  58. MeshPart1.CFrame = CFrame.new(-34.7981873, 4.50509262, 8.90130901, 1, -5.97529906e-14, 7.14083979e-27, 5.97529906e-14, 1, -5.97529906e-14, -3.57041989e-27, 5.97529906e-14, 1)
  59. MeshPart1.Position = Vector3.new(-34.7981873, 4.50509262, 8.90130901)
  60. MeshPart1.Color = Color3.new(0.592157, 0.164706, 0.356863)
  61. MeshPart1.Transparency = 0.0010000000474975
  62. MeshPart1.Size = Vector3.new(1.74621749, 1.72233796, 1.72011757)
  63. MeshPart1.CanCollide = false
  64. local MeshTail = Instance.new("SpecialMesh",MeshPart1)
  65. MeshTail.MeshId = "rbxassetid://714334504"
  66. MeshTail.Scale = Vector3.new(size1 + 0.01, size1, size1)
  67. MeshPart2.Name = "s"
  68. MeshPart2.Parent = MeshPart1
  69. MeshPart2.CFrame = CFrame.new(-35.3162918, 5.62375164, 9.1913805, -0.952941179, 0.00646881526, 0.303086579, -0.2734254, -0.45012188, -0.850075841, 0.130926877, -0.892943859, 0.430708289)
  70. MeshPart2.Orientation = Vector3.new(58.2200012, 35.1300011, -148.720001)
  71. MeshPart2.Position = Vector3.new(-35.3162918, 5.62375164, 9.1913805)
  72. MeshPart2.Rotation = Vector3.new(63.1300011, 17.6399994, -179.610001)
  73. MeshPart2.Color = Color3.new(0.592157, 0.164706, 0.356863)
  74. MeshPart2.Size = Vector3.new(0.706119716, 1.5651921, 1.02956116)
  75. MeshPart2.Material = Enum.Material.SmoothPlastic
  76. local MeshTail = Instance.new("SpecialMesh",MeshPart2)
  77. MeshTail.MeshId = "rbxassetid://871952460"
  78. MeshTail.Scale = Vector3.new(size2, size2, size2)
  79. MeshPart3.Name = "s"
  80. MeshPart3.Parent = MeshPart1
  81. MeshPart3.CFrame = CFrame.new(-34.2833862, 5.61168861, 9.19104004, -0.965110838, -0.00764033245, -0.261730403, 0.237094387, -0.449693203, -0.861140132, -0.111118965, -0.893150508, 0.435815215)
  82. MeshPart3.Orientation = Vector3.new(59.4399986, -30.9899998, 152.199997)
  83. MeshPart3.Position = Vector3.new(-34.2833862, 5.61168861, 9.19104004)
  84. MeshPart3.Rotation = Vector3.new(63.1599998, -15.1700001, 179.550003)
  85. MeshPart3.Color = Color3.new(0.592157, 0.164706, 0.356863)
  86. MeshPart3.Size = Vector3.new(0.716119766, 1.58735824, 1.04414177)
  87. MeshPart3.Material = Enum.Material.SmoothPlastic
  88. local MeshTail = Instance.new("SpecialMesh",MeshPart3)
  89. MeshTail.MeshId = "rbxassetid://871952460"
  90. MeshTail.Scale = Vector3.new(size2, size2, size2)
  91. Weld4.Name = "BTWeld"
  92. Weld4.Parent = MeshPart3
  93. Weld4.C1 = CFrame.new(0.514801025, 1.10659599, 0.289731026, -0.965110838, -0.00764033245, -0.261730403, 0.237094387, -0.449693203, -0.861140132, -0.111118965, -0.893150508, 0.435815215)
  94. Weld4.Part0 = MeshPart3
  95. Weld4.Part1 = MeshPart1
  96. Weld4.part1 = MeshPart1
  97. Weld5.Name = "BTWeld"
  98. Weld5.Parent = MeshPart3
  99. Weld5.C1 = CFrame.new(-0.981044769, 0.0124158859, 0.323167801, 0.840317667, 0.0133009311, 0.541931152, -0.013741482, 0.99990046, -0.00323361158, -0.541920185, -0.00472967699, 0.84041667)
  100. Weld5.Part0 = MeshPart3
  101. Weld5.Part1 = MeshPart2
  102. Weld5.part1 = MeshPart2
  103. for i,v in pairs(mas:GetChildren()) do
  104. v.Parent = char
  105. pcall(function() v:MakeJoints() end)
  106. end
  107. mas:Destroy()
  108. for i,v in pairs(cors) do
  109. spawn(function()
  110. pcall(v)
  111. end)
  112. end
  113. end
  114.  
  115. for i,v in pairs(char:GetChildren()) do
  116. if v.ClassName == "Shirt" or v.ClassName == "Pants" or v.ClassName == "ShirtGraphic" then
  117. v:Destroy()
  118. end
  119. end
  120.  
  121. local shirt = Instance.new("Shirt",char)
  122. shirt.ShirtTemplate = "rbxassetid://3787215222"
  123. local pants = Instance.new("Pants",char)
  124. pants.PantsTemplate = "rbxassetid://3787218707"
  125.  
  126. Character = char
  127.  
  128. local LeftArm = Character["Left Arm"]
  129. local RightArm = Character["Right Arm"]
  130. local LeftLeg = Character["Left Leg"]
  131. local RightLeg = Character["Right Leg"]
  132. local Head = Character.Head
  133. local Torso = Character.Torso
  134.  
  135. bodycolor = char["Body Colors"]
  136. bodycolor.HeadColor = BrickColor.new(color)
  137. bodycolor.TorsoColor = BrickColor.new(color)
  138. bodycolor.RightArmColor=BrickColor.new(color)
  139. bodycolor.LeftArmColor=BrickColor.new(color)
  140. bodycolor.RightLegColor=BrickColor.new(color)
  141. bodycolor.LeftLegColor=BrickColor.new(color)
  142.  
  143. for i,v in pairs(char:GetChildren()) do
  144. if v.ClassName == "Hat" or v.ClassName == "Accessory" then
  145. v:Destroy()
  146. end
  147. end
  148.  
  149. hair()
  150.  
  151. ----------
  152.  
  153. --Song and sounds--
  154.  
  155. BTAUNT = Instance.new("Sound", char.Torso)
  156. BTAUNT.SoundId = "http://www.roblox.com/asset/?id=3816560007"
  157. BTAUNT.Volume = 10
  158. BTAUNT.Pitch = 1.1
  159. BTAUNT.Looped = true
  160. BTAUNT.TimePosition = 0.2
  161. BTAUNT:Play()
  162.  
  163. SLASH = Instance.new("Sound", char.Torso)
  164. SLASH.SoundId = "http://www.roblox.com/asset/?id=2490619022"
  165. SLASH.Volume = 10
  166. SLASH.Pitch = 0.9
  167. SLASH.Looped = false
  168. SLASH.TimePosition = 0.2
  169. SLASH:Play()
  170.  
  171. function weld(a, b, acf)
  172. local w = Instance.new("Weld", a)
  173. w.Part0 = a
  174. w.Part1 = b
  175. w.C0 = acf
  176. end
  177.  
  178. hed.face.Texture = "rbxassetid://4105579577"
  179.  
  180. -------------------
  181.  
  182. --Scythe--
  183.  
  184. ezweld = function(p, a, b, cf)
  185. local weld = Instance.new("Weld",p)
  186. weld.Part0 = a
  187. weld.Part1 = b
  188. weld.C0 = cf
  189. return weld
  190. end
  191.  
  192. Swait,swait = function(number)
  193. if number == 0 or number == nil then
  194. game:GetService("RunService").Heartbeat:Wait()
  195. else
  196. for i = 1,number do
  197. game:GetService("RunService").Heartbeat:Wait()
  198. end
  199. end
  200. end
  201.  
  202. NewSound = function(p, id, pit, vol, loop)
  203. local Sound = Instance.new("Sound",p)
  204. Sound.Pitch = pit
  205. Sound.Volume = vol
  206. Sound.SoundId = "rbxassetid://" ..id
  207. Sound.Looped = loop
  208. Sound:Play()
  209. return Sound
  210. end
  211.  
  212. function AddMesh(Part, MeshId, TextureId, Scale, Offset)
  213. local Mesh = Instance.new("SpecialMesh",Part);
  214. Mesh.MeshId = MeshId;
  215. Mesh.TextureId = TextureId;
  216. Mesh.Scale = Scale;
  217. Mesh.Offset = Offset;
  218. return Mesh;
  219. end
  220.  
  221. weapons = Instance.new("Model",char)
  222. dasize = 0.5
  223.  
  224. local dascythe = Instance.new("Part",weapons) --not blobby
  225. dascythe.CanCollide = false
  226. dascythe.Size = Vector3.new(0.1, 0.1, 0.1)
  227. local damesh = AddMesh(dascythe, "rbxassetid://95891318", "rbxassetid://4105628732", Vector3.new(dasize, dasize, dasize), Vector3.new(0, 0, 0))
  228. local daweld = ezweld(weapons,dascythe,ra,CFrame.new(1.5, -2.5, 0) * CFrame.Angles(77, 0, -77))
  229. daweld.Name = "ScytheWeld"
  230.  
  231. ----------
  232.  
  233. --Heartbeat--
  234.  
  235. ArtificialHB = Instance.new("BindableEvent", script)
  236. ArtificialHB.Name = "ArtificialHB"
  237.  
  238. script:WaitForChild("ArtificialHB")
  239.  
  240. frame = 1 / 60
  241. tf = 0
  242. allowframeloss = false
  243. tossremainder = false
  244. lastframe = tick()
  245. script.ArtificialHB:Fire()
  246.  
  247. game:GetService("RunService").Heartbeat:connect(function(s, p)
  248. tf = tf + s
  249. if tf >= frame then
  250. if allowframeloss then
  251. script.ArtificialHB:Fire()
  252. lastframe = tick()
  253. else
  254. for i = 1, math.floor(tf / frame) do
  255. script.ArtificialHB:Fire()
  256. end
  257. lastframe = tick()
  258. end
  259. if tossremainder then
  260. tf = 0
  261. else
  262. tf = tf - frame * math.floor(tf / frame)
  263. end
  264. end
  265. end)
  266.  
  267. -------------
  268.  
  269.  
  270. --Some functions--
  271.  
  272. IT = Instance.new
  273. CF = CFrame.new
  274. VT = Vector3.new
  275. RAD = math.rad
  276. C3 = Color3.new
  277. UD2 = UDim2.new
  278. BRICKC = BrickColor.new
  279. ANGLES = CFrame.Angles
  280. EULER = CFrame.fromEulerAnglesXYZ
  281. COS = math.cos
  282. ACOS = math.acos
  283. SIN = math.sin
  284. ASIN = math.asin
  285. ABS = math.abs
  286. MRANDOM = math.random
  287. FLOOR = math.floor
  288.  
  289. function Swait(NUMBER)
  290. if NUMBER == 0 or NUMBER == nil then
  291. ArtificialHB.Event:wait()
  292. else
  293. for i = 1, NUMBER do
  294. ArtificialHB.Event:wait()
  295. end
  296. end
  297. end
  298.  
  299. function QuaternionFromCFrame(cf)
  300. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  301. local trace = m00 + m11 + m22
  302. if trace > 0 then
  303. local s = math.sqrt(1 + trace)
  304. local recip = 0.5 / s
  305. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  306. else
  307. local i = 0
  308. if m11 > m00 then
  309. i = 1
  310. end
  311. if m22 > (i == 0 and m00 or m11) then
  312. i = 2
  313. end
  314. if i == 0 then
  315. local s = math.sqrt(m00 - m11 - m22 + 1)
  316. local recip = 0.5 / s
  317. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  318. elseif i == 1 then
  319. local s = math.sqrt(m11 - m22 - m00 + 1)
  320. local recip = 0.5 / s
  321. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  322. elseif i == 2 then
  323. local s = math.sqrt(m22 - m00 - m11 + 1)
  324. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  325. end
  326. end
  327. end
  328.  
  329. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  330. local xs, ys, zs = x + x, y + y, z + z
  331. local wx, wy, wz = w * xs, w * ys, w * zs
  332. local xx = x * xs
  333. local xy = x * ys
  334. local xz = x * zs
  335. local yy = y * ys
  336. local yz = y * zs
  337. local zz = z * zs
  338. 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))
  339. end
  340.  
  341. function QuaternionSlerp(a, b, t)
  342. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  343. local startInterp, finishInterp;
  344. if cosTheta >= 0.0001 then
  345. if (1 - cosTheta) > 0.0001 then
  346. local theta = ACOS(cosTheta)
  347. local invSinTheta = 1 / SIN(theta)
  348. startInterp = SIN((1 - t) * theta) * invSinTheta
  349. finishInterp = SIN(t * theta) * invSinTheta
  350. else
  351. startInterp = 1 - t
  352. finishInterp = t
  353. end
  354. else
  355. if (1 + cosTheta) > 0.0001 then
  356. local theta = ACOS(-cosTheta)
  357. local invSinTheta = 1 / SIN(theta)
  358. startInterp = SIN((t - 1) * theta) * invSinTheta
  359. finishInterp = SIN(t * theta) * invSinTheta
  360. else
  361. startInterp = t - 1
  362. finishInterp = t
  363. end
  364. end
  365. 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
  366. end
  367.  
  368. function Clerp(a, b, t)
  369. local qa = {QuaternionFromCFrame(a)}
  370. local qb = {QuaternionFromCFrame(b)}
  371. local ax, ay, az = a.x, a.y, a.z
  372. local bx, by, bz = b.x, b.y, b.z
  373. local _t = 1 - t
  374. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  375. end
  376.  
  377. ------------------
  378.  
  379. --Motors--
  380.  
  381. local RS = char.Torso["Right Shoulder"]
  382. local LS = char.Torso["Left Shoulder"]
  383. local RH = char.Torso["Right Hip"]
  384. local LH = char.Torso["Left Hip"]
  385. local neck = char.Torso["Neck"]
  386. local rootj = char.HumanoidRootPart.RootJoint
  387. local sine = 0
  388. local RSnor = RS.C0
  389. local LSnor = LS.C0
  390. local RHnor = RH.C0
  391. local LHnor = LH.C0
  392. local rootjnor = rootj.C0
  393. local necknor = neck.C0
  394. local RootPart = rootj.Parent
  395.  
  396. ----------
  397.  
  398. --Useful Values--
  399.  
  400. hum = char.Humanoid
  401. Frame_Speed = 1 / 60
  402. Animation_Speed = 3
  403. Speed = 16
  404. Pose = "Idle"
  405. Cos = math.cos
  406. sine = 0
  407. State = hum:GetState()
  408. anim = hum.Animator
  409. Debris = game:GetService("Debris")
  410. Attack = false
  411. Rad = math.rad
  412. Fallen = false
  413. AntiNil = true
  414. Hold = false
  415. MoveLegs = true
  416.  
  417. -----------------
  418.  
  419. --Attacks--
  420.  
  421. function Eviscerate(Model)
  422. for _,v in pairs (Model:children()) do
  423. if v:IsA("Part") or v:IsA("MeshPart") then
  424. v.Size = v.Size - Vector3.new(0, 0.25, 0)
  425. v:BreakJoints()
  426. local Velocity = Instance.new("BodyVelocity",v)
  427. Velocity.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
  428. Velocity.Velocity = Vector3.new(math.random(-60, 60),math.random(-60, 60),math.random(-60, 60))
  429. end
  430. end
  431. end
  432.  
  433. function DeathEffect(Model)
  434. if Model:FindFirstChild("Torso") then
  435. print("Player is R6")
  436. local MTorso = Model:FindFirstChild("Torso")
  437. MTorso.Size = MTorso.Size - Vector3.new(0, 0.25, 0)
  438. MTorso:BreakJoints()
  439. Model:MakeJoints()
  440. Eviscerate(Model)
  441. end
  442. if Model:FindFirstChild("UpperTorso") then
  443. print("Player is R15")
  444. local MTorso = Model:FindFirstChild("UpperTorso")
  445. MTorso.Size = MTorso.Size - Vector3.new(0, 0.25, 0)
  446. MTorso:BreakJoints()
  447. Model:MakeJoints()
  448. Eviscerate(Model)
  449. end
  450. end
  451.  
  452. function DamageHitbox(Part, Damage)
  453. local Hitter = Part.Touched:connect(function(hit)
  454. for _,v in pairs (hit.Parent:children()) do
  455. if v:IsA("Humanoid") then
  456. v.Health = v.Health - Damage
  457. if v.Health < 1 then
  458. DeathEffect(hit.Parent)
  459. end
  460. end
  461. end
  462. end)
  463. return Hitter
  464. end
  465.  
  466. function attackone() --Slash 1
  467. Attack = true
  468. SLASH:Play()
  469. MoveLegs = true
  470. local Hitbox = DamageHitbox(ra, 15)
  471. for i = 1,12 do
  472. Swait()
  473. rootj.C0 = Clerp(rootj.C0, rootjnor * CFrame.new(0, 0, 0 + 0.05 * Cos(sine / 12)) * CFrame.Angles(0, 0, 0.25), 1 / Animation_Speed)
  474. --RH.C0 = Clerp(RH.C0, RHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.11, 0, -0.11), 1 / Animation_Speed)
  475. --LH.C0 = Clerp(LH.C0, LHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.11, 0, -0.11), 1 / Animation_Speed)
  476. RS.C0 = Clerp(RS.C0, RSnor * CFrame.new(0, 0 + 0.05 * Cos(sine / 12), 0) * CFrame.Angles(0, 0, 77 + 77), 1 / Animation_Speed)
  477. LS.C0 = Clerp(LS.C0, LSnor * CFrame.Angles(-0.25 + 0.05 * Cos(sine / 12), 0, 0.25 + 0.05 * Cos(sine / 12)), 1 / Animation_Speed)
  478. neck.C0 = Clerp(neck.C0, necknor * CFrame.Angles(0, 0, -0.25), 1 / Animation_Speed)
  479. end
  480. for i = 1,17 do
  481. Swait()
  482. rootj.C0 = Clerp(rootj.C0, rootjnor * CFrame.new(0, 0, 0 + 0.05 * Cos(sine / 12)) * CFrame.Angles(0, 0, 0.25), 1 / Animation_Speed)
  483. --RH.C0 = Clerp(RH.C0, RHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.11, 0, -0.11), 1 / Animation_Speed)
  484. --LH.C0 = Clerp(LH.C0, LHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.11, 0, -0.11), 1 / Animation_Speed)
  485. RS.C0 = Clerp(RS.C0, RSnor * CFrame.new(0, 0 + 0.05 * Cos(sine / 12), 0) * CFrame.Angles(0, 0, 0.5), 1 / Animation_Speed)
  486. LS.C0 = Clerp(LS.C0, LSnor * CFrame.Angles(-0.25 + 0.05 * Cos(sine / 12), 0, 0.25 + 0.05 * Cos(sine / 12)), 1 / Animation_Speed)
  487. neck.C0 = Clerp(neck.C0, necknor * CFrame.Angles(0, 0, -0.25), 1 / Animation_Speed)
  488. end
  489. Attack = false
  490. MoveLegs = true
  491. Hitbox:disconnect()
  492. end
  493.  
  494. -----------
  495.  
  496. --Assign keys--
  497.  
  498. mouse.Button1Down:connect(function()
  499. Hold = true
  500. if Attack == false then
  501. attackone()
  502. end
  503. end)
  504.  
  505. mouse.Button1Up:connect(function()
  506. Hold = false
  507. end)
  508.  
  509. ---------------
  510.  
  511. --Animations--
  512.  
  513. print("By youngmacka123 and mangleplays2")
  514.  
  515. while true do
  516. Swait()
  517. sine = sine + 1
  518. anim.Parent = nil
  519. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  520. local Y = RootPart.Velocity.Y
  521. local TiltVelocity = CFrame.new(RootPart.CFrame:vectorToObjectSpace(RootPart.Velocity/1.6))
  522. local WALKSPEEDVALUE = 6 / (hum.WalkSpeed / 16)
  523. if TORSOVELOCITY < 1 and State ~= Enum.HumanoidStateType.Climbing then
  524. Pose = "Idle"
  525. elseif TORSOVELOCITY > 1 and State ~= Enum.HumanoidStateType.Climbing then
  526. Pose = "Walk"
  527. end
  528. if TORSOVELOCITY < 1 and State ~= Enum.HumanoidStateType.Climbing and Attack == false then
  529. Pose = "Idle"
  530. rootj.C0 = Clerp(rootj.C0, rootjnor * CFrame.new(0, 0, 0 + 0.05 * Cos(sine / 12)) * CFrame.Angles(0, 0, 0.25), 1 / Animation_Speed)
  531. --RH.C0 = Clerp(RH.C0, RHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.11, 0, -0.11), 1 / Animation_Speed)
  532. --LH.C0 = Clerp(LH.C0, LHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.11, 0, -0.11), 1 / Animation_Speed)
  533. RS.C0 = Clerp(RS.C0, RSnor * CFrame.new(0, 0 + 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.25 + 0.05 * Cos(sine / 12), 0, 1 + 0.01 * Cos(sine / 12)), 1 / Animation_Speed)
  534. LS.C0 = Clerp(LS.C0, LSnor * CFrame.Angles(-0.25 + 0.05 * Cos(sine / 12), 0, 0.25 + 0.05 * Cos(sine / 12)), 1 / Animation_Speed)
  535. neck.C0 = Clerp(neck.C0, necknor * CFrame.Angles(0, 0, -0.25), 1 / Animation_Speed)
  536. elseif TORSOVELOCITY > 1 and State ~= Enum.HumanoidStateType.Climbing and Attack == false then
  537. Pose = "Walk"
  538. rootj.C0 = Clerp(rootj.C0, rootjnor * CFrame.new(0, 0, 0 + 0.05 * Cos(sine / 12)) * CFrame.Angles(0 -Rad(TiltVelocity.z), 0-Rad(TiltVelocity.x), 0), 1 / Animation_Speed)
  539. --RH.C0 = Clerp(RH.C0, RHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(0, 0, 0 + 1 * Cos(sine / WALKSPEEDVALUE)), 1 / Animation_Speed)
  540. --LH.C0 = Clerp(LH.C0, LHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(0, 0, 0 + 1 * Cos(sine / WALKSPEEDVALUE)), 1 / Animation_Speed)
  541. RS.C0 = Clerp(RS.C0, RSnor * CFrame.new(0, 0 + 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.25 + 0.05 * Cos(sine / 12), 0, 1 + 0.01 * Cos(sine / 12)), 1 / Animation_Speed)
  542. LS.C0 = Clerp(LS.C0, LSnor * CFrame.new(0, 0 + 0.05 * Cos(sine / 12), 0) * CFrame.Angles(0, 0, 0 - 1 * Cos(sine / WALKSPEEDVALUE)), 1 / Animation_Speed)
  543. neck.C0 = Clerp(neck.C0, necknor * CFrame.Angles(0 +Rad(TiltVelocity.z), 0-Rad(TiltVelocity.x), 0), 1 / Animation_Speed)
  544. end
  545. if Pose == "Walk" and MoveLegs == true then
  546. RH.C0 = Clerp(RH.C0, RHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(0, 0, 0 + 1 * Cos(sine / WALKSPEEDVALUE)), 1 / Animation_Speed)
  547. LH.C0 = Clerp(LH.C0, LHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(0, 0, 0 + 1 * Cos(sine / WALKSPEEDVALUE)), 1 / Animation_Speed)
  548. elseif Pose == "Idle" and MoveLegs == true then
  549. RH.C0 = Clerp(RH.C0, RHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.11, 0, -0.11), 1 / Animation_Speed)
  550. LH.C0 = Clerp(LH.C0, LHnor * CFrame.new(0, 0 - 0.05 * Cos(sine / 12), 0) * CFrame.Angles(-0.11, 0, -0.11), 1 / Animation_Speed)
  551. end
  552. end
  553.  
  554. --------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement