Advertisement
lafur

Untitled

Oct 19th, 2018
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 81.39 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. o3 = Instance.new("Model")
  21. o4 = Instance.new("Model")
  22. o5 = Instance.new("Model")
  23. o6 = Instance.new("Part")
  24. o7 = Instance.new("SpecialMesh")
  25. o8 = Instance.new("Part")
  26. o9 = Instance.new("SpecialMesh")
  27. o10 = Instance.new("Part")
  28. o11 = Instance.new("SpecialMesh")
  29. o12 = Instance.new("Part")
  30. o13 = Instance.new("Script")
  31. o14 = Instance.new("ClickDetector")
  32. o15 = Instance.new("Script")
  33. o16 = Instance.new("Smoke")
  34. o17 = Instance.new("Script")
  35. o18 = Instance.new("BlockMesh")
  36. o19 = Instance.new("Part")
  37. o20 = Instance.new("BlockMesh")
  38. o21 = Instance.new("Part")
  39. o22 = Instance.new("SpecialMesh")
  40. o23 = Instance.new("Part")
  41. o24 = Instance.new("SpecialMesh")
  42. o25 = Instance.new("Part")
  43. o26 = Instance.new("SpecialMesh")
  44. o27 = Instance.new("Part")
  45. o28 = Instance.new("CylinderMesh")
  46. o29 = Instance.new("Part")
  47. o30 = Instance.new("SpecialMesh")
  48. o31 = Instance.new("Part")
  49. o32 = Instance.new("CylinderMesh")
  50. o33 = Instance.new("Part")
  51. o34 = Instance.new("CylinderMesh")
  52. o35 = Instance.new("Sound")
  53. o36 = Instance.new("Smoke")
  54. o37 = Instance.new("Script")
  55. o38 = Instance.new("Part")
  56. o39 = Instance.new("CylinderMesh")
  57. o40 = Instance.new("Part")
  58. o41 = Instance.new("CylinderMesh")
  59. o42 = Instance.new("Part")
  60. o43 = Instance.new("SpecialMesh")
  61. o44 = Instance.new("Part")
  62. o45 = Instance.new("CylinderMesh")
  63. o46 = Instance.new("VehicleSeat")
  64. o47 = Instance.new("Weld")
  65. o48 = Instance.new("Part")
  66. o49 = Instance.new("SpecialMesh")
  67. o50 = Instance.new("Part")
  68. o51 = Instance.new("BlockMesh")
  69. o52 = Instance.new("Part")
  70. o53 = Instance.new("SpecialMesh")
  71. o54 = Instance.new("Part")
  72. o55 = Instance.new("BlockMesh")
  73. o56 = Instance.new("Part")
  74. o57 = Instance.new("BlockMesh")
  75. o58 = Instance.new("Part")
  76. o59 = Instance.new("SpecialMesh")
  77. o60 = Instance.new("Part")
  78. o61 = Instance.new("Part")
  79. o62 = Instance.new("Part")
  80. o63 = Instance.new("Part")
  81. o64 = Instance.new("Model")
  82. o65 = Instance.new("Part")
  83. o66 = Instance.new("SpecialMesh")
  84. o71 = Instance.new("Sound")
  85. o72 = Instance.new("RemoteEvent")
  86. o73 = Instance.new("Sound")
  87. o74 = Instance.new("RemoteEvent")
  88. o75 = Instance.new("Sound")
  89. o76 = Instance.new("RemoteEvent")
  90. o77 = Instance.new("Sound")
  91. o78 = Instance.new("RemoteEvent")
  92. o79 = Instance.new("Sound")
  93. o80 = Instance.new("RemoteEvent")
  94. o81 = Instance.new("Sound")
  95. o82 = Instance.new("RemoteEvent")
  96. o83 = Instance.new("Sound")
  97. o84 = Instance.new("RemoteEvent")
  98. o85 = Instance.new("Sound")
  99. o86 = Instance.new("RemoteEvent")
  100. o87 = Instance.new("Sound")
  101. o88 = Instance.new("RemoteEvent")
  102. o89 = Instance.new("Decal")
  103. o90 = Instance.new("Part")
  104. o91 = Instance.new("Decal")
  105. o100 = Instance.new("Motor6D")
  106. o101 = Instance.new("Motor6D")
  107. o102 = Instance.new("Motor6D")
  108. o103 = Instance.new("Motor6D")
  109. o104 = Instance.new("Motor6D")
  110. o105 = Instance.new("Part")
  111. o108 = Instance.new("Part")
  112. o111 = Instance.new("Part")
  113. o113 = Instance.new("Part")
  114. o115 = Instance.new("Humanoid")
  115. o118 = Instance.new("Part")
  116. o120 = Instance.new("Motor6D")
  117. o121 = Instance.new("Script")
  118. o122 = Instance.new("LocalScript")
  119. o123 = Instance.new("Script")
  120. o124 = Instance.new("LocalScript")
  121. o125 = Instance.new("StringValue")
  122. o126 = Instance.new("Animation")
  123. o127 = Instance.new("NumberValue")
  124. o128 = Instance.new("Animation")
  125. o129 = Instance.new("NumberValue")
  126. o130 = Instance.new("StringValue")
  127. o131 = Instance.new("Animation")
  128. o132 = Instance.new("StringValue")
  129. o133 = Instance.new("Animation")
  130. o134 = Instance.new("StringValue")
  131. o135 = Instance.new("Animation")
  132. o136 = Instance.new("StringValue")
  133. o137 = Instance.new("Animation")
  134. o138 = Instance.new("StringValue")
  135. o139 = Instance.new("Animation")
  136. o140 = Instance.new("StringValue")
  137. o141 = Instance.new("Animation")
  138. o142 = Instance.new("StringValue")
  139. o143 = Instance.new("Animation")
  140. o144 = Instance.new("NumberValue")
  141. o145 = Instance.new("BodyColors")
  142. o146 = Instance.new("Pants")
  143. o147 = Instance.new("Shirt")
  144. o149 = Instance.new("Part")
  145. o150 = Instance.new("SpecialMesh")
  146. o152 = Instance.new("Vector3Value")
  147. o153 = Instance.new("Weld")
  148. o3.Parent = mas
  149. o4.Parent = o3
  150. o5.Parent = o4
  151. o6.Parent = o5
  152. o6.BrickColor = BrickColor.new("Dark stone grey")
  153. o6.Position = Vector3.new(-132.795517, 8.79358292, -11.2341585)
  154. o6.Rotation = Vector3.new(-0.0399999991, 15.8599997, -0.109999999)
  155. o6.RotVelocity = Vector3.new(-0.00299954996, 0.000413790403, -0.000806274242)
  156. o6.Velocity = Vector3.new(0.0137291709, -0.017024124, -0.0225311555)
  157. o6.Locked = true
  158. o6.Size = Vector3.new(3, 1.20000005, 2)
  159. o6.CFrame = CFrame.new(-132.795517, 8.79358292, -11.2341585, 0.961952269, 0.0018707643, 0.273211241, -0.00214518933, 0.999997437, 0.000705718063, -0.273209214, -0.0012649569, 0.961953819)
  160. o6.BackSurface = Enum.SurfaceType.Weld
  161. o6.BottomSurface = Enum.SurfaceType.Weld
  162. o6.FrontSurface = Enum.SurfaceType.Weld
  163. o6.LeftSurface = Enum.SurfaceType.Weld
  164. o6.RightSurface = Enum.SurfaceType.Weld
  165. o6.TopSurface = Enum.SurfaceType.Weld
  166. o6.Color = Color3.new(0.388235, 0.372549, 0.384314)
  167. o6.Position = Vector3.new(-132.795517, 8.79358292, -11.2341585)
  168. o6.velocity = Vector3.new(0.0137291709, -0.017024124, -0.0225311555)
  169. o7.Parent = o6
  170. o7.MeshType = Enum.MeshType.Torso
  171. o8.Parent = o5
  172. o8.BrickColor = BrickColor.new("Dark stone grey")
  173. o8.Position = Vector3.new(-134.434998, 8.78941917, -17.0056496)
  174. o8.Rotation = Vector3.new(-0.0399999991, 15.8599997, -0.109999999)
  175. o8.RotVelocity = Vector3.new(0.00608392386, 0.000780430855, 0.00306902756)
  176. o8.Velocity = Vector3.new(-0.0135553963, -0.0159314163, 0.0320526734)
  177. o8.Locked = true
  178. o8.Size = Vector3.new(3, 1.20000005, 2)
  179. o8.CFrame = CFrame.new(-134.434998, 8.78941917, -17.0056496, 0.961951733, 0.00184027455, 0.273213208, -0.00210510753, 0.999997556, 0.000676181866, -0.2732113, -0.00122559746, 0.961953282)
  180. o8.BackSurface = Enum.SurfaceType.Weld
  181. o8.BottomSurface = Enum.SurfaceType.Weld
  182. o8.FrontSurface = Enum.SurfaceType.Weld
  183. o8.LeftSurface = Enum.SurfaceType.Weld
  184. o8.RightSurface = Enum.SurfaceType.Weld
  185. o8.TopSurface = Enum.SurfaceType.Weld
  186. o8.Color = Color3.new(0.388235, 0.372549, 0.384314)
  187. o8.Position = Vector3.new(-134.434998, 8.78941917, -17.0056496)
  188. o8.velocity = Vector3.new(-0.0135553963, -0.0159314163, 0.0320526734)
  189. o9.Parent = o8
  190. o9.MeshType = Enum.MeshType.Torso
  191. o10.Parent = o5
  192. o10.Position = Vector3.new(-133.614151, 9.3915596, -14.1206102)
  193. o10.Rotation = Vector3.new(-0.0399999991, 15.8599997, -0.109999999)
  194. o10.RotVelocity = Vector3.new(0.00107312179, 0.00101654918, 0.00028337253)
  195. o10.Velocity = Vector3.new(0.00422847597, -0.00450160913, 0.00663938001)
  196. o10.Locked = true
  197. o10.Size = Vector3.new(5, 1.20000005, 4)
  198. o10.CFrame = CFrame.new(-133.614151, 9.3915596, -14.1206102, 0.961951554, 0.00185383158, 0.273213863, -0.00212258054, 0.999997497, 0.000688078871, -0.273211896, -0.00124181691, 0.961953104)
  199. o10.BackSurface = Enum.SurfaceType.Weld
  200. o10.BottomSurface = Enum.SurfaceType.Weld
  201. o10.FrontSurface = Enum.SurfaceType.Weld
  202. o10.LeftSurface = Enum.SurfaceType.Weld
  203. o10.RightSurface = Enum.SurfaceType.Weld
  204. o10.TopSurface = Enum.SurfaceType.Weld
  205. o10.Position = Vector3.new(-133.614151, 9.3915596, -14.1206102)
  206. o10.velocity = Vector3.new(0.00422847597, -0.00450160913, 0.00663938001)
  207. o11.Parent = o10
  208. o11.Scale = Vector3.new(0.889999986, 1, 1)
  209. o11.MeshType = Enum.MeshType.Torso
  210. o12.Name = "Switch"
  211. o12.Parent = o5
  212. o12.BrickColor = BrickColor.new("Bright blue")
  213. o12.Position = Vector3.new(-136.62146, 9.29618359, -14.8258924)
  214. o12.Rotation = Vector3.new(89.9300003, -0.109999999, -105.860001)
  215. o12.RotVelocity = Vector3.new(-0.00343973376, 0.000749820727, 0.000173723078)
  216. o12.Velocity = Vector3.new(0.00544150174, -0.0181603394, -0.024878066)
  217. o12.Locked = true
  218. o12.FormFactor = Enum.FormFactor.Plate
  219. o12.Size = Vector3.new(1, 0.400000006, 1)
  220. o12.CFrame = CFrame.new(-136.62146, 9.29618359, -14.8258924, -0.273212492, 0.961951911, -0.00184826145, -0.000708246662, -0.00212251628, -0.999997497, -0.961953461, -0.273210496, 0.00126119726)
  221. o12.BackSurface = Enum.SurfaceType.Weld
  222. o12.BottomSurface = Enum.SurfaceType.Weld
  223. o12.LeftSurface = Enum.SurfaceType.Weld
  224. o12.RightSurface = Enum.SurfaceType.Weld
  225. o12.TopSurface = Enum.SurfaceType.Smooth
  226. o12.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  227. o12.Position = Vector3.new(-136.62146, 9.29618359, -14.8258924)
  228. o12.velocity = Vector3.new(0.00544150174, -0.0181603394, -0.024878066)
  229. o13.Name = "CannonBall"
  230. o13.Parent = o12
  231. o13.Disabled = true
  232.  
  233. runDummyScript(function()
  234. ball = script.Parent
  235. damage = 100
  236.  
  237. function onTouched(hit)
  238.  
  239.  
  240. local humanoid = hit.Parent:findFirstChild("Humanoid")
  241. if humanoid~=nil then
  242. tagHumanoid(humanoid)
  243. humanoid.Health = 0
  244. wait()
  245. untagHumanoid(humanoid)
  246. connection:disconnect()
  247. else
  248. damage = damage / 2
  249. if damage < 2 then
  250. connection:disconnect()
  251. ball.Parent = nil
  252. end
  253. end
  254.  
  255. explosion = Instance.new("Explosion")
  256. explosion.BlastRadius = 20
  257. explosion.BlastPressure = 800000
  258. explosion.Position = script.Parent.Position
  259. explosion.Parent = game.Workspace
  260. connection:disconnect()
  261. ball.Parent = nil
  262. end
  263.  
  264. function tagHumanoid(humanoid)
  265. -- todo: make tag expire
  266. local tag = ball:findFirstChild("creator")
  267. if tag ~= nil then
  268. local new_tag = tag:clone()
  269. new_tag.Parent = humanoid
  270. end
  271. end
  272.  
  273.  
  274. function untagHumanoid(humanoid)
  275. if humanoid ~= nil then
  276. local tag = humanoid:findFirstChild("creator")
  277. if tag ~= nil then
  278. tag.Parent = nil
  279. end
  280. end
  281. end
  282.  
  283. connection = ball.Touched:connect(onTouched)
  284.  
  285. r = game:service("RunService")
  286. t, s = r.Stepped:wait()
  287. d = t + 5.0 - s
  288. while t < d do
  289. t = r.Stepped:wait()
  290. end
  291.  
  292. ball.Parent = nil
  293. end,o13)
  294.  
  295. o14.Parent = o12
  296. o14.MaxActivationDistance = 20
  297. o15.Name = "FireGun"
  298. o15.Parent = o12
  299.  
  300. runDummyScript(function()
  301. local switch = script.Parent
  302.  
  303. local debounce = false
  304.  
  305. local cannonBall = Instance.new("Part")
  306. cannonBall.Size = Vector3.new(3,3,3)
  307. cannonBall.BrickColor = BrickColor.new(1)
  308. cannonBall.Shape = 0
  309. cannonBall.BottomSurface = 0
  310. cannonBall.TopSurface = 0
  311. cannonBall.Name = "Cannon Shot"
  312. cannonBall.Elasticity = .1
  313. cannonBall.Reflectance = 0
  314. cannonBall.Friction = 0
  315.  
  316. function fire(gun)
  317. local sound = gun:findFirstChild("Fire")
  318. if sound == nil then
  319. sound = Instance.new("Sound")
  320. sound.Name = "Fire"
  321. sound.SoundId = "http://www.roblox.com/asset?id=2101148"
  322. sound.Pitch = 1
  323. sound.Volume = 1
  324. sound.Parent = gun
  325. end
  326. sound:play()
  327. local smoke = gun:findFirstChild("Smoke")
  328. if smoke == nil then
  329. smoke = switch.Smoke:clone()
  330. smoke.Parent = gun
  331. smoke.Script.Disabled = false
  332. end
  333. smoke.Enabled = true
  334.  
  335. local spawnPos = (gun.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)) * Vector3.new(0, 0, -15)
  336.  
  337. local v = (gun.CFrame * CFrame.fromEulerAnglesXYZ(math.rad(90),0,0)).lookVector * 800
  338.  
  339. local missile = cannonBall:clone()
  340.  
  341. missile.Position = spawnPos
  342. missile.Velocity = v
  343.  
  344. local force = Instance.new("BodyForce")
  345. force.force = Vector3.new(0,(missile:GetMass() * 95),0)
  346. force.Parent = missile
  347.  
  348. local new_script = script.Parent.CannonBall:clone()
  349. new_script.Disabled = false
  350. new_script.Parent = missile
  351.  
  352. missile.Parent = game.Workspace
  353.  
  354. game.Debris:AddItem(missile,14)
  355. end
  356.  
  357. function onClicked()
  358. if debounce == false then
  359. debounce = true
  360. switch.BrickColor = BrickColor.new("Bright red")
  361. fire(script.Parent.Parent.Gun)
  362.  
  363. wait(1)
  364. debounce = false
  365. switch.BrickColor = BrickColor.new("Bright blue")
  366. end
  367. end
  368.  
  369.  
  370. script.Parent.ClickDetector.MouseClick:connect(onClicked)
  371.  
  372.  
  373.  
  374. end,o15)
  375.  
  376. o16.Parent = o12
  377. o16.Color = Color3.new(0.109804, 0.109804, 0.109804)
  378. o16.Enabled = false
  379. o16.RiseVelocity = 8
  380. o17.Parent = o16
  381. o17.Disabled = true
  382.  
  383. runDummyScript(function()
  384. function Check()
  385. if script.Parent.Enabled == true then
  386. wait(0.25)
  387. script.Parent.Enabled = false
  388. end
  389. end
  390.  
  391. script.Parent.Changed:connect(Check)
  392. end,o17)
  393.  
  394. o18.Parent = o12
  395. o18.Scale = Vector3.new(1, 1, 0.5)
  396. o19.Parent = o5
  397. o19.Position = Vector3.new(-132.18013, 4.58837748, -14.5245323)
  398. o19.Rotation = Vector3.new(179.559998, 74.1399994, -179.610001)
  399. o19.RotVelocity = Vector3.new(-0.00291023683, 0.00142147497, 0.000273291487)
  400. o19.Velocity = Vector3.new(0.00543753896, -0.0111651057, -0.0144352363)
  401. o19.Locked = true
  402. o19.Size = Vector3.new(2, 1.20000005, 2)
  403. o19.CFrame = CFrame.new(-132.18013, 4.58837748, -14.5245323, -0.273215503, 0.00183905393, 0.961951077, -0.000709586253, 0.999997497, -0.00211332925, -0.961952567, -0.00125998154, -0.273213506)
  404. o19.BackSurface = Enum.SurfaceType.Weld
  405. o19.BottomSurface = Enum.SurfaceType.Weld
  406. o19.FrontSurface = Enum.SurfaceType.Weld
  407. o19.LeftSurface = Enum.SurfaceType.Weld
  408. o19.RightSurface = Enum.SurfaceType.Weld
  409. o19.TopSurface = Enum.SurfaceType.Weld
  410. o19.Position = Vector3.new(-132.18013, 4.58837748, -14.5245323)
  411. o19.velocity = Vector3.new(0.00543753896, -0.0111651057, -0.0144352363)
  412. o20.Parent = o19
  413. o21.Parent = o5
  414. o21.Position = Vector3.new(-133.208786, 6.99258947, -12.6747847)
  415. o21.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
  416. o21.RotVelocity = Vector3.new(-0.00233547692, 0.00106526236, -0.00141616841)
  417. o21.Velocity = Vector3.new(0.0137156602, -0.00905784592, -0.0153651778)
  418. o21.Locked = true
  419. o21.Size = Vector3.new(5, 3.60000014, 1)
  420. o21.CFrame = CFrame.new(-133.208786, 6.99258947, -12.6747847, -0.961951494, 0.00185312005, -0.273213983, 0.00212600199, 0.999997497, -0.000702729158, 0.273212016, -0.00125684496, -0.961953044)
  421. o21.BackSurface = Enum.SurfaceType.Weld
  422. o21.BottomSurface = Enum.SurfaceType.Weld
  423. o21.FrontSurface = Enum.SurfaceType.Weld
  424. o21.LeftSurface = Enum.SurfaceType.Weld
  425. o21.RightSurface = Enum.SurfaceType.Weld
  426. o21.TopSurface = Enum.SurfaceType.Weld
  427. o21.Position = Vector3.new(-133.208786, 6.99258947, -12.6747847)
  428. o21.velocity = Vector3.new(0.0137156602, -0.00905784592, -0.0153651778)
  429. o22.Parent = o21
  430. o22.MeshType = Enum.MeshType.Torso
  431. o23.Parent = o5
  432. o23.BrickColor = BrickColor.new("Mid gray")
  433. o23.Position = Vector3.new(-131.694641, 6.98722792, -14.6641645)
  434. o23.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
  435. o23.RotVelocity = Vector3.new(-0.00249349466, 0.000972564099, -0.00249066437)
  436. o23.Velocity = Vector3.new(0.0162097961, -0.0195786767, -0.0175110158)
  437. o23.Locked = true
  438. o23.Size = Vector3.new(1, 3.60000014, 2)
  439. o23.CFrame = CFrame.new(-131.694641, 6.98722792, -14.6641645, -0.961951494, 0.00187182252, -0.273213834, 0.002145743, 0.999997437, -0.00070378196, 0.273211837, -0.00126325083, -0.961953044)
  440. o23.BackSurface = Enum.SurfaceType.Weld
  441. o23.BottomSurface = Enum.SurfaceType.Weld
  442. o23.FrontSurface = Enum.SurfaceType.Weld
  443. o23.LeftSurface = Enum.SurfaceType.Weld
  444. o23.RightSurface = Enum.SurfaceType.Weld
  445. o23.TopSurface = Enum.SurfaceType.Weld
  446. o23.Color = Color3.new(0.803922, 0.803922, 0.803922)
  447. o23.Position = Vector3.new(-131.694641, 6.98722792, -14.6641645)
  448. o23.velocity = Vector3.new(0.0162097961, -0.0195786767, -0.0175110158)
  449. o24.Parent = o23
  450. o24.MeshType = Enum.MeshType.Torso
  451. o25.Parent = o5
  452. o25.BrickColor = BrickColor.new("Dark stone grey")
  453. o25.Position = Vector3.new(-132.373871, 6.89333916, -10.8327341)
  454. o25.Rotation = Vector3.new(-0.0399999991, 15.8599997, 89.8899994)
  455. o25.RotVelocity = Vector3.new(-0.00182265427, 0.0012148415, -0.00102851947)
  456. o25.Velocity = Vector3.new(0.0148531571, -0.00633196067, -0.0134898312)
  457. o25.Locked = true
  458. o25.Size = Vector3.new(1, 2.4000001, 1)
  459. o25.CFrame = CFrame.new(-132.373871, 6.89333916, -10.8327341, 0.00187461742, -0.961951256, 0.273214728, 0.999997437, 0.00214804546, 0.000701654528, -0.00126183499, 0.273212701, 0.961952806)
  460. o25.BackSurface = Enum.SurfaceType.Weld
  461. o25.BottomSurface = Enum.SurfaceType.Weld
  462. o25.FrontSurface = Enum.SurfaceType.Weld
  463. o25.LeftSurface = Enum.SurfaceType.Weld
  464. o25.RightSurface = Enum.SurfaceType.Weld
  465. o25.TopSurface = Enum.SurfaceType.Weld
  466. o25.Color = Color3.new(0.388235, 0.372549, 0.384314)
  467. o25.Position = Vector3.new(-132.373871, 6.89333916, -10.8327341)
  468. o25.velocity = Vector3.new(0.0148531571, -0.00633196067, -0.0134898312)
  469. o26.Parent = o25
  470. o26.MeshType = Enum.MeshType.Torso
  471. o27.Name = "Smooth Block Model"
  472. o27.Parent = o5
  473. o27.Position = Vector3.new(-132.660812, 7.79399204, -10.7518921)
  474. o27.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
  475. o27.RotVelocity = Vector3.new(-0.00159689877, 0.000973881339, 0.00018386131)
  476. o27.Velocity = Vector3.new(0.0089943381, -0.00388312666, -0.0137049453)
  477. o27.Locked = true
  478. o27.FormFactor = Enum.FormFactor.Plate
  479. o27.Size = Vector3.new(1, 0.800000012, 1)
  480. o27.CFrame = CFrame.new(-132.660812, 7.79399204, -10.7518921, -0.961951554, 0.0018624143, -0.273213804, 0.00213557924, 0.999997497, -0.000702432066, 0.273211807, -0.00125917525, -0.961953104)
  481. o27.BackSurface = Enum.SurfaceType.Weld
  482. o27.BottomSurface = Enum.SurfaceType.Weld
  483. o27.FrontSurface = Enum.SurfaceType.Weld
  484. o27.LeftSurface = Enum.SurfaceType.Weld
  485. o27.RightSurface = Enum.SurfaceType.Weld
  486. o27.TopSurface = Enum.SurfaceType.Weld
  487. o27.Position = Vector3.new(-132.660812, 7.79399204, -10.7518921)
  488. o27.velocity = Vector3.new(0.0089943381, -0.00388312666, -0.0137049453)
  489. o28.Parent = o27
  490. o28.Scale = Vector3.new(1, 2, 1)
  491. o29.Parent = o5
  492. o29.Position = Vector3.new(-134.028442, 6.99044323, -15.5606823)
  493. o29.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
  494. o29.RotVelocity = Vector3.new(-0.00409532944, 0.00102448335, 0.00157562341)
  495. o29.Velocity = Vector3.new(0.000179392518, -0.0231168214, -0.0219743215)
  496. o29.Locked = true
  497. o29.Size = Vector3.new(5, 3.60000014, 1)
  498. o29.CFrame = CFrame.new(-134.028442, 6.99044323, -15.5606823, -0.961951435, 0.0018474235, -0.273214251, 0.0021229845, 0.999997497, -0.000712954206, 0.273212224, -0.0012658569, -0.961952925)
  499. o29.BackSurface = Enum.SurfaceType.Weld
  500. o29.BottomSurface = Enum.SurfaceType.Weld
  501. o29.FrontSurface = Enum.SurfaceType.Weld
  502. o29.LeftSurface = Enum.SurfaceType.Weld
  503. o29.RightSurface = Enum.SurfaceType.Weld
  504. o29.TopSurface = Enum.SurfaceType.Weld
  505. o29.Position = Vector3.new(-134.028442, 6.99044323, -15.5606823)
  506. o29.velocity = Vector3.new(0.000179392518, -0.0231168214, -0.0219743215)
  507. o30.Parent = o29
  508. o30.MeshType = Enum.MeshType.Torso
  509. o31.Name = "Smooth Block Model"
  510. o31.Parent = o5
  511. o31.Position = Vector3.new(-130.642441, 6.88951349, -11.3245296)
  512. o31.Rotation = Vector3.new(179.959991, -15.8599997, 90.1100006)
  513. o31.RotVelocity = Vector3.new(-0.00392165966, 0.000615938334, 0.000664196035)
  514. o31.Velocity = Vector3.new(0.00663693296, -0.00728883827, -0.0225109309)
  515. o31.Locked = true
  516. o31.FormFactor = Enum.FormFactor.Plate
  517. o31.Size = Vector3.new(1, 1.20000005, 1)
  518. o31.CFrame = CFrame.new(-130.642441, 6.88951349, -11.3245296, -0.00185461598, -0.961951852, -0.273212701, -0.999997497, 0.00212993263, -0.00071109907, 0.00126596761, 0.273210675, -0.961953402)
  519. o31.BackSurface = Enum.SurfaceType.Weld
  520. o31.BottomSurface = Enum.SurfaceType.Weld
  521. o31.FrontSurface = Enum.SurfaceType.Weld
  522. o31.LeftSurface = Enum.SurfaceType.Weld
  523. o31.RightSurface = Enum.SurfaceType.Weld
  524. o31.TopSurface = Enum.SurfaceType.Weld
  525. o31.Position = Vector3.new(-130.642441, 6.88951349, -11.3245296)
  526. o31.velocity = Vector3.new(0.00663693296, -0.00728883827, -0.0225109309)
  527. o32.Parent = o31
  528. o32.Scale = Vector3.new(1, 3, 1)
  529. o33.Name = "Gun"
  530. o33.Parent = o5
  531. o33.BrickColor = BrickColor.new("Really black")
  532. o33.Position = Vector3.new(-129.584259, 6.88714123, -11.6250658)
  533. o33.Rotation = Vector3.new(-90.0699997, 0.109999999, -74.1399994)
  534. o33.RotVelocity = Vector3.new(-0.00383019145, 0.00056818407, 0.000126178085)
  535. o33.Velocity = Vector3.new(0.00865810458, -0.00888883974, -0.0229801033)
  536. o33.Locked = true
  537. o33.FormFactor = Enum.FormFactor.Symmetric
  538. o33.Size = Vector3.new(1, 1, 1)
  539. o33.CFrame = CFrame.new(-129.584259, 6.88714123, -11.6250658, 0.273212284, 0.961951971, 0.00186316785, 0.000710154942, -0.00213855412, 0.999997437, 0.961953521, -0.273210287, -0.00126741419)
  540. o33.BackSurface = Enum.SurfaceType.Weld
  541. o33.BottomSurface = Enum.SurfaceType.Weld
  542. o33.FrontSurface = Enum.SurfaceType.Weld
  543. o33.LeftSurface = Enum.SurfaceType.Weld
  544. o33.RightSurface = Enum.SurfaceType.Weld
  545. o33.TopSurface = Enum.SurfaceType.Weld
  546. o33.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  547. o33.Position = Vector3.new(-129.584259, 6.88714123, -11.6250658)
  548. o33.velocity = Vector3.new(0.00865810458, -0.00888883974, -0.0229801033)
  549. o34.Parent = o33
  550. o34.Scale = Vector3.new(1.20000005, 1, 1.20000005)
  551. o35.Name = "Fire"
  552. o35.Parent = o33
  553. o35.SoundId = "http://www.roblox.com/asset?id=2101148"
  554. o35.Volume = 1
  555. o36.Parent = o33
  556. o36.Color = Color3.new(0.109804, 0.109804, 0.109804)
  557. o36.Enabled = false
  558. o36.RiseVelocity = 8
  559. o37.Parent = o36
  560.  
  561. runDummyScript(function()
  562. function Check()
  563. if script.Parent.Enabled == true then
  564. wait(0.25)
  565. script.Parent.Enabled = false
  566. end
  567. end
  568.  
  569. script.Parent.Changed:connect(Check)
  570. end,o37)
  571.  
  572. o38.Name = "Gun"
  573. o38.Parent = o5
  574. o38.BrickColor = BrickColor.new("Really black")
  575. o38.Position = Vector3.new(-131.496765, 6.88219929, -18.3587475)
  576. o38.Rotation = Vector3.new(-90.0699997, 0.109999999, -74.1399994)
  577. o38.RotVelocity = Vector3.new(-0.00417036097, 0.000950930291, 0.000697736861)
  578. o38.Velocity = Vector3.new(0.00106051425, -0.0337170437, -0.0244025681)
  579. o38.Locked = true
  580. o38.FormFactor = Enum.FormFactor.Symmetric
  581. o38.Size = Vector3.new(1, 1, 1)
  582. o38.CFrame = CFrame.new(-131.496765, 6.88219929, -18.3587475, 0.273214132, 0.961951435, 0.00185392459, 0.00071244064, -0.00212959689, 0.999997497, 0.961952984, -0.273212135, -0.00126716925)
  583. o38.BackSurface = Enum.SurfaceType.Weld
  584. o38.BottomSurface = Enum.SurfaceType.Weld
  585. o38.FrontSurface = Enum.SurfaceType.Weld
  586. o38.LeftSurface = Enum.SurfaceType.Weld
  587. o38.RightSurface = Enum.SurfaceType.Weld
  588. o38.TopSurface = Enum.SurfaceType.Weld
  589. o38.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  590. o38.Position = Vector3.new(-131.496765, 6.88219929, -18.3587475)
  591. o38.velocity = Vector3.new(0.00106051425, -0.0337170437, -0.0244025681)
  592. o39.Parent = o38
  593. o39.Scale = Vector3.new(1.20000005, 1, 1.20000005)
  594. o40.Name = "Smooth Block Model"
  595. o40.Parent = o5
  596. o40.Position = Vector3.new(-132.554916, 6.8845849, -18.0581875)
  597. o40.Rotation = Vector3.new(179.959991, -15.8599997, 90.1100006)
  598. o40.RotVelocity = Vector3.new(-0.00235087913, 0.0012729381, -0.00113409851)
  599. o40.Velocity = Vector3.new(0.00586256431, -0.022124622, -0.0168664809)
  600. o40.Locked = true
  601. o40.FormFactor = Enum.FormFactor.Plate
  602. o40.Size = Vector3.new(1, 1.20000005, 1)
  603. o40.CFrame = CFrame.new(-132.554916, 6.8845849, -18.0581875, -0.00186064071, -0.961951137, -0.273215175, -0.999997497, 0.00213423837, -0.000704196107, 0.00126050855, 0.273213148, -0.961952686)
  604. o40.BackSurface = Enum.SurfaceType.Weld
  605. o40.BottomSurface = Enum.SurfaceType.Weld
  606. o40.FrontSurface = Enum.SurfaceType.Weld
  607. o40.LeftSurface = Enum.SurfaceType.Weld
  608. o40.RightSurface = Enum.SurfaceType.Weld
  609. o40.TopSurface = Enum.SurfaceType.Weld
  610. o40.Position = Vector3.new(-132.554916, 6.8845849, -18.0581875)
  611. o40.velocity = Vector3.new(0.00586256431, -0.022124622, -0.0168664809)
  612. o41.Parent = o40
  613. o41.Scale = Vector3.new(1, 3, 1)
  614. o42.Parent = o5
  615. o42.BrickColor = BrickColor.new("Dark stone grey")
  616. o42.Position = Vector3.new(-134.286392, 6.88837337, -17.5664158)
  617. o42.Rotation = Vector3.new(-0.0399999991, 15.8599997, 89.8899994)
  618. o42.RotVelocity = Vector3.new(-0.00327797909, 0.000569265627, 9.73321949e-05)
  619. o42.Velocity = Vector3.new(0.0051581217, -0.0317814052, -0.0170049388)
  620. o42.Locked = true
  621. o42.Size = Vector3.new(1, 2.4000001, 1)
  622. o42.CFrame = CFrame.new(-134.286392, 6.88837337, -17.5664158, 0.00186291547, -0.96195209, 0.273211837, 0.999997437, 0.00213765819, 0.000707926694, -0.00126502512, 0.27320984, 0.96195364)
  623. o42.BackSurface = Enum.SurfaceType.Weld
  624. o42.BottomSurface = Enum.SurfaceType.Weld
  625. o42.FrontSurface = Enum.SurfaceType.Weld
  626. o42.LeftSurface = Enum.SurfaceType.Weld
  627. o42.RightSurface = Enum.SurfaceType.Weld
  628. o42.TopSurface = Enum.SurfaceType.Weld
  629. o42.Color = Color3.new(0.388235, 0.372549, 0.384314)
  630. o42.Position = Vector3.new(-134.286392, 6.88837337, -17.5664158)
  631. o42.velocity = Vector3.new(0.0051581217, -0.0317814052, -0.0170049388)
  632. o43.Parent = o42
  633. o43.MeshType = Enum.MeshType.Torso
  634. o44.Name = "Smooth Block Model"
  635. o44.Parent = o5
  636. o44.Position = Vector3.new(-134.573334, 7.78907061, -17.4855652)
  637. o44.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
  638. o44.RotVelocity = Vector3.new(-0.00188569503, 0.00110359606, -0.00128656928)
  639. o44.Velocity = Vector3.new(0.00888236519, -0.0164775308, -0.013150149)
  640. o44.Locked = true
  641. o44.FormFactor = Enum.FormFactor.Plate
  642. o44.Size = Vector3.new(1, 0.800000012, 1)
  643. o44.CFrame = CFrame.new(-134.573334, 7.78907061, -17.4855652, -0.961951494, 0.00186560571, -0.273213983, 0.00213870569, 0.999997437, -0.000701758079, 0.273211986, -0.00125938153, -0.961953044)
  644. o44.BackSurface = Enum.SurfaceType.Weld
  645. o44.BottomSurface = Enum.SurfaceType.Weld
  646. o44.FrontSurface = Enum.SurfaceType.Weld
  647. o44.LeftSurface = Enum.SurfaceType.Weld
  648. o44.RightSurface = Enum.SurfaceType.Weld
  649. o44.TopSurface = Enum.SurfaceType.Weld
  650. o44.Position = Vector3.new(-134.573334, 7.78907061, -17.4855652)
  651. o44.velocity = Vector3.new(0.00888236519, -0.0164775308, -0.013150149)
  652. o45.Parent = o44
  653. o45.Scale = Vector3.new(1, 2, 1)
  654. o46.Parent = o5
  655. o46.BrickColor = BrickColor.new("Light stone grey")
  656. o46.Position = Vector3.new(-134.104202, 4.49256992, -13.9779787)
  657. o46.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
  658. o46.RotVelocity = Vector3.new(-0.00361638982, 0.00064811646, 0.000531136873)
  659. o46.Velocity = Vector3.new(0.0068000108, -0.0189370755, -0.0106117744)
  660. o46.Locked = true
  661. o46.Size = Vector3.new(2, 1, 2)
  662. o46.CFrame = CFrame.new(-134.104202, 4.49256992, -13.9779787, 0.273212552, 0.00185650866, -0.961951911, 0.000709909596, 0.999997497, 0.00213156198, 0.961953402, -0.00126526842, 0.273210526)
  663. o46.BackSurface = Enum.SurfaceType.Weld
  664. o46.BottomSurface = Enum.SurfaceType.Weld
  665. o46.FrontSurface = Enum.SurfaceType.Weld
  666. o46.LeftSurface = Enum.SurfaceType.Weld
  667. o46.RightSurface = Enum.SurfaceType.Weld
  668. o46.TopSurface = Enum.SurfaceType.Weld
  669. o46.MaxSpeed = 10
  670. o46.Torque = 1
  671. o46.Color = Color3.new(0.898039, 0.894118, 0.87451)
  672. o46.Position = Vector3.new(-134.104202, 4.49256992, -13.9779787)
  673. o46.velocity = Vector3.new(0.0068000108, -0.0189370755, -0.0106117744)
  674. o47.Name = "SeatWeld"
  675. o47.Parent = o46
  676. o47.Archivable = false
  677. o47.C0 = CFrame.new(0, 0.5, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  678. o47.C1 = CFrame.new(0, -1.5, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  679. o47.Part0 = o46
  680. o47.Part1 = o118
  681. o48.Parent = o5
  682. o48.Position = Vector3.new(-134.442673, 4.58942795, -17.0005627)
  683. o48.Rotation = Vector3.new(179.959991, -15.8599997, -179.889999)
  684. o48.RotVelocity = Vector3.new(-0.00202778564, 0.00109578029, -0.00107223727)
  685. o48.Velocity = Vector3.new(0.00489517115, -0.0161795598, -0.00807946734)
  686. o48.Locked = true
  687. o48.Size = Vector3.new(7, 1.20000005, 2)
  688. o48.CFrame = CFrame.new(-134.442673, 4.58942795, -17.0005627, -0.961951435, 0.00186016143, -0.273214102, 0.00213333499, 0.999997497, -0.000702774792, 0.273212105, -0.00125889247, -0.961952984)
  689. o48.BackSurface = Enum.SurfaceType.Weld
  690. o48.BottomSurface = Enum.SurfaceType.Smooth
  691. o48.FrontSurface = Enum.SurfaceType.Weld
  692. o48.LeftSurface = Enum.SurfaceType.Weld
  693. o48.RightSurface = Enum.SurfaceType.Weld
  694. o48.TopSurface = Enum.SurfaceType.Weld
  695. o48.Position = Vector3.new(-134.442673, 4.58942795, -17.0005627)
  696. o48.velocity = Vector3.new(0.00489517115, -0.0161795598, -0.00807946734)
  697. o49.Parent = o48
  698. o49.Scale = Vector3.new(1, 2, 1.10000002)
  699. o49.MeshType = Enum.MeshType.Torso
  700. o50.Parent = o5
  701. o50.Position = Vector3.new(-133.213226, 4.59257412, -12.6717863)
  702. o50.Rotation = Vector3.new(179.550003, 74.1399994, -179.610001)
  703. o50.RotVelocity = Vector3.new(-0.00408259081, 0.000769795384, 0.000164236728)
  704. o50.Velocity = Vector3.new(0.00908565708, -0.0117738051, -0.0129809128)
  705. o50.Locked = true
  706. o50.Size = Vector3.new(1, 1.20000005, 5)
  707. o50.CFrame = CFrame.new(-133.213226, 4.59257412, -12.6717863, -0.27321294, 0.0018594506, 0.961951792, -0.000711265544, 0.999997497, -0.00213500601, -0.961953342, -0.00126751442, -0.273210913)
  708. o50.BackSurface = Enum.SurfaceType.Weld
  709. o50.BottomSurface = Enum.SurfaceType.Weld
  710. o50.FrontSurface = Enum.SurfaceType.Weld
  711. o50.LeftSurface = Enum.SurfaceType.Weld
  712. o50.RightSurface = Enum.SurfaceType.Weld
  713. o50.TopSurface = Enum.SurfaceType.Weld
  714. o50.Position = Vector3.new(-133.213226, 4.59257412, -12.6717863)
  715. o50.velocity = Vector3.new(0.00908565708, -0.0117738051, -0.0129809128)
  716. o51.Parent = o50
  717. o52.Parent = o5
  718. o52.Position = Vector3.new(-132.803391, 4.59362411, -11.2288504)
  719. o52.Rotation = Vector3.new(-0.0399999991, 15.8599997, -0.109999999)
  720. o52.RotVelocity = Vector3.new(-0.00355896261, 0.000553214864, 9.86231098e-05)
  721. o52.Velocity = Vector3.new(0.00914993789, -0.00956097525, -0.0114497906)
  722. o52.Locked = true
  723. o52.Size = Vector3.new(7, 1.20000005, 2)
  724. o52.CFrame = CFrame.new(-132.803391, 4.59362411, -11.2288504, 0.961952031, 0.00186185399, 0.273212045, -0.002136881, 0.999997437, 0.000709074084, -0.273210049, -0.00126591686, 0.96195358)
  725. o52.BackSurface = Enum.SurfaceType.Weld
  726. o52.BottomSurface = Enum.SurfaceType.Smooth
  727. o52.FrontSurface = Enum.SurfaceType.Weld
  728. o52.LeftSurface = Enum.SurfaceType.Weld
  729. o52.RightSurface = Enum.SurfaceType.Weld
  730. o52.TopSurface = Enum.SurfaceType.Weld
  731. o52.Position = Vector3.new(-132.803391, 4.59362411, -11.2288504)
  732. o52.velocity = Vector3.new(0.00914993789, -0.00956097525, -0.0114497906)
  733. o53.Parent = o52
  734. o53.Scale = Vector3.new(1, 2, 1.10000002)
  735. o53.MeshType = Enum.MeshType.Torso
  736. o54.Parent = o5
  737. o54.Position = Vector3.new(-134.032837, 4.59044456, -15.5576458)
  738. o54.Rotation = Vector3.new(179.550003, 74.1399994, -179.610001)
  739. o54.RotVelocity = Vector3.new(-0.00384912337, 0.000789649901, 0.000177847542)
  740. o54.Velocity = Vector3.new(0.00672962889, -0.0227337591, -0.0118665574)
  741. o54.Locked = true
  742. o54.Size = Vector3.new(1, 1.20000005, 5)
  743. o54.CFrame = CFrame.new(-134.032837, 4.59044456, -15.5576458, -0.27321291, 0.00186002406, 0.961951792, -0.00071038655, 0.999997497, -0.00213535246, -0.961953342, -0.00126676343, -0.273210883)
  744. o54.BackSurface = Enum.SurfaceType.Weld
  745. o54.BottomSurface = Enum.SurfaceType.Weld
  746. o54.FrontSurface = Enum.SurfaceType.Weld
  747. o54.LeftSurface = Enum.SurfaceType.Weld
  748. o54.RightSurface = Enum.SurfaceType.Weld
  749. o54.TopSurface = Enum.SurfaceType.Weld
  750. o54.Position = Vector3.new(-134.032837, 4.59044456, -15.5576458)
  751. o54.velocity = Vector3.new(0.00672962889, -0.0227337591, -0.0118665574)
  752. o55.Parent = o54
  753. o56.Parent = o5
  754. o56.BrickColor = BrickColor.new("Dark stone grey")
  755. o56.Position = Vector3.new(-135.546951, 4.59576654, -13.5682898)
  756. o56.Rotation = Vector3.new(179.550003, 74.1399994, -179.610001)
  757. o56.RotVelocity = Vector3.new(-0.00362602342, 0.000589581323, 0.000368714973)
  758. o56.Velocity = Vector3.new(0.00744601898, -0.0180878807, -0.0102737518)
  759. o56.Locked = true
  760. o56.Size = Vector3.new(2, 1.20000005, 1)
  761. o56.CFrame = CFrame.new(-135.546951, 4.59576654, -13.5682898, -0.273212135, 0.00185799086, 0.961952031, -0.000709685322, 0.999997497, -0.00213303859, -0.961953521, -0.00126545527, -0.273210138)
  762. o56.BackSurface = Enum.SurfaceType.Weld
  763. o56.BottomSurface = Enum.SurfaceType.Weld
  764. o56.FrontSurface = Enum.SurfaceType.Weld
  765. o56.LeftSurface = Enum.SurfaceType.Weld
  766. o56.RightSurface = Enum.SurfaceType.Weld
  767. o56.TopSurface = Enum.SurfaceType.Weld
  768. o56.Color = Color3.new(0.388235, 0.372549, 0.384314)
  769. o56.Position = Vector3.new(-135.546951, 4.59576654, -13.5682898)
  770. o56.velocity = Vector3.new(0.00744601898, -0.0180878807, -0.0102737518)
  771. o57.Parent = o56
  772. o58.Parent = o5
  773. o58.BrickColor = BrickColor.new("Dark stone grey")
  774. o58.Position = Vector3.new(-133.625275, 3.39151073, -14.1131954)
  775. o58.Rotation = Vector3.new(179.959991, -15.8599997, 0.109999999)
  776. o58.RotVelocity = Vector3.new(-0.00364024681, 0.000637281395, 0.000496431254)
  777. o58.Velocity = Vector3.new(0.00747687183, -0.0185573604, -0.00733480742)
  778. o58.Locked = true
  779. o58.Size = Vector3.new(5, 1.20000005, 4)
  780. o58.CFrame = CFrame.new(-133.625275, 3.39151073, -14.1131954, 0.961951911, -0.00185659365, -0.273212612, -0.00213165162, -0.999997497, -0.000709913031, -0.273210585, 0.00126529625, -0.961953402)
  781. o58.BottomSurface = Enum.SurfaceType.Weld
  782. o58.TopSurface = Enum.SurfaceType.Weld
  783. o58.Color = Color3.new(0.388235, 0.372549, 0.384314)
  784. o58.Position = Vector3.new(-133.625275, 3.39151073, -14.1131954)
  785. o58.velocity = Vector3.new(0.00747687183, -0.0185573604, -0.00733480742)
  786. o59.Parent = o58
  787. o59.MeshType = Enum.MeshType.Torso
  788. o60.Parent = o5
  789. o60.BrickColor = BrickColor.new("Really black")
  790. o60.Position = Vector3.new(-131.392365, 2.98060203, -11.6283941)
  791. o60.Rotation = Vector3.new(-105.720001, 43.579998, -67.8499985)
  792. o60.Locked = true
  793. o60.FormFactor = Enum.FormFactor.Symmetric
  794. o60.Shape = Enum.PartType.Cylinder
  795. o60.Size = Vector3.new(2, 2, 2)
  796. o60.CFrame = CFrame.new(-131.392365, 2.98060203, -11.6283941, 0.273208141, 0.670982659, 0.689303696, 0.00073814299, -0.716711462, 0.697369456, 0.961954653, -0.190018207, -0.196306691)
  797. o60.BottomSurface = Enum.SurfaceType.Smooth
  798. o60.LeftSurface = Enum.SurfaceType.Hinge
  799. o60.TopSurface = Enum.SurfaceType.Smooth
  800. o60.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  801. o60.Position = Vector3.new(-131.392365, 2.98060203, -11.6283941)
  802. o61.Parent = o5
  803. o61.BrickColor = BrickColor.new("Really black")
  804. o61.Position = Vector3.new(-133.031586, 2.97639489, -17.4001045)
  805. o61.Rotation = Vector3.new(83.0800018, -22.8699989, -107.25)
  806. o61.Locked = true
  807. o61.FormFactor = Enum.FormFactor.Symmetric
  808. o61.Shape = Enum.PartType.Cylinder
  809. o61.Size = Vector3.new(2, 2, 2)
  810. o61.CFrame = CFrame.new(-133.031586, 2.97639489, -17.4001045, -0.273202896, 0.87996912, -0.388605833, -0.000696757983, -0.404155374, -0.914690077, -0.961956203, -0.249625221, 0.11102955)
  811. o61.BottomSurface = Enum.SurfaceType.Smooth
  812. o61.LeftSurface = Enum.SurfaceType.Hinge
  813. o61.TopSurface = Enum.SurfaceType.Smooth
  814. o61.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  815. o61.Position = Vector3.new(-133.031586, 2.97639489, -17.4001045)
  816. o62.Parent = o5
  817. o62.BrickColor = BrickColor.new("Really black")
  818. o62.Position = Vector3.new(-134.278198, 2.99691701, -10.8087835)
  819. o62.Rotation = Vector3.new(-71.4799957, -48.2599983, -65.7699966)
  820. o62.Locked = true
  821. o62.FormFactor = Enum.FormFactor.Symmetric
  822. o62.Shape = Enum.PartType.Cylinder
  823. o62.Size = Vector3.new(2, 2, 2)
  824. o62.CFrame = CFrame.new(-134.278198, 2.99691701, -10.8087835, 0.273206651, 0.607095778, -0.746185541, 0.000710595108, 0.775569022, 0.631262362, 0.96195513, -0.172995299, 0.211459219)
  825. o62.BottomSurface = Enum.SurfaceType.Smooth
  826. o62.LeftSurface = Enum.SurfaceType.Hinge
  827. o62.TopSurface = Enum.SurfaceType.Smooth
  828. o62.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  829. o62.Position = Vector3.new(-134.278198, 2.99691701, -10.8087835)
  830. o63.Parent = o5
  831. o63.BrickColor = BrickColor.new("Really black")
  832. o63.Position = Vector3.new(-135.91745, 2.99266267, -16.5805092)
  833. o63.Rotation = Vector3.new(-94.0199966, 13.7399998, 106.339996)
  834. o63.Locked = true
  835. o63.FormFactor = Enum.FormFactor.Symmetric
  836. o63.Shape = Enum.PartType.Cylinder
  837. o63.Size = Vector3.new(2, 2, 2)
  838. o63.CFrame = CFrame.new(-135.91745, 2.99266267, -16.5805092, -0.273206145, -0.932174683, 0.237505257, -0.000698235235, 0.247090474, 0.968992174, -0.961955249, 0.264568776, -0.068157509)
  839. o63.BottomSurface = Enum.SurfaceType.Smooth
  840. o63.LeftSurface = Enum.SurfaceType.Hinge
  841. o63.TopSurface = Enum.SurfaceType.Smooth
  842. o63.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  843. o63.Position = Vector3.new(-135.91745, 2.99266267, -16.5805092)
  844. o64.Name = "timetodie23232223"
  845. o64.Parent = mas
  846. o64.Archivable = false
  847. o64.PrimaryPart = o65
  848. o65.Name = "Head"
  849. o65.Parent = o64
  850. o65.BrickColor = BrickColor.new("Pastel brown")
  851. o65.Position = Vector3.new(-134.097672, 7.99255943, -13.9824114)
  852. o65.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
  853. o65.RotVelocity = Vector3.new(-0.00366616971, 0.000549944642, 0.000128250787)
  854. o65.Velocity = Vector3.new(0.00730870059, -0.0192007702, -0.0237619039)
  855. o65.Locked = true
  856. o65.FormFactor = Enum.FormFactor.Symmetric
  857. o65.Size = Vector3.new(2, 1, 1)
  858. o65.CFrame = CFrame.new(-134.097672, 7.99255943, -13.9824114, 0.273212016, 0.00186096458, -0.961952031, 0.000709518034, 0.999997497, 0.00213608216, 0.96195358, -0.00126612559, 0.273210019)
  859. o65.TopSurface = Enum.SurfaceType.Smooth
  860. o65.Color = Color3.new(1, 0.8, 0.6)
  861. o65.Position = Vector3.new(-134.097672, 7.99255943, -13.9824114)
  862. o65.velocity = Vector3.new(0.00730870059, -0.0192007702, -0.0237619039)
  863. o66.Parent = o65
  864. o66.Scale = Vector3.new(1.25, 1.25, 1.25)
  865. o71.Name = "GettingUp"
  866. o71.Parent = o65
  867. o71.Archivable = false
  868. o71.SoundId = "rbxasset://sounds/action_get_up.mp3"
  869. o71.Volume = 0.64999997615814
  870. o72.Name = "CharacterSoundEvent"
  871. o72.Parent = o71
  872. o73.Name = "Died"
  873. o73.Parent = o65
  874. o73.Archivable = false
  875. o73.SoundId = "rbxasset://sounds/uuhhh.mp3"
  876. o73.Volume = 0.64999997615814
  877. o74.Name = "CharacterSoundEvent"
  878. o74.Parent = o73
  879. o75.Name = "FreeFalling"
  880. o75.Parent = o65
  881. o75.Archivable = false
  882. o75.SoundId = "rbxasset://sounds/action_falling.mp3"
  883. o75.TimePosition = 0.060414153314923
  884. o75.Volume = 1
  885. o75.Looped = true
  886. o76.Name = "CharacterSoundEvent"
  887. o76.Parent = o75
  888. o77.Name = "Jumping"
  889. o77.Parent = o65
  890. o77.Archivable = false
  891. o77.SoundId = "rbxasset://sounds/action_jump.mp3"
  892. o77.Volume = 0.64999997615814
  893. o78.Name = "CharacterSoundEvent"
  894. o78.Parent = o77
  895. o79.Name = "Landing"
  896. o79.Parent = o65
  897. o79.Archivable = false
  898. o79.SoundId = "rbxasset://sounds/action_jump_land.mp3"
  899. o79.Volume = 1
  900. o80.Name = "CharacterSoundEvent"
  901. o80.Parent = o79
  902. o81.Name = "Splash"
  903. o81.Parent = o65
  904. o81.Archivable = false
  905. o81.SoundId = "rbxasset://sounds/impact_water.mp3"
  906. o81.Volume = 0.64999997615814
  907. o82.Name = "CharacterSoundEvent"
  908. o82.Parent = o81
  909. o83.Name = "Running"
  910. o83.Parent = o65
  911. o83.Archivable = false
  912. o83.Pitch = 1.8500000238419
  913. o83.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
  914. o83.TimePosition = 1.1257365234617
  915. o83.Volume = 0.64999997615814
  916. o83.Looped = true
  917. o84.Name = "CharacterSoundEvent"
  918. o84.Parent = o83
  919. o85.Name = "Swimming"
  920. o85.Parent = o65
  921. o85.Archivable = false
  922. o85.Pitch = 1.6000000238419
  923. o85.SoundId = "rbxasset://sounds/action_swim.mp3"
  924. o85.Volume = 0.64999997615814
  925. o85.Looped = true
  926. o86.Name = "CharacterSoundEvent"
  927. o86.Parent = o85
  928. o87.Name = "Climbing"
  929. o87.Parent = o65
  930. o87.Archivable = false
  931. o87.SoundId = "rbxasset://sounds/action_footsteps_plastic.mp3"
  932. o87.Volume = 0.64999997615814
  933. o87.Looped = true
  934. o88.Name = "CharacterSoundEvent"
  935. o88.Parent = o87
  936. o89.Name = "face"
  937. o89.Parent = o65
  938. o89.Texture = "http://www.roblox.com/asset/?id=13038247"
  939. o90.Name = "Torso"
  940. o90.Parent = o64
  941. o90.BrickColor = BrickColor.new("Pastel brown")
  942. o90.Position = Vector3.new(-134.100464, 6.49258947, -13.9804831)
  943. o90.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
  944. o90.RotVelocity = Vector3.new(-0.00163458323, 0.00098092726, -0.00170538155)
  945. o90.Velocity = Vector3.new(0.0119806472, -0.0127420211, -0.00988146011)
  946. o90.Locked = true
  947. o90.FormFactor = Enum.FormFactor.Symmetric
  948. o90.Size = Vector3.new(2, 2, 1)
  949. o90.CFrame = CFrame.new(-134.100464, 6.49258947, -13.9804831, 0.273213685, 0.00186787848, -0.961951554, 0.000700736069, 0.999997437, 0.00214077765, 0.961953104, -0.00125896395, 0.273211688)
  950. o90.LeftSurface = Enum.SurfaceType.Weld
  951. o90.RightSurface = Enum.SurfaceType.Weld
  952. o90.Color = Color3.new(1, 0.8, 0.6)
  953. o90.Position = Vector3.new(-134.100464, 6.49258947, -13.9804831)
  954. o90.velocity = Vector3.new(0.0119806472, -0.0127420211, -0.00988146011)
  955. o91.Name = "roblox"
  956. o91.Parent = o90
  957. o100.Name = "Right Shoulder"
  958. o100.Parent = o90
  959. o100.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  960. o100.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  961. o100.Part0 = o90
  962. o100.Part1 = o108
  963. o100.CurrentAngle = 1.5707963705063
  964. o100.MaxVelocity = 0.10000000149012
  965. o101.Name = "Left Shoulder"
  966. o101.Parent = o90
  967. o101.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  968. o101.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  969. o101.Part0 = o90
  970. o101.Part1 = o105
  971. o101.CurrentAngle = -1.5707963705063
  972. o101.MaxVelocity = 0.10000000149012
  973. o102.Name = "Right Hip"
  974. o102.Parent = o90
  975. o102.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  976. o102.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  977. o102.Part0 = o90
  978. o102.Part1 = o113
  979. o102.CurrentAngle = 1.5707963705063
  980. o102.MaxVelocity = 0.10000000149012
  981. o103.Name = "Left Hip"
  982. o103.Parent = o90
  983. o103.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  984. o103.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  985. o103.Part0 = o90
  986. o103.Part1 = o111
  987. o103.CurrentAngle = -1.5707963705063
  988. o103.MaxVelocity = 0.10000000149012
  989. o104.Name = "Neck"
  990. o104.Parent = o90
  991. o104.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  992. o104.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  993. o104.Part0 = o90
  994. o104.Part1 = o65
  995. o104.MaxVelocity = 0.10000000149012
  996. o105.Name = "Left Arm"
  997. o105.Parent = o64
  998. o105.BrickColor = BrickColor.new("Pastel brown")
  999. o105.Position = Vector3.new(-134.028473, 6.9903245, -15.5603104)
  1000. o105.Rotation = Vector3.new(89.9300003, -0.109999999, 74.1399994)
  1001. o105.RotVelocity = Vector3.new(0.0173833147, 0.000907649868, 0.0064344923)
  1002. o105.Velocity = Vector3.new(-0.0137807541, -0.0499749333, 0.0702756792)
  1003. o105.CanCollide = false
  1004. o105.Locked = true
  1005. o105.FormFactor = Enum.FormFactor.Symmetric
  1006. o105.Size = Vector3.new(1, 2, 1)
  1007. o105.CFrame = CFrame.new(-134.028473, 6.9903245, -15.5603104, 0.273213327, -0.961951733, -0.00183552608, 0.000632914132, 0.00208788272, -0.999997616, 0.961953223, 0.273211569, 0.00117927033)
  1008. o105.Color = Color3.new(1, 0.8, 0.6)
  1009. o105.Position = Vector3.new(-134.028473, 6.9903245, -15.5603104)
  1010. o105.velocity = Vector3.new(-0.0137807541, -0.0499749333, 0.0702756792)
  1011. o108.Name = "Right Arm"
  1012. o108.Parent = o64
  1013. o108.BrickColor = BrickColor.new("Pastel brown")
  1014. o108.Position = Vector3.new(-133.208832, 6.99222326, -12.6744499)
  1015. o108.Rotation = Vector3.new(89.9300003, -0.109999999, 74.1399994)
  1016. o108.RotVelocity = Vector3.new(0.0173833147, 0.000907649868, 0.0064344923)
  1017. o108.Velocity = Vector3.new(-0.0111736208, -0.0948667824, 0.0695647448)
  1018. o108.CanCollide = false
  1019. o108.Locked = true
  1020. o108.FormFactor = Enum.FormFactor.Symmetric
  1021. o108.Size = Vector3.new(1, 2, 1)
  1022. o108.CFrame = CFrame.new(-133.208832, 6.99222326, -12.6744499, 0.273213267, -0.961951733, -0.0018355021, 0.000633001793, 0.00208788272, -0.999997616, 0.961953223, 0.273211509, 0.00117935438)
  1023. o108.Color = Color3.new(1, 0.8, 0.6)
  1024. o108.Position = Vector3.new(-133.208832, 6.99222326, -12.6744499)
  1025. o108.velocity = Vector3.new(-0.0111736208, -0.0948667824, 0.0695647448)
  1026. o111.Name = "Left Leg"
  1027. o111.Parent = o64
  1028. o111.BrickColor = BrickColor.new("Pastel brown")
  1029. o111.Position = Vector3.new(-133.277145, 5.4902401, -14.7332573)
  1030. o111.Rotation = Vector3.new(89.9300003, -0.099999994, 74.1399994)
  1031. o111.RotVelocity = Vector3.new(0.00438322453, 0.00169923075, 0.00324965641)
  1032. o111.Velocity = Vector3.new(-0.00543624116, 0.00709632318, 0.0166214965)
  1033. o111.CanCollide = false
  1034. o111.Locked = true
  1035. o111.FormFactor = Enum.FormFactor.Symmetric
  1036. o111.Size = Vector3.new(1, 2, 1)
  1037. o111.CFrame = CFrame.new(-133.277145, 5.4902401, -14.7332573, 0.27321586, -0.961951017, -0.00181173789, 0.000674283598, 0.00207490637, -0.999997616, 0.961952448, 0.273214042, 0.00121552532)
  1038. o111.BottomSurface = Enum.SurfaceType.Smooth
  1039. o111.Color = Color3.new(1, 0.8, 0.6)
  1040. o111.Position = Vector3.new(-133.277145, 5.4902401, -14.7332573)
  1041. o111.velocity = Vector3.new(-0.00543624116, 0.00709632318, 0.0166214965)
  1042. o113.Name = "Right Leg"
  1043. o113.Parent = o64
  1044. o113.BrickColor = BrickColor.new("Pastel brown")
  1045. o113.Position = Vector3.new(-133.003983, 5.49092627, -13.7714157)
  1046. o113.Rotation = Vector3.new(89.9300003, -0.099999994, 74.1399994)
  1047. o113.RotVelocity = Vector3.new(0.000289053394, 0.000902900298, 0.00468921755)
  1048. o113.Velocity = Vector3.new(-0.00559230847, 0.0044792681, -0.0051766918)
  1049. o113.CanCollide = false
  1050. o113.Locked = true
  1051. o113.FormFactor = Enum.FormFactor.Symmetric
  1052. o113.Size = Vector3.new(1, 2, 1)
  1053. o113.CFrame = CFrame.new(-133.003983, 5.49092627, -13.7714157, 0.273213446, -0.961951733, -0.00179531099, 0.000702179619, 0.00206574984, -0.999997616, 0.961953104, 0.273211569, 0.00123985356)
  1054. o113.BottomSurface = Enum.SurfaceType.Smooth
  1055. o113.Color = Color3.new(1, 0.8, 0.6)
  1056. o113.Position = Vector3.new(-133.003983, 5.49092627, -13.7714157)
  1057. o113.velocity = Vector3.new(-0.00559230847, 0.0044792681, -0.0051766918)
  1058. o115.Parent = o64
  1059. o115.RightLeg = o113
  1060. o115.LeftLeg = o111
  1061. o115.Torso = o118
  1062. o115.Sit = true
  1063. o118.Name = "HumanoidRootPart"
  1064. o118.Parent = o64
  1065. o118.Transparency = 1
  1066. o118.Position = Vector3.new(-134.100479, 6.49259663, -13.9804878)
  1067. o118.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
  1068. o118.RotVelocity = Vector3.new(-0.00239218515, 0.00103416073, -0.00141358236)
  1069. o118.Velocity = Vector3.new(0.012269523, -0.0113523081, -0.0135693792)
  1070. o118.CanCollide = false
  1071. o118.Locked = true
  1072. o118.FormFactor = Enum.FormFactor.Symmetric
  1073. o118.Size = Vector3.new(2, 2, 1)
  1074. o118.CFrame = CFrame.new(-134.100479, 6.49259663, -13.9804878, 0.273213983, 0.00186020019, -0.961951494, 0.000702761929, 0.999997497, 0.00213337154, 0.961953044, -0.0012588898, 0.273211986)
  1075. o118.BottomSurface = Enum.SurfaceType.Smooth
  1076. o118.TopSurface = Enum.SurfaceType.Smooth
  1077. o118.Position = Vector3.new(-134.100479, 6.49259663, -13.9804878)
  1078. o118.velocity = Vector3.new(0.012269523, -0.0113523081, -0.0135693792)
  1079. o120.Name = "RootJoint"
  1080. o120.Parent = o118
  1081. o120.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  1082. o120.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  1083. o120.Part0 = o118
  1084. o120.Part1 = o90
  1085. o120.MaxVelocity = 0.10000000149012
  1086. o121.Name = "Sound"
  1087. o121.Parent = o64
  1088.  
  1089. runDummyScript(function()
  1090. --[[
  1091. Author: @spotco
  1092. This script creates sounds which are placed under the character head.
  1093. These sounds are used by the "LocalSound" script.
  1094.  
  1095. To modify this script, copy it to your "StarterPlayer/StarterCharacterScripts" folder keeping the same script name ("Sound").
  1096. The default Sound script loaded for every character will then be replaced with your copy of the script.
  1097. ]]--
  1098. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  1099. local Players = game:GetService("Players")
  1100.  
  1101. local SOUND_EVENT_FOLDER_NAME = "DefaultSoundEvents"
  1102. local DEFAULT_SERVER_SOUND_EVENT_NAME = "DefaultServerSoundEvent"
  1103.  
  1104. local SoundEventFolder = ReplicatedStorage:FindFirstChild(SOUND_EVENT_FOLDER_NAME)
  1105. local DefaultServerSoundEvent = nil
  1106.  
  1107. local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
  1108. if useSoundDispatcher then
  1109. if not SoundEventFolder then
  1110. SoundEventFolder = Instance.new("Folder")
  1111. SoundEventFolder.Name = SOUND_EVENT_FOLDER_NAME
  1112. SoundEventFolder.Archivable = false
  1113. SoundEventFolder.Parent = ReplicatedStorage
  1114. end
  1115.  
  1116. DefaultServerSoundEvent = SoundEventFolder:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
  1117. else
  1118. DefaultServerSoundEvent = ReplicatedStorage:FindFirstChild(DEFAULT_SERVER_SOUND_EVENT_NAME)
  1119. end
  1120.  
  1121. if not DefaultServerSoundEvent then
  1122. if useSoundDispatcher then
  1123. DefaultServerSoundEvent = Instance.new("RemoteEvent", SoundEventFolder)
  1124. else
  1125. DefaultServerSoundEvent = Instance.new("RemoteEvent", ReplicatedStorage)
  1126. end
  1127.  
  1128. DefaultServerSoundEvent.Name = DEFAULT_SERVER_SOUND_EVENT_NAME
  1129. DefaultServerSoundEvent.OnServerEvent:Connect(function() end)
  1130. end
  1131.  
  1132. local function CreateNewSound(name, id, looped, pitch, parent)
  1133. local sound = Instance.new("Sound")
  1134. sound.SoundId = id
  1135. sound.Name = name
  1136. sound.archivable = false
  1137. sound.Pitch = pitch
  1138. sound.Looped = looped
  1139. sound.MinDistance = 5
  1140. sound.MaxDistance = 150
  1141. sound.Volume = 0.65
  1142. sound.Parent = parent
  1143.  
  1144. if DefaultServerSoundEvent then
  1145. local CharacterSoundEvent = Instance.new("RemoteEvent", sound)
  1146. CharacterSoundEvent.Name = "CharacterSoundEvent"
  1147. CharacterSoundEvent.OnServerEvent:Connect(function(player, playing, resetPosition)
  1148. if type(playing) ~= "boolean" then
  1149. return
  1150. end
  1151. if type(resetPosition) ~= "boolean" then
  1152. return
  1153. end
  1154.  
  1155. if player.Character ~= script.Parent then
  1156. return
  1157. end
  1158. for _, p in pairs(Players:GetPlayers()) do
  1159. if p ~= player then
  1160. -- Connect to the dispatcher to check if the player has loaded.
  1161. if useSoundDispatcher then
  1162. SoundEventFolder:FindFirstChild("SoundDispatcher"):Fire(p, sound, playing, resetPosition)
  1163. else
  1164. DefaultServerSoundEvent:FireClient(p, sound, playing, resetPosition)
  1165. end
  1166. end
  1167. end
  1168. end)
  1169. end
  1170. return sound
  1171. end
  1172.  
  1173. local head = script.Parent:FindFirstChild("Head")
  1174. if not head then
  1175. error("Sound script parent has no child Head.")
  1176. return
  1177. end
  1178.  
  1179. CreateNewSound("GettingUp", "rbxasset://sounds/action_get_up.mp3", false, 1, head)
  1180. CreateNewSound("Died", "rbxasset://sounds/uuhhh.mp3", false, 1, head)
  1181. CreateNewSound("FreeFalling", "rbxasset://sounds/action_falling.mp3", true, 1, head)
  1182. CreateNewSound("Jumping", "rbxasset://sounds/action_jump.mp3", false, 1, head)
  1183. CreateNewSound("Landing", "rbxasset://sounds/action_jump_land.mp3", false, 1, head)
  1184. CreateNewSound("Splash", "rbxasset://sounds/impact_water.mp3", false, 1, head)
  1185. CreateNewSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1.85, head)
  1186. CreateNewSound("Swimming", "rbxasset://sounds/action_swim.mp3", true, 1.6, head)
  1187. CreateNewSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3", true, 1, head)
  1188. end,o121)
  1189.  
  1190. o122.Name = "LocalSound"
  1191. o122.Parent = o121
  1192.  
  1193. runDummyScript(function()
  1194. --[[
  1195. Author: @spotco
  1196. This script runs locally for the player of the given humanoid.
  1197. This script triggers humanoid sound play/pause actions locally.
  1198.  
  1199. The Playing/TimePosition properties of Sound objects bypass FilteringEnabled, so this triggers the sound
  1200. immediately for the player and is replicated to all other players.
  1201.  
  1202. This script is optimized to reduce network traffic through minimizing the amount of property replication.
  1203. ]]--
  1204.  
  1205. --All sounds are referenced by this ID
  1206. local SFX = {
  1207. Died = 0;
  1208. Running = 1;
  1209. Swimming = 2;
  1210. Climbing = 3,
  1211. Jumping = 4;
  1212. GettingUp = 5;
  1213. FreeFalling = 6;
  1214. FallingDown = 7;
  1215. Landing = 8;
  1216. Splash = 9;
  1217. }
  1218.  
  1219. local useUpdatedLocalSoundFlag = UserSettings():IsUserFeatureEnabled("UserFixCharacterSoundIssues")
  1220.  
  1221. local Humanoid = nil
  1222. local Head = nil
  1223. --SFX ID to Sound object
  1224. local Sounds = {}
  1225. local SoundService = game:GetService("SoundService")
  1226. local soundEventFolderName = "DefaultSoundEvents"
  1227. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  1228. local AddCharacterLoadedEvent = nil
  1229. local RemoveCharacterEvent = nil
  1230. local soundEventFolder = ReplicatedStorage:FindFirstChild(soundEventFolderName)
  1231. local useSoundDispatcher = UserSettings():IsUserFeatureEnabled("UserUseSoundDispatcher")
  1232.  
  1233. if useSoundDispatcher then
  1234. if not soundEventFolder then
  1235. soundEventFolder = Instance.new("Folder", ReplicatedStorage)
  1236. soundEventFolder.Name = soundEventFolderName
  1237. soundEventFolder.Archivable = false
  1238. end
  1239.  
  1240. -- Load the RemoveCharacterEvent
  1241. RemoveCharacterEvent = soundEventFolder:FindFirstChild("RemoveCharacterEvent")
  1242. if RemoveCharacterEvent == nil then
  1243. RemoveCharacterEvent = Instance.new("RemoteEvent", soundEventFolder)
  1244. RemoveCharacterEvent.Name = "RemoveCharacterEvent"
  1245. end
  1246.  
  1247. AddCharacterLoadedEvent = soundEventFolder:FindFirstChild("AddCharacterLoadedEvent")
  1248. if AddCharacterLoadedEvent == nil then
  1249. AddCharacterLoadedEvent = Instance.new("RemoteEvent", soundEventFolder)
  1250. AddCharacterLoadedEvent.Name = "AddCharacterLoadedEvent"
  1251. end
  1252.  
  1253. -- Notify the server a new character has been loaded
  1254. AddCharacterLoadedEvent:FireServer()
  1255.  
  1256. -- Notify the sound dispatcher this character has left.
  1257. game.Players.LocalPlayer.CharacterRemoving:connect(function(character)
  1258. RemoveCharacterEvent:FireServer(game.Players.LocalPlayer)
  1259. end)
  1260. end
  1261.  
  1262. do
  1263. local Figure = script.Parent.Parent
  1264. Head = Figure:WaitForChild("Head")
  1265. while not Humanoid do
  1266. for _,NewHumanoid in pairs(Figure:GetChildren()) do
  1267. if NewHumanoid:IsA("Humanoid") then
  1268. Humanoid = NewHumanoid
  1269. break
  1270. end
  1271. end
  1272. if Humanoid then break end
  1273. Figure.ChildAdded:wait()
  1274. end
  1275. Sounds[SFX.Died] = Head:WaitForChild("Died")
  1276. Sounds[SFX.Running] = Head:WaitForChild("Running")
  1277. Sounds[SFX.Swimming] = Head:WaitForChild("Swimming")
  1278. Sounds[SFX.Climbing] = Head:WaitForChild("Climbing")
  1279. Sounds[SFX.Jumping] = Head:WaitForChild("Jumping")
  1280. Sounds[SFX.GettingUp] = Head:WaitForChild("GettingUp")
  1281. Sounds[SFX.FreeFalling] = Head:WaitForChild("FreeFalling")
  1282. Sounds[SFX.Landing] = Head:WaitForChild("Landing")
  1283. Sounds[SFX.Splash] = Head:WaitForChild("Splash")
  1284.  
  1285. local DefaultServerSoundEvent = nil
  1286. if useSoundDispatcher then
  1287. DefaultServerSoundEvent = soundEventFolder:FindFirstChild("DefaultServerSoundEvent")
  1288. else
  1289. DefaultServerSoundEvent = game:GetService("ReplicatedStorage"):FindFirstChild("DefaultServerSoundEvent")
  1290. end
  1291.  
  1292. if DefaultServerSoundEvent then
  1293. DefaultServerSoundEvent.OnClientEvent:connect(function(sound, playing, resetPosition)
  1294. if resetPosition and sound.TimePosition ~= 0 then
  1295. sound.TimePosition = 0
  1296. end
  1297. if sound.IsPlaying ~= playing then
  1298. sound.Playing = playing
  1299. end
  1300. end)
  1301. end
  1302. end
  1303.  
  1304. local IsSoundFilteringEnabled = function()
  1305. return game.Workspace.FilteringEnabled and SoundService.RespectFilteringEnabled
  1306. end
  1307.  
  1308. local Util
  1309. Util = {
  1310.  
  1311. --Define linear relationship between (pt1x,pt2x) and (pt2x,pt2y). Evaluate this at x.
  1312. YForLineGivenXAndTwoPts = function(x,pt1x,pt1y,pt2x,pt2y)
  1313. --(y - y1)/(x - x1) = m
  1314. local m = (pt1y - pt2y) / (pt1x - pt2x)
  1315. --float b = pt1.y - m * pt1.x;
  1316. local b = (pt1y - m * pt1x)
  1317. return m * x + b
  1318. end;
  1319.  
  1320. --Clamps the value of "val" between the "min" and "max"
  1321. Clamp = function(val,min,max)
  1322. return math.min(max,math.max(min,val))
  1323. end;
  1324.  
  1325. --Gets the horizontal (x,z) velocity magnitude of the given part
  1326. HorizontalSpeed = function(Head)
  1327. local hVel = Head.Velocity + Vector3.new(0,-Head.Velocity.Y,0)
  1328. return hVel.magnitude
  1329. end;
  1330.  
  1331. --Gets the vertical (y) velocity magnitude of the given part
  1332. VerticalSpeed = function(Head)
  1333. return math.abs(Head.Velocity.Y)
  1334. end;
  1335.  
  1336. --Setting Playing/TimePosition values directly result in less network traffic than Play/Pause/Resume/Stop
  1337. --If these properties are enabled, use them.
  1338. Play = function(sound)
  1339. if IsSoundFilteringEnabled() then
  1340. sound.CharacterSoundEvent:FireServer(true, true)
  1341. end
  1342. if sound.TimePosition ~= 0 then
  1343. sound.TimePosition = 0
  1344. end
  1345. if not sound.IsPlaying then
  1346. sound.Playing = true
  1347. end
  1348. end;
  1349.  
  1350. Pause = function(sound)
  1351. if IsSoundFilteringEnabled() then
  1352. sound.CharacterSoundEvent:FireServer(false, false)
  1353. end
  1354. if sound.IsPlaying then
  1355. sound.Playing = false
  1356. end
  1357. end;
  1358.  
  1359. Resume = function(sound)
  1360. if IsSoundFilteringEnabled() then
  1361. sound.CharacterSoundEvent:FireServer(true, false)
  1362. end
  1363. if not sound.IsPlaying then
  1364. sound.Playing = true
  1365. end
  1366. end;
  1367.  
  1368. Stop = function(sound)
  1369. if IsSoundFilteringEnabled() then
  1370. sound.CharacterSoundEvent:FireServer(false, true)
  1371. end
  1372. if sound.IsPlaying then
  1373. sound.Playing = false
  1374. end
  1375. if sound.TimePosition ~= 0 then
  1376. sound.TimePosition = 0
  1377. end
  1378. end;
  1379. }
  1380.  
  1381. do
  1382. -- List of all active Looped sounds
  1383. local playingLoopedSounds = {}
  1384.  
  1385. -- Last seen Enum.HumanoidStateType
  1386. local activeState = nil
  1387.  
  1388. local fallSpeed = 0
  1389.  
  1390. -- Verify and set that "sound" is in "playingLoopedSounds".
  1391. function setSoundInPlayingLoopedSounds(sound)
  1392. for i=1, #playingLoopedSounds do
  1393. if playingLoopedSounds[i] == sound then
  1394. return
  1395. end
  1396. end
  1397. table.insert(playingLoopedSounds,sound)
  1398. end
  1399.  
  1400. -- Stop all active looped sounds except parameter "except". If "except" is not passed, all looped sounds will be stopped.
  1401. function stopPlayingLoopedSoundsExcept(except)
  1402. for i=#playingLoopedSounds,1,-1 do
  1403. if playingLoopedSounds[i] ~= except then
  1404. Util.Pause(playingLoopedSounds[i])
  1405. table.remove(playingLoopedSounds,i)
  1406. end
  1407. end
  1408. end
  1409.  
  1410. -- Table of Enum.HumanoidStateType to handling function
  1411. local stateUpdateHandler = {
  1412. [Enum.HumanoidStateType.Dead] = function()
  1413. stopPlayingLoopedSoundsExcept()
  1414. local sound = Sounds[SFX.Died]
  1415. Util.Play(sound)
  1416. end;
  1417.  
  1418. [Enum.HumanoidStateType.RunningNoPhysics] = function(speed)
  1419. stateUpdated(Enum.HumanoidStateType.Running, speed)
  1420. end;
  1421.  
  1422. [Enum.HumanoidStateType.Running] = function(speed)
  1423. local sound = Sounds[SFX.Running]
  1424. stopPlayingLoopedSoundsExcept(sound)
  1425.  
  1426. if(useUpdatedLocalSoundFlag and activeState == Enum.HumanoidStateType.Freefall and fallSpeed > 0.1) then
  1427. -- Play a landing sound if the character dropped from a large distance
  1428. local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
  1429. local freeFallSound = Sounds[SFX.FreeFalling]
  1430. freeFallSound.Volume = vol
  1431. Util.Play(freeFallSound)
  1432. fallSpeed = 0
  1433. end
  1434. if useUpdatedLocalSoundFlag then
  1435. if speed ~= nil and speed > 0.5 then
  1436. Util.Resume(sound)
  1437. setSoundInPlayingLoopedSounds(sound)
  1438. elseif speed ~= nil then
  1439. stopPlayingLoopedSoundsExcept()
  1440. end
  1441. else
  1442. if Util.HorizontalSpeed(Head) > 0.5 then
  1443. Util.Resume(sound)
  1444. setSoundInPlayingLoopedSounds(sound)
  1445. else
  1446. stopPlayingLoopedSoundsExcept()
  1447. end
  1448. end
  1449. end;
  1450.  
  1451. [Enum.HumanoidStateType.Swimming] = function(speed)
  1452. local threshold
  1453. if useUpdatedLocalSoundFlag then threshold = speed else threshold = Util.VerticalSpeed(Head) end
  1454. if activeState ~= Enum.HumanoidStateType.Swimming and threshold > 0.1 then
  1455. local splashSound = Sounds[SFX.Splash]
  1456. splashSound.Volume = Util.Clamp(
  1457. Util.YForLineGivenXAndTwoPts(
  1458. Util.VerticalSpeed(Head),
  1459. 100, 0.28,
  1460. 350, 1),
  1461. 0,1)
  1462. Util.Play(splashSound)
  1463. end
  1464.  
  1465. do
  1466. local sound = Sounds[SFX.Swimming]
  1467. stopPlayingLoopedSoundsExcept(sound)
  1468. Util.Resume(sound)
  1469. setSoundInPlayingLoopedSounds(sound)
  1470. end
  1471. end;
  1472.  
  1473. [Enum.HumanoidStateType.Climbing] = function(speed)
  1474. local sound = Sounds[SFX.Climbing]
  1475. if useUpdatedLocalSoundFlag then
  1476. if speed ~= nil and math.abs(speed) > 0.1 then
  1477. Util.Resume(sound)
  1478. stopPlayingLoopedSoundsExcept(sound)
  1479. else
  1480. Util.Pause(sound)
  1481. stopPlayingLoopedSoundsExcept(sound)
  1482. end
  1483. else
  1484. if Util.VerticalSpeed(Head) > 0.1 then
  1485. Util.Resume(sound)
  1486. stopPlayingLoopedSoundsExcept(sound)
  1487. else
  1488. stopPlayingLoopedSoundsExcept()
  1489. end
  1490. end
  1491.  
  1492. setSoundInPlayingLoopedSounds(sound)
  1493. end;
  1494.  
  1495. [Enum.HumanoidStateType.Jumping] = function()
  1496. if activeState == Enum.HumanoidStateType.Jumping then
  1497. return
  1498. end
  1499. stopPlayingLoopedSoundsExcept()
  1500. local sound = Sounds[SFX.Jumping]
  1501. Util.Play(sound)
  1502. end;
  1503.  
  1504. [Enum.HumanoidStateType.GettingUp] = function()
  1505. stopPlayingLoopedSoundsExcept()
  1506. local sound = Sounds[SFX.GettingUp]
  1507. Util.Play(sound)
  1508. end;
  1509.  
  1510. [Enum.HumanoidStateType.Freefall] = function()
  1511. if activeState == Enum.HumanoidStateType.Freefall then
  1512. return
  1513. end
  1514. local sound = Sounds[SFX.FreeFalling]
  1515. sound.Volume = 0
  1516. stopPlayingLoopedSoundsExcept()
  1517.  
  1518. fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.y))
  1519. end;
  1520.  
  1521. [Enum.HumanoidStateType.FallingDown] = function()
  1522. stopPlayingLoopedSoundsExcept()
  1523. end;
  1524.  
  1525. [Enum.HumanoidStateType.Landed] = function()
  1526. stopPlayingLoopedSoundsExcept()
  1527. if Util.VerticalSpeed(Head) > 75 then
  1528. local landingSound = Sounds[SFX.Landing]
  1529. landingSound.Volume = Util.Clamp(
  1530. Util.YForLineGivenXAndTwoPts(
  1531. Util.VerticalSpeed(Head),
  1532. 50, 0,
  1533. 100, 1),
  1534. 0,1)
  1535. Util.Play(landingSound)
  1536. end
  1537. end;
  1538.  
  1539. [Enum.HumanoidStateType.Seated] = function()
  1540. stopPlayingLoopedSoundsExcept()
  1541. end;
  1542. }
  1543.  
  1544.  
  1545.  
  1546. -- Handle state event fired or OnChange fired
  1547. function stateUpdated(state, speed)
  1548. if stateUpdateHandler[state] ~= nil then
  1549. if useUpdatedLocalSoundFlag and (state == Enum.HumanoidStateType.Running
  1550. or state == Enum.HumanoidStateType.Climbing
  1551. or state == Enum.HumanoidStateType.Swimming
  1552. or state == Enum.HumanoidStateType.RunningNoPhysics) then
  1553. stateUpdateHandler[state](speed)
  1554. else
  1555. stateUpdateHandler[state]()
  1556. end
  1557. end
  1558. activeState = state
  1559. end
  1560.  
  1561. Humanoid.Died:connect( function() stateUpdated(Enum.HumanoidStateType.Dead) end)
  1562. Humanoid.Running:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Running, speed) end)
  1563. Humanoid.Swimming:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Swimming, speed) end)
  1564. Humanoid.Climbing:connect( function(speed) stateUpdated(Enum.HumanoidStateType.Climbing, speed) end)
  1565. Humanoid.Jumping:connect( function() stateUpdated(Enum.HumanoidStateType.Jumping) end)
  1566. Humanoid.GettingUp:connect( function() stateUpdated(Enum.HumanoidStateType.GettingUp) end)
  1567. Humanoid.FreeFalling:connect( function() stateUpdated(Enum.HumanoidStateType.Freefall) end)
  1568. Humanoid.FallingDown:connect( function() stateUpdated(Enum.HumanoidStateType.FallingDown) end)
  1569.  
  1570.  
  1571.  
  1572. -- required for proper handling of Landed event
  1573.  
  1574. Humanoid.StateChanged:connect(function(old, new)
  1575. stateUpdated(new)
  1576. end)
  1577.  
  1578.  
  1579.  
  1580. function onUpdate(stepDeltaSeconds, tickSpeedSeconds)
  1581. local stepScale = stepDeltaSeconds / tickSpeedSeconds
  1582. do
  1583. local sound = Sounds[SFX.FreeFalling]
  1584. if activeState == Enum.HumanoidStateType.Freefall then
  1585. if Head.Velocity.Y < 0 and Util.VerticalSpeed(Head) > 75 then
  1586. Util.Resume(sound)
  1587.  
  1588. --Volume takes 1.1 seconds to go from volume 0 to 1
  1589. local ANIMATION_LENGTH_SECONDS = 1.1
  1590.  
  1591. local normalizedIncrement = tickSpeedSeconds / ANIMATION_LENGTH_SECONDS
  1592. sound.Volume = Util.Clamp(sound.Volume + normalizedIncrement * stepScale, 0, 1)
  1593. else
  1594. sound.Volume = 0
  1595. end
  1596. else
  1597. Util.Pause(sound)
  1598. end
  1599. end
  1600.  
  1601. do
  1602. local sound = Sounds[SFX.Running]
  1603. if activeState == Enum.HumanoidStateType.Running then
  1604. if Util.HorizontalSpeed(Head) < 0.5 then
  1605. Util.Pause(sound)
  1606. end
  1607. end
  1608. end
  1609. end
  1610.  
  1611.  
  1612. local lastTick = tick()
  1613. local TICK_SPEED_SECONDS = 0.25
  1614. while true do
  1615. onUpdate(tick() - lastTick,TICK_SPEED_SECONDS)
  1616. lastTick = tick()
  1617. wait(TICK_SPEED_SECONDS)
  1618. end
  1619.  
  1620. end
  1621.  
  1622. end,o122)
  1623.  
  1624. o123.Name = "Health"
  1625. o123.Parent = o64
  1626.  
  1627. runDummyScript(function()
  1628. -- Gradually regenerates the Humanoid's Health over time.
  1629.  
  1630. local REGEN_RATE = 1/100 -- Regenerate this fraction of MaxHealth per second.
  1631. local REGEN_STEP = 1 -- Wait this long between each regeneration step.
  1632.  
  1633. --------------------------------------------------------------------------------
  1634.  
  1635. local Character = script.Parent
  1636. local Humanoid = Character:WaitForChild'Humanoid'
  1637.  
  1638. --------------------------------------------------------------------------------
  1639.  
  1640. while true do
  1641. while Humanoid.Health < Humanoid.MaxHealth do
  1642. local dt = wait(REGEN_STEP)
  1643. local dh = dt*REGEN_RATE*Humanoid.MaxHealth
  1644. Humanoid.Health = math.min(Humanoid.Health + dh, Humanoid.MaxHealth)
  1645. end
  1646. Humanoid.HealthChanged:Wait()
  1647. end
  1648. end,o123)
  1649.  
  1650. o124.Name = "Animate"
  1651. o124.Parent = o64
  1652.  
  1653. runDummyScript(function()
  1654. local Figure = script.Parent
  1655. local Torso = Figure:WaitForChild("Torso")
  1656. local RightShoulder = Torso:WaitForChild("Right Shoulder")
  1657. local LeftShoulder = Torso:WaitForChild("Left Shoulder")
  1658. local RightHip = Torso:WaitForChild("Right Hip")
  1659. local LeftHip = Torso:WaitForChild("Left Hip")
  1660. local Neck = Torso:WaitForChild("Neck")
  1661. local Humanoid = Figure:WaitForChild("Humanoid")
  1662. local pose = "Standing"
  1663.  
  1664. local currentAnim = ""
  1665. local currentAnimInstance = nil
  1666. local currentAnimTrack = nil
  1667. local currentAnimKeyframeHandler = nil
  1668. local currentAnimSpeed = 1.0
  1669. local animTable = {}
  1670. local animNames = {
  1671. idle = {
  1672. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  1673. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  1674. },
  1675. walk = {
  1676. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  1677. },
  1678. run = {
  1679. { id = "run.xml", weight = 10 }
  1680. },
  1681. jump = {
  1682. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  1683. },
  1684. fall = {
  1685. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  1686. },
  1687. climb = {
  1688. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  1689. },
  1690. sit = {
  1691. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  1692. },
  1693. toolnone = {
  1694. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  1695. },
  1696. toolslash = {
  1697. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  1698. -- { id = "slash.xml", weight = 10 }
  1699. },
  1700. toollunge = {
  1701. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  1702. },
  1703. wave = {
  1704. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  1705. },
  1706. point = {
  1707. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  1708. },
  1709. dance1 = {
  1710. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  1711. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  1712. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  1713. },
  1714. dance2 = {
  1715. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  1716. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  1717. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  1718. },
  1719. dance3 = {
  1720. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  1721. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  1722. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  1723. },
  1724. laugh = {
  1725. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  1726. },
  1727. cheer = {
  1728. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  1729. },
  1730. }
  1731. local dances = {"dance1", "dance2", "dance3"}
  1732.  
  1733. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  1734. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  1735.  
  1736. function configureAnimationSet(name, fileList)
  1737. if (animTable[name] ~= nil) then
  1738. for _, connection in pairs(animTable[name].connections) do
  1739. connection:disconnect()
  1740. end
  1741. end
  1742. animTable[name] = {}
  1743. animTable[name].count = 0
  1744. animTable[name].totalWeight = 0
  1745. animTable[name].connections = {}
  1746.  
  1747. -- check for config values
  1748. local config = script:FindFirstChild(name)
  1749. if (config ~= nil) then
  1750. -- print("Loading anims " .. name)
  1751. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  1752. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  1753. local idx = 1
  1754. for _, childPart in pairs(config:GetChildren()) do
  1755. if (childPart:IsA("Animation")) then
  1756. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  1757. animTable[name][idx] = {}
  1758. animTable[name][idx].anim = childPart
  1759. local weightObject = childPart:FindFirstChild("Weight")
  1760. if (weightObject == nil) then
  1761. animTable[name][idx].weight = 1
  1762. else
  1763. animTable[name][idx].weight = weightObject.Value
  1764. end
  1765. animTable[name].count = animTable[name].count + 1
  1766. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  1767. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  1768. idx = idx + 1
  1769. end
  1770. end
  1771. end
  1772.  
  1773. -- fallback to defaults
  1774. if (animTable[name].count <= 0) then
  1775. for idx, anim in pairs(fileList) do
  1776. animTable[name][idx] = {}
  1777. animTable[name][idx].anim = Instance.new("Animation")
  1778. animTable[name][idx].anim.Name = name
  1779. animTable[name][idx].anim.AnimationId = anim.id
  1780. animTable[name][idx].weight = anim.weight
  1781. animTable[name].count = animTable[name].count + 1
  1782. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  1783. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  1784. end
  1785. end
  1786. end
  1787.  
  1788. -- Setup animation objects
  1789. function scriptChildModified(child)
  1790. local fileList = animNames[child.Name]
  1791. if (fileList ~= nil) then
  1792. configureAnimationSet(child.Name, fileList)
  1793. end
  1794. end
  1795.  
  1796. script.ChildAdded:connect(scriptChildModified)
  1797. script.ChildRemoved:connect(scriptChildModified)
  1798.  
  1799.  
  1800. for name, fileList in pairs(animNames) do
  1801. configureAnimationSet(name, fileList)
  1802. end
  1803.  
  1804. -- ANIMATION
  1805.  
  1806. -- declarations
  1807. local toolAnim = "None"
  1808. local toolAnimTime = 0
  1809.  
  1810. local jumpAnimTime = 0
  1811. local jumpAnimDuration = 0.3
  1812.  
  1813. local toolTransitionTime = 0.1
  1814. local fallTransitionTime = 0.3
  1815. local jumpMaxLimbVelocity = 0.75
  1816.  
  1817. -- functions
  1818.  
  1819. function stopAllAnimations()
  1820. local oldAnim = currentAnim
  1821.  
  1822. -- return to idle if finishing an emote
  1823. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  1824. oldAnim = "idle"
  1825. end
  1826.  
  1827. currentAnim = ""
  1828. currentAnimInstance = nil
  1829. if (currentAnimKeyframeHandler ~= nil) then
  1830. currentAnimKeyframeHandler:disconnect()
  1831. end
  1832.  
  1833. if (currentAnimTrack ~= nil) then
  1834. currentAnimTrack:Stop()
  1835. currentAnimTrack:Destroy()
  1836. currentAnimTrack = nil
  1837. end
  1838. return oldAnim
  1839. end
  1840.  
  1841. function setAnimationSpeed(speed)
  1842. if speed ~= currentAnimSpeed then
  1843. currentAnimSpeed = speed
  1844. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  1845. end
  1846. end
  1847.  
  1848. function keyFrameReachedFunc(frameName)
  1849. if (frameName == "End") then
  1850.  
  1851. local repeatAnim = currentAnim
  1852. -- return to idle if finishing an emote
  1853. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  1854. repeatAnim = "idle"
  1855. end
  1856.  
  1857. local animSpeed = currentAnimSpeed
  1858. playAnimation(repeatAnim, 0.0, Humanoid)
  1859. setAnimationSpeed(animSpeed)
  1860. end
  1861. end
  1862.  
  1863. -- Preload animations
  1864. function playAnimation(animName, transitionTime, humanoid)
  1865.  
  1866. local roll = math.random(1, animTable[animName].totalWeight)
  1867. local origRoll = roll
  1868. local idx = 1
  1869. while (roll > animTable[animName][idx].weight) do
  1870. roll = roll - animTable[animName][idx].weight
  1871. idx = idx + 1
  1872. end
  1873. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  1874. local anim = animTable[animName][idx].anim
  1875.  
  1876. -- switch animation
  1877. if (anim ~= currentAnimInstance) then
  1878.  
  1879. if (currentAnimTrack ~= nil) then
  1880. currentAnimTrack:Stop(transitionTime)
  1881. currentAnimTrack:Destroy()
  1882. end
  1883.  
  1884. currentAnimSpeed = 1.0
  1885.  
  1886. -- load it to the humanoid; get AnimationTrack
  1887. currentAnimTrack = humanoid:LoadAnimation(anim)
  1888. currentAnimTrack.Priority = Enum.AnimationPriority.Core
  1889.  
  1890. -- play the animation
  1891. currentAnimTrack:Play(transitionTime)
  1892. currentAnim = animName
  1893. currentAnimInstance = anim
  1894.  
  1895. -- set up keyframe name triggers
  1896. if (currentAnimKeyframeHandler ~= nil) then
  1897. currentAnimKeyframeHandler:disconnect()
  1898. end
  1899. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  1900.  
  1901. end
  1902.  
  1903. end
  1904.  
  1905. -------------------------------------------------------------------------------------------
  1906. -------------------------------------------------------------------------------------------
  1907.  
  1908. local toolAnimName = ""
  1909. local toolAnimTrack = nil
  1910. local toolAnimInstance = nil
  1911. local currentToolAnimKeyframeHandler = nil
  1912.  
  1913. function toolKeyFrameReachedFunc(frameName)
  1914. if (frameName == "End") then
  1915. -- print("Keyframe : ".. frameName)
  1916. playToolAnimation(toolAnimName, 0.0, Humanoid)
  1917. end
  1918. end
  1919.  
  1920.  
  1921. function playToolAnimation(animName, transitionTime, humanoid, priority)
  1922.  
  1923. local roll = math.random(1, animTable[animName].totalWeight)
  1924. local origRoll = roll
  1925. local idx = 1
  1926. while (roll > animTable[animName][idx].weight) do
  1927. roll = roll - animTable[animName][idx].weight
  1928. idx = idx + 1
  1929. end
  1930. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  1931. local anim = animTable[animName][idx].anim
  1932.  
  1933. if (toolAnimInstance ~= anim) then
  1934.  
  1935. if (toolAnimTrack ~= nil) then
  1936. toolAnimTrack:Stop()
  1937. toolAnimTrack:Destroy()
  1938. transitionTime = 0
  1939. end
  1940.  
  1941. -- load it to the humanoid; get AnimationTrack
  1942. toolAnimTrack = humanoid:LoadAnimation(anim)
  1943. if priority then
  1944. toolAnimTrack.Priority = priority
  1945. end
  1946.  
  1947. -- play the animation
  1948. toolAnimTrack:Play(transitionTime)
  1949. toolAnimName = animName
  1950. toolAnimInstance = anim
  1951.  
  1952. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  1953. end
  1954. end
  1955.  
  1956. function stopToolAnimations()
  1957. local oldAnim = toolAnimName
  1958.  
  1959. if (currentToolAnimKeyframeHandler ~= nil) then
  1960. currentToolAnimKeyframeHandler:disconnect()
  1961. end
  1962.  
  1963. toolAnimName = ""
  1964. toolAnimInstance = nil
  1965. if (toolAnimTrack ~= nil) then
  1966. toolAnimTrack:Stop()
  1967. toolAnimTrack:Destroy()
  1968. toolAnimTrack = nil
  1969. end
  1970.  
  1971.  
  1972. return oldAnim
  1973. end
  1974.  
  1975. -------------------------------------------------------------------------------------------
  1976. -------------------------------------------------------------------------------------------
  1977.  
  1978.  
  1979. function onRunning(speed)
  1980. if speed > 0.01 then
  1981. playAnimation("walk", 0.1, Humanoid)
  1982. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  1983. setAnimationSpeed(speed / 14.5)
  1984. end
  1985. pose = "Running"
  1986. else
  1987. if emoteNames[currentAnim] == nil then
  1988. playAnimation("idle", 0.1, Humanoid)
  1989. pose = "Standing"
  1990. end
  1991. end
  1992. end
  1993.  
  1994. function onDied()
  1995. pose = "Dead"
  1996. end
  1997.  
  1998. function onJumping()
  1999. playAnimation("jump", 0.1, Humanoid)
  2000. jumpAnimTime = jumpAnimDuration
  2001. pose = "Jumping"
  2002. end
  2003.  
  2004. function onClimbing(speed)
  2005. playAnimation("climb", 0.1, Humanoid)
  2006. setAnimationSpeed(speed / 12.0)
  2007. pose = "Climbing"
  2008. end
  2009.  
  2010. function onGettingUp()
  2011. pose = "GettingUp"
  2012. end
  2013.  
  2014. function onFreeFall()
  2015. if (jumpAnimTime <= 0) then
  2016. playAnimation("fall", fallTransitionTime, Humanoid)
  2017. end
  2018. pose = "FreeFall"
  2019. end
  2020.  
  2021. function onFallingDown()
  2022. pose = "FallingDown"
  2023. end
  2024.  
  2025. function onSeated()
  2026. pose = "Seated"
  2027. end
  2028.  
  2029. function onPlatformStanding()
  2030. pose = "PlatformStanding"
  2031. end
  2032.  
  2033. function onSwimming(speed)
  2034. if speed > 0 then
  2035. pose = "Running"
  2036. else
  2037. pose = "Standing"
  2038. end
  2039. end
  2040.  
  2041. function getTool()
  2042. for _, kid in ipairs(Figure:GetChildren()) do
  2043. if kid.className == "Tool" then return kid end
  2044. end
  2045. return nil
  2046. end
  2047.  
  2048. function getToolAnim(tool)
  2049. for _, c in ipairs(tool:GetChildren()) do
  2050. if c.Name == "toolanim" and c.className == "StringValue" then
  2051. return c
  2052. end
  2053. end
  2054. return nil
  2055. end
  2056.  
  2057. function animateTool()
  2058.  
  2059. if (toolAnim == "None") then
  2060. playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
  2061. return
  2062. end
  2063.  
  2064. if (toolAnim == "Slash") then
  2065. playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
  2066. return
  2067. end
  2068.  
  2069. if (toolAnim == "Lunge") then
  2070. playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
  2071. return
  2072. end
  2073. end
  2074.  
  2075. function moveSit()
  2076. RightShoulder.MaxVelocity = 0.15
  2077. LeftShoulder.MaxVelocity = 0.15
  2078. RightShoulder:SetDesiredAngle(3.14 /2)
  2079. LeftShoulder:SetDesiredAngle(-3.14 /2)
  2080. RightHip:SetDesiredAngle(3.14 /2)
  2081. LeftHip:SetDesiredAngle(-3.14 /2)
  2082. end
  2083.  
  2084. local lastTick = 0
  2085.  
  2086. function move(time)
  2087. local amplitude = 1
  2088. local frequency = 1
  2089. local deltaTime = time - lastTick
  2090. lastTick = time
  2091.  
  2092. local climbFudge = 0
  2093. local setAngles = false
  2094.  
  2095. if (jumpAnimTime > 0) then
  2096. jumpAnimTime = jumpAnimTime - deltaTime
  2097. end
  2098.  
  2099. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  2100. playAnimation("fall", fallTransitionTime, Humanoid)
  2101. elseif (pose == "Seated") then
  2102. playAnimation("sit", 0.5, Humanoid)
  2103. return
  2104. elseif (pose == "Running") then
  2105. playAnimation("walk", 0.1, Humanoid)
  2106. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  2107. -- print("Wha " .. pose)
  2108. stopAllAnimations()
  2109. amplitude = 0.1
  2110. frequency = 1
  2111. setAngles = true
  2112. end
  2113.  
  2114. if (setAngles) then
  2115. local desiredAngle = amplitude * math.sin(time * frequency)
  2116.  
  2117. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  2118. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  2119. RightHip:SetDesiredAngle(-desiredAngle)
  2120. LeftHip:SetDesiredAngle(-desiredAngle)
  2121. end
  2122.  
  2123. -- Tool Animation handling
  2124. local tool = getTool()
  2125. if tool and tool:FindFirstChild("Handle") then
  2126.  
  2127. local animStringValueObject = getToolAnim(tool)
  2128.  
  2129. if animStringValueObject then
  2130. toolAnim = animStringValueObject.Value
  2131. -- message recieved, delete StringValue
  2132. animStringValueObject.Parent = nil
  2133. toolAnimTime = time + .3
  2134. end
  2135.  
  2136. if time > toolAnimTime then
  2137. toolAnimTime = 0
  2138. toolAnim = "None"
  2139. end
  2140.  
  2141. animateTool()
  2142. else
  2143. stopToolAnimations()
  2144. toolAnim = "None"
  2145. toolAnimInstance = nil
  2146. toolAnimTime = 0
  2147. end
  2148. end
  2149.  
  2150. -- connect events
  2151. Humanoid.Died:connect(onDied)
  2152. Humanoid.Running:connect(onRunning)
  2153. Humanoid.Jumping:connect(onJumping)
  2154. Humanoid.Climbing:connect(onClimbing)
  2155. Humanoid.GettingUp:connect(onGettingUp)
  2156. Humanoid.FreeFalling:connect(onFreeFall)
  2157. Humanoid.FallingDown:connect(onFallingDown)
  2158. Humanoid.Seated:connect(onSeated)
  2159. Humanoid.PlatformStanding:connect(onPlatformStanding)
  2160. Humanoid.Swimming:connect(onSwimming)
  2161.  
  2162. -- setup emote chat hook
  2163. game:GetService("Players").LocalPlayer.Chatted:connect(function(msg)
  2164. local emote = ""
  2165. if msg == "/e dance" then
  2166. emote = dances[math.random(1, #dances)]
  2167. elseif (string.sub(msg, 1, 3) == "/e ") then
  2168. emote = string.sub(msg, 4)
  2169. elseif (string.sub(msg, 1, 7) == "/emote ") then
  2170. emote = string.sub(msg, 8)
  2171. end
  2172.  
  2173. if (pose == "Standing" and emoteNames[emote] ~= nil) then
  2174. playAnimation(emote, 0.1, Humanoid)
  2175. end
  2176.  
  2177. end)
  2178.  
  2179.  
  2180. -- main program
  2181.  
  2182. -- initialize to idle
  2183. playAnimation("idle", 0.1, Humanoid)
  2184. pose = "Standing"
  2185.  
  2186. while Figure.Parent ~= nil do
  2187. local _, time = wait(0.1)
  2188. move(time)
  2189. end
  2190.  
  2191.  
  2192.  
  2193. end,o124)
  2194.  
  2195. o125.Name = "idle"
  2196. o125.Parent = o124
  2197. o126.Name = "Animation1"
  2198. o126.Parent = o125
  2199. o126.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  2200. o127.Name = "Weight"
  2201. o127.Parent = o126
  2202. o127.Value = 9
  2203. o128.Name = "Animation2"
  2204. o128.Parent = o125
  2205. o128.AnimationId = "http://www.roblox.com/asset/?id=180435792"
  2206. o129.Name = "Weight"
  2207. o129.Parent = o128
  2208. o129.Value = 1
  2209. o130.Name = "walk"
  2210. o130.Parent = o124
  2211. o131.Name = "WalkAnim"
  2212. o131.Parent = o130
  2213. o131.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  2214. o132.Name = "run"
  2215. o132.Parent = o124
  2216. o133.Name = "RunAnim"
  2217. o133.Parent = o132
  2218. o133.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  2219. o134.Name = "jump"
  2220. o134.Parent = o124
  2221. o135.Name = "JumpAnim"
  2222. o135.Parent = o134
  2223. o135.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  2224. o136.Name = "climb"
  2225. o136.Parent = o124
  2226. o137.Name = "ClimbAnim"
  2227. o137.Parent = o136
  2228. o137.AnimationId = "http://www.roblox.com/asset/?id=180436334"
  2229. o138.Name = "toolnone"
  2230. o138.Parent = o124
  2231. o139.Name = "ToolNoneAnim"
  2232. o139.Parent = o138
  2233. o139.AnimationId = "http://www.roblox.com/asset/?id=182393478"
  2234. o140.Name = "fall"
  2235. o140.Parent = o124
  2236. o141.Name = "FallAnim"
  2237. o141.Parent = o140
  2238. o141.AnimationId = "http://www.roblox.com/asset/?id=180436148"
  2239. o142.Name = "sit"
  2240. o142.Parent = o124
  2241. o143.Name = "SitAnim"
  2242. o143.Parent = o142
  2243. o143.AnimationId = "http://www.roblox.com/asset/?id=178130996"
  2244. o144.Name = "ScaleDampeningPercent"
  2245. o144.Parent = o124
  2246. o144.Value = 0.39999997615814
  2247. o145.Parent = o64
  2248. o145.HeadColor = BrickColor.new("Pastel brown")
  2249. o145.LeftArmColor = BrickColor.new("Pastel brown")
  2250. o145.LeftLegColor = BrickColor.new("Pastel brown")
  2251. o145.RightArmColor = BrickColor.new("Pastel brown")
  2252. o145.RightLegColor = BrickColor.new("Pastel brown")
  2253. o145.TorsoColor = BrickColor.new("Pastel brown")
  2254. o146.Name = "Pants"
  2255. o146.Parent = o64
  2256. o146.PantsTemplate = "http://www.roblox.com/asset/?id=1439542143"
  2257. o147.Name = "Shirt"
  2258. o147.Parent = o64
  2259. o147.ShirtTemplate = "http://www.roblox.com/asset/?id=1439532842"
  2260. o149.Name = "Handle"
  2261. o149.Parent = mas
  2262. o149.Position = Vector3.new(-134.121231, 8.39259243, -13.9760065)
  2263. o149.Rotation = Vector3.new(-0.449999988, -74.1399994, -0.389999986)
  2264. o149.RotVelocity = Vector3.new(-0.00334252417, 0.000452164415, -0.000137843788)
  2265. o149.Velocity = Vector3.new(0.00836813357, -0.0241958033, -0.0229405127)
  2266. o149.CanCollide = false
  2267. o149.Locked = true
  2268. o149.FormFactor = Enum.FormFactor.Custom
  2269. o149.Size = Vector3.new(1.45002651, 2.35999823, 1.24000001)
  2270. o149.CFrame = CFrame.new(-134.121231, 8.39259243, -13.9760065, 0.273211837, 0.00186326669, -0.96195209, 0.000707792584, 0.999997437, 0.00213798531, 0.96195364, -0.00126498542, 0.27320981)
  2271. o149.BottomSurface = Enum.SurfaceType.Smooth
  2272. o149.TopSurface = Enum.SurfaceType.Smooth
  2273. o149.Position = Vector3.new(-134.121231, 8.39259243, -13.9760065)
  2274. o149.velocity = Vector3.new(0.00836813357, -0.0241958033, -0.0229405127)
  2275. o150.Parent = o149
  2276. o150.MeshId = "http://www.roblox.com/asset/?id=188565062 "
  2277. o150.TextureId = "http://www.roblox.com/asset/?id=188565095 "
  2278. o150.MeshType = Enum.MeshType.FileMesh
  2279. o152.Name = "OriginalSize"
  2280. o152.Parent = o149
  2281. o152.Value = Vector3.new(1.45002651, 2.35999823, 1.24000001)
  2282. o153.Name = "AccessoryWeld"
  2283. o153.Parent = o149
  2284. o153.C0 = CFrame.new(8.65748007e-09, 0.199999809, -0.0252722446, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2285. o153.C1 = CFrame.new(0, 0.600000024, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2286. o153.Part0 = o149
  2287. o153.Part1 = o65
  2288. mas.Parent = workspace
  2289. mas:MakeJoints()
  2290. local mas1 = mas:GetChildren()
  2291. for i=1,#mas1 do
  2292. mas1[i].Parent = workspace
  2293. ypcall(function() mas1[i]:MakeJoints() end)
  2294. end
  2295. mas:Destroy()
  2296. for i=1,#cors do
  2297. coroutine.resume(cors[i])
  2298. end
  2299. mess_handle.Text = "Resetting"
  2300. for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  2301. v:LoadCharacter()
  2302. end
  2303. wait(1)
  2304. mess_handle:Remove()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement