Advertisement
lafur

Untitled

Oct 21st, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 62.55 KB | None | 0 0
  1. --Created by PenguinAnonymous (ttyyuu12345) Editied by Dittoide
  2. --What's Added To M2S with Dittoide's Edit?
  3. --/ Better dummy script function to improve compatibility (makes it like you are running the code inside the script.)
  4. --/ Removed Gui In Bottom-Left for when you are making guis.
  5. --/ Removed "Inserting Map Please Wait" gui when selected Workspace as Place to export.
  6. --Credit: PenguinAnonymous for making original script, i just wanted to iron it out to my liking.
  7. --Errors: Camera,Terrain,Attachment,Status,Animator,Accessory
  8. local runDummyScript = function(f,scri)
  9. if (not scri:IsA('Script')) or (not scri:IsA('LocalScript')) then return false; end;
  10. local Dummy_CoRoutine = coroutine.create(function()
  11. getfenv().script = scri
  12. ypcall(function() f() end)
  13. end)
  14. table.insert(cors,Dummy_CoRoutine);
  15. coroutine.resume(Dummy_CoRoutine);
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. mas.Name = "M2S_Model"
  20. o2 = Instance.new("Part")
  21. o4 = Instance.new("Model")
  22. o5 = Instance.new("Part")
  23. o6 = Instance.new("SpecialMesh")
  24. o11 = Instance.new("Sound")
  25. o12 = Instance.new("RemoteEvent")
  26. o13 = Instance.new("Sound")
  27. o14 = Instance.new("RemoteEvent")
  28. o15 = Instance.new("Sound")
  29. o16 = Instance.new("RemoteEvent")
  30. o17 = Instance.new("Sound")
  31. o18 = Instance.new("RemoteEvent")
  32. o19 = Instance.new("Sound")
  33. o20 = Instance.new("RemoteEvent")
  34. o21 = Instance.new("Sound")
  35. o22 = Instance.new("RemoteEvent")
  36. o23 = Instance.new("Sound")
  37. o24 = Instance.new("RemoteEvent")
  38. o25 = Instance.new("Sound")
  39. o26 = Instance.new("RemoteEvent")
  40. o27 = Instance.new("Sound")
  41. o28 = Instance.new("RemoteEvent")
  42. o29 = Instance.new("Decal")
  43. o30 = Instance.new("Part")
  44. o31 = Instance.new("Decal")
  45. o40 = Instance.new("Motor6D")
  46. o41 = Instance.new("Motor6D")
  47. o42 = Instance.new("Motor6D")
  48. o43 = Instance.new("Motor6D")
  49. o44 = Instance.new("Motor6D")
  50. o45 = Instance.new("Weld")
  51. o46 = Instance.new("Part")
  52. o49 = Instance.new("Weld")
  53. o50 = Instance.new("Part")
  54. o53 = Instance.new("Weld")
  55. o54 = Instance.new("Part")
  56. o56 = Instance.new("Weld")
  57. o57 = Instance.new("Part")
  58. o59 = Instance.new("Weld")
  59. o60 = Instance.new("Humanoid")
  60. o63 = Instance.new("Part")
  61. o65 = Instance.new("Motor6D")
  62. o66 = Instance.new("Script")
  63. o67 = Instance.new("LocalScript")
  64. o68 = Instance.new("Script")
  65. o69 = Instance.new("LocalScript")
  66. o70 = Instance.new("StringValue")
  67. o71 = Instance.new("Animation")
  68. o72 = Instance.new("NumberValue")
  69. o73 = Instance.new("Animation")
  70. o74 = Instance.new("NumberValue")
  71. o75 = Instance.new("StringValue")
  72. o76 = Instance.new("Animation")
  73. o77 = Instance.new("StringValue")
  74. o78 = Instance.new("Animation")
  75. o79 = Instance.new("StringValue")
  76. o80 = Instance.new("Animation")
  77. o81 = Instance.new("StringValue")
  78. o82 = Instance.new("Animation")
  79. o83 = Instance.new("StringValue")
  80. o84 = Instance.new("Animation")
  81. o85 = Instance.new("StringValue")
  82. o86 = Instance.new("Animation")
  83. o87 = Instance.new("StringValue")
  84. o88 = Instance.new("Animation")
  85. o89 = Instance.new("NumberValue")
  86. o90 = Instance.new("BodyColors")
  87. o91 = Instance.new("Pants")
  88. o92 = Instance.new("Shirt")
  89. o94 = Instance.new("Part")
  90. o95 = Instance.new("SpecialMesh")
  91. o97 = Instance.new("Vector3Value")
  92. o98 = Instance.new("Weld")
  93. o99 = Instance.new("Model")
  94. o100 = Instance.new("Part")
  95. o101 = Instance.new("BlockMesh")
  96. o102 = Instance.new("Decal")
  97. o103 = Instance.new("Decal")
  98. o104 = Instance.new("Decal")
  99. o105 = Instance.new("Decal")
  100. o106 = Instance.new("Decal")
  101. o107 = Instance.new("Decal")
  102. o108 = Instance.new("Script")
  103. o109 = Instance.new("Part")
  104. o110 = Instance.new("Decal")
  105. o111 = Instance.new("BodyGyro")
  106. o112 = Instance.new("BlockMesh")
  107. o113 = Instance.new("Decal")
  108. o114 = Instance.new("Decal")
  109. o115 = Instance.new("Decal")
  110. o116 = Instance.new("Decal")
  111. o117 = Instance.new("Decal")
  112. o118 = Instance.new("Decal")
  113. o119 = Instance.new("Weld")
  114. o120 = Instance.new("Weld")
  115. o121 = Instance.new("Model")
  116. o122 = Instance.new("Part")
  117. o123 = Instance.new("Decal")
  118. o124 = Instance.new("Decal")
  119. o125 = Instance.new("Decal")
  120. o126 = Instance.new("Decal")
  121. o127 = Instance.new("Decal")
  122. o128 = Instance.new("Decal")
  123. o129 = Instance.new("BlockMesh")
  124. o130 = Instance.new("Weld")
  125. o131 = Instance.new("Model")
  126. o132 = Instance.new("Part")
  127. o133 = Instance.new("BlockMesh")
  128. o134 = Instance.new("Decal")
  129. o135 = Instance.new("Decal")
  130. o136 = Instance.new("Decal")
  131. o137 = Instance.new("Decal")
  132. o138 = Instance.new("Decal")
  133. o139 = Instance.new("Decal")
  134. o140 = Instance.new("Weld")
  135. o141 = Instance.new("Model")
  136. o142 = Instance.new("Part")
  137. o143 = Instance.new("BlockMesh")
  138. o144 = Instance.new("Decal")
  139. o145 = Instance.new("Decal")
  140. o146 = Instance.new("Decal")
  141. o147 = Instance.new("Decal")
  142. o148 = Instance.new("Decal")
  143. o149 = Instance.new("Decal")
  144. o150 = Instance.new("Weld")
  145. o151 = Instance.new("Model")
  146. o152 = Instance.new("Part")
  147. o153 = Instance.new("Decal")
  148. o154 = Instance.new("Decal")
  149. o155 = Instance.new("Decal")
  150. o156 = Instance.new("Decal")
  151. o157 = Instance.new("Decal")
  152. o158 = Instance.new("Decal")
  153. o159 = Instance.new("BlockMesh")
  154. o160 = Instance.new("Weld")
  155. o2.Name = "Baseplate"
  156. o2.Parent = mas
  157. o2.BrickColor = BrickColor.new("Dark stone grey")
  158. o2.Position = Vector3.new(0, -10, 0)
  159. o2.Anchored = true
  160. o2.Locked = true
  161. o2.FormFactor = Enum.FormFactor.Symmetric
  162. o2.Size = Vector3.new(512, 20, 512)
  163. o2.CFrame = CFrame.new(0, -10, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  164. o2.Color = Color3.new(0.388235, 0.372549, 0.384314)
  165. o2.Position = Vector3.new(0, -10, 0)
  166. o4.Name = "timetodie23232223"
  167. o4.Parent = mas
  168. o4.Archivable = false
  169. o4.PrimaryPart = o5
  170. o5.Name = "Head"
  171. o5.Parent = o4
  172. o5.BrickColor = BrickColor.new("Pastel brown")
  173. o5.Transparency = 0.98000001907349
  174. o5.Position = Vector3.new(45.1851501, 4.4455905, 17.7143955)
  175. o5.Rotation = Vector3.new(-0.299999982, -35.2900009, -0.170000002)
  176. o5.RotVelocity = Vector3.new(7.99957888e-07, 8.49270554e-15, -2.13864519e-06)
  177. o5.Velocity = Vector3.new(3.82598728e-06, -0.227071941, 1.43110628e-06)
  178. o5.Locked = true
  179. o5.FormFactor = Enum.FormFactor.Symmetric
  180. o5.Size = Vector3.new(2, 1, 1)
  181. o5.CFrame = CFrame.new(45.1851501, 4.4455905, 17.7143955, 0.816232741, 0.00244292081, -0.57771796, -1.58424918e-05, 0.999991179, 0.00420614937, 0.577723145, -0.00342404423, 0.816225588)
  182. o5.TopSurface = Enum.SurfaceType.Smooth
  183. o5.Color = Color3.new(1, 0.8, 0.6)
  184. o5.Position = Vector3.new(45.1851501, 4.4455905, 17.7143955)
  185. o6.Parent = o5
  186. o6.Scale = Vector3.new(1.25, 1.25, 1.25)
  187. o11.Name = "GettingUp"
  188. o11.Parent = o5
  189. o11.Archivable = false
  190. o11.SoundId = "rbxasset://sounds/action_get_up.mp3"
  191. o11.Volume = 0.64999997615814
  192. o12.Name = "CharacterSoundEvent"
  193. o12.Parent = o11
  194. o13.Name = "Died"
  195. o13.Parent = o5
  196. o13.Archivable = false
  197. o13.SoundId = "rbxasset://sounds/uuhhh.mp3"
  198. o13.Volume = 0.64999997615814
  199. o14.Name = "CharacterSoundEvent"
  200. o14.Parent = o13
  201. o15.Name = "FreeFalling"
  202. o15.Parent = o5
  203. o15.Archivable = false
  204. o15.SoundId = "rbxasset://sounds/action_falling.mp3"
  205. o15.TimePosition = 0.26334824121614
  206. o15.Volume = 0.011887255124748
  207. o15.Looped = true
  208. o16.Name = "CharacterSoundEvent"
  209. o16.Parent = o15
  210. o17.Name = "Jumping"
  211. o17.Parent = o5
  212. o17.Archivable = false
  213. o17.SoundId = "rbxasset://sounds/action_jump.mp3"
  214. o17.Volume = 0.64999997615814
  215. o18.Name = "CharacterSoundEvent"
  216. o18.Parent = o17
  217. o19.Name = "Landing"
  218. o19.Parent = o5
  219. o19.Archivable = false
  220. o19.SoundId = "rbxasset://sounds/action_jump_land.mp3"
  221. o19.Volume = 1
  222. o20.Name = "CharacterSoundEvent"
  223. o20.Parent = o19
  224. o21.Name = "Splash"
  225. o21.Parent = o5
  226. o21.Archivable = false
  227. o21.SoundId = "rbxasset://sounds/impact_water.mp3"
  228. o21.Volume = 0.64999997615814
  229. o22.Name = "CharacterSoundEvent"
  230. o22.Parent = o21
  231. o23.Name = "Running"
  232. o23.Parent = o5
  233. o23.Archivable = false
  234. o23.Pitch = 1.8500000238419
  235. o23.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
  236. o23.TimePosition = 2.1942696646406
  237. o23.Volume = 0.64999997615814
  238. o23.Looped = true
  239. o24.Name = "CharacterSoundEvent"
  240. o24.Parent = o23
  241. o25.Name = "Swimming"
  242. o25.Parent = o5
  243. o25.Archivable = false
  244. o25.Pitch = 1.6000000238419
  245. o25.SoundId = "rbxasset://sounds/action_swim.mp3"
  246. o25.Volume = 0.64999997615814
  247. o25.Looped = true
  248. o26.Name = "CharacterSoundEvent"
  249. o26.Parent = o25
  250. o27.Name = "Climbing"
  251. o27.Parent = o5
  252. o27.Archivable = false
  253. o27.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
  254. o27.Volume = 0.64999997615814
  255. o27.Looped = true
  256. o28.Name = "CharacterSoundEvent"
  257. o28.Parent = o27
  258. o29.Name = "face"
  259. o29.Parent = o5
  260. o29.Texture = "http://www.roblox.com/asset/?id=13038247"
  261. o30.Name = "Torso"
  262. o30.Parent = o4
  263. o30.BrickColor = BrickColor.new("Pastel brown")
  264. o30.Transparency = 1
  265. o30.Position = Vector3.new(45.1839294, 2.97144008, 17.7161083)
  266. o30.Rotation = Vector3.new(0, -35.5099983, 0)
  267. o30.RotVelocity = Vector3.new(7.74944965e-07, 4.90025839e-15, -2.07179141e-06)
  268. o30.Velocity = Vector3.new(6.47594106e-07, 0.181635305, 2.42229902e-07)
  269. o30.Locked = true
  270. o30.FormFactor = Enum.FormFactor.Symmetric
  271. o30.Size = Vector3.new(2, 2, 1)
  272. o30.CFrame = CFrame.new(45.1839294, 2.97144008, 17.7161083, 0.814045668, -8.19862507e-08, -0.580800891, 8.45517576e-08, 1, -2.26536496e-08, 0.580800891, -3.06666301e-08, 0.814045668)
  273. o30.LeftSurface = Enum.SurfaceType.Weld
  274. o30.RightSurface = Enum.SurfaceType.Weld
  275. o30.Color = Color3.new(1, 0.8, 0.6)
  276. o30.Position = Vector3.new(45.1839294, 2.97144008, 17.7161083)
  277. o30.velocity = Vector3.new(6.47594106e-07, 0.181635305, 2.42229902e-07)
  278. o31.Name = "roblox"
  279. o31.Parent = o30
  280. o40.Name = "Right Shoulder"
  281. o40.Parent = o30
  282. o40.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  283. o40.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  284. o40.Part0 = o30
  285. o40.Part1 = o50
  286. o40.CurrentAngle = -0.0050382339395583
  287. o40.MaxVelocity = 0.10000000149012
  288. o41.Name = "Left Shoulder"
  289. o41.Parent = o30
  290. o41.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  291. o41.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  292. o41.Part0 = o30
  293. o41.Part1 = o46
  294. o41.CurrentAngle = 0.0040962835773826
  295. o41.MaxVelocity = 0.10000000149012
  296. o42.Name = "Right Hip"
  297. o42.Parent = o30
  298. o42.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  299. o42.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  300. o42.Part0 = o30
  301. o42.Part1 = o57
  302. o42.MaxVelocity = 0.10000000149012
  303. o43.Name = "Left Hip"
  304. o43.Parent = o30
  305. o43.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  306. o43.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  307. o43.Part0 = o30
  308. o43.Part1 = o54
  309. o43.MaxVelocity = 0.10000000149012
  310. o44.Name = "Neck"
  311. o44.Parent = o30
  312. o44.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  313. o44.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  314. o44.Part0 = o30
  315. o44.Part1 = o5
  316. o44.CurrentAngle = -0.00014588759222534
  317. o44.MaxVelocity = 0.10000000149012
  318. o45.Parent = o30
  319. o45.Part0 = o30
  320. o45.Part1 = o109
  321. o46.Name = "Left Arm"
  322. o46.Parent = o4
  323. o46.BrickColor = BrickColor.new("Pastel brown")
  324. o46.Transparency = 1
  325. o46.Position = Vector3.new(43.9680328, 2.91677237, 16.8343182)
  326. o46.Rotation = Vector3.new(0.280000001, -36.6100006, -0.0700000003)
  327. o46.RotVelocity = Vector3.new(-6.87908141e-07, 6.73073979e-15, 1.83910811e-06)
  328. o46.Velocity = Vector3.new(-4.78143079e-07, 0.128622785, -1.78846747e-07)
  329. o46.CanCollide = false
  330. o46.Locked = true
  331. o46.FormFactor = Enum.FormFactor.Symmetric
  332. o46.Size = Vector3.new(1, 2, 1)
  333. o46.CFrame = CFrame.new(43.9680328, 2.91677237, 16.8343182, 0.802737832, 0.000962207559, -0.596331358, -0.00414953334, 0.99998349, -0.00397227053, 0.596317708, 0.00566319004, 0.802728593)
  334. o46.Color = Color3.new(1, 0.8, 0.6)
  335. o46.Position = Vector3.new(43.9680328, 2.91677237, 16.8343182)
  336. o46.velocity = Vector3.new(-4.78143079e-07, 0.128622785, -1.78846747e-07)
  337. o49.Parent = o46
  338. o49.Part0 = o46
  339. o49.Part1 = o152
  340. o50.Name = "Right Arm"
  341. o50.Parent = o4
  342. o50.BrickColor = BrickColor.new("Pastel brown")
  343. o50.Transparency = 1
  344. o50.Position = Vector3.new(46.4100304, 2.94120884, 18.5800209)
  345. o50.Rotation = Vector3.new(0.529999971, -34.9300003, 0.299999982)
  346. o50.RotVelocity = Vector3.new(8.50270339e-07, 1.00552865e-14, -2.27318219e-06)
  347. o50.Velocity = Vector3.new(6.49445496e-07, 0.0396099575, 2.42921232e-07)
  348. o50.CanCollide = false
  349. o50.Locked = true
  350. o50.FormFactor = Enum.FormFactor.Symmetric
  351. o50.Size = Vector3.new(1, 2, 1)
  352. o50.CFrame = CFrame.new(46.4100304, 2.94120884, 18.5800209, 0.819866359, -0.00424642442, -0.57253921, -0.000142743942, 0.999970973, -0.00762102846, 0.572554886, 0.0063299546, 0.819841981)
  353. o50.Color = Color3.new(1, 0.8, 0.6)
  354. o50.Position = Vector3.new(46.4100304, 2.94120884, 18.5800209)
  355. o50.velocity = Vector3.new(6.49445496e-07, 0.0396099575, 2.42921232e-07)
  356. o53.Parent = o50
  357. o53.Part0 = o50
  358. o53.Part1 = o122
  359. o54.Name = "Left Leg"
  360. o54.Parent = o4
  361. o54.BrickColor = BrickColor.new("Pastel brown")
  362. o54.Transparency = 1
  363. o54.Position = Vector3.new(44.7769051, 0.967441559, 17.4257088)
  364. o54.Rotation = Vector3.new(0, -35.5099983, 0)
  365. o54.RotVelocity = Vector3.new(-6.29877604e-07, 5.52061813e-15, 1.68396775e-06)
  366. o54.Velocity = Vector3.new(2.84237535e-06, -0.00027731873, 1.0631727e-06)
  367. o54.CanCollide = false
  368. o54.Locked = true
  369. o54.FormFactor = Enum.FormFactor.Symmetric
  370. o54.Size = Vector3.new(1, 2, 1)
  371. o54.CFrame = CFrame.new(44.7769051, 0.967441559, 17.4257088, 0.814045668, -5.1267893e-08, -0.580800891, 5.28720854e-08, 1, -1.41659626e-08, 0.580800891, -1.91764133e-08, 0.814045668)
  372. o54.BottomSurface = Enum.SurfaceType.Smooth
  373. o54.Color = Color3.new(1, 0.8, 0.6)
  374. o54.Position = Vector3.new(44.7769051, 0.967441559, 17.4257088)
  375. o54.velocity = Vector3.new(2.84237535e-06, -0.00027731873, 1.0631727e-06)
  376. o56.Parent = o54
  377. o56.Part0 = o54
  378. o56.Part1 = o132
  379. o57.Name = "Right Leg"
  380. o57.Parent = o4
  381. o57.BrickColor = BrickColor.new("Pastel brown")
  382. o57.Transparency = 1
  383. o57.Position = Vector3.new(45.5909538, 0.968118429, 18.0065079)
  384. o57.Rotation = Vector3.new(0, -35.5099983, 0)
  385. o57.RotVelocity = Vector3.new(-5.89426463e-07, 4.84538718e-15, 1.57582554e-06)
  386. o57.Velocity = Vector3.new(2.65877702e-06, -0.046217043, 9.94496759e-07)
  387. o57.CanCollide = false
  388. o57.Locked = true
  389. o57.FormFactor = Enum.FormFactor.Symmetric
  390. o57.Size = Vector3.new(1, 2, 1)
  391. o57.CFrame = CFrame.new(45.5909538, 0.968118429, 18.0065079, 0.814045668, 9.00194319e-09, -0.580800891, -9.28362365e-09, 1, 2.48733967e-09, 0.580800891, 3.3671288e-09, 0.814045668)
  392. o57.BottomSurface = Enum.SurfaceType.Smooth
  393. o57.Color = Color3.new(1, 0.8, 0.6)
  394. o57.Position = Vector3.new(45.5909538, 0.968118429, 18.0065079)
  395. o57.velocity = Vector3.new(2.65877702e-06, -0.046217043, 9.94496759e-07)
  396. o59.Parent = o57
  397. o59.Part0 = o57
  398. o59.Part1 = o142
  399. o60.Parent = o4
  400. o60.RightLeg = o57
  401. o60.LeftLeg = o54
  402. o60.Torso = o63
  403. o63.Name = "HumanoidRootPart"
  404. o63.Parent = o4
  405. o63.Transparency = 1
  406. o63.Position = Vector3.new(45.1839294, 2.9687233, 17.7161083)
  407. o63.Rotation = Vector3.new(0, -35.5099983, 0)
  408. o63.RotVelocity = Vector3.new(-6.54914913e-07, 1.03519869e-14, 1.75090918e-06)
  409. o63.Velocity = Vector3.new(-5.47635409e-07, -0.158884585, -2.04839054e-07)
  410. o63.CanCollide = false
  411. o63.Locked = true
  412. o63.FormFactor = Enum.FormFactor.Symmetric
  413. o63.Size = Vector3.new(2, 2, 1)
  414. o63.CFrame = CFrame.new(45.1839294, 2.9687233, 17.7161083, 0.814045668, 8.6990859e-08, -0.580800891, -8.97128132e-08, 1, 2.40366997e-08, 0.580800891, 3.25383098e-08, 0.814045668)
  415. o63.BottomSurface = Enum.SurfaceType.Smooth
  416. o63.TopSurface = Enum.SurfaceType.Smooth
  417. o63.Position = Vector3.new(45.1839294, 2.9687233, 17.7161083)
  418. o63.velocity = Vector3.new(-5.47635409e-07, -0.158884585, -2.04839054e-07)
  419. o65.Name = "RootJoint"
  420. o65.Parent = o63
  421. o65.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  422. o65.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  423. o65.Part0 = o63
  424. o65.Part1 = o30
  425. o65.MaxVelocity = 0.10000000149012
  426. o66.Name = "Sound"
  427. o66.Parent = o4
  428.  
  429. runDummyScript(function()
  430. --[[
  431. Author: @spotco
  432. This script creates sounds which are placed under the character head.
  433. These sounds are used by the "LocalSound" script.
  434.  
  435. To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
  436. The default Sound script loaded for every character will then be replaced with your copy of the script.
  437. ]]--
  438. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  439. local Players = game:GetService("Players")
  440.  
  441. local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents"
  442. local DEFAULT_SERVER_SOUND_EVENT_NAME = "DefaultServerSoundEvent"
  443.  
  444. local SoundEventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME)
  445. local DefaultServerSoundEvent = nil
  446.  
  447. local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
  448. if useSoundDispatcher then
  449. if not SoundEventFolder then
  450. SoundEventFolder = Instance.new("Folder")
  451. SoundEventFolder.Name = SOUND_EVENT_FOLDER_NAME
  452. SoundEventFolder.Archivable = false
  453. SoundEventFolder.Parent = ReplicatedStorage
  454. end
  455.  
  456. DefaultServerSoundEvent = SoundEventFolder:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
  457. else
  458. DefaultServerSoundEvent = ReplicatedStorage:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
  459. end
  460.  
  461. if not DefaultServerSoundEvent then
  462. if useSoundDispatcher then
  463. DefaultServerSoundEvent = Instance.new("RemoteEvent", SoundEventFolder)
  464. else
  465. DefaultServerSoundEvent = Instance.new("RemoteEvent", ReplicatedStorage)
  466. end
  467.  
  468. DefaultServerSoundEvent.Name = DEFAULT_SERVER_SOUND_EVENT_NAME
  469. DefaultServerSoundEvent.OnServerEvent:Connect(function() end)
  470. end
  471.  
  472. local function CreateNewSound(name, id, looped, pitch, parent)
  473. local sound = Instance.new("Sound")
  474. sound.SoundId = id
  475. sound.Name = name
  476. sound.archivable = false
  477. sound.Pitch = pitch
  478. sound.Looped = looped
  479. sound.MinDistance = 5
  480. sound.MaxDistance = 150
  481. sound.Volume = 0.65
  482. sound.Parent = parent
  483.  
  484. if DefaultServerSoundEvent then
  485. local CharacterSoundEvent = Instance.new("RemoteEvent", sound)
  486. CharacterSoundEvent.Name = "CharacterSoundEvent"
  487. CharacterSoundEvent.OnServerEvent:Connect(function(player, playing, resetPosition)
  488. if type(playing) ~= "boolean" then
  489. return
  490. end
  491. if type(resetPosition) ~= "boolean" then
  492. return
  493. end
  494.  
  495. if player.Character ~= script.Parent then
  496. return
  497. end
  498. for _, p in pairs(Players:GetPlayers()) do
  499. if p ~= player then
  500. -- Connect to the dispatcher to check if the player has loaded.
  501. if useSoundDispatcher then
  502. SoundEventFolder:FindFirstChild("SoundDispatcher"):Fire(p, sound, playing, resetPosition)
  503. else
  504. DefaultServerSoundEvent:FireClient(p, sound, playing, resetPosition)
  505. end
  506. end
  507. end
  508. end)
  509. end
  510. return sound
  511. end
  512.  
  513. local head = script.Parent:FindFirstChild("Head")
  514. if not head then
  515. error("Sound script parent has no child Head.")
  516. return
  517. end
  518.  
  519. CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
  520. CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
  521. CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
  522. CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
  523. CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
  524. CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
  525. CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
  526. CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
  527. CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head)
  528. end,o66)
  529.  
  530. o67.Name = "LocalSound"
  531. o67.Parent = o66
  532.  
  533. runDummyScript(function()
  534. --[[
  535. Author: @spotco
  536. This script runs locally for the player of the given humanoid.
  537. This script triggers humanoid sound play/pause actions locally.
  538.  
  539. The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
  540. immediately for the player and is replicated to all other players.
  541.  
  542. This script is optimized to reduce network traffic through minimizing the amount of property replication.
  543. ]]--
  544.  
  545. --All sounds are referenced by this ID
  546. local SFX = {
  547. Died = 0;
  548. Running = 1;
  549. Swimming = 2;
  550. Climbing = 3,
  551. Jumping = 4;
  552. GettingUp = 5;
  553. FreeFalling = 6;
  554. FallingDown = 7;
  555. Landing = 8;
  556. Splash = 9;
  557. }
  558.  
  559. local useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues")
  560.  
  561. local Humanoid = nil
  562. local Head = nil
  563. --SFX ID to Sound object
  564. local Sounds = {}
  565. local SoundService = game:GetService("SoundService")
  566. local soundEventFolderName = "DefaultSoundEvents"
  567. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  568. local AddCharacterLoadedEvent = nil
  569. local RemoveCharacterEvent = nil
  570. local soundEventFolder = ReplicatedStorage:FindFirstChild(soundEventFolderName)
  571. local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
  572.  
  573. if useSoundDispatcher then
  574. if not soundEventFolder then
  575. soundEventFolder = Instance.new("Folder", ReplicatedStorage)
  576. soundEventFolder.Name = soundEventFolderName
  577. soundEventFolder.Archivable = false
  578. end
  579.  
  580. -- Load the RemoveCharacterEvent
  581. RemoveCharacterEvent = soundEventFolder:FindFirstChild("RemoveCharacterEvent")
  582. if RemoveCharacterEvent == nil then
  583. RemoveCharacterEvent = Instance.new("RemoteEvent", soundEventFolder)
  584. RemoveCharacterEvent.Name = "RemoveCharacterEvent"
  585. end
  586.  
  587. AddCharacterLoadedEvent = soundEventFolder:FindFirstChild("AddCharacterLoadedEvent")
  588. if AddCharacterLoadedEvent == nil then
  589. AddCharacterLoadedEvent = Instance.new("RemoteEvent", soundEventFolder)
  590. AddCharacterLoadedEvent.Name = "AddCharacterLoadedEvent"
  591. end
  592.  
  593. -- Notify the server a new character has been loaded
  594. AddCharacterLoadedEvent:FireServer()
  595.  
  596. -- Notify the sound dispatcher this character has left.
  597. game.Players.LocalPlayer.CharacterRemoving:connect(function(character)
  598. RemoveCharacterEvent:FireServer(game.Players.LocalPlayer)
  599. end)
  600. end
  601.  
  602. do
  603. local Figure = script.Parent.Parent
  604. Head = Figure:WaitForChild("Head")
  605. while not Humanoid do
  606. for _,NewHumanoid in pairs(Figure:GetChildren()) do
  607. if NewHumanoid:IsA("Humanoid") then
  608. Humanoid = NewHumanoid
  609. break
  610. end
  611. end
  612. if Humanoid then break end
  613. Figure.ChildAdded:wait()
  614. end
  615. Sounds[SFX.Died] = Head:WaitForChild("Died")
  616. Sounds[SFX.Running] = Head:WaitForChild("Running")
  617. Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
  618. Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
  619. Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
  620. Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
  621. Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
  622. Sounds[SFX.Landing] = Head:WaitForChild("Landing")
  623. Sounds[SFX.Splash] = Head:WaitForChild("Splash")
  624.  
  625. local DefaultServerSoundEvent = nil
  626. if useSoundDispatcher then
  627. DefaultServerSoundEvent = soundEventFolder:FindFirstChild("DefaultServerSoundEvent")
  628. else
  629. DefaultServerSoundEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DefaultServerSoundEvent")
  630. end
  631.  
  632. if DefaultServerSoundEvent then
  633. DefaultServerSoundEvent.OnClientEvent:connect(function(sound, playing, resetPosition)
  634. if resetPosition and sound.TimePosition ~= 0 then
  635. sound.TimePosition = 0
  636. end
  637. if sound.IsPlaying ~= playing then
  638. sound.Playing = playing
  639. end
  640. end)
  641. end
  642. end
  643.  
  644. local IsSoundFilteringEnabled = function()
  645. return game.Workspace.FilteringEnabled and SoundService.RespectFilteringEnabled
  646. end
  647.  
  648. local Util
  649. Util = {
  650.  
  651. --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
  652. YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
  653. --(y - y1)/(x - x1) = m
  654. local m = (pt1y - pt2y) / (pt1x - pt2x)
  655. --float b = pt1.y - m * pt1.x;
  656. local b = (pt1y - m * pt1x)
  657. return m * x + b
  658. end;
  659.  
  660. --Clamps the value of "val" between the "min" and "max"
  661. Clamp = function(val,min,max)
  662. return math.min(max,math.max(min,val))
  663. end;
  664.  
  665. --Gets the horizontal (x,z) velocity magnitude of the given part
  666. HorizontalSpeed = function(Head)
  667. local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
  668. return hVel.magnitude
  669. end;
  670.  
  671. --Gets the vertical (y) velocity magnitude of the given part
  672. VerticalSpeed = function(Head)
  673. return math.abs(Head.Velocity.Y)
  674. end;
  675.  
  676. --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
  677. --If these properties are enabled, use them.
  678. Play = function(sound)
  679. if IsSoundFilteringEnabled() then
  680. sound.CharacterSoundEvent:FireServer(true, true)
  681. end
  682. if sound.TimePosition ~= 0 then
  683. sound.TimePosition = 0
  684. end
  685. if not sound.IsPlaying then
  686. sound.Playing = true
  687. end
  688. end;
  689.  
  690. Pause = function(sound)
  691. if IsSoundFilteringEnabled() then
  692. sound.CharacterSoundEvent:FireServer(false, false)
  693. end
  694. if sound.IsPlaying then
  695. sound.Playing = false
  696. end
  697. end;
  698.  
  699. Resume = function(sound)
  700. if IsSoundFilteringEnabled() then
  701. sound.CharacterSoundEvent:FireServer(true, false)
  702. end
  703. if not sound.IsPlaying then
  704. sound.Playing = true
  705. end
  706. end;
  707.  
  708. Stop = function(sound)
  709. if IsSoundFilteringEnabled() then
  710. sound.CharacterSoundEvent:FireServer(false, true)
  711. end
  712. if sound.IsPlaying then
  713. sound.Playing = false
  714. end
  715. if sound.TimePosition ~= 0 then
  716. sound.TimePosition = 0
  717. end
  718. end;
  719. }
  720.  
  721. do
  722. -- List of all active Looped sounds
  723. local playingLoopedSounds = {}
  724.  
  725. -- Last seen Enum.HumanoidStateType
  726. local activeState = nil
  727.  
  728. local fallSpeed = 0
  729.  
  730. -- Verify and set that "sound" is in "playingLoopedSounds".
  731. function setSoundInPlayingLoopedSounds(sound)
  732. for i=1, #playingLoopedSounds do
  733. if playingLoopedSounds[i] == sound then
  734. return
  735. end
  736. end
  737. table.insert(playingLoopedSounds,sound)
  738. end
  739.  
  740. -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
  741. function stopPlayingLoopedSoundsExcept(except)
  742. for i=#playingLoopedSounds,1,-1 do
  743. if playingLoopedSounds[i] ~= except then
  744. Util.Pause(playingLoopedSounds[i])
  745. table.remove(playingLoopedSounds,i)
  746. end
  747. end
  748. end
  749.  
  750. -- Table of Enum.HumanoidStateType to handling function
  751. local stateUpdateHandler = {
  752. [Enum.HumanoidStateType.Dead] = function()
  753. stopPlayingLoopedSoundsExcept()
  754. local sound = Sounds[SFX.Died]
  755. Util.Play(sound)
  756. end;
  757.  
  758. [Enum.HumanoidStateType.RunningNoPhysics] = function(speed)
  759. stateUpdated(Enum.HumanoidStateType.Running, speed)
  760. end;
  761.  
  762. [Enum.HumanoidStateType.Running] = function(speed)
  763. local sound = Sounds[SFX.Running]
  764. stopPlayingLoopedSoundsExcept(sound)
  765.  
  766. if(useUpdatedLocalSoundFlag and activeState == Enum.HumanoidStateType.Freefall and fallSpeed > 0.1) then
  767. -- Play a landing sound if the character dropped from a large distance
  768. local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
  769. local freeFallSound = Sounds[SFX.FreeFalling]
  770. freeFallSound.Volume = vol
  771. Util.Play(freeFallSound)
  772. fallSpeed = 0
  773. end
  774. if useUpdatedLocalSoundFlag then
  775. if speed ~= nil and speed > 0.5 then
  776. Util.Resume(sound)
  777. setSoundInPlayingLoopedSounds(sound)
  778. elseif speed ~= nil then
  779. stopPlayingLoopedSoundsExcept()
  780. end
  781. else
  782. if Util.HorizontalSpeed(Head) > 0.5 then
  783. Util.Resume(sound)
  784. setSoundInPlayingLoopedSounds(sound)
  785. else
  786. stopPlayingLoopedSoundsExcept()
  787. end
  788. end
  789. end;
  790.  
  791. [Enum.HumanoidStateType.Swimming] = function(speed)
  792. local threshold
  793. if useUpdatedLocalSoundFlag then threshold = speed else threshold = Util.VerticalSpeed(Head) end
  794. if activeState ~= Enum.HumanoidStateType.Swimming and threshold > 0.1 then
  795. local splashSound = Sounds[SFX.Splash]
  796. splashSound.Volume = Util.Clamp(
  797. Util.YForLineGivenXAndTwoPts(
  798. Util.VerticalSpeed(Head),
  799. 100, 0.28,
  800. 350, 1),
  801. 0,1)
  802. Util.Play(splashSound)
  803. end
  804.  
  805. do
  806. local sound = Sounds[SFX.Swimming]
  807. stopPlayingLoopedSoundsExcept(sound)
  808. Util.Resume(sound)
  809. setSoundInPlayingLoopedSounds(sound)
  810. end
  811. end;
  812.  
  813. [Enum.HumanoidStateType.Climbing] = function(speed)
  814. local sound = Sounds[SFX.Climbing]
  815. if useUpdatedLocalSoundFlag then
  816. if speed ~= nil and math.abs(speed) > 0.1 then
  817. Util.Resume(sound)
  818. stopPlayingLoopedSoundsExcept(sound)
  819. else
  820. Util.Pause(sound)
  821. stopPlayingLoopedSoundsExcept(sound)
  822. end
  823. else
  824. if Util.VerticalSpeed(Head) > 0.1 then
  825. Util.Resume(sound)
  826. stopPlayingLoopedSoundsExcept(sound)
  827. else
  828. stopPlayingLoopedSoundsExcept()
  829. end
  830. end
  831.  
  832. setSoundInPlayingLoopedSounds(sound)
  833. end;
  834.  
  835. [Enum.HumanoidStateType.Jumping] = function()
  836. if activeState == Enum.HumanoidStateType.Jumping then
  837. return
  838. end
  839. stopPlayingLoopedSoundsExcept()
  840. local sound = Sounds[SFX.Jumping]
  841. Util.Play(sound)
  842. end;
  843.  
  844. [Enum.HumanoidStateType.GettingUp] = function()
  845. stopPlayingLoopedSoundsExcept()
  846. local sound = Sounds[SFX.GettingUp]
  847. Util.Play(sound)
  848. end;
  849.  
  850. [Enum.HumanoidStateType.Freefall] = function()
  851. if activeState == Enum.HumanoidStateType.Freefall then
  852. return
  853. end
  854. local sound = Sounds[SFX.FreeFalling]
  855. sound.Volume = 0
  856. stopPlayingLoopedSoundsExcept()
  857.  
  858. fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.y))
  859. end;
  860.  
  861. [Enum.HumanoidStateType.FallingDown] = function()
  862. stopPlayingLoopedSoundsExcept()
  863. end;
  864.  
  865. [Enum.HumanoidStateType.Landed] = function()
  866. stopPlayingLoopedSoundsExcept()
  867. if Util.VerticalSpeed(Head) > 75 then
  868. local landingSound = Sounds[SFX.Landing]
  869. landingSound.Volume = Util.Clamp(
  870. Util.YForLineGivenXAndTwoPts(
  871. Util.VerticalSpeed(Head),
  872. 50, 0,
  873. 100, 1),
  874. 0,1)
  875. Util.Play(landingSound)
  876. end
  877. end;
  878.  
  879. [Enum.HumanoidStateType.Seated] = function()
  880. stopPlayingLoopedSoundsExcept()
  881. end;
  882. }
  883.  
  884.  
  885.  
  886. -- Handle state event fired or OnChange fired
  887. function stateUpdated(state, speed)
  888. if stateUpdateHandler[state] ~= nil then
  889. if useUpdatedLocalSoundFlag and (state == Enum.HumanoidStateType.Running
  890. or state == Enum.HumanoidStateType.Climbing
  891. or state == Enum.HumanoidStateType.Swimming
  892. or state == Enum.HumanoidStateType.RunningNoPhysics) then
  893. stateUpdateHandler[state](speed)
  894. else
  895. stateUpdateHandler[state]()
  896. end
  897. end
  898. activeState = state
  899. end
  900.  
  901. Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
  902. Humanoid.Running:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Running, speed) end)
  903. Humanoid.Swimming:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Swimming, speed) end)
  904. Humanoid.Climbing:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Climbing, speed) end)
  905. Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
  906. Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
  907. Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
  908. Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
  909.  
  910.  
  911.  
  912. -- required for proper handling of Landed event
  913.  
  914. Humanoid.StateChanged:connect(function(old, new)
  915. stateUpdated(new)
  916. end)
  917.  
  918.  
  919.  
  920. function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
  921. local stepScale = stepDeltaSeconds / tickSpeedSeconds
  922. do
  923. local sound = Sounds[SFX.FreeFalling]
  924. if activeState == Enum.HumanoidStateType.Freefall then
  925. if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
  926. Util.Resume(sound)
  927.  
  928. --Volume takes 1.1 seconds to go from volume 0 to 1
  929. local ANIMATION_LENGTH_SECONDS = 1.1
  930.  
  931. local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
  932. sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
  933. else
  934. sound.Volume = 0
  935. end
  936. else
  937. Util.Pause(sound)
  938. end
  939. end
  940.  
  941. do
  942. local sound = Sounds[SFX.Running]
  943. if activeState == Enum.HumanoidStateType.Running then
  944. if Util.HorizontalSpeed(Head) < 0.5 then
  945. Util.Pause(sound)
  946. end
  947. end
  948. end
  949. end
  950.  
  951.  
  952. local lastTick = tick()
  953. local TICK_SPEED_SECONDS = 0.25
  954. while true do
  955. onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
  956. lastTick = tick()
  957. wait(TICK_SPEED_SECONDS)
  958. end
  959.  
  960. end
  961.  
  962. end,o67)
  963.  
  964. o68.Name = "Health"
  965. o68.Parent = o4
  966.  
  967. runDummyScript(function()
  968. -- Gradually regenerates the Humanoid's Health over time.
  969.  
  970. local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
  971. local REGEN_STEP = 1 -- Wait this long between each regeneration step.
  972.  
  973. --------------------------------------------------------------------------------
  974.  
  975. local Character = script.Parent
  976. local Humanoid = Character:WaitForChild'Humanoid'
  977.  
  978. --------------------------------------------------------------------------------
  979.  
  980. while true do
  981. while Humanoid.Health < Humanoid.MaxHealth do
  982. local dt = wait(REGEN_STEP)
  983. local dh = dt*REGEN_RATE*Humanoid.MaxHealth
  984. Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
  985. end
  986. Humanoid.HealthChanged:Wait()
  987. end
  988. end,o68)
  989.  
  990. o69.Name = "Animate"
  991. o69.Parent = o4
  992.  
  993. runDummyScript(function()
  994. local Figure = script.Parent
  995. local Torso = Figure:WaitForChild("Torso")
  996. local RightShoulder = Torso:WaitForChild("Right Shoulder")
  997. local LeftShoulder = Torso:WaitForChild("Left Shoulder")
  998. local RightHip = Torso:WaitForChild("Right Hip")
  999. local LeftHip = Torso:WaitForChild("Left Hip")
  1000. local Neck = Torso:WaitForChild("Neck")
  1001. local Humanoid = Figure:WaitForChild("Humanoid")
  1002. local pose = "Standing"
  1003.  
  1004. local currentAnim = ""
  1005. local currentAnimInstance = nil
  1006. local currentAnimTrack = nil
  1007. local currentAnimKeyframeHandler = nil
  1008. local currentAnimSpeed = 1.0
  1009. local animTable = {}
  1010. local animNames = {
  1011. idle = {
  1012. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  1013. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  1014. },
  1015. walk = {
  1016. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  1017. },
  1018. run = {
  1019. { id = "run.xml", weight = 10 }
  1020. },
  1021. jump = {
  1022. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  1023. },
  1024. fall = {
  1025. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  1026. },
  1027. climb = {
  1028. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  1029. },
  1030. sit = {
  1031. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  1032. },
  1033. toolnone = {
  1034. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  1035. },
  1036. toolslash = {
  1037. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  1038. -- { id = "slash.xml", weight = 10 }
  1039. },
  1040. toollunge = {
  1041. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  1042. },
  1043. wave = {
  1044. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  1045. },
  1046. point = {
  1047. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  1048. },
  1049. dance1 = {
  1050. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  1051. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  1052. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  1053. },
  1054. dance2 = {
  1055. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  1056. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  1057. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  1058. },
  1059. dance3 = {
  1060. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  1061. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  1062. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  1063. },
  1064. laugh = {
  1065. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  1066. },
  1067. cheer = {
  1068. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  1069. },
  1070. }
  1071. local dances = {"dance1", "dance2", "dance3"}
  1072.  
  1073. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  1074. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  1075.  
  1076. function configureAnimationSet(name, fileList)
  1077. if (animTable[name] ~= nil) then
  1078. for _, connection in pairs(animTable[name].connections) do
  1079. connection:disconnect()
  1080. end
  1081. end
  1082. animTable[name] = {}
  1083. animTable[name].count = 0
  1084. animTable[name].totalWeight = 0
  1085. animTable[name].connections = {}
  1086.  
  1087. -- check for config values
  1088. local config = script:FindFirstChild(name)
  1089. if (config ~= nil) then
  1090. -- print("Loading anims " .. name)
  1091. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  1092. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  1093. local idx = 1
  1094. for _, childPart in pairs(config:GetChildren()) do
  1095. if (childPart:IsA("Animation")) then
  1096. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  1097. animTable[name][idx] = {}
  1098. animTable[name][idx].anim = childPart
  1099. local weightObject = childPart:FindFirstChild("Weight")
  1100. if (weightObject == nil) then
  1101. animTable[name][idx].weight = 1
  1102. else
  1103. animTable[name][idx].weight = weightObject.Value
  1104. end
  1105. animTable[name].count = animTable[name].count + 1
  1106. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  1107. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  1108. idx = idx + 1
  1109. end
  1110. end
  1111. end
  1112.  
  1113. -- fallback to defaults
  1114. if (animTable[name].count <= 0) then
  1115. for idx, anim in pairs(fileList) do
  1116. animTable[name][idx] = {}
  1117. animTable[name][idx].anim = Instance.new("Animation")
  1118. animTable[name][idx].anim.Name = name
  1119. animTable[name][idx].anim.AnimationId = anim.id
  1120. animTable[name][idx].weight = anim.weight
  1121. animTable[name].count = animTable[name].count + 1
  1122. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  1123. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  1124. end
  1125. end
  1126. end
  1127.  
  1128. -- Setup animation objects
  1129. function scriptChildModified(child)
  1130. local fileList = animNames[child.Name]
  1131. if (fileList ~= nil) then
  1132. configureAnimationSet(child.Name, fileList)
  1133. end
  1134. end
  1135.  
  1136. script.ChildAdded:connect(scriptChildModified)
  1137. script.ChildRemoved:connect(scriptChildModified)
  1138.  
  1139.  
  1140. for name, fileList in pairs(animNames) do
  1141. configureAnimationSet(name, fileList)
  1142. end
  1143.  
  1144. -- ANIMATION
  1145.  
  1146. -- declarations
  1147. local toolAnim = "None"
  1148. local toolAnimTime = 0
  1149.  
  1150. local jumpAnimTime = 0
  1151. local jumpAnimDuration = 0.3
  1152.  
  1153. local toolTransitionTime = 0.1
  1154. local fallTransitionTime = 0.3
  1155. local jumpMaxLimbVelocity = 0.75
  1156.  
  1157. -- functions
  1158.  
  1159. function stopAllAnimations()
  1160. local oldAnim = currentAnim
  1161.  
  1162. -- return to idle if finishing an emote
  1163. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  1164. oldAnim = "idle"
  1165. end
  1166.  
  1167. currentAnim = ""
  1168. currentAnimInstance = nil
  1169. if (currentAnimKeyframeHandler ~= nil) then
  1170. currentAnimKeyframeHandler:disconnect()
  1171. end
  1172.  
  1173. if (currentAnimTrack ~= nil) then
  1174. currentAnimTrack:Stop()
  1175. currentAnimTrack:Destroy()
  1176. currentAnimTrack = nil
  1177. end
  1178. return oldAnim
  1179. end
  1180.  
  1181. function setAnimationSpeed(speed)
  1182. if speed ~= currentAnimSpeed then
  1183. currentAnimSpeed = speed
  1184. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  1185. end
  1186. end
  1187.  
  1188. function keyFrameReachedFunc(frameName)
  1189. if (frameName == "End") then
  1190.  
  1191. local repeatAnim = currentAnim
  1192. -- return to idle if finishing an emote
  1193. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  1194. repeatAnim = "idle"
  1195. end
  1196.  
  1197. local animSpeed = currentAnimSpeed
  1198. playAnimation(repeatAnim, 0.0, Humanoid)
  1199. setAnimationSpeed(animSpeed)
  1200. end
  1201. end
  1202.  
  1203. -- Preload animations
  1204. function playAnimation(animName, transitionTime, humanoid)
  1205.  
  1206. local roll = math.random(1, animTable[animName].totalWeight)
  1207. local origRoll = roll
  1208. local idx = 1
  1209. while (roll > animTable[animName][idx].weight) do
  1210. roll = roll - animTable[animName][idx].weight
  1211. idx = idx + 1
  1212. end
  1213. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  1214. local anim = animTable[animName][idx].anim
  1215.  
  1216. -- switch animation
  1217. if (anim ~= currentAnimInstance) then
  1218.  
  1219. if (currentAnimTrack ~= nil) then
  1220. currentAnimTrack:Stop(transitionTime)
  1221. currentAnimTrack:Destroy()
  1222. end
  1223.  
  1224. currentAnimSpeed = 1.0
  1225.  
  1226. -- load it to the humanoid; get AnimationTrack
  1227. currentAnimTrack = humanoid:LoadAnimation(anim)
  1228. currentAnimTrack.Priority = Enum.AnimationPriority.Core
  1229.  
  1230. -- play the animation
  1231. currentAnimTrack:Play(transitionTime)
  1232. currentAnim = animName
  1233. currentAnimInstance = anim
  1234.  
  1235. -- set up keyframe name triggers
  1236. if (currentAnimKeyframeHandler ~= nil) then
  1237. currentAnimKeyframeHandler:disconnect()
  1238. end
  1239. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  1240.  
  1241. end
  1242.  
  1243. end
  1244.  
  1245. -------------------------------------------------------------------------------------------
  1246. -------------------------------------------------------------------------------------------
  1247.  
  1248. local toolAnimName = ""
  1249. local toolAnimTrack = nil
  1250. local toolAnimInstance = nil
  1251. local currentToolAnimKeyframeHandler = nil
  1252.  
  1253. function toolKeyFrameReachedFunc(frameName)
  1254. if (frameName == "End") then
  1255. -- print("Keyframe : ".. frameName)
  1256. playToolAnimation(toolAnimName, 0.0, Humanoid)
  1257. end
  1258. end
  1259.  
  1260.  
  1261. function playToolAnimation(animName, transitionTime, humanoid, priority)
  1262.  
  1263. local roll = math.random(1, animTable[animName].totalWeight)
  1264. local origRoll = roll
  1265. local idx = 1
  1266. while (roll > animTable[animName][idx].weight) do
  1267. roll = roll - animTable[animName][idx].weight
  1268. idx = idx + 1
  1269. end
  1270. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  1271. local anim = animTable[animName][idx].anim
  1272.  
  1273. if (toolAnimInstance ~= anim) then
  1274.  
  1275. if (toolAnimTrack ~= nil) then
  1276. toolAnimTrack:Stop()
  1277. toolAnimTrack:Destroy()
  1278. transitionTime = 0
  1279. end
  1280.  
  1281. -- load it to the humanoid; get AnimationTrack
  1282. toolAnimTrack = humanoid:LoadAnimation(anim)
  1283. if priority then
  1284. toolAnimTrack.Priority = priority
  1285. end
  1286.  
  1287. -- play the animation
  1288. toolAnimTrack:Play(transitionTime)
  1289. toolAnimName = animName
  1290. toolAnimInstance = anim
  1291.  
  1292. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  1293. end
  1294. end
  1295.  
  1296. function stopToolAnimations()
  1297. local oldAnim = toolAnimName
  1298.  
  1299. if (currentToolAnimKeyframeHandler ~= nil) then
  1300. currentToolAnimKeyframeHandler:disconnect()
  1301. end
  1302.  
  1303. toolAnimName = ""
  1304. toolAnimInstance = nil
  1305. if (toolAnimTrack ~= nil) then
  1306. toolAnimTrack:Stop()
  1307. toolAnimTrack:Destroy()
  1308. toolAnimTrack = nil
  1309. end
  1310.  
  1311.  
  1312. return oldAnim
  1313. end
  1314.  
  1315. -------------------------------------------------------------------------------------------
  1316. -------------------------------------------------------------------------------------------
  1317.  
  1318.  
  1319. function onRunning(speed)
  1320. if speed > 0.01 then
  1321. playAnimation("walk", 0.1, Humanoid)
  1322. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  1323. setAnimationSpeed(speed / 14.5)
  1324. end
  1325. pose = "Running"
  1326. else
  1327. if emoteNames[currentAnim] == nil then
  1328. playAnimation("idle", 0.1, Humanoid)
  1329. pose = "Standing"
  1330. end
  1331. end
  1332. end
  1333.  
  1334. function onDied()
  1335. pose = "Dead"
  1336. end
  1337.  
  1338. function onJumping()
  1339. playAnimation("jump", 0.1, Humanoid)
  1340. jumpAnimTime = jumpAnimDuration
  1341. pose = "Jumping"
  1342. end
  1343.  
  1344. function onClimbing(speed)
  1345. playAnimation("climb", 0.1, Humanoid)
  1346. setAnimationSpeed(speed / 12.0)
  1347. pose = "Climbing"
  1348. end
  1349.  
  1350. function onGettingUp()
  1351. pose = "GettingUp"
  1352. end
  1353.  
  1354. function onFreeFall()
  1355. if (jumpAnimTime <= 0) then
  1356. playAnimation("fall", fallTransitionTime, Humanoid)
  1357. end
  1358. pose = "FreeFall"
  1359. end
  1360.  
  1361. function onFallingDown()
  1362. pose = "FallingDown"
  1363. end
  1364.  
  1365. function onSeated()
  1366. pose = "Seated"
  1367. end
  1368.  
  1369. function onPlatformStanding()
  1370. pose = "PlatformStanding"
  1371. end
  1372.  
  1373. function onSwimming(speed)
  1374. if speed > 0 then
  1375. pose = "Running"
  1376. else
  1377. pose = "Standing"
  1378. end
  1379. end
  1380.  
  1381. function getTool()
  1382. for _, kid in ipairs(Figure:GetChildren()) do
  1383. if kid.className == "Tool" then return kid end
  1384. end
  1385. return nil
  1386. end
  1387.  
  1388. function getToolAnim(tool)
  1389. for _, c in ipairs(tool:GetChildren()) do
  1390. if c.Name == "toolanim" and c.className == "StringValue" then
  1391. return c
  1392. end
  1393. end
  1394. return nil
  1395. end
  1396.  
  1397. function animateTool()
  1398.  
  1399. if (toolAnim == "None") then
  1400. playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
  1401. return
  1402. end
  1403.  
  1404. if (toolAnim == "Slash") then
  1405. playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
  1406. return
  1407. end
  1408.  
  1409. if (toolAnim == "Lunge") then
  1410. playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
  1411. return
  1412. end
  1413. end
  1414.  
  1415. function moveSit()
  1416. RightShoulder.MaxVelocity = 0.15
  1417. LeftShoulder.MaxVelocity = 0.15
  1418. RightShoulder:SetDesiredAngle(3.14 /2)
  1419. LeftShoulder:SetDesiredAngle(-3.14 /2)
  1420. RightHip:SetDesiredAngle(3.14 /2)
  1421. LeftHip:SetDesiredAngle(-3.14 /2)
  1422. end
  1423.  
  1424. local lastTick = 0
  1425.  
  1426. function move(time)
  1427. local amplitude = 1
  1428. local frequency = 1
  1429. local deltaTime = time - lastTick
  1430. lastTick = time
  1431.  
  1432. local climbFudge = 0
  1433. local setAngles = false
  1434.  
  1435. if (jumpAnimTime > 0) then
  1436. jumpAnimTime = jumpAnimTime - deltaTime
  1437. end
  1438.  
  1439. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  1440. playAnimation("fall", fallTransitionTime, Humanoid)
  1441. elseif (pose == "Seated") then
  1442. playAnimation("sit", 0.5, Humanoid)
  1443. return
  1444. elseif (pose == "Running") then
  1445. playAnimation("walk", 0.1, Humanoid)
  1446. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  1447. -- print("Wha " .. pose)
  1448. stopAllAnimations()
  1449. amplitude = 0.1
  1450. frequency = 1
  1451. setAngles = true
  1452. end
  1453.  
  1454. if (setAngles) then
  1455. local desiredAngle = amplitude * math.sin(time * frequency)
  1456.  
  1457. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  1458. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  1459. RightHip:SetDesiredAngle(-desiredAngle)
  1460. LeftHip:SetDesiredAngle(-desiredAngle)
  1461. end
  1462.  
  1463. -- Tool Animation handling
  1464. local tool = getTool()
  1465. if tool and tool:FindFirstChild("Handle") then
  1466.  
  1467. local animStringValueObject = getToolAnim(tool)
  1468.  
  1469. if animStringValueObject then
  1470. toolAnim = animStringValueObject.Value
  1471. -- message recieved, delete StringValue
  1472. animStringValueObject.Parent = nil
  1473. toolAnimTime = time + .3
  1474. end
  1475.  
  1476. if time > toolAnimTime then
  1477. toolAnimTime = 0
  1478. toolAnim = "None"
  1479. end
  1480.  
  1481. animateTool()
  1482. else
  1483. stopToolAnimations()
  1484. toolAnim = "None"
  1485. toolAnimInstance = nil
  1486. toolAnimTime = 0
  1487. end
  1488. end
  1489.  
  1490. -- connect events
  1491. Humanoid.Died:connect(onDied)
  1492. Humanoid.Running:connect(onRunning)
  1493. Humanoid.Jumping:connect(onJumping)
  1494. Humanoid.Climbing:connect(onClimbing)
  1495. Humanoid.GettingUp:connect(onGettingUp)
  1496. Humanoid.FreeFalling:connect(onFreeFall)
  1497. Humanoid.FallingDown:connect(onFallingDown)
  1498. Humanoid.Seated:connect(onSeated)
  1499. Humanoid.PlatformStanding:connect(onPlatformStanding)
  1500. Humanoid.Swimming:connect(onSwimming)
  1501.  
  1502. -- setup emote chat hook
  1503. game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
  1504. local emote = ""
  1505. if msg == "/e dance" then
  1506. emote = dances[math.random(1, #dances)]
  1507. elseif (string.sub(msg, 1, 3) == "/e ") then
  1508. emote = string.sub(msg, 4)
  1509. elseif (string.sub(msg, 1, 7) == "/emote ") then
  1510. emote = string.sub(msg, 8)
  1511. end
  1512.  
  1513. if (pose == "Standing" and emoteNames[emote] ~= nil) then
  1514. playAnimation(emote, 0.1, Humanoid)
  1515. end
  1516.  
  1517. end)
  1518.  
  1519.  
  1520. -- main program
  1521.  
  1522. -- initialize to idle
  1523. playAnimation("idle", 0.1, Humanoid)
  1524. pose = "Standing"
  1525.  
  1526. while Figure.Parent ~= nil do
  1527. local _, time = wait(0.1)
  1528. move(time)
  1529. end
  1530.  
  1531.  
  1532.  
  1533. end,o69)
  1534.  
  1535. o70.Name = "idle"
  1536. o70.Parent = o69
  1537. o71.Name = "Animation1"
  1538. o71.Parent = o70
  1539. o71.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  1540. o72.Name = "Weight"
  1541. o72.Parent = o71
  1542. o72.Value = 9
  1543. o73.Name = "Animation2"
  1544. o73.Parent = o70
  1545. o73.AnimationId = "http://www.roblox.com/asset/?id=180435792"
  1546. o74.Name = "Weight"
  1547. o74.Parent = o73
  1548. o74.Value = 1
  1549. o75.Name = "walk"
  1550. o75.Parent = o69
  1551. o76.Name = "WalkAnim"
  1552. o76.Parent = o75
  1553. o76.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1554. o77.Name = "run"
  1555. o77.Parent = o69
  1556. o78.Name = "RunAnim"
  1557. o78.Parent = o77
  1558. o78.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1559. o79.Name = "jump"
  1560. o79.Parent = o69
  1561. o80.Name = "JumpAnim"
  1562. o80.Parent = o79
  1563. o80.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  1564. o81.Name = "climb"
  1565. o81.Parent = o69
  1566. o82.Name = "ClimbAnim"
  1567. o82.Parent = o81
  1568. o82.AnimationId = "http://www.roblox.com/asset/?id=180436334"
  1569. o83.Name = "toolnone"
  1570. o83.Parent = o69
  1571. o84.Name = "ToolNoneAnim"
  1572. o84.Parent = o83
  1573. o84.AnimationId = "http://www.roblox.com/asset/?id=182393478"
  1574. o85.Name = "fall"
  1575. o85.Parent = o69
  1576. o86.Name = "FallAnim"
  1577. o86.Parent = o85
  1578. o86.AnimationId = "http://www.roblox.com/asset/?id=180436148"
  1579. o87.Name = "sit"
  1580. o87.Parent = o69
  1581. o88.Name = "SitAnim"
  1582. o88.Parent = o87
  1583. o88.AnimationId = "http://www.roblox.com/asset/?id=178130996"
  1584. o89.Name = "ScaleDampeningPercent"
  1585. o89.Parent = o69
  1586. o89.Value = 0.39999997615814
  1587. o90.Parent = o4
  1588. o90.HeadColor = BrickColor.new("Pastel brown")
  1589. o90.LeftArmColor = BrickColor.new("Pastel brown")
  1590. o90.LeftLegColor = BrickColor.new("Pastel brown")
  1591. o90.RightArmColor = BrickColor.new("Pastel brown")
  1592. o90.RightLegColor = BrickColor.new("Pastel brown")
  1593. o90.TorsoColor = BrickColor.new("Pastel brown")
  1594. o91.Name = "Pants"
  1595. o91.Parent = o4
  1596. o91.PantsTemplate = "http://www.roblox.com/asset/?id=1439542143"
  1597. o92.Name = "Shirt"
  1598. o92.Parent = o4
  1599. o92.ShirtTemplate = "http://www.roblox.com/asset/?id=1439532842"
  1600. o94.Name = "Handle"
  1601. o94.Parent = mas
  1602. o94.Position = Vector3.new(45.1692505, 4.86831141, 17.736681)
  1603. o94.Rotation = Vector3.new(0, -35.5099983, 0)
  1604. o94.RotVelocity = Vector3.new(-7.95405924e-07, 8.80337605e-15, 2.12652571e-06)
  1605. o94.Velocity = Vector3.new(-4.70551686e-06, -0.0988538861, -1.7600521e-06)
  1606. o94.CanCollide = false
  1607. o94.Locked = true
  1608. o94.FormFactor = Enum.FormFactor.Custom
  1609. o94.Size = Vector3.new(1.45002651, 2.35999823, 1.24000001)
  1610. o94.CFrame = CFrame.new(45.1692505, 4.86831141, 17.736681, 0.814045668, -6.57990853e-08, -0.580800891, 6.78578331e-08, 1, -1.81812929e-08, 0.580800891, -2.4611488e-08, 0.814045668)
  1611. o94.BottomSurface = Enum.SurfaceType.Smooth
  1612. o94.TopSurface = Enum.SurfaceType.Smooth
  1613. o94.Position = Vector3.new(45.1692505, 4.86831141, 17.736681)
  1614. o94.velocity = Vector3.new(-4.70551686e-06, -0.0988538861, -1.7600521e-06)
  1615. o95.Parent = o94
  1616. o95.MeshId = "http://www.roblox.com/asset/?id=188565062 "
  1617. o95.TextureId = "http://www.roblox.com/asset/?id=188565095 "
  1618. o95.MeshType = Enum.MeshType.FileMesh
  1619. o97.Name = "OriginalSize"
  1620. o97.Parent = o94
  1621. o97.Value = Vector3.new(1.45002651, 2.35999823, 1.24000001)
  1622. o98.Name = "AccessoryWeld"
  1623. o98.Parent = o94
  1624. o98.C0 = CFrame.new(8.65748007e-09, 0.199999809, -0.0252722446, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1625. o98.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1626. o98.Part0 = o94
  1627. o98.Part1 = o5
  1628. o99.Name = "Chest"
  1629. o99.Parent = o4
  1630. o100.Parent = o99
  1631. o100.BrickColor = BrickColor.new("Light orange")
  1632. o100.Position = Vector3.new(45.1839294, 4.43847609, 17.7161083)
  1633. o100.Rotation = Vector3.new(0, -35.5099983, 0)
  1634. o100.RotVelocity = Vector3.new(-8.32025592e-07, 1.01844294e-14, 2.22443464e-06)
  1635. o100.Velocity = Vector3.new(-3.96510995e-06, -0.158884585, -1.48310619e-06)
  1636. o100.CanCollide = false
  1637. o100.Locked = true
  1638. o100.FormFactor = Enum.FormFactor.Symmetric
  1639. o100.Size = Vector3.new(2, 1, 1)
  1640. o100.CFrame = CFrame.new(45.1839294, 4.43847609, 17.7161083, 0.814045668, 5.84624154e-08, -0.580800891, -6.02916046e-08, 1, 1.61540701e-08, 0.580800891, 2.18672653e-08, 0.814045668)
  1641. o100.TopSurface = Enum.SurfaceType.Smooth
  1642. o100.Color = Color3.new(0.917647, 0.721569, 0.572549)
  1643. o100.Position = Vector3.new(45.1839294, 4.43847609, 17.7161083)
  1644. o100.velocity = Vector3.new(-3.96510995e-06, -0.158884585, -1.48310619e-06)
  1645. o101.Parent = o100
  1646. o101.Offset = Vector3.new(0, 0.200000003, 0)
  1647. o101.Scale = Vector3.new(0.800000012, 1.60000002, 1.60000002)
  1648. o102.Parent = o100
  1649. o102.Texture = "http://www.roblox.com/asset/?id=36047347"
  1650. o102.Face = Enum.NormalId.Bottom
  1651. o103.Parent = o100
  1652. o103.Texture = "http://www.roblox.com/asset/?id=36047330"
  1653. o103.Face = Enum.NormalId.Back
  1654. o104.Parent = o100
  1655. o104.Texture = "http://www.roblox.com/asset/?id=36047341"
  1656. o104.Face = Enum.NormalId.Top
  1657. o105.Parent = o100
  1658. o105.Texture = "http://www.roblox.com/asset/?id=36047315"
  1659. o105.Face = Enum.NormalId.Right
  1660. o106.Parent = o100
  1661. o106.Texture = "http://www.roblox.com/asset/?id=36047323"
  1662. o106.Face = Enum.NormalId.Left
  1663. o107.Parent = o100
  1664. o107.Texture = "http://www.roblox.com/asset/?id=36047310"
  1665. o108.Name = "DeathScript"
  1666. o108.Parent = o100
  1667.  
  1668. runDummyScript(function()
  1669. local human
  1670.  
  1671. while true do
  1672. human = script.Parent.Parent.Parent:FindFirstChild("Humanoid")
  1673. if human ~= nil then
  1674. break
  1675. else
  1676. wait(5)
  1677. end
  1678. end
  1679.  
  1680. function onDeath()
  1681. script.Parent.CanCollide = true
  1682. script.Parent.Parent.Middle.CanCollide = true
  1683. script.Parent.Parent.Parent.Arm1.Middle.CanCollide = true
  1684. script.Parent.Parent.Parent.Arm2.Middle.CanCollide = true
  1685. script.Parent.Parent.Parent.Leg1.Middle.CanCollide = true
  1686. script.Parent.Parent.Parent.Leg2.Middle.CanCollide = true
  1687. end
  1688.  
  1689. human.Died:connect(onDeath)
  1690. end,o108)
  1691.  
  1692. o109.Name = "Middle"
  1693. o109.Parent = o99
  1694. o109.Position = Vector3.new(45.1839294, 2.97163534, 17.7161083)
  1695. o109.Rotation = Vector3.new(0, -35.5099983, 0)
  1696. o109.RotVelocity = Vector3.new(6.99950419e-07, 6.8143682e-15, -1.87134401e-06)
  1697. o109.Velocity = Vector3.new(5.85304292e-07, 0.181635305, 2.18924995e-07)
  1698. o109.CanCollide = false
  1699. o109.Locked = true
  1700. o109.FormFactor = Enum.FormFactor.Symmetric
  1701. o109.Size = Vector3.new(2, 2, 1)
  1702. o109.CFrame = CFrame.new(45.1839294, 2.97163534, 17.7161083, 0.814045668, 8.97444963e-08, -0.580800891, -9.25522414e-08, 1, 2.47980747e-08, 0.580800891, 3.35676589e-08, 0.814045668)
  1703. o109.LeftSurface = Enum.SurfaceType.Weld
  1704. o109.RightSurface = Enum.SurfaceType.Weld
  1705. o109.Position = Vector3.new(45.1839294, 2.97163534, 17.7161083)
  1706. o109.velocity = Vector3.new(5.85304292e-07, 0.181635305, 2.18924995e-07)
  1707. o110.Name = "roblox"
  1708. o110.Parent = o109
  1709. o111.Parent = o109
  1710. o111.maxTorque = Vector3.new(0, 0, 0)
  1711. o111.MaxTorque = Vector3.new(0, 0, 0)
  1712. o112.Parent = o109
  1713. o112.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  1714. o113.Parent = o109
  1715. o113.Texture = "http://www.roblox.com/asset/?id=38934753"
  1716. o114.Parent = o109
  1717. o114.Texture = "http://www.roblox.com/asset/?id=38934762"
  1718. o114.Face = Enum.NormalId.Right
  1719. o115.Parent = o109
  1720. o115.Texture = "http://www.roblox.com/asset/?id=38934762"
  1721. o115.Face = Enum.NormalId.Left
  1722. o116.Parent = o109
  1723. o116.Texture = "http://www.roblox.com/asset/?id=38934731"
  1724. o116.Face = Enum.NormalId.Back
  1725. o117.Parent = o109
  1726. o117.Texture = "http://www.roblox.com/asset/?id=38934780"
  1727. o117.Face = Enum.NormalId.Top
  1728. o118.Parent = o109
  1729. o118.Texture = "http://www.roblox.com/asset/?id=38934740"
  1730. o118.Face = Enum.NormalId.Bottom
  1731. o119.Parent = o109
  1732. o119.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1733. o119.C1 = CFrame.new(0, -1.50001192, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1734. o119.Part0 = o109
  1735. o119.Part1 = o100
  1736. o120.Parent = o109
  1737. o120.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1738. o120.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1739. o120.Part0 = o109
  1740. o120.Part1 = o109
  1741. o121.Name = "Arm2"
  1742. o121.Parent = o4
  1743. o122.Name = "Middle"
  1744. o122.Parent = o121
  1745. o122.BrickColor = BrickColor.new("Light orange")
  1746. o122.Position = Vector3.new(46.4081688, 2.95613194, 18.5827065)
  1747. o122.Rotation = Vector3.new(0.349999994, -35.1499977, 0.189999998)
  1748. o122.RotVelocity = Vector3.new(5.44140278e-07, 4.05322121e-15, -1.45479544e-06)
  1749. o122.Velocity = Vector3.new(4.34361482e-07, -0.304247439, 1.6246517e-07)
  1750. o122.CanCollide = false
  1751. o122.Locked = true
  1752. o122.FormFactor = Enum.FormFactor.Symmetric
  1753. o122.Size = Vector3.new(1, 2, 1)
  1754. o122.CFrame = CFrame.new(46.4081688, 2.95613194, 18.5827065, 0.817628503, -0.0027554878, -0.575739563, -0.000136445786, 0.999987602, -0.00497969612, 0.575746179, 0.00415009446, 0.817618012)
  1755. o122.Color = Color3.new(0.917647, 0.721569, 0.572549)
  1756. o122.Position = Vector3.new(46.4081688, 2.95613194, 18.5827065)
  1757. o122.velocity = Vector3.new(4.34361482e-07, -0.304247439, 1.6246517e-07)
  1758. o123.Parent = o122
  1759. o123.Texture = "http://www.roblox.com/asset/?id=38934568"
  1760. o123.Face = Enum.NormalId.Bottom
  1761. o124.Parent = o122
  1762. o124.Texture = "http://www.roblox.com/asset/?id=38934613"
  1763. o124.Face = Enum.NormalId.Top
  1764. o125.Parent = o122
  1765. o125.Texture = "http://www.roblox.com/asset/?id=38934581"
  1766. o126.Parent = o122
  1767. o126.Texture = "http://www.roblox.com/asset/?id=38934591"
  1768. o126.Face = Enum.NormalId.Right
  1769. o127.Parent = o122
  1770. o127.Texture = "http://www.roblox.com/asset/?id=38934560"
  1771. o127.Face = Enum.NormalId.Back
  1772. o128.Parent = o122
  1773. o128.Texture = "http://www.roblox.com/asset/?id=38934601"
  1774. o128.Face = Enum.NormalId.Left
  1775. o129.Parent = o122
  1776. o129.Offset = Vector3.new(-0.300000012, 0, 0)
  1777. o129.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  1778. o130.Parent = o122
  1779. o130.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1780. o130.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1781. o130.Part0 = o122
  1782. o130.Part1 = o122
  1783. o131.Name = "Leg1"
  1784. o131.Parent = o4
  1785. o132.Name = "Middle"
  1786. o132.Parent = o131
  1787. o132.BrickColor = BrickColor.new("Br. yellowish green")
  1788. o132.Position = Vector3.new(44.7769051, 0.96840775, 17.4257088)
  1789. o132.Rotation = Vector3.new(0, -35.5099983, 0)
  1790. o132.RotVelocity = Vector3.new(5.14148667e-07, 3.64952065e-15, -1.37461734e-06)
  1791. o132.Velocity = Vector3.new(-2.3226894e-06, 0.167274505, -8.68756445e-07)
  1792. o132.CanCollide = false
  1793. o132.Locked = true
  1794. o132.FormFactor = Enum.FormFactor.Symmetric
  1795. o132.Size = Vector3.new(1, 2, 1)
  1796. o132.CFrame = CFrame.new(44.7769051, 0.96840775, 17.4257088, 0.814045668, -4.17685513e-08, -0.580800891, 4.3075211e-08, 1, -1.1541581e-08, 0.580800891, -1.56227475e-08, 0.814045668)
  1797. o132.BottomSurface = Enum.SurfaceType.Smooth
  1798. o132.Color = Color3.new(0.643137, 0.741176, 0.278431)
  1799. o132.Position = Vector3.new(44.7769051, 0.96840775, 17.4257088)
  1800. o132.velocity = Vector3.new(-2.3226894e-06, 0.167274505, -8.68756445e-07)
  1801. o133.Parent = o132
  1802. o133.Offset = Vector3.new(0.100000001, 0, 0)
  1803. o133.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  1804. o134.Parent = o132
  1805. o134.Texture = "http://www.roblox.com/asset/?id=38936226"
  1806. o135.Parent = o132
  1807. o135.Texture = "http://www.roblox.com/asset/?id=38936255"
  1808. o135.Face = Enum.NormalId.Left
  1809. o136.Parent = o132
  1810. o136.Texture = "http://www.roblox.com/asset/?id=38936242"
  1811. o136.Face = Enum.NormalId.Right
  1812. o137.Parent = o132
  1813. o137.Texture = "http://www.roblox.com/asset/?id=38936209"
  1814. o137.Face = Enum.NormalId.Back
  1815. o138.Parent = o132
  1816. o138.Texture = "http://www.roblox.com/asset/?id=38934719"
  1817. o138.Face = Enum.NormalId.Top
  1818. o139.Parent = o132
  1819. o139.Texture = "http://www.roblox.com/asset/?id=38934712"
  1820. o139.Face = Enum.NormalId.Bottom
  1821. o140.Parent = o132
  1822. o140.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1823. o140.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1824. o140.Part0 = o132
  1825. o140.Part1 = o132
  1826. o141.Name = "Leg2"
  1827. o141.Parent = o4
  1828. o142.Name = "Middle"
  1829. o142.Parent = o141
  1830. o142.BrickColor = BrickColor.new("Br. yellowish green")
  1831. o142.Position = Vector3.new(45.5959358, 0.968318582, 17.9995232)
  1832. o142.Rotation = Vector3.new(0.599999964, -35.5099983, 0.349999994)
  1833. o142.RotVelocity = Vector3.new(-9.39738186e-07, 1.22918787e-14, 2.51247047e-06)
  1834. o142.Velocity = Vector3.new(4.23901884e-06, 0.039614778, 1.58551825e-06)
  1835. o142.CanCollide = false
  1836. o142.Locked = true
  1837. o142.FormFactor = Enum.FormFactor.Symmetric
  1838. o142.Size = Vector3.new(1, 2, 1)
  1839. o142.CFrame = CFrame.new(45.5959358, 0.968318582, 17.9995232, 0.814045668, -0.00498333899, -0.580779493, 3.36844153e-08, 0.999963164, -0.00858006906, 0.580800891, 0.00698454818, 0.814015687)
  1840. o142.BottomSurface = Enum.SurfaceType.Smooth
  1841. o142.Color = Color3.new(0.643137, 0.741176, 0.278431)
  1842. o142.Position = Vector3.new(45.5959358, 0.968318582, 17.9995232)
  1843. o142.velocity = Vector3.new(4.23901884e-06, 0.039614778, 1.58551825e-06)
  1844. o143.Parent = o142
  1845. o143.Offset = Vector3.new(-0.100000001, 0, 0)
  1846. o143.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  1847. o144.Parent = o142
  1848. o144.Texture = "http://www.roblox.com/asset/?id=38936226"
  1849. o145.Parent = o142
  1850. o145.Texture = "http://www.roblox.com/asset/?id=38936255"
  1851. o145.Face = Enum.NormalId.Left
  1852. o146.Parent = o142
  1853. o146.Texture = "http://www.roblox.com/asset/?id=38936242"
  1854. o146.Face = Enum.NormalId.Right
  1855. o147.Parent = o142
  1856. o147.Texture = "http://www.roblox.com/asset/?id=38936209"
  1857. o147.Face = Enum.NormalId.Back
  1858. o148.Parent = o142
  1859. o148.Texture = "http://www.roblox.com/asset/?id=38934719"
  1860. o148.Face = Enum.NormalId.Top
  1861. o149.Parent = o142
  1862. o149.Texture = "http://www.roblox.com/asset/?id=38934712"
  1863. o149.Face = Enum.NormalId.Bottom
  1864. o150.Parent = o142
  1865. o150.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1866. o150.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1867. o150.Part0 = o142
  1868. o150.Part1 = o142
  1869. o151.Name = "Arm1"
  1870. o151.Parent = o4
  1871. o152.Name = "Middle"
  1872. o152.Parent = o151
  1873. o152.BrickColor = BrickColor.new("Light orange")
  1874. o152.Position = Vector3.new(43.996048, 2.98104191, 16.7983818)
  1875. o152.Rotation = Vector3.new(8.03999996, -35.2399979, 4.65999985)
  1876. o152.RotVelocity = Vector3.new(6.87771376e-07, 5.64605354e-15, -1.83882344e-06)
  1877. o152.Velocity = Vector3.new(5.81158076e-07, 0.218425527, 2.17369347e-07)
  1878. o152.CanCollide = false
  1879. o152.Locked = true
  1880. o152.FormFactor = Enum.FormFactor.Symmetric
  1881. o152.Size = Vector3.new(1, 2, 1)
  1882. o152.CFrame = CFrame.new(43.996048, 2.98104191, 16.7983818, 0.814045668, -0.0663845763, -0.576994598, 8.30649185e-08, 0.993446469, -0.114298224, 0.580800951, 0.0930439159, 0.808710814)
  1883. o152.Color = Color3.new(0.917647, 0.721569, 0.572549)
  1884. o152.Position = Vector3.new(43.996048, 2.98104191, 16.7983818)
  1885. o152.velocity = Vector3.new(5.81158076e-07, 0.218425527, 2.17369347e-07)
  1886. o153.Parent = o152
  1887. o153.Texture = "http://www.roblox.com/asset/?id=38934568"
  1888. o153.Face = Enum.NormalId.Bottom
  1889. o154.Parent = o152
  1890. o154.Texture = "http://www.roblox.com/asset/?id=38934613"
  1891. o154.Face = Enum.NormalId.Top
  1892. o155.Parent = o152
  1893. o155.Texture = "http://www.roblox.com/asset/?id=38934581"
  1894. o156.Parent = o152
  1895. o156.Texture = "http://www.roblox.com/asset/?id=38934591"
  1896. o156.Face = Enum.NormalId.Right
  1897. o157.Parent = o152
  1898. o157.Texture = "http://www.roblox.com/asset/?id=38934560"
  1899. o157.Face = Enum.NormalId.Back
  1900. o158.Parent = o152
  1901. o158.Texture = "http://www.roblox.com/asset/?id=38934601"
  1902. o158.Face = Enum.NormalId.Left
  1903. o159.Parent = o152
  1904. o159.Offset = Vector3.new(0.300000012, 0, 0)
  1905. o159.Scale = Vector3.new(0.800000012, 1, 0.800000012)
  1906. o160.Parent = o152
  1907. o160.C0 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1908. o160.C1 = CFrame.new(0, 0, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1909. o160.Part0 = o152
  1910. o160.Part1 = o152
  1911. mas.Parent = workspace
  1912. mas:MakeJoints()
  1913. local mas1 = mas:GetChildren()
  1914. for i=1,#mas1 do
  1915. mas1[i].Parent = script
  1916. ypcall(function() mas1[i]:MakeJoints() end)
  1917. end
  1918. mas:Destroy()
  1919. for i=1,#cors do
  1920. coroutine.resume(cors[i])
  1921. end
  1922. mess_handle.Text = "Resetting"
  1923. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  1924. v:LoadCharacter()
  1925. end
  1926. wait(1)
  1927. mess_handle:Remove()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement