sawgamer1

Untitled

Jul 1st, 2018
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 57.25 KB | None | 0 0
  1. -- Created with Z_Vs model compiler
  2. -- https://www.roblox.com/UPDATE-Model-2-Script-item?id=362910923
  3.  
  4. --Errors: Attachment,MeshPart,Camera,Animator
  5. System = {}
  6.  
  7. System.Create = function(a, c)
  8. local e = Instance.new(a)
  9. for d, a in pairs(c) do
  10. local b, a = ypcall(function()
  11. return e[d]
  12. end)
  13. if b then
  14. e[d] = c[d]
  15. end
  16. end
  17. return e
  18. end
  19. function b(d, b)
  20. local c = getfenv(d)
  21. local a = setmetatable({}, {
  22. __index = function(a, a)
  23. if a:lower() == 'script' then
  24. return b
  25. else
  26. return c[a]
  27. end
  28. end
  29. })
  30. setfenv(d, a)
  31. ypcall(function()
  32. d()
  33. end)
  34. end
  35. c = {}
  36. mas = Instance.new("Model",game:GetService("Lighting"))
  37. mas.Name = "CompiledModel"
  38. o1 = System.Create("Model",{
  39. ["Name"] = "Laina",
  40. ["Parent"] = mas,
  41. ["PrimaryPart"] = o22,
  42. })
  43. o2 = System.Create("Part",{
  44. ["Name"] = "Torso",
  45. ["Parent"] = o1,
  46. ["Material"] = Enum.Material.SmoothPlastic,
  47. ["BrickColor"] = BrickColor.new("Institutional white"),
  48. ["Position"] = Vector3.new(-6.21000004, 2.96728134, -16.4599895),
  49. ["CFrame"] = CFrame.new(-6.21000004, 2.96728134, -16.4599895, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  50. ["Locked"] = true,
  51. ["Elasticity"] = 0,
  52. ["FormFactor"] = Enum.FormFactor.Symmetric,
  53. ["Friction"] = 2,
  54. ["Size"] = Vector3.new(2, 2, 1),
  55. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  56. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  57. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  58. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  59. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  60. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  61. ["Color"] = Color3.new(0.972549, 0.972549, 0.972549),
  62. ["Position"] = Vector3.new(-6.21000004, 2.96728134, -16.4599895),
  63. })
  64. o3 = System.Create("Decal",{
  65. ["Name"] = "roblox",
  66. ["Parent"] = o2,
  67. })
  68. o4 = System.Create("Motor6D",{
  69. ["Name"] = "Right Shoulder",
  70. ["Parent"] = o2,
  71. ["Part0"] = o2,
  72. ["Part1"] = o43,
  73. ["CurrentAngle"] = 0.0087095517665148,
  74. ["MaxVelocity"] = 0.10000000149012,
  75. })
  76. o5 = System.Create("Motor6D",{
  77. ["Name"] = "Left Shoulder",
  78. ["Parent"] = o2,
  79. ["Part0"] = o2,
  80. ["Part1"] = o20,
  81. ["CurrentAngle"] = -0.0043317070230842,
  82. ["MaxVelocity"] = 0.10000000149012,
  83. })
  84. o6 = System.Create("Motor6D",{
  85. ["Name"] = "Right Hip",
  86. ["Parent"] = o2,
  87. ["Part0"] = o2,
  88. ["Part1"] = o45,
  89. ["MaxVelocity"] = 0.10000000149012,
  90. })
  91. o7 = System.Create("Motor6D",{
  92. ["Name"] = "Left Hip",
  93. ["Parent"] = o2,
  94. ["Part0"] = o2,
  95. ["Part1"] = o46,
  96. ["MaxVelocity"] = 0.10000000149012,
  97. })
  98. o8 = System.Create("Motor6D",{
  99. ["Name"] = "Neck",
  100. ["Parent"] = o2,
  101. ["Part0"] = o2,
  102. ["Part1"] = o22,
  103. ["CurrentAngle"] = 0.0022247293964028,
  104. ["MaxVelocity"] = 0.10000000149012,
  105. })
  106. o18 = System.Create("Part",{
  107. ["Name"] = "HumanoidRootPart",
  108. ["Parent"] = o1,
  109. ["Material"] = Enum.Material.SmoothPlastic,
  110. ["Transparency"] = 1,
  111. ["Position"] = Vector3.new(-6.21000004, 3, -16.4599895),
  112. ["CFrame"] = CFrame.new(-6.21000004, 3, -16.4599895, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  113. ["CanCollide"] = false,
  114. ["Locked"] = true,
  115. ["Elasticity"] = 0,
  116. ["FormFactor"] = Enum.FormFactor.Symmetric,
  117. ["Friction"] = 2,
  118. ["Size"] = Vector3.new(2, 2, 1),
  119. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  120. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  121. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  122. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  123. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  124. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  125. ["Position"] = Vector3.new(-6.21000004, 3, -16.4599895),
  126. })
  127. o19 = System.Create("Motor6D",{
  128. ["Name"] = "RootJoint",
  129. ["Parent"] = o18,
  130. ["Part0"] = o18,
  131. ["Part1"] = o2,
  132. ["MaxVelocity"] = 0.10000000149012,
  133. })
  134. o20 = System.Create("Part",{
  135. ["Name"] = "Left Arm",
  136. ["Parent"] = o1,
  137. ["Material"] = Enum.Material.SmoothPlastic,
  138. ["BrickColor"] = BrickColor.new("Institutional white"),
  139. ["Position"] = Vector3.new(-7.71186352, 2.94633961, -16.4722157),
  140. ["Rotation"] = Vector3.new(0.25, -1.14999998, -0.229999989),
  141. ["CFrame"] = CFrame.new(-7.71186352, 2.94633961, -16.4722157, 0.999790251, 0.00393704092, -0.0200987849, -0.00402405811, 0.999982715, -0.00429140637, 0.0200815443, 0.00437137531, 0.999788821),
  142. ["CanCollide"] = false,
  143. ["Locked"] = true,
  144. ["Elasticity"] = 0,
  145. ["FormFactor"] = Enum.FormFactor.Symmetric,
  146. ["Friction"] = 2,
  147. ["Size"] = Vector3.new(1, 2, 1),
  148. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  149. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  150. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  151. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  152. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  153. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  154. ["Color"] = Color3.new(0.972549, 0.972549, 0.972549),
  155. ["Position"] = Vector3.new(-7.71186352, 2.94633961, -16.4722157),
  156. })
  157. o22 = System.Create("Part",{
  158. ["Name"] = "Head",
  159. ["Parent"] = o1,
  160. ["Material"] = Enum.Material.SmoothPlastic,
  161. ["BrickColor"] = BrickColor.new("Institutional white"),
  162. ["Position"] = Vector3.new(-6.21000004, 4.46728134, -16.4602089),
  163. ["Rotation"] = Vector3.new(-0.0299999993, 0.129999995, 0),
  164. ["CFrame"] = CFrame.new(-6.21000004, 4.46728134, -16.4602089, 0.999997556, 1.31313016e-07, 0.002224728, -1.10194378e-06, 0.999999881, 0.000437556911, -0.00222472753, -0.00043755825, 0.999997437),
  165. ["Locked"] = true,
  166. ["Elasticity"] = 0,
  167. ["FormFactor"] = Enum.FormFactor.Symmetric,
  168. ["Friction"] = 2,
  169. ["Size"] = Vector3.new(2, 1, 1),
  170. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  171. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  172. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  173. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  174. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  175. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  176. ["Color"] = Color3.new(0.972549, 0.972549, 0.972549),
  177. ["Position"] = Vector3.new(-6.21000004, 4.46728134, -16.4602089),
  178. })
  179. o23 = System.Create("SpecialMesh",{
  180. ["Name"] = "3.0 Female Head Mesh",
  181. ["Parent"] = o22,
  182. ["MeshId"] = "rbxassetid://82992952",
  183. ["Scale"] = Vector3.new(1.25, 1.25, 1.25),
  184. ["MeshType"] = Enum.MeshType.FileMesh,
  185. })
  186. o24 = System.Create("Decal",{
  187. ["Name"] = "face",
  188. ["Parent"] = o22,
  189. ["Texture"] = "rbxassetid://912935344",
  190. })
  191. o25 = System.Create("ManualWeld",{
  192. ["Name"] = "HairWeld",
  193. ["Parent"] = o22,
  194. ["Part0"] = o22,
  195. ["Part1"] = mas,
  196. })
  197. o26 = System.Create("Sound",{
  198. ["Name"] = "PlasticCreak",
  199. ["Parent"] = o22,
  200. ["SoundId"] = "rbxassetid://913163726",
  201. ["Volume"] = 1,
  202. ["Looped"] = true,
  203. })
  204. o27 = System.Create("ParticleEmitter",{
  205. ["Name"] = "BrokenHearts",
  206. ["Parent"] = o22,
  207. ["Size"] = NumberSequence.new(0,0.30000001192093,1,0.30000001192093,0.30000001192093,1,0.30000001192093,0.30000001192093,0.5,0.061728358268738,0.12345671653748,0.37037014961243,0.18518507480621,0.30000001192093,0),
  208. ["Color"] = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0, 0, 0)),
  209. ["Enabled"] = false,
  210. ["Texture"] = "rbxassetid://912982766",
  211. ["Acceleration"] = Vector3.new(0, -10, 0),
  212. ["Lifetime"] = NumberRange.new(1.5,1.5),
  213. ["Rate"] = 10,
  214. ["RotSpeed"] = NumberRange.new(-100,100),
  215. ["VelocitySpread"] = -99999,
  216. })
  217. o28 = System.Create("ParticleEmitter",{
  218. ["Name"] = "Hearts",
  219. ["Parent"] = o22,
  220. ["Size"] = NumberSequence.new(0,0.30000001192093,1,0.30000001192093,0.30000001192093,1,0.30000001192093,0.30000001192093,0.5,0.061728358268738,0.12345671653748,0.37037014961243,0.18518507480621,0.30000001192093,0),
  221. ["Color"] = ColorSequence.new(Color3.new(1, 1, 1),Color3.new(1, 0, 0)),
  222. ["Enabled"] = false,
  223. ["Texture"] = "rbxassetid://912982665",
  224. ["Acceleration"] = Vector3.new(0, -2, 0),
  225. ["Lifetime"] = NumberRange.new(2,2),
  226. ["Rate"] = 10,
  227. ["RotSpeed"] = NumberRange.new(-100,100),
  228. ["VelocitySpread"] = -99999,
  229. })
  230. o33 = System.Create("Sound",{
  231. ["Name"] = "GettingUp",
  232. ["Parent"] = o22,
  233. ["Archivable"] = false,
  234. ["SoundId"] = "rbxasset://sounds/action_get_up.mp3",
  235. ["Volume"] = 1,
  236. })
  237. o34 = System.Create("Sound",{
  238. ["Name"] = "Died",
  239. ["Parent"] = o22,
  240. ["Archivable"] = false,
  241. ["SoundId"] = "rbxasset://sounds/uuhhh.mp3",
  242. ["Volume"] = 1,
  243. })
  244. o35 = System.Create("Sound",{
  245. ["Name"] = "FreeFalling",
  246. ["Parent"] = o22,
  247. ["Archivable"] = false,
  248. ["SoundId"] = "rbxasset://sounds/action_falling.mp3",
  249. ["Volume"] = 1,
  250. ["Looped"] = true,
  251. })
  252. o36 = System.Create("Sound",{
  253. ["Name"] = "Jumping",
  254. ["Parent"] = o22,
  255. ["Archivable"] = false,
  256. ["SoundId"] = "rbxasset://sounds/action_jump.mp3",
  257. ["Volume"] = 1,
  258. })
  259. o37 = System.Create("Sound",{
  260. ["Name"] = "Landing",
  261. ["Parent"] = o22,
  262. ["Archivable"] = false,
  263. ["SoundId"] = "rbxasset://sounds/action_jump_land.mp3",
  264. ["Volume"] = 1,
  265. })
  266. o38 = System.Create("Sound",{
  267. ["Name"] = "Splash",
  268. ["Parent"] = o22,
  269. ["Archivable"] = false,
  270. ["SoundId"] = "rbxasset://sounds/impact_water.mp3",
  271. ["Volume"] = 1,
  272. })
  273. o39 = System.Create("Sound",{
  274. ["Name"] = "Running",
  275. ["Parent"] = o22,
  276. ["Archivable"] = false,
  277. ["Pitch"] = 1.8500000238419,
  278. ["SoundId"] = "rbxasset://sounds/action_footsteps_plastic.mp3",
  279. ["Volume"] = 1,
  280. ["Looped"] = true,
  281. })
  282. o40 = System.Create("Sound",{
  283. ["Name"] = "Swimming",
  284. ["Parent"] = o22,
  285. ["Archivable"] = false,
  286. ["Pitch"] = 1.6000000238419,
  287. ["SoundId"] = "rbxasset://sounds/action_swim.mp3",
  288. ["Volume"] = 1,
  289. ["Looped"] = true,
  290. })
  291. o41 = System.Create("Sound",{
  292. ["Name"] = "Climbing",
  293. ["Parent"] = o22,
  294. ["Archivable"] = false,
  295. ["SoundId"] = "rbxasset://sounds/action_footsteps_plastic.mp3",
  296. ["Volume"] = 1,
  297. ["Looped"] = true,
  298. })
  299. o43 = System.Create("Part",{
  300. ["Name"] = "Right Arm",
  301. ["Parent"] = o1,
  302. ["Material"] = Enum.Material.SmoothPlastic,
  303. ["BrickColor"] = BrickColor.new("Institutional white"),
  304. ["Position"] = Vector3.new(-4.70955324, 2.95977163, -16.4700832),
  305. ["Rotation"] = Vector3.new(0.5, 0.659999967, 0.0599999987),
  306. ["CFrame"] = CFrame.new(-4.70955324, 2.95977163, -16.4700832, 0.9999336, -0.000960732112, 0.0114820553, 0.00106069725, 0.999961555, -0.00870344788, -0.0114732524, 0.00871504843, 0.999896228),
  307. ["CanCollide"] = false,
  308. ["Locked"] = true,
  309. ["Elasticity"] = 0,
  310. ["FormFactor"] = Enum.FormFactor.Symmetric,
  311. ["Friction"] = 2,
  312. ["Size"] = Vector3.new(1, 2, 1),
  313. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  314. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  315. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  316. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  317. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  318. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  319. ["Color"] = Color3.new(0.972549, 0.972549, 0.972549),
  320. ["Position"] = Vector3.new(-4.70955324, 2.95977163, -16.4700832),
  321. })
  322. o45 = System.Create("Part",{
  323. ["Name"] = "Right Leg",
  324. ["Parent"] = o1,
  325. ["Material"] = Enum.Material.SmoothPlastic,
  326. ["BrickColor"] = BrickColor.new("Institutional white"),
  327. ["Position"] = Vector3.new(-5.71000004, 0.991715193, -16.4599895),
  328. ["CFrame"] = CFrame.new(-5.71000004, 0.991715193, -16.4599895, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  329. ["CanCollide"] = false,
  330. ["Locked"] = true,
  331. ["Elasticity"] = 0,
  332. ["FormFactor"] = Enum.FormFactor.Symmetric,
  333. ["Friction"] = 2,
  334. ["Size"] = Vector3.new(1, 2, 1),
  335. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  336. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  337. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  338. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  339. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  340. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  341. ["Color"] = Color3.new(0.972549, 0.972549, 0.972549),
  342. ["Position"] = Vector3.new(-5.71000004, 0.991715193, -16.4599895),
  343. })
  344. o46 = System.Create("Part",{
  345. ["Name"] = "Left Leg",
  346. ["Parent"] = o1,
  347. ["Material"] = Enum.Material.SmoothPlastic,
  348. ["BrickColor"] = BrickColor.new("Institutional white"),
  349. ["Position"] = Vector3.new(-6.71000004, 0.997588873, -16.4599895),
  350. ["CFrame"] = CFrame.new(-6.71000004, 0.997588873, -16.4599895, 1, 0, 0, 0, 1, 0, 0, 0, 1),
  351. ["CanCollide"] = false,
  352. ["Locked"] = true,
  353. ["Elasticity"] = 0,
  354. ["FormFactor"] = Enum.FormFactor.Symmetric,
  355. ["Friction"] = 2,
  356. ["Size"] = Vector3.new(1, 2, 1),
  357. ["BackSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  358. ["BottomSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  359. ["FrontSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  360. ["LeftSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  361. ["RightSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  362. ["TopSurface"] = Enum.SurfaceType.SmoothNoOutlines,
  363. ["Color"] = Color3.new(0.972549, 0.972549, 0.972549),
  364. ["Position"] = Vector3.new(-6.71000004, 0.997588873, -16.4599895),
  365. })
  366. o47 = System.Create("Humanoid",{
  367. ["Name"] = "SeductiveWoman",
  368. ["Parent"] = o1,
  369. ["DisplayDistanceType"] = Enum.HumanoidDisplayDistanceType.None,
  370. ["HealthDisplayDistance"] = 0,
  371. ["NameDisplayDistance"] = 0,
  372. ["NameOcclusion"] = Enum.NameOcclusion.EnemyOcclusion,
  373. ["RightLeg"] = o45,
  374. ["LeftLeg"] = o46,
  375. ["Torso"] = o18,
  376. ["Health"] = inf,
  377. ["MaxHealth"] = inf,
  378. ["WalkSpeed"] = 20,
  379. })
  380. o48 = System.Create("Model",{
  381. ["Name"] = "Status",
  382. ["Parent"] = o47,
  383. })
  384. o49 = System.Create("Model",{
  385. ["Name"] = "AvalibleSpawns",
  386. ["Parent"] = o48,
  387. })
  388. o51 = System.Create("Script",{
  389. ["Name"] = "Respawn",
  390. ["Parent"] = o1,
  391. })
  392. table.insert(c, coroutine.create(function()
  393. wait()
  394. b(function()
  395. --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
  396. local PlayerSpawning=false; --[[ Change this to true if you want the NPC to spawn like a player, and change this to false if you want the NPC to spawn at it's current position. ]]--
  397. local AdvancedRespawnScript=script;
  398. repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
  399. local Laina=AdvancedRespawnScript.Parent;
  400. if AdvancedRespawnScript and Laina and Laina:FindFirstChild("Thumbnail")then
  401. Laina:FindFirstChild("Thumbnail"):Destroy();
  402. end;
  403. local GameDerbis=Game:GetService("Debris");
  404. local LainaHumanoid;
  405. for _,Child in pairs(Laina:GetChildren())do
  406. if Child and Child.ClassName=="Humanoid"and Child.Health~=0 then
  407. LainaHumanoid=Child;
  408. end;
  409. end;
  410. local Respawndant=Laina:Clone();
  411. if PlayerSpawning then --[[ LOOK AT LINE: 2. ]]--
  412. coroutine.resume(coroutine.create(function()
  413. if Laina and LainaHumanoid and LainaHumanoid:FindFirstChild("Status")and not LainaHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns")then
  414. SpawnModel=Instance.new("Model");
  415. SpawnModel.Parent=LainaHumanoid.Status;
  416. SpawnModel.Name="AvalibleSpawns";
  417. else
  418. SpawnModel=LainaHumanoid:FindFirstChild("Status"):FindFirstChild("AvalibleSpawns");
  419. end;
  420. function FindSpawn(SearchValue)
  421. local PartsArchivable=SearchValue:GetChildren();
  422. for AreaSearch=1,#PartsArchivable do
  423. if PartsArchivable[AreaSearch].className=="SpawnLocation"then
  424. local PositionValue=Instance.new("Vector3Value",SpawnModel);
  425. PositionValue.Value=PartsArchivable[AreaSearch].Position;
  426. PositionValue.Name=PartsArchivable[AreaSearch].Duration;
  427. end;
  428. FindSpawn(PartsArchivable[AreaSearch]);
  429. end;
  430. end;
  431. FindSpawn(Game:GetService("Workspace"));
  432. local SpawnChilden=SpawnModel:GetChildren();
  433. if#SpawnChilden>0 then
  434. local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
  435. local RespawningForceField=Instance.new("ForceField");
  436. RespawningForceField.Parent=Laina;
  437. RespawningForceField.Name="SpawnForceField";
  438. GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
  439. Laina:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
  440. else
  441. if Laina:FindFirstChild("SpawnForceField")then
  442. Laina:FindFirstChild("SpawnForceField"):Destroy();
  443. end;
  444. Laina:MoveTo(Vector3.new(0,115,0));
  445. end;
  446. end));
  447. end;
  448. function Respawn()
  449. Wait(5);
  450. Respawndant.Parent=Laina.Parent;
  451. Respawndant:makeJoints();
  452. Respawndant:FindFirstChild("Head"):MakeJoints();
  453. Respawndant:FindFirstChild("Torso"):MakeJoints();
  454. Laina:remove();
  455. end;
  456. if AdvancedRespawnScript and Laina and LainaHumanoid then
  457. LainaHumanoid.Died:connect(Respawn);
  458. end;
  459. --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]-- end..o51)
  460. end))
  461.  
  462. o52 = System.Create("BodyColors",{
  463. ["Parent"] = o1,
  464. ["HeadColor"] = BrickColor.new("Institutional white"),
  465. ["LeftArmColor"] = BrickColor.new("Institutional white"),
  466. ["LeftLegColor"] = BrickColor.new("Institutional white"),
  467. ["RightArmColor"] = BrickColor.new("Institutional white"),
  468. ["RightLegColor"] = BrickColor.new("Institutional white"),
  469. ["TorsoColor"] = BrickColor.new("Institutional white"),
  470. })
  471. o53 = System.Create("Pants",{
  472. ["Name"] = "Dress",
  473. ["Parent"] = o1,
  474. ["PantsTemplate"] = "rbxassetid://912935270",
  475. })
  476. o54 = System.Create("Script",{
  477. ["Name"] = "LainaMain",
  478. ["Parent"] = o1,
  479. })
  480. table.insert(c, coroutine.create(function()
  481. wait()
  482. b(function()
  483. --[[ By: Brutez. ]]--
  484. local LainaScript=script;
  485. repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
  486. local Laina=LainaScript.Parent;
  487. local LainaHumanoid;
  488. for _,Child in pairs(Laina:GetChildren())do
  489. if Child and Child:IsA("Humanoid")and Child.Health~=0 then
  490. LainaHumanoid=Child;
  491. end;
  492. end;
  493. local LeftLegC0,RightLegC0,LeftArmC0,RightArmC0,HeadC0,LeftLegC02,RightLegC02=CFrame.new(-1,-1,0,0,0,-1,0,1,0,1,0,0),CFrame.new(1,-1,0,0,0,1,0,1,-0,-1,0,0),CFrame.new(-1,0.5,0,0,0,-1,0,1,0,1,0,0),CFrame.new(1,0.5,0,0,0,1,0,1,-0,-1,0,0),CFrame.new(0,1,0,-1,0,0,0,0,1,0,1,-0),CFrame.new(-0.5,-1,0.5,0,0,-1,0,1,0,1,0,0),CFrame.new(0.5,-1,0.5,0,0,1,0,1,-0,-1,0,0);
  494. local LainaWeld;
  495. local LainaBodyGyro;
  496. RecreateThingies=function()
  497. LainaWeld=Instance.new("Weld");
  498. LainaWeld.Name="LainaWeld";
  499. LainaBodyGyro=Instance.new("BodyGyro");
  500. LainaBodyGyro.Name="LainaBodyGyro";
  501. LainaBodyGyro.cframe=CFrame.new(Vector3.new(0,0,0),Vector3.new(0,5000000,0));
  502. LainaBodyGyro.D=300;
  503. LainaBodyGyro.maxTorque=Vector3.new(99999e99999,99999e99999,0);
  504. LainaBodyGyro.P=7000;
  505. end;
  506. RecreateThingies();
  507. local IsOnTop=false;
  508. function RayCast(Position,Direction,MaxDistance,IgnoreList)
  509. return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position,Direction.unit * (MaxDistance or 999.8699)),IgnoreList)
  510. end;
  511. while Wait(0)do
  512. if LainaScript and Laina and Laina:FindFirstChild("Torso") and LainaHumanoid and LainaHumanoid.Health~=0 then
  513. local TargetPoint=LainaHumanoid.TargetPoint;
  514. local Blockage,BlockagePos=RayCast((Laina:FindFirstChild("Torso").CFrame+CFrame.new(Laina:FindFirstChild("Torso").Position,Vector3.new(TargetPoint.X,Laina:FindFirstChild("Torso").Position.Y,TargetPoint.Z)).lookVector*(Laina:FindFirstChild("Torso").Size.Z/2)).p,Laina:FindFirstChild("Torso").CFrame.lookVector,(Laina:FindFirstChild("Torso").Size.Z*2.5),{Laina,Laina})
  515. local Jumpable=false;
  516. if Blockage then
  517. Jumpable=true;
  518. if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
  519. local BlockageHumanoid;
  520. for _,Child in pairs(Blockage.Parent:GetChildren())do
  521. if Child and Child:IsA("Humanoid")and Child.Health~=0 then
  522. BlockageHumanoid=Child;
  523. end;
  524. end;
  525. if Blockage and Blockage:IsA("Terrain")then
  526. local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
  527. local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
  528. if CellMaterial==Enum.CellMaterial.Water then
  529. Jumpable=false;
  530. end;
  531. elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"then
  532. Jumpable=false;
  533. end;
  534. end;
  535. if Jumpable and LainaScript and Laina and LainaHumanoid and LainaHumanoid.Health~=0 and not LainaHumanoid.Sit and not IsOnTop then
  536. LainaHumanoid.Jump=true;
  537. end;
  538. end;
  539. end;
  540. if Laina and LainaHumanoid and LainaHumanoid.Health==0 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")then
  541. Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://912935337";
  542. Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=false;
  543. Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=true;
  544. if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Head")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak").IsPlaying then
  545. Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak"):Stop();
  546. end;
  547. if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Torso")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Neck")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")~=nil then
  548. Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip").C0=LeftLegC0;
  549. Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder").C0=LeftArmC0;
  550. Laina:FindFirstChild("Torso"):FindFirstChild("Neck").C0=HeadC0;
  551. Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip").C0=RightLegC0;
  552. Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder").C0=RightArmC0;
  553. end;
  554. end;
  555. if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")and not IsOnTop then
  556. Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://912935344";
  557. Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=false;
  558. Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=false;
  559. if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Head")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak").IsPlaying then
  560. Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak"):Stop();
  561. end;
  562. if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Torso")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Neck")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")~=nil then
  563. Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip").C0=LeftLegC0;
  564. Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder").C0=LeftArmC0;
  565. Laina:FindFirstChild("Torso"):FindFirstChild("Neck").C0=HeadC0;
  566. Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip").C0=RightLegC0;
  567. Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder").C0=RightArmC0;
  568. end;
  569. elseif Laina and LainaHumanoid and LainaHumanoid.Health~=0 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")and IsOnTop then
  570. Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://912935342";
  571. Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=true;
  572. Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=false;
  573. if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Head")~=nil and Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak")~=nil and not Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak").IsPlaying then
  574. Laina:FindFirstChild("Head"):FindFirstChild("PlasticCreak"):Play();
  575. end;
  576. local LRotation,RRotation,LARotation,RARotation,HRotation=math.sin(tick()*9.86)*0.5,math.sin(tick()*9.86)*0.5,math.sin(tick()*9.86)*-0.3,math.sin(tick()*9.86)*-0.3,math.sin(tick()*9.86)*-0.3
  577. if LainaScript~=nil and Laina~=nil and Laina:FindFirstChild("Torso")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Neck")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip")~=nil and Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder")~=nil then
  578. Laina:FindFirstChild("Torso"):FindFirstChild("Left Hip").C0=LeftLegC02*CFrame.fromEulerAnglesXYZ(1.5,1.5-LRotation,-1);
  579. Laina:FindFirstChild("Torso"):FindFirstChild("Left Shoulder").C0=LeftArmC0*CFrame.fromEulerAnglesXYZ(0,0,0.3+LARotation);
  580. Laina:FindFirstChild("Torso"):FindFirstChild("Neck").C0=HeadC0*CFrame.fromEulerAnglesXYZ(0.5+HRotation,0,0);
  581. Laina:FindFirstChild("Torso"):FindFirstChild("Right Hip").C0=RightLegC02*CFrame.fromEulerAnglesXYZ(1.5,-1.5+RRotation,1);
  582. Laina:FindFirstChild("Torso"):FindFirstChild("Right Shoulder").C0=RightArmC0*CFrame.fromEulerAnglesXYZ(0,0,-0.3-RARotation);
  583. end;
  584. end;
  585. if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and not LainaHumanoid.AutoJumpEnabled then
  586. LainaHumanoid.AutoJumpEnabled=true;
  587. end;
  588. if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and not LainaHumanoid.AutoRotate then
  589. LainaHumanoid.AutoRotate=true;
  590. end;
  591. if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and LainaHumanoid.PlatformStand then
  592. LainaHumanoid.PlatformStand=false;
  593. end;
  594. if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and LainaHumanoid.Sit and not IsOnTop then
  595. LainaHumanoid.Sit=false;
  596. end;
  597. if Laina and LainaHumanoid and LainaHumanoid.Health~=0 then
  598. LainaHumanoid.JumpPower=60;
  599. LainaHumanoid.WalkSpeed=20;
  600. end;
  601. local NoticeDistance=99999e99999;
  602. for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
  603. if TargetModel and TargetModel:IsA("Model")and TargetModel~=Laina and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
  604. local TargetPart=TargetModel:FindFirstChild("Torso");
  605. local FoundHumanoid;
  606. for _,Child in pairs(TargetModel:GetChildren())do
  607. if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
  608. FoundHumanoid=Child;
  609. end;
  610. end;
  611. if Laina and Laina:FindFirstChild("HumanoidRootPart")and LainaHumanoid and LainaHumanoid.Health~=0 and TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude<NoticeDistance and not IsOnTop then
  612. NoticeDistance=(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude;
  613. if Laina and Laina:FindFirstChild("HumanoidRootPart")and LainaHumanoid and LainaHumanoid.Health~=0 and TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and FoundHumanoid.Jump and not IsOnTop then
  614. LainaHumanoid.Jump=true;
  615. end;
  616. LainaHumanoid:MoveTo(TargetPart.Position+(TargetPart.Position-Laina:FindFirstChild("Torso").Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
  617. if TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude<5 and not IsOnTop then
  618. IsOnTop=true;
  619. LainaWeld.Parent=Laina:FindFirstChild("Torso");
  620. LainaWeld.Part1=Laina:FindFirstChild("Torso");
  621. LainaWeld.C0=CFrame.new(0,-0.1,-1.4)*CFrame.fromEulerAnglesXYZ(-0.7+math.sin(tick()*9.86)*0.3,math.pi,0);
  622. LainaWeld.Part0=TargetPart;
  623. LainaBodyGyro.Parent=TargetPart;
  624. if LainaScript and LainaScript:FindFirstChild("JumpOk")and LainaScript:FindFirstChild("JumpOkNPC")and TargetModel.Parent~=nil and TargetPart.Parent~=nil and LainaBodyGyro~=nil and FoundHumanoid.Parent~=nil and LainaWeld.Parent~=nil and LainaBodyGyro.Parent~=nil and FoundHumanoid.Health~=0 and Laina and LainaHumanoid and LainaHumanoid.Health~=0 then
  625. if TargetModel and FoundHumanoid and FoundHumanoid.Health~=0 and FoundHumanoid:FindFirstChild("Status")and FoundHumanoid:FindFirstChild("Status").ClassName=="Status"then
  626. local JumpOk=LainaScript:FindFirstChild("JumpOk"):Clone();
  627. JumpOk.Parent=TargetModel;
  628. JumpOk.Disabled=false;
  629. elseif TargetModel and FoundHumanoid and FoundHumanoid.Health~=0 and FoundHumanoid:FindFirstChild("Status")and FoundHumanoid:FindFirstChild("Status").ClassName=="Model"or TargetModel and FoundHumanoid and FoundHumanoid.Health~=0 and not FoundHumanoid:FindFirstChild("Status")then
  630. local JumpOkNPC=LainaScript:FindFirstChild("JumpOkNPC"):Clone();
  631. JumpOkNPC.Parent=TargetModel;
  632. JumpOkNPC.Disabled=false;
  633. end;
  634. end;
  635. Spawn(function()
  636. while Wait(0)do
  637. if TargetModel.Parent~=nil and TargetPart.Parent~=nil and FoundHumanoid.Parent~=nil and LainaWeld.Parent~=nil and LainaBodyGyro.Parent~=nil and FoundHumanoid.Health~=0 and Laina and LainaHumanoid and LainaHumanoid.Health~=0 then
  638. LainaHumanoid.Sit=true;
  639. if Laina and LainaHumanoid and LainaHumanoid.Health~=0 and Laina:FindFirstChild("Torso")and LainaWeld then
  640. LainaWeld.C0=CFrame.new(0,-0.1,-1.4)*CFrame.fromEulerAnglesXYZ(-0.7+math.sin(tick()*9.86)*0.3,math.pi,0);
  641. end;
  642. if TargetModel~=nil and TargetPart~=nil and FoundHumanoid~=nil and FoundHumanoid.Health~=0 then
  643. FoundHumanoid.Jump=false;
  644. FoundHumanoid.Sit=true;
  645. end;
  646. else
  647. IsOnTop=false;
  648. if LainaWeld then
  649. LainaWeld:Destroy();
  650. end;
  651. if LainaBodyGyro then
  652. LainaBodyGyro:Destroy();
  653. end;
  654. RecreateThingies();
  655. break
  656. end;
  657. end;
  658. end)
  659. end;
  660. end;
  661. end;
  662. end;
  663. end;
  664. --[[ By: Brutez. ]]-- end..o54)
  665. end))
  666.  
  667. o55 = System.Create("LocalScript",{
  668. ["Name"] = "JumpOk",
  669. ["Parent"] = o54,
  670. ["Disabled"] = true,
  671. })
  672. table.insert(c, coroutine.create(function()
  673. wait()
  674. b(function()
  675. --[[ By: Brutez. ]]--
  676. local JumpScript=script;
  677. repeat Wait(0);until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
  678. local ROBLOXian=JumpScript.Parent;
  679. local ROBLOXianHumanoid;
  680. for _,Child in pairs(ROBLOXian:GetChildren())do
  681. if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
  682. ROBLOXianHumanoid=Child;
  683. end;
  684. end;
  685. if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 then
  686. ROBLOXianHumanoid.Changed:connect(function()
  687. if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 and ROBLOXianHumanoid.Jump then
  688. ROBLOXianHumanoid.Jump=false;
  689. end;
  690. end);
  691. end;
  692. while Wait(0)do
  693. if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 and not ROBLOXian:FindFirstChild("Torso"):FindFirstChild("LainaBodyGyro")then
  694. JumpScript.Disabled=true;
  695. JumpScript:Destroy();
  696. break
  697. end;
  698. end;
  699. --[[ By: Brutez. ]]-- end..o55)
  700. end))
  701.  
  702. o56 = System.Create("Script",{
  703. ["Name"] = "JumpOkNPC",
  704. ["Parent"] = o54,
  705. ["Disabled"] = true,
  706. })
  707. table.insert(c, coroutine.create(function()
  708. wait()
  709. b(function()
  710. --[[ By: Brutez. ]]--
  711. local JumpScript=script;
  712. repeat Wait(0);until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
  713. local ROBLOXian=JumpScript.Parent;
  714. local ROBLOXianHumanoid;
  715. for _,Child in pairs(ROBLOXian:GetChildren())do
  716. if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
  717. ROBLOXianHumanoid=Child;
  718. end;
  719. end;
  720. if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 then
  721. ROBLOXianHumanoid.Changed:connect(function()
  722. if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 and ROBLOXianHumanoid.Jump then
  723. ROBLOXianHumanoid.Jump=false;
  724. end;
  725. end);
  726. end;
  727. while Wait(0)do
  728. if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 and not ROBLOXian:FindFirstChild("Torso"):FindFirstChild("LainaBodyGyro")then
  729. JumpScript.Disabled=true;
  730. JumpScript:Destroy();
  731. break
  732. end;
  733. end;
  734. --[[ By: Brutez. ]]-- end..o56)
  735. end))
  736.  
  737. o57 = System.Create("Decal",{
  738. ["Parent"] = o54,
  739. ["Texture"] = "http://www.roblox.com/asset/?id=912935342",
  740. })
  741. o58 = System.Create("CharacterMesh",{
  742. ["Name"] = "3.0 Female Left Arm",
  743. ["Parent"] = o1,
  744. ["MeshId"] = 83001137,
  745. ["BodyPart"] = Enum.BodyPart.LeftArm,
  746. })
  747. o59 = System.Create("CharacterMesh",{
  748. ["Name"] = "3.0 Female Left Leg",
  749. ["Parent"] = o1,
  750. ["MeshId"] = 81628361,
  751. ["BodyPart"] = Enum.BodyPart.LeftLeg,
  752. })
  753. o60 = System.Create("CharacterMesh",{
  754. ["Name"] = "3.0 Female Right Arm",
  755. ["Parent"] = o1,
  756. ["MeshId"] = 83001181,
  757. ["BodyPart"] = Enum.BodyPart.RightArm,
  758. })
  759. o61 = System.Create("CharacterMesh",{
  760. ["Name"] = "3.0 Female Right Leg",
  761. ["Parent"] = o1,
  762. ["MeshId"] = 81628308,
  763. ["BodyPart"] = Enum.BodyPart.RightLeg,
  764. })
  765. o62 = System.Create("CharacterMesh",{
  766. ["Name"] = "3.0 Female Torso",
  767. ["Parent"] = o1,
  768. ["MeshId"] = 82987757,
  769. ["BodyPart"] = Enum.BodyPart.Torso,
  770. })
  771. o63 = System.Create("Script",{
  772. ["Name"] = "SoundNew",
  773. ["Parent"] = o1,
  774. })
  775. table.insert(c, coroutine.create(function()
  776. wait()
  777. b(function()
  778. --[[ Compact mode by: Brutez. ]]--
  779. Spawn(function()
  780. local SFX,Humanoid,Head,Sounds={Died=0;Running=1;Swimming=2;Climbing=3,Jumping=4;GettingUp=5;FreeFalling=6;FallingDown=7;Landing=8;Splash=9;},nil,nil,{};
  781. local Figure=script.Parent;Head=Figure:FindFirstChild("Head");while not Humanoid do for _,NewHumanoid in pairs(Figure:GetChildren())do if NewHumanoid:IsA("Humanoid")then Humanoid=NewHumanoid;break;end;end;Figure.ChildAdded:wait();end;Sounds[SFX.Died]=Head:FindFirstChild("Died");Sounds[SFX.Running]=Head:FindFirstChild("Running");Sounds[SFX.Swimming]=Head:FindFirstChild("Swimming");Sounds[SFX.Climbing]=Head:FindFirstChild("Climbing");Sounds[SFX.Jumping]=Head:FindFirstChild("Jumping");Sounds[SFX.GettingUp]=Head:FindFirstChild("GettingUp");Sounds[SFX.FreeFalling]=Head:FindFirstChild("FreeFalling");Sounds[SFX.Landing]=Head:FindFirstChild("Landing");Sounds[SFX.Splash]=Head:FindFirstChild("Splash");
  782. local Util={YForLineGivenXAndTwoPts=function(x,pt1x,pt1y,pt2x,pt2y)local m=(pt1y-pt2y)/(pt1x-pt2x);local b=(pt1y-m*pt1x);return m*x+b;end;Clamp=function(val,min,max)return math.min(max,math.max(min,val));end;HorizontalSpeed=function(Head)local hVel=Head.Velocity+Vector3.new(0,-Head.Velocity.Y,0);return hVel.magnitude;end;VerticalSpeed=function(Head)return math.abs(Head.Velocity.Y);end;Play=function(sound)if sound.TimePosition~=0 then sound.TimePosition=0;end;if not sound.IsPlaying then sound.Playing=true;end;end;Pause=function(sound)if sound.IsPlaying then sound.Playing=false;end;end;Resume=function(sound)if not sound.IsPlaying then sound.Playing=true;end;end;Stop=function(sound)if sound.IsPlaying then sound.Playing=false;end;if sound.TimePosition~=0 then sound.TimePosition=0;end;end;};
  783. local playingLoopedSounds={};local activeState=nil;function setSoundInPlayingLoopedSounds(sound)for i=1,#playingLoopedSounds do if playingLoopedSounds[i]==sound then return;end;end;table.insert(playingLoopedSounds,sound);end;function stopPlayingLoopedSoundsExcept(except)for i=#playingLoopedSounds,1,-1 do if playingLoopedSounds[i]~=except then Util.Pause(playingLoopedSounds[i]);table.remove(playingLoopedSounds,i);end;end;end;local stateUpdateHandler={[Enum.HumanoidStateType.Dead]=function()stopPlayingLoopedSoundsExcept();local sound=Sounds[SFX.Died];Util.Play(sound);end;[Enum.HumanoidStateType.RunningNoPhysics]=function()stateUpdated(Enum.HumanoidStateType.Running);end;[Enum.HumanoidStateType.Running]=function()local sound=Sounds[SFX.Running];stopPlayingLoopedSoundsExcept(sound);if Util.HorizontalSpeed(Head)>0.5 then Util.Resume(sound);setSoundInPlayingLoopedSounds(sound);else stopPlayingLoopedSoundsExcept();end;end;[Enum.HumanoidStateType.Swimming]=function()if activeState~=Enum.HumanoidStateType.Swimming and Util.VerticalSpeed(Head)>0.1 then local splashSound=Sounds[SFX.Splash];splashSound.Volume=Util.Clamp(Util.YForLineGivenXAndTwoPts(Util.VerticalSpeed(Head),100,0.28,350,1),0,1);Util.Play(splashSound);end;do local sound=Sounds[SFX.Swimming];stopPlayingLoopedSoundsExcept(sound);Util.Resume(sound);setSoundInPlayingLoopedSounds(sound);end;end;[Enum.HumanoidStateType.Climbing]=function()local sound=Sounds[SFX.Climbing];if Util.VerticalSpeed(Head)>0.1 then Util.Resume(sound);stopPlayingLoopedSoundsExcept(sound);else stopPlayingLoopedSoundsExcept();end;setSoundInPlayingLoopedSounds(sound);end;[Enum.HumanoidStateType.Jumping]=function()if activeState==Enum.HumanoidStateType.Jumping then return;end;stopPlayingLoopedSoundsExcept();local sound=Sounds[SFX.Jumping];Util.Play(sound);end;[Enum.HumanoidStateType.GettingUp]=function()stopPlayingLoopedSoundsExcept();local sound=Sounds[SFX.GettingUp];Util.Play(sound);end;[Enum.HumanoidStateType.Freefall]=function()if activeState==Enum.HumanoidStateType.Freefall then return;end;local sound=Sounds[SFX.FreeFalling];sound.Volume=0;stopPlayingLoopedSoundsExcept();end;[Enum.HumanoidStateType.FallingDown]=function()stopPlayingLoopedSoundsExcept();end;[Enum.HumanoidStateType.Landed]=function()stopPlayingLoopedSoundsExcept();if Util.VerticalSpeed(Head)>75 then local landingSound=Sounds[SFX.Landing];landingSound.Volume=Util.Clamp(Util.YForLineGivenXAndTwoPts(Util.VerticalSpeed(Head),50,0,100,1),0,1);Util.Play(landingSound);end;end;[Enum.HumanoidStateType.Seated]=function()stopPlayingLoopedSoundsExcept();end;};function stateUpdated(state)if stateUpdateHandler[state]~=nil then stateUpdateHandler[state]();end;activeState=state;end;Humanoid.Died:connect(function()stateUpdated(Enum.HumanoidStateType.Dead);end);Humanoid.Running:connect(function()stateUpdated(Enum.HumanoidStateType.Running);end);Humanoid.Swimming:connect(function()stateUpdated(Enum.HumanoidStateType.Swimming);end);Humanoid.Climbing:connect(function()stateUpdated(Enum.HumanoidStateType.Climbing);end);Humanoid.Jumping:connect(function()stateUpdated(Enum.HumanoidStateType.Jumping);end);Humanoid.GettingUp:connect(function()stateUpdated(Enum.HumanoidStateType.GettingUp);end);Humanoid.FreeFalling:connect(function()stateUpdated(Enum.HumanoidStateType.Freefall);end);Humanoid.FallingDown:connect(function()stateUpdated(Enum.HumanoidStateType.FallingDown);end);Humanoid.StateChanged:connect(function(old,new)stateUpdated(new);end);function onUpdate(stepDeltaSeconds,tickSpeedSeconds)local stepScale=stepDeltaSeconds/tickSpeedSeconds;do local sound=Sounds[SFX.FreeFalling];if activeState==Enum.HumanoidStateType.Freefall then if Head.Velocity.Y<0 and Util.VerticalSpeed(Head)>75 then Util.Resume(sound);local ANIMATION_LENGTH_SECONDS=1.1;local normalizedIncrement=tickSpeedSeconds/ANIMATION_LENGTH_SECONDS;sound.Volume=Util.Clamp(sound.Volume+normalizedIncrement*stepScale,0,1);else sound.Volume=0;end;else Util.Pause(sound);end;end;do local sound=Sounds[SFX.Running];if activeState==Enum.HumanoidStateType.Running then if Util.HorizontalSpeed(Head)<0.5 then Util.Pause(sound);end;end;end;end;local lastTick=tick();local TICK_SPEED_SECONDS=0.25;while true do onUpdate(tick()-lastTick,TICK_SPEED_SECONDS);lastTick=tick();wait(TICK_SPEED_SECONDS);end;
  784. end);
  785. --[[ Compact mode by: Brutez. ]]--
  786. function CreateNewSound(name,id,looped,pitch,parent)
  787. local sound=Instance.new("Sound");
  788. sound.SoundId=id;
  789. sound.Name=name;
  790. sound.archivable=false;
  791. sound.Parent=parent;
  792. sound.Pitch=pitch;
  793. sound.Looped=looped;
  794. sound.MinDistance=20;
  795. sound.MaxDistance=10000;
  796. sound.Volume=1;
  797. return sound;
  798. end;
  799. local head=script.Parent:FindFirstChild("Head");
  800. CreateNewSound("GettingUp","rbxasset://sounds/action_get_up.mp3",false,1,head);
  801. CreateNewSound("Died","rbxasset://sounds/uuhhh.mp3",false,1,head);
  802. CreateNewSound("FreeFalling","rbxasset://sounds/action_falling.mp3",true,1,head);
  803. CreateNewSound("Jumping","rbxasset://sounds/action_jump.mp3",false,1,head);
  804. CreateNewSound("Landing","rbxasset://sounds/action_jump_land.mp3",false,1,head);
  805. CreateNewSound("Splash","rbxasset://sounds/impact_water.mp3",false,1,head);
  806. CreateNewSound("Running","rbxasset://sounds/action_footsteps_plastic.mp3",true,1.85,head);
  807. CreateNewSound("Swimming","rbxasset://sounds/action_swim.mp3",true,1.6,head);
  808. CreateNewSound("Climbing","rbxasset://sounds/action_footsteps_plastic.mp3",true,1,head); end..o63)
  809. end))
  810.  
  811. o64 = System.Create("Script",{
  812. ["Name"] = "AnimateNew",
  813. ["Parent"] = o1,
  814. })
  815. table.insert(c, coroutine.create(function()
  816. wait()
  817. b(function()
  818. local Figure = script.Parent
  819. local Torso = Figure:FindFirstChild("Torso")
  820. local RightShoulder = Torso:FindFirstChild("Right Shoulder")
  821. local LeftShoulder = Torso:FindFirstChild("Left Shoulder")
  822. local RightHip = Torso:FindFirstChild("Right Hip")
  823. local LeftHip = Torso:FindFirstChild("Left Hip")
  824. local Neck = Torso:FindFirstChild("Neck")
  825. local Humanoid;
  826. for _,Child in pairs(Figure:GetChildren())do
  827. if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
  828. Humanoid=Child;
  829. end;
  830. end;
  831. local pose = "Standing"
  832.  
  833. local currentAnim = ""
  834. local currentAnimInstance = nil
  835. local currentAnimTrack = nil
  836. local currentAnimKeyframeHandler = nil
  837. local currentAnimSpeed = 1.0
  838. local animTable = {}
  839. local animNames = {
  840. idle = {
  841. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  842. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  843. },
  844. walk = {
  845. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  846. },
  847. run = {
  848. { id = "run.xml", weight = 10 }
  849. },
  850. jump = {
  851. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  852. },
  853. fall = {
  854. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  855. },
  856. climb = {
  857. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  858. },
  859. sit = {
  860. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  861. },
  862. toolnone = {
  863. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  864. },
  865. toolslash = {
  866. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  867. -- { id = "slash.xml", weight = 10 }
  868. },
  869. toollunge = {
  870. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  871. },
  872. wave = {
  873. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  874. },
  875. point = {
  876. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  877. },
  878. dance1 = {
  879. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  880. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  881. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  882. },
  883. dance2 = {
  884. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  885. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  886. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  887. },
  888. dance3 = {
  889. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  890. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  891. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  892. },
  893. laugh = {
  894. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  895. },
  896. cheer = {
  897. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  898. },
  899. }
  900. local dances = {"dance1", "dance2", "dance3"}
  901.  
  902. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  903. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  904.  
  905. function configureAnimationSet(name, fileList)
  906. if (animTable[name] ~= nil) then
  907. for _, connection in pairs(animTable[name].connections) do
  908. connection:disconnect()
  909. end
  910. end
  911. animTable[name] = {}
  912. animTable[name].count = 0
  913. animTable[name].totalWeight = 0
  914. animTable[name].connections = {}
  915.  
  916. -- check for config values
  917. local config = script:FindFirstChild(name)
  918. if (config ~= nil) then
  919. -- print("Loading anims " .. name)
  920. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  921. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  922. local idx = 1
  923. for _, childPart in pairs(config:GetChildren()) do
  924. if (childPart:IsA("Animation")) then
  925. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  926. animTable[name][idx] = {}
  927. animTable[name][idx].anim = childPart
  928. local weightObject = childPart:FindFirstChild("Weight")
  929. if (weightObject == nil) then
  930. animTable[name][idx].weight = 1
  931. else
  932. animTable[name][idx].weight = weightObject.Value
  933. end
  934. animTable[name].count = animTable[name].count + 1
  935. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  936. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  937. idx = idx + 1
  938. end
  939. end
  940. end
  941.  
  942. -- fallback to defaults
  943. if (animTable[name].count <= 0) then
  944. for idx, anim in pairs(fileList) do
  945. animTable[name][idx] = {}
  946. animTable[name][idx].anim = Instance.new("Animation")
  947. animTable[name][idx].anim.Name = name
  948. animTable[name][idx].anim.AnimationId = anim.id
  949. animTable[name][idx].weight = anim.weight
  950. animTable[name].count = animTable[name].count + 1
  951. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  952. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  953. end
  954. end
  955. end
  956.  
  957. -- Setup animation objects
  958. function scriptChildModified(child)
  959. local fileList = animNames[child.Name]
  960. if (fileList ~= nil) then
  961. configureAnimationSet(child.Name, fileList)
  962. end
  963. end
  964.  
  965. script.ChildAdded:connect(scriptChildModified)
  966. script.ChildRemoved:connect(scriptChildModified)
  967.  
  968.  
  969. for name, fileList in pairs(animNames) do
  970. configureAnimationSet(name, fileList)
  971. end
  972.  
  973. -- ANIMATION
  974.  
  975. -- declarations
  976. local toolAnim = "None"
  977. local toolAnimTime = 0
  978.  
  979. local jumpAnimTime = 0
  980. local jumpAnimDuration = 0.3
  981.  
  982. local toolTransitionTime = 0.1
  983. local fallTransitionTime = 0.3
  984. local jumpMaxLimbVelocity = 0.75
  985.  
  986. -- functions
  987.  
  988. function stopAllAnimations()
  989. local oldAnim = currentAnim
  990.  
  991. -- return to idle if finishing an emote
  992. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  993. oldAnim = "idle"
  994. end
  995.  
  996. currentAnim = ""
  997. currentAnimInstance = nil
  998. if (currentAnimKeyframeHandler ~= nil) then
  999. currentAnimKeyframeHandler:disconnect()
  1000. end
  1001.  
  1002. if (currentAnimTrack ~= nil) then
  1003. currentAnimTrack:Stop()
  1004. currentAnimTrack:Destroy()
  1005. currentAnimTrack = nil
  1006. end
  1007. return oldAnim
  1008. end
  1009.  
  1010. function setAnimationSpeed(speed)
  1011. if speed ~= currentAnimSpeed then
  1012. currentAnimSpeed = speed
  1013. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  1014. end
  1015. end
  1016.  
  1017. function keyFrameReachedFunc(frameName)
  1018. if (frameName == "End") then
  1019.  
  1020. local repeatAnim = currentAnim
  1021. -- return to idle if finishing an emote
  1022. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  1023. repeatAnim = "idle"
  1024. end
  1025.  
  1026. local animSpeed = currentAnimSpeed
  1027. playAnimation(repeatAnim, 0.0, Humanoid)
  1028. setAnimationSpeed(animSpeed)
  1029. end
  1030. end
  1031.  
  1032. -- Preload animations
  1033. function playAnimation(animName, transitionTime, humanoid)
  1034.  
  1035. local roll = math.random(1, animTable[animName].totalWeight)
  1036. local origRoll = roll
  1037. local idx = 1
  1038. while (roll > animTable[animName][idx].weight) do
  1039. roll = roll - animTable[animName][idx].weight
  1040. idx = idx + 1
  1041. end
  1042. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  1043. local anim = animTable[animName][idx].anim
  1044.  
  1045. -- switch animation
  1046. if (anim ~= currentAnimInstance) then
  1047.  
  1048. if (currentAnimTrack ~= nil) then
  1049. currentAnimTrack:Stop(transitionTime)
  1050. currentAnimTrack:Destroy()
  1051. end
  1052.  
  1053. currentAnimSpeed = 1.0
  1054.  
  1055. -- load it to the humanoid; get AnimationTrack
  1056. currentAnimTrack = humanoid:LoadAnimation(anim)
  1057. currentAnimTrack.Priority = Enum.AnimationPriority.Core
  1058.  
  1059. -- play the animation
  1060. currentAnimTrack:Play(transitionTime)
  1061. currentAnim = animName
  1062. currentAnimInstance = anim
  1063.  
  1064. -- set up keyframe name triggers
  1065. if (currentAnimKeyframeHandler ~= nil) then
  1066. currentAnimKeyframeHandler:disconnect()
  1067. end
  1068. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  1069.  
  1070. end
  1071.  
  1072. end
  1073.  
  1074. -------------------------------------------------------------------------------------------
  1075. -------------------------------------------------------------------------------------------
  1076.  
  1077. local toolAnimName = ""
  1078. local toolAnimTrack = nil
  1079. local toolAnimInstance = nil
  1080. local currentToolAnimKeyframeHandler = nil
  1081.  
  1082. function toolKeyFrameReachedFunc(frameName)
  1083. if (frameName == "End") then
  1084. -- print("Keyframe : ".. frameName)
  1085. playToolAnimation(toolAnimName, 0.0, Humanoid)
  1086. end
  1087. end
  1088.  
  1089.  
  1090. function playToolAnimation(animName, transitionTime, humanoid, priority)
  1091.  
  1092. local roll = math.random(1, animTable[animName].totalWeight)
  1093. local origRoll = roll
  1094. local idx = 1
  1095. while (roll > animTable[animName][idx].weight) do
  1096. roll = roll - animTable[animName][idx].weight
  1097. idx = idx + 1
  1098. end
  1099. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  1100. local anim = animTable[animName][idx].anim
  1101.  
  1102. if (toolAnimInstance ~= anim) then
  1103.  
  1104. if (toolAnimTrack ~= nil) then
  1105. toolAnimTrack:Stop()
  1106. toolAnimTrack:Destroy()
  1107. transitionTime = 0
  1108. end
  1109.  
  1110. -- load it to the humanoid; get AnimationTrack
  1111. toolAnimTrack = humanoid:LoadAnimation(anim)
  1112. if priority then
  1113. toolAnimTrack.Priority = priority
  1114. end
  1115.  
  1116. -- play the animation
  1117. toolAnimTrack:Play(transitionTime)
  1118. toolAnimName = animName
  1119. toolAnimInstance = anim
  1120.  
  1121. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  1122. end
  1123. end
  1124.  
  1125. function stopToolAnimations()
  1126. local oldAnim = toolAnimName
  1127.  
  1128. if (currentToolAnimKeyframeHandler ~= nil) then
  1129. currentToolAnimKeyframeHandler:disconnect()
  1130. end
  1131.  
  1132. toolAnimName = ""
  1133. toolAnimInstance = nil
  1134. if (toolAnimTrack ~= nil) then
  1135. toolAnimTrack:Stop()
  1136. toolAnimTrack:Destroy()
  1137. toolAnimTrack = nil
  1138. end
  1139.  
  1140.  
  1141. return oldAnim
  1142. end
  1143.  
  1144. -------------------------------------------------------------------------------------------
  1145. -------------------------------------------------------------------------------------------
  1146.  
  1147.  
  1148. function onRunning(speed)
  1149. if speed > 0.01 then
  1150. playAnimation("walk", 0.1, Humanoid)
  1151. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  1152. setAnimationSpeed(speed / 14.5)
  1153. end
  1154. pose = "Running"
  1155. else
  1156. if emoteNames[currentAnim] == nil then
  1157. playAnimation("idle", 0.1, Humanoid)
  1158. pose = "Standing"
  1159. end
  1160. end
  1161. end
  1162.  
  1163. function onDied()
  1164. pose = "Dead"
  1165. end
  1166.  
  1167. function onJumping()
  1168. playAnimation("jump", 0.1, Humanoid)
  1169. jumpAnimTime = jumpAnimDuration
  1170. pose = "Jumping"
  1171. end
  1172.  
  1173. function onClimbing(speed)
  1174. playAnimation("climb", 0.1, Humanoid)
  1175. setAnimationSpeed(speed / 12.0)
  1176. pose = "Climbing"
  1177. end
  1178.  
  1179. function onGettingUp()
  1180. pose = "GettingUp"
  1181. end
  1182.  
  1183. function onFreeFall()
  1184. if (jumpAnimTime <= 0) then
  1185. playAnimation("fall", fallTransitionTime, Humanoid)
  1186. end
  1187. pose = "FreeFall"
  1188. end
  1189.  
  1190. function onFallingDown()
  1191. pose = "FallingDown"
  1192. end
  1193.  
  1194. function onSeated()
  1195. pose = "Seated"
  1196. end
  1197.  
  1198. function onPlatformStanding()
  1199. pose = "PlatformStanding"
  1200. end
  1201.  
  1202. function onSwimming(speed)
  1203. if speed > 0 then
  1204. pose = "Running"
  1205. else
  1206. pose = "Standing"
  1207. end
  1208. end
  1209.  
  1210. function getTool()
  1211. for _, kid in ipairs(Figure:GetChildren()) do
  1212. if kid.className == "Tool" then return kid end
  1213. end
  1214. return nil
  1215. end
  1216.  
  1217. function getToolAnim(tool)
  1218. for _, c in ipairs(tool:GetChildren()) do
  1219. if c.Name == "toolanim" and c.className == "StringValue" then
  1220. return c
  1221. end
  1222. end
  1223. return nil
  1224. end
  1225.  
  1226. function animateTool()
  1227.  
  1228. if (toolAnim == "None") then
  1229. playToolAnimation("toolnone", toolTransitionTime, Humanoid, Enum.AnimationPriority.Idle)
  1230. return
  1231. end
  1232.  
  1233. if (toolAnim == "Slash") then
  1234. playToolAnimation("toolslash", 0, Humanoid, Enum.AnimationPriority.Action)
  1235. return
  1236. end
  1237.  
  1238. if (toolAnim == "Lunge") then
  1239. playToolAnimation("toollunge", 0, Humanoid, Enum.AnimationPriority.Action)
  1240. return
  1241. end
  1242. end
  1243.  
  1244. function moveSit()
  1245. RightShoulder.MaxVelocity = 0.15
  1246. LeftShoulder.MaxVelocity = 0.15
  1247. RightShoulder:SetDesiredAngle(3.14 /2)
  1248. LeftShoulder:SetDesiredAngle(-3.14 /2)
  1249. RightHip:SetDesiredAngle(3.14 /2)
  1250. LeftHip:SetDesiredAngle(-3.14 /2)
  1251. end
  1252.  
  1253. local lastTick = 0
  1254.  
  1255. function move(time)
  1256. local amplitude = 1
  1257. local frequency = 1
  1258. local deltaTime = time - lastTick
  1259. lastTick = time
  1260.  
  1261. local climbFudge = 0
  1262. local setAngles = false
  1263.  
  1264. if (jumpAnimTime > 0) then
  1265. jumpAnimTime = jumpAnimTime - deltaTime
  1266. end
  1267.  
  1268. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  1269. playAnimation("fall", fallTransitionTime, Humanoid)
  1270. elseif (pose == "Seated") then
  1271. playAnimation("sit", 0.5, Humanoid)
  1272. return
  1273. elseif (pose == "Running") then
  1274. playAnimation("walk", 0.1, Humanoid)
  1275. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  1276. -- print("Wha " .. pose)
  1277. stopAllAnimations()
  1278. amplitude = 0.1
  1279. frequency = 1
  1280. setAngles = true
  1281. end
  1282.  
  1283. if (setAngles) then
  1284. local desiredAngle = amplitude * math.sin(time * frequency)
  1285.  
  1286. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  1287. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  1288. RightHip:SetDesiredAngle(-desiredAngle)
  1289. LeftHip:SetDesiredAngle(-desiredAngle)
  1290. end
  1291.  
  1292. -- Tool Animation handling
  1293. local tool = getTool()
  1294. if tool and tool:FindFirstChild("Handle") then
  1295.  
  1296. local animStringValueObject = getToolAnim(tool)
  1297.  
  1298. if animStringValueObject then
  1299. toolAnim = animStringValueObject.Value
  1300. -- message recieved, delete StringValue
  1301. animStringValueObject.Parent = nil
  1302. toolAnimTime = time + .3
  1303. end
  1304.  
  1305. if time > toolAnimTime then
  1306. toolAnimTime = 0
  1307. toolAnim = "None"
  1308. end
  1309.  
  1310. animateTool()
  1311. else
  1312. stopToolAnimations()
  1313. toolAnim = "None"
  1314. toolAnimInstance = nil
  1315. toolAnimTime = 0
  1316. end
  1317. end
  1318.  
  1319. -- connect events
  1320. Humanoid.Died:connect(onDied)
  1321. Humanoid.Running:connect(onRunning)
  1322. Humanoid.Jumping:connect(onJumping)
  1323. Humanoid.Climbing:connect(onClimbing)
  1324. Humanoid.GettingUp:connect(onGettingUp)
  1325. Humanoid.FreeFalling:connect(onFreeFall)
  1326. Humanoid.FallingDown:connect(onFallingDown)
  1327. Humanoid.Seated:connect(onSeated)
  1328. Humanoid.PlatformStanding:connect(onPlatformStanding)
  1329. Humanoid.Swimming:connect(onSwimming)
  1330. playAnimation("idle", 0.1, Humanoid)
  1331. pose = "Standing"
  1332. while Figure.Parent ~= nil do
  1333. local _, time = wait(0.1)
  1334. move(time)
  1335. end end..o64)
  1336. end))
  1337.  
  1338. o65 = System.Create("StringValue",{
  1339. ["Name"] = "climb",
  1340. ["Parent"] = o64,
  1341. })
  1342. o66 = System.Create("Animation",{
  1343. ["Name"] = "ClimbAnim",
  1344. ["Parent"] = o65,
  1345. ["AnimationId"] = "http://www.roblox.com/asset/?id=180436334",
  1346. })
  1347. o67 = System.Create("StringValue",{
  1348. ["Name"] = "fall",
  1349. ["Parent"] = o64,
  1350. })
  1351. o68 = System.Create("Animation",{
  1352. ["Name"] = "FallAnim",
  1353. ["Parent"] = o67,
  1354. ["AnimationId"] = "http://www.roblox.com/asset/?id=180436148",
  1355. })
  1356. o69 = System.Create("StringValue",{
  1357. ["Name"] = "idle",
  1358. ["Parent"] = o64,
  1359. })
  1360. o70 = System.Create("Animation",{
  1361. ["Name"] = "Animation1",
  1362. ["Parent"] = o69,
  1363. ["AnimationId"] = "http://www.roblox.com/asset/?id=180435571",
  1364. })
  1365. o71 = System.Create("NumberValue",{
  1366. ["Name"] = "Weight",
  1367. ["Parent"] = o70,
  1368. ["Value"] = 9,
  1369. })
  1370. o72 = System.Create("Animation",{
  1371. ["Name"] = "Animation2",
  1372. ["Parent"] = o69,
  1373. ["AnimationId"] = "http://www.roblox.com/asset/?id=180435792",
  1374. })
  1375. o73 = System.Create("NumberValue",{
  1376. ["Name"] = "Weight",
  1377. ["Parent"] = o72,
  1378. ["Value"] = 1,
  1379. })
  1380. o74 = System.Create("StringValue",{
  1381. ["Name"] = "jump",
  1382. ["Parent"] = o64,
  1383. })
  1384. o75 = System.Create("Animation",{
  1385. ["Name"] = "JumpAnim",
  1386. ["Parent"] = o74,
  1387. ["AnimationId"] = "http://www.roblox.com/asset/?id=125750702",
  1388. })
  1389. o76 = System.Create("StringValue",{
  1390. ["Name"] = "run",
  1391. ["Parent"] = o64,
  1392. })
  1393. o77 = System.Create("Animation",{
  1394. ["Name"] = "RunAnim",
  1395. ["Parent"] = o76,
  1396. ["AnimationId"] = "http://www.roblox.com/asset/?id=180426354",
  1397. })
  1398. o78 = System.Create("StringValue",{
  1399. ["Name"] = "sit",
  1400. ["Parent"] = o64,
  1401. })
  1402. o79 = System.Create("Animation",{
  1403. ["Name"] = "SitAnim",
  1404. ["Parent"] = o78,
  1405. ["AnimationId"] = "http://www.roblox.com/asset/?id=178130996",
  1406. })
  1407. o80 = System.Create("StringValue",{
  1408. ["Name"] = "toolnone",
  1409. ["Parent"] = o64,
  1410. })
  1411. o81 = System.Create("Animation",{
  1412. ["Name"] = "ToolNoneAnim",
  1413. ["Parent"] = o80,
  1414. ["AnimationId"] = "http://www.roblox.com/asset/?id=182393478",
  1415. })
  1416. o82 = System.Create("StringValue",{
  1417. ["Name"] = "walk",
  1418. ["Parent"] = o64,
  1419. })
  1420. o83 = System.Create("Animation",{
  1421. ["Name"] = "WalkAnim",
  1422. ["Parent"] = o82,
  1423. ["AnimationId"] = "http://www.roblox.com/asset/?id=180426354",
  1424. })
  1425. o84 = System.Create("Script",{
  1426. ["Name"] = "HealthNew",
  1427. ["Parent"] = o1,
  1428. })
  1429. table.insert(c, coroutine.create(function()
  1430. wait()
  1431. b(function()
  1432. --[[ By: Brutez. ]]--
  1433. local LainaHealthScript=script;
  1434. local Laina=LainaHealthScript.Parent;
  1435. local LainaHumanoid;
  1436. for _,Child in pairs(Laina:GetChildren())do
  1437. if Child~=nil and Child:IsA("Humanoid")and Child.Health~=0 then
  1438. LainaHumanoid=Child;
  1439. end;
  1440. end;
  1441. local Regenerating=false;
  1442. function UpdateHealth()
  1443. if not Regenerating then
  1444. Regenerating=true;
  1445. Spawn(function()
  1446. while LainaHumanoid.Health<LainaHumanoid.MaxHealth do
  1447. local StoredHealth=LainaHumanoid.Health;
  1448. if StoredHealth>0 and StoredHealth<LainaHumanoid.MaxHealth then
  1449. local AdditionalHealth=0.01*LainaHumanoid.MaxHealth;
  1450. StoredHealth=StoredHealth+AdditionalHealth;
  1451. LainaHumanoid.Health=math.min(StoredHealth,LainaHumanoid.MaxHealth);
  1452. end;
  1453. Wait(0.3);
  1454. end;
  1455. if LainaHumanoid.Health>LainaHumanoid.MaxHealth then
  1456. LainaHumanoid.Health=LainaHumanoid.MaxHealth;
  1457. end;
  1458. Regenerating=false;
  1459. end);
  1460. end;
  1461. end;
  1462. LainaHumanoid.HealthChanged:connect(UpdateHealth);
  1463. --[[ By: Brutez. ]]-- end..o84)
  1464. end))
  1465.  
  1466. mas.Parent = workspace
  1467. mas:MakeJoints()
  1468. local b = mas:GetChildren()
  1469. for a = 1, #b do
  1470. b[a].Parent = workspace
  1471. ypcall(function()
  1472. b[a]:MakeJoints()
  1473. end)
  1474. end
  1475. mas:Destroy()
  1476. for a = 1, #c do
  1477. coroutine.resume(c[a])
  1478. end
Advertisement
Add Comment
Please, Sign In to add comment