Hydasi

FE Sturdy

Dec 22nd, 2022
12
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.56 KB | None | 0 0
  1. for i,v in next, game:GetService("Players").LocalPlayer.Character:GetDescendants() do
  2. if v:IsA("BasePart") and v.Name ~="HumanoidRootPart" then
  3. game:GetService("RunService").Heartbeat:connect(function()
  4. v.Velocity = Vector3.new(1, 25, 1)
  5. end)
  6. end
  7. end
  8.  
  9. wait(3)
  10. local Frame = (60)
  11. local chr = game.Players.LocalPlayer.Character
  12. Service =
  13. setmetatable(
  14. {
  15. Get = function(Self, Serv)
  16. if Service[Serv] then
  17. return Service[Serv]
  18. end
  19. local S = game:GetService(Serv)
  20. if S then
  21. Service[Serv] = S
  22. end
  23. return S
  24. end
  25. },
  26. {
  27. __index = function(Self, Index)
  28. local S = game:GetService(Index)
  29. if S then
  30. Service[Index] = S
  31. end
  32. return S
  33. end
  34. }
  35. )
  36.  
  37. local LP = Service["Players"].LocalPlayer
  38. local Char = LP["Character"]
  39. local Torso, Root, Humanoid = Char["UpperTorso"], Char["HumanoidRootPart"], Char["Humanoid"]
  40. local TService, UIS = Service["TweenService"], Service["UserInputService"]
  41.  
  42. coroutine.wrap(
  43. function()
  44. Root["Anchored"] = true
  45. wait(.8)
  46. Root["Anchored"] = false
  47. end
  48. )()
  49.  
  50. local Create = function(Obj, Parent)
  51. local I = Instance.new(Obj)
  52. I["Parent"] = Parent
  53. return I
  54. end
  55.  
  56. local Contains = function(Table, KV)
  57. for K, V in next, Table do
  58. if rawequal(KV, K) or rawequal(KV, V) then
  59. return true
  60. end
  61. end
  62. return false
  63. end
  64.  
  65. local PoseToCF = function(Pose, Motor)
  66. return (Motor["Part0"].CFrame * Motor["C0"] * Pose["CFrame"] * Motor["C1"]:Inverse()):ToObjectSpace(
  67. Motor["Part0"].CFrame
  68. )
  69. end
  70.  
  71. local Joints = {
  72. ["LeftHand"] = game.Players.LocalPlayer.Character.LeftHand["LeftWrist"],
  73. ["LeftLowerArm"] = chr.LeftLowerArm["LeftElbow"],
  74. ["LeftUpperArm"] = chr.LeftUpperArm["LeftShoulder"],
  75. ["RightHand"] = chr.RightHand["RightWrist"],
  76. ["RightLowerArm"] = chr.RightLowerArm["RightElbow"],
  77. ["RightUpperArm"] = chr.RightUpperArm["RightShoulder"],
  78. ["UpperTorso"] = chr.UpperTorso["Waist"],
  79. ["LeftFoot"] = chr.LeftFoot["LeftAnkle"],
  80. ["LeftLowerLeg"] = chr.LeftLowerLeg["LeftKnee"],
  81. ["LeftUpperLeg"] = chr.LeftUpperLeg["LeftHip"],
  82. ["RightFoot"] = chr.RightFoot["RightAnkle"],
  83. ["RightLowerLeg"] = chr.RightLowerLeg["RightKnee"],
  84. ["RightUpperLeg"] = chr.RightUpperLeg["RightHip"],
  85. ["LowerTorso"] = chr.LowerTorso["Root"]
  86. }
  87.  
  88. for K, V in next, Char:GetChildren() do
  89. if V:IsA("BasePart") then
  90. coroutine.wrap(
  91. function()
  92. repeat
  93. V["CanCollide"] = false
  94. Service["RunService"].Stepped:Wait()
  95. until Humanoid["Health"] < 1
  96. end
  97. )()
  98. end
  99. end
  100.  
  101. for K, V in next, Joints do
  102. local AP, AO, A0, A1 =
  103. Create("AlignPosition", V["Part1"]),
  104. Create("AlignOrientation", V["Part1"]),
  105. Create("Attachment", V["Part1"]),
  106. Create("Attachment", V["Part0"])
  107. AP["RigidityEnabled"] = true
  108. AO["RigidityEnabled"] = true
  109. AP["Attachment0"] = A0
  110. AP["Attachment1"] = A1
  111. AO["Attachment0"] = A0
  112. AO["Attachment1"] = A1
  113. A0["Name"] = "CFAttachment0"
  114. A1["Name"] = "CFAttachment1"
  115. A0["CFrame"] = V["C1"] * V["C0"]:Inverse()
  116. V:Remove()
  117. end
  118.  
  119. local Edit = function(Part, Value, Duration, Style, Direction)
  120. Style = Style or "Enum.EasingStyle.Linear"
  121. Direction = Direction or "Enum.EasingDirection.In"
  122. local Attachment = Part:FindFirstChild("CFAttachment0")
  123. if Attachment ~= nil then
  124. TService:Create(
  125. Attachment,
  126. TweenInfo.new(
  127. Duration,
  128. Enum["EasingStyle"][tostring(Style):split(".")[3]],
  129. Enum["EasingDirection"][tostring(Direction):split(".")[3]],
  130. 0,
  131. false,
  132. 0
  133. ),
  134. {CFrame = Value}
  135. ):Play()
  136. end
  137. end
  138.  
  139. if not Service["RunService"]:FindFirstChild("Delta") then
  140. local Delta = Create("BindableEvent", Service["RunService"])
  141. Delta["Name"] = "Delta"
  142. local A, B = 0, tick()
  143. Service["RunService"].Delta:Fire()
  144. Service["RunService"].Heartbeat:Connect(
  145. function(C, D)
  146. A = A + C
  147. if A >= (1 / Frame) then
  148. for I = 1, math.floor(A / (1 / Frame)) do
  149. Service["RunService"].Delta:Fire()
  150. end
  151. B = tick()
  152. A = A - (1 / Frame) * math.floor(A / (1 / Frame))
  153. end
  154. end
  155. )
  156. end
  157.  
  158. coroutine.wrap(
  159. function()
  160. Humanoid["Died"]:Wait()
  161. for K, V in next, Char:GetDescendants() do
  162. if V["Name"]:match("Align") then
  163. V:Destroy()
  164. end
  165. end
  166. end
  167. )()
  168.  
  169. local PreloadAnimation = function(AssetId)
  170. local Sequence = game:GetObjects("rbxassetid://" .. AssetId)[1]
  171. assert(Sequence:IsA("KeyframeSequence"), "Instance is not a KeyframeSequence.")
  172. wait(.06)
  173. local Class = {}
  174. Class["Speed"] = 1
  175. local Yield = function(Seconds)
  176. local Time = Seconds * (Frame + Sequence:GetKeyframes()[#Sequence:GetKeyframes()].Time)
  177. for I = 1, Time, Class["Speed"] do
  178. Service["RunService"].Delta["Event"]:Wait()
  179. end
  180. end
  181. Class["Stopped"] = false
  182. Class["Complete"] = Instance.new("BindableEvent")
  183. Class["Play"] = function()
  184. Class["Stopped"] = false
  185. coroutine.wrap(
  186. function()
  187. repeat
  188. for K = 1, #Sequence:GetKeyframes() do
  189. local K0, K1, K2 =
  190. Sequence:GetKeyframes()[K - 1],
  191. Sequence:GetKeyframes()[K],
  192. Sequence:GetKeyframes()[K + 1]
  193. if Class["Stopped"] ~= true and Humanoid["Health"] > 0 then
  194. if K0 ~= nil then
  195. Yield(K1["Time"] - K0["Time"])
  196. end
  197. coroutine.wrap(
  198. function()
  199. for I = 1, #K1:GetDescendants() do
  200. local Pose = K1:GetDescendants()[I]
  201. if Contains(Joints, Pose["Name"]) then
  202. local Duration =
  203. K2 ~= nil and (K2["Time"] - K1["Time"]) / Class["Speed"] or .5
  204. Edit(
  205. Char[Pose["Name"]],
  206. PoseToCF(Pose, Joints[Pose["Name"]]),
  207. Duration,
  208. Pose["EasingStyle"],
  209. Pose["EasingDirection"]
  210. )
  211. end
  212. end
  213. end
  214. )()
  215. end
  216. end
  217. Class["Complete"]:Fire()
  218. until Sequence["Loop"] ~= true or Class["Stopped"] ~= false or Humanoid["Health"] < 1
  219. end
  220. )()
  221. end
  222. Class["Stop"] = function()
  223. Class["Stopped"] = true
  224. end
  225. Class["Reset"] = function()
  226. coroutine.wrap(
  227. function()
  228. wait(.02)
  229. assert(Class["Stopped"], "Track Must Be Stopped First!")
  230. for K, V in next, Joints do
  231. local Part = Char[K]
  232. if Part ~= nil then
  233. local Attachment = Part:FindFirstChild("CFAttachment0")
  234. if Attachment ~= nil then
  235. Attachment["CFrame"] = V["C1"] * V["C0"]:Inverse()
  236. end
  237. end
  238. end
  239. end
  240. )()
  241. end
  242. return Class
  243. end
  244.  
  245. Humanoid.WalkSpeed = 16
  246.  
  247. local Anims = {
  248. ["Idle"] = PreloadAnimation(4211217646),
  249. ["Walk"] = PreloadAnimation(913376220),
  250. ["Run"] = PreloadAnimation(913376220),
  251. ["Jump"] = PreloadAnimation(507765000),
  252. ["Fall"] = PreloadAnimation(507767968)
  253. }
  254.  
  255. wait(1)
  256. local Connections = {}
  257.  
  258. Mouse = LP:GetMouse()
  259. local Dancing, Running = false, false
  260.  
  261. local StopAll = function()
  262. for K, V in next, Anims do
  263. if V["Stopped"] ~= true then
  264. V:Stop()
  265. end
  266. end
  267. end
  268.  
  269. Anims["Idle"]:Play()
  270. Dancing = false
  271. Anims["Walk"].Stopped = true
  272. Anims["Run"].Stopped = true
  273.  
  274. Connections["Run"] =
  275. Humanoid["Running"]:Connect(
  276. function(Speed)
  277. if Speed > 6 and Dancing ~= true and Anims["Walk"].Stopped ~= false and runnning ~= true then
  278. Anims["Idle"]:Stop()
  279. Anims["Jump"]:Stop()
  280. Anims["Fall"]:Stop()
  281. Anims["Run"]:Stop()
  282. Anims["Walk"]:Play()
  283. elseif Speed < 5 and Dancing ~= true and Anims["Walk"].Stopped ~= true and runnning ~= true then
  284. Anims["Walk"]:Stop()
  285. Anims["Jump"]:Stop()
  286. Anims["Fall"]:Stop()
  287. Anims["Run"]:Stop()
  288. Anims["Idle"]:Play()
  289. elseif Speed < 5 and Dancing ~= true and Anims["Jump"].Stopped ~= true or Anims["Fall"].Stopped ~= true then
  290. Anims["Walk"]:Stop()
  291. Anims["Jump"]:Stop()
  292. Anims["Fall"]:Stop()
  293. Anims["Run"]:Stop()
  294. Anims["Idle"]:Play()
  295. end
  296. end
  297. )
  298. Connections["Jumping"] =
  299. Humanoid["Jumping"]:Connect(
  300. function(active)
  301. if active and Dancing ~= true and Anims["Jump"].Stopped ~= false then
  302. Anims["Idle"]:Stop()
  303. Anims["Walk"]:Stop()
  304. Anims["Fall"]:Stop()
  305. Anims["Run"]:Stop()
  306. Anims["Jump"]:Play()
  307. end
  308. end
  309. )
  310. Connections["FreeFalling"] =
  311. Humanoid["FreeFalling"]:Connect(
  312. function(active)
  313. if active and Dancing ~= true and Anims["Jump"].Stopped ~= false then
  314. Anims["Idle"]:Stop()
  315. Anims["Walk"]:Stop()
  316. Anims["Jump"]:Stop()
  317. Anims["Run"]:Stop()
  318. Anims["Fall"]:Play()
  319. end
  320. end
  321. )
  322.  
  323. Mouse.KeyDown:connect(
  324. function(key)
  325. if key:lower() == string.char(48) then --string.char(48) is just shift
  326. if Humanoid and Anims["Walk"].Stopped ~= true then
  327. Anims["Walk"]:Stop()
  328. Anims["Jump"]:Stop()
  329. Anims["Fall"]:Stop()
  330. Anims["Idle"]:Stop()
  331. Anims["Run"]:Play()
  332. runnning = true
  333. Humanoid.WalkSpeed = 26
  334. end
  335. end
  336. end
  337. )
  338.  
  339. --When button is lifted
  340. Mouse.KeyUp:connect(
  341. function(key)
  342. if key:lower() == string.char(48) then --string.char(48) is just shift
  343. if Humanoid then
  344. runnning = false
  345. Humanoid.WalkSpeed = 16
  346. end
  347. end
  348. end
  349. )
  350.  
  351. wait(1)
  352. local Bind = function(Id, Key, Speed)
  353. Speed = Speed or 1
  354. local Animation = PreloadAnimation(Id)
  355. table.insert(Anims, Animation)
  356. local V =
  357. UIS.InputBegan:Connect(
  358. function(Input, P)
  359. if Input.KeyCode == Enum.KeyCode[Key] and P ~= true then
  360. if Dancing ~= true then
  361. Dancing = true
  362. StopAll()
  363. wait(.1)
  364. Animation:Play()
  365. Animation["Speed"] = Speed
  366. else
  367. Dancing = false
  368. StopAll()
  369. wait(.1)
  370. Anims["Idle"]:Play()
  371. end
  372. end
  373. end
  374. )
  375. end
  376.  
  377. Bind(10507080897, "Q", 1)
  378. wait(0.1)
  379. Bind(10731649737, "Y", 1)
  380. wait(0.1)
  381. Bind(10724052169 , "E", 1)
  382. wait(0.1)
  383. Bind(10722615238 , "R", 1)
  384. wait(0.1)
  385. Bind(5971749922, "T", 1)
  386. wait(0.1)
  387. Bind(5349599731, "U", 2)
  388. wait(0.1)
  389. Bind(5641878449, "F", 1)
  390. wait(0.1)
  391. Bind(5943669474, "O", 1)
  392. wait(0.1)
  393. Bind(6024896974, "G", 1)
  394. wait(0.1)
  395. Bind(10881761394, "H", 1)
  396. wait(0.1)
  397. Bind(1574383214, "J", 1)
  398. wait(0.1)
  399. Bind(10881753261, "K", 1)
  400. wait(0.1)
  401. Bind(5349600811, "L", 1)
  402. wait(0.1)
  403. Bind(10881645631, "Z", 1)
  404. wait(0.1)
  405. Bind(10881661040, "X", 1)
  406. wait(0.1)
  407. Bind(10881685708, "C", 1)
  408. wait(0.1)
  409. Bind(5943658900, "V", 1)
  410. wait(0.1)
  411. Bind(10881733560, "B", 1)
  412. wait(0.1)
  413. Bind(10881694331, "N", 1)
  414. wait(0.1)
  415. Bind(5927871610, "M", 1)
Add Comment
Please, Sign In to add comment