Advertisement
sawgamer1

Untitled

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