Advertisement
Gamerulexerul

Untitled

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