Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2018
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 53.23 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. SpecialMesh3 = Instance.new("SpecialMesh")
  23. Decal4 = Instance.new("Decal")
  24. ParticleEmitter5 = Instance.new("ParticleEmitter")
  25. ParticleEmitter6 = Instance.new("ParticleEmitter")
  26. Weld7 = Instance.new("Weld")
  27. Part8 = Instance.new("Part")
  28. Decal9 = Instance.new("Decal")
  29. Motor6D10 = Instance.new("Motor6D")
  30. Motor6D11 = Instance.new("Motor6D")
  31. Motor6D12 = Instance.new("Motor6D")
  32. Motor6D13 = Instance.new("Motor6D")
  33. Motor6D14 = Instance.new("Motor6D")
  34. Part15 = Instance.new("Part")
  35. Part16 = Instance.new("Part")
  36. Part17 = Instance.new("Part")
  37. Part18 = Instance.new("Part")
  38. Humanoid19 = Instance.new("Humanoid")
  39. Model20 = Instance.new("Model")
  40. Model21 = Instance.new("Model")
  41. Part22 = Instance.new("Part")
  42. Motor6D23 = Instance.new("Motor6D")
  43. Script24 = Instance.new("Script")
  44. LocalScript25 = Instance.new("LocalScript")
  45. BodyColors26 = Instance.new("BodyColors")
  46. Script27 = Instance.new("Script")
  47. StringValue28 = Instance.new("StringValue")
  48. Animation29 = Instance.new("Animation")
  49. StringValue30 = Instance.new("StringValue")
  50. Animation31 = Instance.new("Animation")
  51. StringValue32 = Instance.new("StringValue")
  52. Animation33 = Instance.new("Animation")
  53. NumberValue34 = Instance.new("NumberValue")
  54. Animation35 = Instance.new("Animation")
  55. NumberValue36 = Instance.new("NumberValue")
  56. StringValue37 = Instance.new("StringValue")
  57. Animation38 = Instance.new("Animation")
  58. StringValue39 = Instance.new("StringValue")
  59. Animation40 = Instance.new("Animation")
  60. StringValue41 = Instance.new("StringValue")
  61. Animation42 = Instance.new("Animation")
  62. StringValue43 = Instance.new("StringValue")
  63. Animation44 = Instance.new("Animation")
  64. StringValue45 = Instance.new("StringValue")
  65. Animation46 = Instance.new("Animation")
  66. Pants47 = Instance.new("Pants")
  67. Script48 = Instance.new("Script")
  68. Script49 = Instance.new("Script")
  69. CharacterMesh50 = Instance.new("CharacterMesh")
  70. CharacterMesh51 = Instance.new("CharacterMesh")
  71. CharacterMesh52 = Instance.new("CharacterMesh")
  72. CharacterMesh53 = Instance.new("CharacterMesh")
  73. CharacterMesh54 = Instance.new("CharacterMesh")
  74. Hat55 = Instance.new("Hat")
  75. Part56 = Instance.new("Part")
  76. SpecialMesh57 = Instance.new("SpecialMesh")
  77. Script58 = Instance.new("Script")
  78. LocalScript59 = Instance.new("LocalScript")
  79. Script60 = Instance.new("Script")
  80. Model0.Name = "Laina"
  81. Model0.Parent = mas
  82. Model1.Name = "Laina"
  83. Model1.Parent = Model0
  84. Model1.PrimaryPart = Part2
  85. Part2.Name = "Head"
  86. Part2.Parent = Model1
  87. Part2.Material = Enum.Material.SmoothPlastic
  88. Part2.BrickColor = BrickColor.new("Institutional white")
  89. Part2.CanCollide = false
  90. Part2.Elasticity = 0
  91. Part2.FormFactor = Enum.FormFactor.Symmetric
  92. Part2.Friction = 2
  93. Part2.Size = Vector3.new(2, 1, 1)
  94. Part2.CFrame = CFrame.new(-75.9998779, 4.50002766, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  95. Part2.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  96. Part2.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  97. Part2.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  98. Part2.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  99. Part2.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  100. Part2.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  101. Part2.Color = Color3.new(0.972549, 0.972549, 0.972549)
  102. Part2.Position = Vector3.new(-75.9998779, 4.50002766, 1)
  103. Part2.Color = Color3.new(0.972549, 0.972549, 0.972549)
  104. SpecialMesh3.Parent = Part2
  105. SpecialMesh3.Scale = Vector3.new(1.25, 1.25, 1.25)
  106. SpecialMesh3.Scale = Vector3.new(1.25, 1.25, 1.25)
  107. Decal4.Name = "face"
  108. Decal4.Parent = Part2
  109. Decal4.Texture = "rbxassetid://116690930"
  110. ParticleEmitter5.Name = "Hearts"
  111. ParticleEmitter5.Parent = Part2
  112. ParticleEmitter5.Size = NumberSequence.new(0,0.30000001192093,1,0.30000001192093,0.3125,1.3749998807907,0.30000001192093,0)
  113. ParticleEmitter5.Enabled = false
  114. ParticleEmitter5.Texture = "rbxassetid://332222673"
  115. ParticleEmitter5.Lifetime = NumberRange.new(2, 2)
  116. ParticleEmitter5.Rate = 10
  117. ParticleEmitter5.RotSpeed = NumberRange.new(-100, 100)
  118. ParticleEmitter5.Speed = NumberRange.new(1, 1)
  119. ParticleEmitter5.VelocitySpread = 50
  120. ParticleEmitter6.Name = "BrokenHearts"
  121. ParticleEmitter6.Parent = Part2
  122. ParticleEmitter6.Size = NumberSequence.new(0,0.30000001192093,1,0.30000001192093,0.30000001192093,0)
  123. ParticleEmitter6.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0, 0, 0))
  124. ParticleEmitter6.Enabled = false
  125. ParticleEmitter6.Texture = "rbxassetid://11476663"
  126. ParticleEmitter6.Lifetime = NumberRange.new(1, 1)
  127. ParticleEmitter6.Rate = 10
  128. ParticleEmitter6.RotSpeed = NumberRange.new(-100, 100)
  129. ParticleEmitter6.Speed = NumberRange.new(3, 3)
  130. ParticleEmitter6.Color = ColorSequence.new(Color3.new(1, 0, 0),Color3.new(0, 0, 0))
  131. Weld7.Name = "HeadWeld"
  132. Weld7.Parent = Part2
  133. Weld7.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  134. Weld7.C1 = CFrame.new(0, 0.899999976, 0, 1, 0, 0, 0, 0.995037198, 0.0995037183, 0, -0.0995037183, 0.995037198)
  135. Weld7.Part0 = Part2
  136. Weld7.Part1 = Part56
  137. Part8.Name = "Torso"
  138. Part8.Parent = Model1
  139. Part8.Material = Enum.Material.SmoothPlastic
  140. Part8.BrickColor = BrickColor.new("Institutional white")
  141. Part8.CanCollide = false
  142. Part8.Elasticity = 0
  143. Part8.FormFactor = Enum.FormFactor.Symmetric
  144. Part8.Friction = 2
  145. Part8.Size = Vector3.new(2, 2, 1)
  146. Part8.CFrame = CFrame.new(-75.9998779, 3.00002789, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  147. Part8.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  148. Part8.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  149. Part8.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  150. Part8.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  151. Part8.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  152. Part8.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  153. Part8.Color = Color3.new(0.972549, 0.972549, 0.972549)
  154. Part8.Position = Vector3.new(-75.9998779, 3.00002789, 1)
  155. Part8.Color = Color3.new(0.972549, 0.972549, 0.972549)
  156. Decal9.Name = "roblox"
  157. Decal9.Parent = Part8
  158. Motor6D10.Name = "Right Shoulder"
  159. Motor6D10.Parent = Part8
  160. Motor6D10.C0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  161. Motor6D10.C1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  162. Motor6D10.Part0 = Part8
  163. Motor6D10.Part1 = Part16
  164. Motor6D10.DesiredAngle = -0.071469336748123
  165. Motor6D10.MaxVelocity = 0.10000000149012
  166. Motor6D11.Name = "Left Shoulder"
  167. Motor6D11.Parent = Part8
  168. Motor6D11.C0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  169. Motor6D11.C1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  170. Motor6D11.Part0 = Part8
  171. Motor6D11.Part1 = Part15
  172. Motor6D11.DesiredAngle = -0.071469336748123
  173. Motor6D11.MaxVelocity = 0.10000000149012
  174. Motor6D12.Name = "Right Hip"
  175. Motor6D12.Parent = Part8
  176. Motor6D12.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  177. Motor6D12.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  178. Motor6D12.Part0 = Part8
  179. Motor6D12.Part1 = Part18
  180. Motor6D12.DesiredAngle = 0.071469336748123
  181. Motor6D12.MaxVelocity = 0.10000000149012
  182. Motor6D13.Name = "Left Hip"
  183. Motor6D13.Parent = Part8
  184. Motor6D13.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  185. Motor6D13.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  186. Motor6D13.Part0 = Part8
  187. Motor6D13.Part1 = Part17
  188. Motor6D13.DesiredAngle = 0.071469336748123
  189. Motor6D13.MaxVelocity = 0.10000000149012
  190. Motor6D14.Name = "Neck"
  191. Motor6D14.Parent = Part8
  192. Motor6D14.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  193. Motor6D14.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  194. Motor6D14.Part0 = Part8
  195. Motor6D14.Part1 = Part2
  196. Motor6D14.MaxVelocity = 0.10000000149012
  197. Part15.Name = "Left Arm"
  198. Part15.Parent = Model1
  199. Part15.Material = Enum.Material.SmoothPlastic
  200. Part15.BrickColor = BrickColor.new("Institutional white")
  201. Part15.CanCollide = false
  202. Part15.Elasticity = 0
  203. Part15.FormFactor = Enum.FormFactor.Symmetric
  204. Part15.Friction = 2
  205. Part15.Size = Vector3.new(1, 2, 1)
  206. Part15.CFrame = CFrame.new(-77.4998779, 3.00002789, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  207. Part15.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  208. Part15.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  209. Part15.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  210. Part15.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  211. Part15.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  212. Part15.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  213. Part15.Color = Color3.new(0.972549, 0.972549, 0.972549)
  214. Part15.Position = Vector3.new(-77.4998779, 3.00002789, 1)
  215. Part15.Color = Color3.new(0.972549, 0.972549, 0.972549)
  216. Part16.Name = "Right Arm"
  217. Part16.Parent = Model1
  218. Part16.Material = Enum.Material.SmoothPlastic
  219. Part16.BrickColor = BrickColor.new("Institutional white")
  220. Part16.CanCollide = false
  221. Part16.Elasticity = 0
  222. Part16.FormFactor = Enum.FormFactor.Symmetric
  223. Part16.Friction = 2
  224. Part16.Size = Vector3.new(1, 2, 1)
  225. Part16.CFrame = CFrame.new(-74.4998779, 3.00002789, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  226. Part16.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  227. Part16.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  228. Part16.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  229. Part16.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  230. Part16.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  231. Part16.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  232. Part16.Color = Color3.new(0.972549, 0.972549, 0.972549)
  233. Part16.Position = Vector3.new(-74.4998779, 3.00002789, 1)
  234. Part16.Color = Color3.new(0.972549, 0.972549, 0.972549)
  235. Part17.Name = "Left Leg"
  236. Part17.Parent = Model1
  237. Part17.Material = Enum.Material.SmoothPlastic
  238. Part17.BrickColor = BrickColor.new("Institutional white")
  239. Part17.CanCollide = false
  240. Part17.Elasticity = 0
  241. Part17.FormFactor = Enum.FormFactor.Symmetric
  242. Part17.Friction = 2
  243. Part17.Size = Vector3.new(1, 2, 1)
  244. Part17.CFrame = CFrame.new(-76.4998779, 1.00002789, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  245. Part17.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  246. Part17.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  247. Part17.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  248. Part17.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  249. Part17.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  250. Part17.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  251. Part17.Color = Color3.new(0.972549, 0.972549, 0.972549)
  252. Part17.Position = Vector3.new(-76.4998779, 1.00002789, 1)
  253. Part17.Color = Color3.new(0.972549, 0.972549, 0.972549)
  254. Part18.Name = "Right Leg"
  255. Part18.Parent = Model1
  256. Part18.Material = Enum.Material.SmoothPlastic
  257. Part18.BrickColor = BrickColor.new("Institutional white")
  258. Part18.CanCollide = false
  259. Part18.Elasticity = 0
  260. Part18.FormFactor = Enum.FormFactor.Symmetric
  261. Part18.Friction = 2
  262. Part18.Size = Vector3.new(1, 2, 1)
  263. Part18.CFrame = CFrame.new(-75.4998779, 1.00002789, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  264. Part18.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  265. Part18.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  266. Part18.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  267. Part18.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  268. Part18.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  269. Part18.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  270. Part18.Color = Color3.new(0.972549, 0.972549, 0.972549)
  271. Part18.Position = Vector3.new(-75.4998779, 1.00002789, 1)
  272. Part18.Color = Color3.new(0.972549, 0.972549, 0.972549)
  273. Humanoid19.Parent = Model1
  274. Humanoid19.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  275. Humanoid19.RightLeg = Part18
  276. Humanoid19.LeftLeg = Part17
  277. Humanoid19.Torso = Part22
  278. Humanoid19.Health = 100000000000000000
  279. Humanoid19.MaxHealth = 100000000000000000
  280. Humanoid19.WalkSpeed = 30
  281. Model20.Name = "Status"
  282. Model20.Parent = Humanoid19
  283. Model21.Name = "AvalibleSpawns"
  284. Model21.Parent = Model20
  285. Part22.Name = "HumanoidRootPart"
  286. Part22.Parent = Model1
  287. Part22.Material = Enum.Material.SmoothPlastic
  288. Part22.BrickColor = BrickColor.new("Bright blue")
  289. Part22.Transparency = 1
  290. Part22.CanCollide = false
  291. Part22.Elasticity = 0
  292. Part22.FormFactor = Enum.FormFactor.Symmetric
  293. Part22.Friction = 2
  294. Part22.Size = Vector3.new(2, 2, 1)
  295. Part22.CFrame = CFrame.new(-75.9998779, 3.00002789, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  296. Part22.BackSurface = Enum.SurfaceType.SmoothNoOutlines
  297. Part22.BottomSurface = Enum.SurfaceType.SmoothNoOutlines
  298. Part22.FrontSurface = Enum.SurfaceType.SmoothNoOutlines
  299. Part22.LeftSurface = Enum.SurfaceType.SmoothNoOutlines
  300. Part22.RightSurface = Enum.SurfaceType.SmoothNoOutlines
  301. Part22.TopSurface = Enum.SurfaceType.SmoothNoOutlines
  302. Part22.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  303. Part22.Position = Vector3.new(-75.9998779, 3.00002789, 1)
  304. Part22.Color = Color3.new(0.0509804, 0.411765, 0.67451)
  305. Motor6D23.Name = "RootJoint"
  306. Motor6D23.Parent = Part22
  307. Motor6D23.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  308. Motor6D23.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  309. Motor6D23.Part0 = Part22
  310. Motor6D23.Part1 = Part8
  311. Motor6D23.MaxVelocity = 0.10000000149012
  312. Script24.Name = "Sound"
  313. Script24.Parent = Model1
  314. table.insert(cors,sandbox(Script24,function()
  315. ---This server script creates the sounds and also exists so that it can be easily copied into an NPC and create sounds for that NPC.
  316. --Remove the local script if you copy this into an NPC.
  317. function waitForChild(parent, childName)
  318. local child = parent:findFirstChild(childName)
  319. if child then return child end
  320. while true do
  321. child = parent.ChildAdded:wait()
  322. if child.Name==childName then return child end
  323. end
  324. end
  325. function newSound(name, id)
  326. local sound = Instance.new("Sound")
  327. sound.SoundId = id
  328. sound.Name = name
  329. sound.archivable = false
  330. sound.Parent = script.Parent.Head
  331. return sound
  332. end
  333. -- declarations
  334. local sGettingUp = newSound("GettingUp", "rbxasset://sounds/action_get_up.mp3")
  335. local sDied = newSound("Died", "rbxasset://sounds/uuhhh.mp3")
  336. local sFreeFalling = newSound("FreeFalling", "rbxasset://sounds/action_falling.mp3")
  337. local sJumping = newSound("Jumping", "rbxasset://sounds/action_jump.mp3")
  338. local sLanding = newSound("Landing", "rbxasset://sounds/action_jump_land.mp3")
  339. local sSplash = newSound("Splash", "rbxasset://sounds/impact_water.mp3")
  340. local sRunning = newSound("Running", "rbxasset://sounds/action_footsteps_plastic.mp3")
  341. sRunning.Looped = true
  342. local sSwimming = newSound("Swimming", "rbxasset://sounds/action_swim.mp3")
  343. sSwimming.Looped = true
  344. local sClimbing = newSound("Climbing", "rbxasset://sounds/action_footsteps_plastic.mp3")
  345. sClimbing.Looped = true
  346.  
  347. local Figure = script.Parent
  348. local Head = waitForChild(Figure, "Head")
  349. local Humanoid;
  350. for _,Child in pairs(Figure:GetChildren())do
  351. if Child and Child.ClassName=="Humanoid"then
  352. Humanoid=Child;
  353. end;
  354. end;
  355. local hasPlayer = game.Players:GetPlayerFromCharacter(script.Parent)
  356. local filteringEnabled = game.Workspace.FilteringEnabled
  357.  
  358. local prevState = "None"
  359.  
  360. -- functions
  361.  
  362. function onDied()
  363. stopLoopedSounds()
  364. for _,Child in pairs(Figure:FindFirstChild("Head"):GetChildren())do
  365. if Child and Child.ClassName=="Sound"then
  366. Child.Volume=0
  367. Child:Stop()
  368. end
  369. end
  370. sDied.Volume=1;
  371. sDied:Play();
  372. end
  373.  
  374. local fallCount = 0
  375. local fallSpeed = 0
  376. function onStateFall(state, sound)
  377. fallCount = fallCount + 1
  378. if state then
  379. sound.Volume = 0
  380. sound:Play()
  381. Spawn( function()
  382. local t = 0
  383. local thisFall = fallCount
  384. while t < 1.5 and fallCount == thisFall do
  385. local vol = math.max(t - 0.3 , 0)
  386. sound.Volume = vol
  387. wait(0.1)
  388. t = t + 0.1
  389. end
  390. end)
  391. else
  392. sound:Stop()
  393. end
  394. fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.Y))
  395. end
  396.  
  397.  
  398. function onStateNoStop(state, sound)
  399. if state then
  400. sound:Play()
  401. end
  402. end
  403.  
  404.  
  405. function onRunning(speed)
  406. sClimbing:Stop()
  407. sSwimming:Stop()
  408. if (prevState == "FreeFall" and fallSpeed > 0.1) then
  409. local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
  410. sLanding.Volume = vol
  411. sLanding:Play()
  412. fallSpeed = 0
  413. end
  414. if speed>0.5 then
  415. sRunning:Play()
  416. sRunning.Pitch = speed / 8.0
  417. else
  418. sRunning:Stop()
  419. end
  420. prevState = "Run"
  421. end
  422.  
  423. function onSwimming(speed)
  424. if (prevState ~= "Swim" and speed > 0.1) then
  425. local volume = math.min(1.0, speed / 350)
  426. sSplash.Volume = volume
  427. sSplash:Play()
  428. prevState = "Swim"
  429. end
  430. sClimbing:Stop()
  431. sRunning:Stop()
  432. sSwimming.Pitch = 1.6
  433. sSwimming:Play()
  434. end
  435.  
  436. function onClimbing(speed)
  437. sRunning:Stop()
  438. sSwimming:Stop()
  439. if speed>0.01 then
  440. sClimbing:Play()
  441. sClimbing.Pitch = speed / 5.5
  442. else
  443. sClimbing:Stop()
  444. end
  445. prevState = "Climb"
  446. end
  447. -- connect up
  448.  
  449. function stopLoopedSounds()
  450. sRunning:Stop()
  451. sClimbing:Stop()
  452. sSwimming:Stop()
  453. end
  454.  
  455. if hasPlayer == nil then
  456. Humanoid.Died:connect(onDied)
  457. Humanoid.Running:connect(onRunning)
  458. Humanoid.Swimming:connect(onSwimming)
  459. Humanoid.Climbing:connect(onClimbing)
  460. Humanoid.Jumping:connect(function(state) onStateNoStop(state, sJumping) prevState = "Jump" end)
  461. Humanoid.GettingUp:connect(function(state) stopLoopedSounds() onStateNoStop(state, sGettingUp) prevState = "GetUp" end)
  462. Humanoid.FreeFalling:connect(function(state) stopLoopedSounds() onStateFall(state, sFreeFalling) prevState = "FreeFall" end)
  463. Humanoid.FallingDown:connect(function(state) stopLoopedSounds() end)
  464. Humanoid.StateChanged:connect(function(old, new)
  465. if not (new.Name == "Dead" or
  466. new.Name == "Running" or
  467. new.Name == "RunningNoPhysics" or
  468. new.Name == "Swimming" or
  469. new.Name == "Jumping" or
  470. new.Name == "GettingUp" or
  471. new.Name == "Freefall" or
  472. new.Name == "FallingDown") then
  473. stopLoopedSounds()
  474. end
  475. end)
  476. end
  477.  
  478. end))
  479. LocalScript25.Name = "LocalSound"
  480. LocalScript25.Parent = Script24
  481. LocalScript25.Disabled = true
  482. table.insert(cors,sandbox(LocalScript25,function()
  483. --This local script will run only for the player whos character it is in. It's changes to the sounds will replicate as they are changes to the character.
  484. -- util
  485.  
  486. function waitForChild(parent, childName)
  487. local child = parent:findFirstChild(childName)
  488. if child then return child end
  489. while true do
  490. child = parent.ChildAdded:wait()
  491. if child.Name==childName then return child end
  492. end
  493. end
  494.  
  495.  
  496. -- declarations
  497.  
  498. local Figure = script.Parent.Parent
  499. local Head = waitForChild(Figure, "Head")
  500. local Humanoid = waitForChild(Figure, "Humanoid")
  501.  
  502. local sGettingUp = waitForChild(Head, "GettingUp")
  503. local sDied = waitForChild(Head, "Died")
  504. local sFreeFalling = waitForChild(Head, "FreeFalling")
  505. local sJumping = waitForChild(Head, "Jumping")
  506. local sLanding = waitForChild(Head, "Landing")
  507. local sSplash = waitForChild(Head, "Splash")
  508. local sRunning = waitForChild(Head, "Running")
  509. sRunning.Looped = true
  510. local sSwimming = waitForChild(Head, "Swimming")
  511. sSwimming.Looped = true
  512. local sClimbing =waitForChild(Head, "Climbing")
  513. sClimbing.Looped = true
  514.  
  515. local prevState = "None"
  516.  
  517. -- functions
  518.  
  519. function onDied()
  520. stopLoopedSounds()
  521. sDied:Play()
  522. end
  523.  
  524. local fallCount = 0
  525. local fallSpeed = 0
  526. function onStateFall(state, sound)
  527. fallCount = fallCount + 1
  528. if state then
  529. sound.Volume = 0
  530. sound:Play()
  531. Spawn( function()
  532. local t = 0
  533. local thisFall = fallCount
  534. while t < 1.5 and fallCount == thisFall do
  535. local vol = math.max(t - 0.3 , 0)
  536. sound.Volume = vol
  537. wait(0.1)
  538. t = t + 0.1
  539. end
  540. end)
  541. else
  542. sound:Stop()
  543. end
  544. fallSpeed = math.max(fallSpeed, math.abs(Head.Velocity.Y))
  545. end
  546.  
  547.  
  548. function onStateNoStop(state, sound)
  549. if state then
  550. sound:Play()
  551. end
  552. end
  553.  
  554.  
  555. function onRunning(speed)
  556. sClimbing:Stop()
  557. sSwimming:Stop()
  558. if (prevState == "FreeFall" and fallSpeed > 0.1) then
  559. local vol = math.min(1.0, math.max(0.0, (fallSpeed - 50) / 110))
  560. sLanding.Volume = vol
  561. sLanding:Play()
  562. fallSpeed = 0
  563. end
  564. if speed>0.5 then
  565. sRunning:Play()
  566. sRunning.Pitch = speed / 8.0
  567. else
  568. sRunning:Stop()
  569. end
  570. prevState = "Run"
  571. end
  572.  
  573. function onSwimming(speed)
  574. if (prevState ~= "Swim" and speed > 0.1) then
  575. local volume = math.min(1.0, speed / 350)
  576. sSplash.Volume = volume
  577. sSplash:Play()
  578. prevState = "Swim"
  579. end
  580. sClimbing:Stop()
  581. sRunning:Stop()
  582. sSwimming.Pitch = 1.6
  583. sSwimming:Play()
  584. end
  585.  
  586. function onClimbing(speed)
  587. sRunning:Stop()
  588. sSwimming:Stop()
  589. if speed>0.01 then
  590. sClimbing:Play()
  591. sClimbing.Pitch = speed / 5.5
  592. else
  593. sClimbing:Stop()
  594. end
  595. prevState = "Climb"
  596. end
  597. -- connect up
  598.  
  599. function stopLoopedSounds()
  600. sRunning:Stop()
  601. sClimbing:Stop()
  602. sSwimming:Stop()
  603. end
  604.  
  605. Humanoid.Died:connect(onDied)
  606. Humanoid.Running:connect(onRunning)
  607. Humanoid.Swimming:connect(onSwimming)
  608. Humanoid.Climbing:connect(onClimbing)
  609. Humanoid.Jumping:connect(function(state) onStateNoStop(state, sJumping) prevState = "Jump" end)
  610. Humanoid.GettingUp:connect(function(state) stopLoopedSounds() onStateNoStop(state, sGettingUp) prevState = "GetUp" end)
  611. Humanoid.FreeFalling:connect(function(state) stopLoopedSounds() onStateFall(state, sFreeFalling) prevState = "FreeFall" end)
  612. Humanoid.FallingDown:connect(function(state) stopLoopedSounds() end)
  613. Humanoid.StateChanged:connect(function(old, new)
  614. if not (new.Name == "Dead" or
  615. new.Name == "Running" or
  616. new.Name == "RunningNoPhysics" or
  617. new.Name == "Swimming" or
  618. new.Name == "Jumping" or
  619. new.Name == "GettingUp" or
  620. new.Name == "Freefall" or
  621. new.Name == "FallingDown") then
  622. stopLoopedSounds()
  623. end
  624. end)
  625.  
  626.  
  627. end))
  628. BodyColors26.Parent = Model1
  629. BodyColors26.HeadColor = BrickColor.new("Institutional white")
  630. BodyColors26.LeftArmColor = BrickColor.new("Institutional white")
  631. BodyColors26.LeftLegColor = BrickColor.new("Institutional white")
  632. BodyColors26.RightArmColor = BrickColor.new("Institutional white")
  633. BodyColors26.RightLegColor = BrickColor.new("Institutional white")
  634. BodyColors26.TorsoColor = BrickColor.new("Institutional white")
  635. Script27.Name = "AnimateSauce"
  636. Script27.Parent = Model1
  637. table.insert(cors,sandbox(Script27,function()
  638. function waitForChild(parent, childName)
  639. local child = parent:findFirstChild(childName)
  640. if child then return child end
  641. while true do
  642. child = parent.ChildAdded:wait()
  643. if child.Name==childName then return child end
  644. end
  645. end
  646. local Figure = script.Parent
  647. local Torso = waitForChild(Figure, "Torso")
  648. local RightShoulder = waitForChild(Torso, "Right Shoulder")
  649. local LeftShoulder = waitForChild(Torso, "Left Shoulder")
  650. local RightHip = waitForChild(Torso, "Right Hip")
  651. local LeftHip = waitForChild(Torso, "Left Hip")
  652. local Neck = waitForChild(Torso, "Neck")
  653. local Humanoid;
  654. for _,Child in pairs(Figure:GetChildren())do
  655. if Child and Child.ClassName=="Humanoid"then
  656. Humanoid=Child;
  657. end;
  658. end;
  659. local pose = "Standing"
  660. local currentAnim = ""
  661. local currentAnimInstance = nil
  662. local currentAnimTrack = nil
  663. local currentAnimKeyframeHandler = nil
  664. local currentAnimSpeed = 1.0
  665. local animTable = {}
  666. local animNames = {
  667. idle = {
  668. { id = "http://www.roblox.com/asset/?id=180435571", weight = 9 },
  669. { id = "http://www.roblox.com/asset/?id=180435792", weight = 1 }
  670. },
  671. walk = {
  672. { id = "http://www.roblox.com/asset/?id=180426354", weight = 10 }
  673. },
  674. run = {
  675. { id = "run.xml", weight = 10 }
  676. },
  677. jump = {
  678. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  679. },
  680. fall = {
  681. { id = "http://www.roblox.com/asset/?id=180436148", weight = 10 }
  682. },
  683. climb = {
  684. { id = "http://www.roblox.com/asset/?id=180436334", weight = 10 }
  685. },
  686. sit = {
  687. { id = "http://www.roblox.com/asset/?id=178130996", weight = 10 }
  688. },
  689. toolnone = {
  690. { id = "http://www.roblox.com/asset/?id=182393478", weight = 10 }
  691. },
  692. toolslash = {
  693. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  694. --{ id = "slash.xml", weight = 10 }
  695. },
  696. toollunge = {
  697. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  698. },
  699. wave = {
  700. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  701. },
  702. point = {
  703. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  704. },
  705. dance1 = {
  706. { id = "http://www.roblox.com/asset/?id=182435998", weight = 10 },
  707. { id = "http://www.roblox.com/asset/?id=182491037", weight = 10 },
  708. { id = "http://www.roblox.com/asset/?id=182491065", weight = 10 }
  709. },
  710. dance2 = {
  711. { id = "http://www.roblox.com/asset/?id=182436842", weight = 10 },
  712. { id = "http://www.roblox.com/asset/?id=182491248", weight = 10 },
  713. { id = "http://www.roblox.com/asset/?id=182491277", weight = 10 }
  714. },
  715. dance3 = {
  716. { id = "http://www.roblox.com/asset/?id=182436935", weight = 10 },
  717. { id = "http://www.roblox.com/asset/?id=182491368", weight = 10 },
  718. { id = "http://www.roblox.com/asset/?id=182491423", weight = 10 }
  719. },
  720. laugh = {
  721. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  722. },
  723. cheer = {
  724. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  725. },
  726. }
  727. local dances = {"dance1", "dance2", "dance3"}
  728.  
  729. -- Existance in this list signifies that it is an emote, the value indicates if it is a looping emote
  730. local emoteNames = { wave = false, point = false, dance1 = true, dance2 = true, dance3 = true, laugh = false, cheer = false}
  731.  
  732. function configureAnimationSet(name, fileList)
  733. if (animTable[name] ~= nil) then
  734. for _, connection in pairs(animTable[name].connections) do
  735. connection:disconnect()
  736. end
  737. end
  738. animTable[name] = {}
  739. animTable[name].count = 0
  740. animTable[name].totalWeight = 0
  741. animTable[name].connections = {}
  742.  
  743. -- check for config values
  744. local config = script:FindFirstChild(name)
  745. if (config ~= nil) then
  746. --print("Loading anims " .. name)
  747. table.insert(animTable[name].connections, config.ChildAdded:connect(function(child) configureAnimationSet(name, fileList) end))
  748. table.insert(animTable[name].connections, config.ChildRemoved:connect(function(child) configureAnimationSet(name, fileList) end))
  749. local idx = 1
  750. for _, childPart in pairs(config:GetChildren()) do
  751. if (childPart:IsA("Animation")) then
  752. table.insert(animTable[name].connections, childPart.Changed:connect(function(property) configureAnimationSet(name, fileList) end))
  753. animTable[name][idx] = {}
  754. animTable[name][idx].anim = childPart
  755. local weightObject = childPart:FindFirstChild("Weight")
  756. if (weightObject == nil) then
  757. animTable[name][idx].weight = 1
  758. else
  759. animTable[name][idx].weight = weightObject.Value
  760. end
  761. animTable[name].count = animTable[name].count + 1
  762. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  763. --print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  764. idx = idx + 1
  765. end
  766. end
  767. end
  768.  
  769. -- fallback to defaults
  770. if (animTable[name].count <= 0) then
  771. for idx, anim in pairs(fileList) do
  772. animTable[name][idx] = {}
  773. animTable[name][idx].anim = Instance.new("Animation")
  774. animTable[name][idx].anim.Name = name
  775. animTable[name][idx].anim.AnimationId = anim.id
  776. animTable[name][idx].weight = anim.weight
  777. animTable[name].count = animTable[name].count + 1
  778. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  779. --print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  780. end
  781. end
  782. end
  783.  
  784. -- Setup animation objects
  785. function scriptChildModified(child)
  786. local fileList = animNames[child.Name]
  787. if (fileList ~= nil) then
  788. configureAnimationSet(child.Name, fileList)
  789. end
  790. end
  791.  
  792. script.ChildAdded:connect(scriptChildModified)
  793. script.ChildRemoved:connect(scriptChildModified)
  794.  
  795.  
  796. for name, fileList in pairs(animNames) do
  797. configureAnimationSet(name, fileList)
  798. end
  799.  
  800. -- ANIMATION
  801.  
  802. -- declarations
  803. local toolAnim = "None"
  804. local toolAnimTime = 0
  805.  
  806. local jumpAnimTime = 0
  807. local jumpAnimDuration = 0.3
  808.  
  809. local toolTransitionTime = 0.1
  810. local fallTransitionTime = 0.3
  811. local jumpMaxLimbVelocity = 0.75
  812.  
  813. -- functions
  814.  
  815. function stopAllAnimations()
  816. local oldAnim = currentAnim
  817.  
  818. -- return to idle if finishing an emote
  819. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  820. oldAnim = "idle"
  821. end
  822.  
  823. currentAnim = ""
  824. currentAnimInstance = nil
  825. if (currentAnimKeyframeHandler ~= nil) then
  826. currentAnimKeyframeHandler:disconnect()
  827. end
  828.  
  829. if (currentAnimTrack ~= nil) then
  830. currentAnimTrack:Stop()
  831. currentAnimTrack:Destroy()
  832. currentAnimTrack = nil
  833. end
  834. return oldAnim
  835. end
  836.  
  837. function setAnimationSpeed(speed)
  838. if speed ~= currentAnimSpeed then
  839. currentAnimSpeed = speed
  840. currentAnimTrack:AdjustSpeed(currentAnimSpeed)
  841. end
  842. end
  843.  
  844. function keyFrameReachedFunc(frameName)
  845. if (frameName == "End") then
  846.  
  847. local repeatAnim = currentAnim
  848. -- return to idle if finishing an emote
  849. if (emoteNames[repeatAnim] ~= nil and emoteNames[repeatAnim] == false) then
  850. repeatAnim = "idle"
  851. end
  852.  
  853. local animSpeed = currentAnimSpeed
  854. playAnimation(repeatAnim, 0.0, Humanoid)
  855. setAnimationSpeed(animSpeed)
  856. end
  857. end
  858.  
  859. -- Preload animations
  860. function playAnimation(animName, transitionTime, humanoid)
  861.  
  862. local roll = math.random(1, animTable[animName].totalWeight)
  863. local origRoll = roll
  864. local idx = 1
  865. while (roll > animTable[animName][idx].weight) do
  866. roll = roll - animTable[animName][idx].weight
  867. idx = idx + 1
  868. end
  869. --print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  870. local anim = animTable[animName][idx].anim
  871. -- switch animation
  872. if (anim ~= currentAnimInstance) then
  873. if (currentAnimTrack ~= nil) then
  874. currentAnimTrack:Stop(transitionTime)
  875. currentAnimTrack:Destroy()
  876. end
  877. currentAnimSpeed = 1.0
  878. -- load it to the humanoid; get AnimationTrack
  879. currentAnimTrack = humanoid:LoadAnimation(anim)
  880. -- play the animation
  881. currentAnimTrack:Play(transitionTime)
  882. currentAnim = animName
  883. currentAnimInstance = anim
  884. -- set up keyframe name triggers
  885. if (currentAnimKeyframeHandler ~= nil) then
  886. currentAnimKeyframeHandler:disconnect()
  887. end
  888. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  889. end
  890. end
  891. -------------------------------------------------------------------------------------------
  892. -------------------------------------------------------------------------------------------
  893. local toolAnimName = ""
  894. local toolAnimTrack = nil
  895. local toolAnimInstance = nil
  896. local currentToolAnimKeyframeHandler = nil
  897. function toolKeyFrameReachedFunc(frameName)
  898. if (frameName == "End") then
  899. --print("Keyframe : ".. frameName)
  900. playToolAnimation(toolAnimName, 0.0, Humanoid)
  901. end
  902. end
  903. function playToolAnimation(animName, transitionTime, humanoid)
  904. local roll = math.random(1, animTable[animName].totalWeight)
  905. local origRoll = roll
  906. local idx = 1
  907. while (roll > animTable[animName][idx].weight) do
  908. roll = roll - animTable[animName][idx].weight
  909. idx = idx + 1
  910. end
  911. --print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  912. local anim = animTable[animName][idx].anim
  913. if (toolAnimInstance ~= anim) then
  914. if (toolAnimTrack ~= nil) then
  915. toolAnimTrack:Stop()
  916. toolAnimTrack:Destroy()
  917. transitionTime = 0
  918. end
  919. -- load it to the humanoid; get AnimationTrack
  920. toolAnimTrack = humanoid:LoadAnimation(anim)
  921. -- play the animation
  922. toolAnimTrack:Play(transitionTime)
  923. toolAnimName = animName
  924. toolAnimInstance = anim
  925. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  926. end
  927. end
  928. function stopToolAnimations()
  929. local oldAnim = toolAnimName
  930. if (currentToolAnimKeyframeHandler ~= nil) then
  931. currentToolAnimKeyframeHandler:disconnect()
  932. end
  933. toolAnimName = ""
  934. toolAnimInstance = nil
  935. if (toolAnimTrack ~= nil) then
  936. toolAnimTrack:Stop()
  937. toolAnimTrack:Destroy()
  938. toolAnimTrack = nil
  939. end
  940. return oldAnim
  941. end
  942. -------------------------------------------------------------------------------------------
  943. -------------------------------------------------------------------------------------------
  944. function onRunning(speed)
  945. if speed>0.01 then
  946. playAnimation("walk", 0.1, Humanoid)
  947. if currentAnimInstance and currentAnimInstance.AnimationId == "http://www.roblox.com/asset/?id=180426354" then
  948. setAnimationSpeed(speed / 14.5)
  949. end
  950. pose = "Running"
  951. else
  952. playAnimation("idle", 0.1, Humanoid)
  953. pose = "Standing"
  954. end
  955. end
  956. function onDied()
  957. pose = "Dead"
  958. end
  959. function onJumping()
  960. playAnimation("jump", 0.1, Humanoid)
  961. jumpAnimTime = jumpAnimDuration
  962. pose = "Jumping"
  963. end
  964. function onClimbing(speed)
  965. playAnimation("climb", 0.1, Humanoid)
  966. setAnimationSpeed(speed / 12.0)
  967. pose = "Climbing"
  968. end
  969. function onGettingUp()
  970. pose = "GettingUp"
  971. end
  972. function onFreeFall()
  973. if (jumpAnimTime <= 0) then
  974. playAnimation("fall", fallTransitionTime, Humanoid)
  975. end
  976. pose = "FreeFall"
  977. end
  978. function onFallingDown()
  979. pose = "FallingDown"
  980. end
  981. function onSeated()
  982. pose = "Seated"
  983. end
  984. function onPlatformStanding()
  985. pose = "PlatformStanding"
  986. end
  987. function onSwimming(speed)
  988. if speed>0 then
  989. pose = "Running"
  990. else
  991. pose = "Standing"
  992. end
  993. end
  994.  
  995. function getTool()
  996. for _, kid in ipairs(Figure:GetChildren()) do
  997. if kid.className == "Tool" then return kid end
  998. end
  999. return nil
  1000. end
  1001.  
  1002. function getToolAnim(tool)
  1003. for _, c in ipairs(tool:GetChildren()) do
  1004. if c.Name == "toolanim" and c.className == "StringValue" then
  1005. return c
  1006. end
  1007. end
  1008. return nil
  1009. end
  1010.  
  1011. function animateTool()
  1012.  
  1013. if (toolAnim == "None") then
  1014. playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  1015. return
  1016. end
  1017.  
  1018. if (toolAnim == "Slash") then
  1019. playToolAnimation("toolslash", 0, Humanoid)
  1020. return
  1021. end
  1022.  
  1023. if (toolAnim == "Lunge") then
  1024. playToolAnimation("toollunge", 0, Humanoid)
  1025. return
  1026. end
  1027. end
  1028.  
  1029. function moveSit()
  1030. RightShoulder.MaxVelocity = 0.15
  1031. LeftShoulder.MaxVelocity = 0.15
  1032. RightShoulder:SetDesiredAngle(3.14 /2)
  1033. LeftShoulder:SetDesiredAngle(-3.14 /2)
  1034. RightHip:SetDesiredAngle(3.14 /2)
  1035. LeftHip:SetDesiredAngle(-3.14 /2)
  1036. end
  1037.  
  1038. local lastTick = 0
  1039.  
  1040. function move(time)
  1041. local amplitude = 1
  1042. local frequency = 1
  1043. local deltaTime = time - lastTick
  1044. lastTick = time
  1045.  
  1046. local climbFudge = 0
  1047. local setAngles = false
  1048.  
  1049. if (jumpAnimTime > 0) then
  1050. jumpAnimTime = jumpAnimTime - deltaTime
  1051. end
  1052.  
  1053. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  1054. playAnimation("fall", fallTransitionTime, Humanoid)
  1055. elseif (pose == "Seated") then
  1056. playAnimation("sit", 0.5, Humanoid)
  1057. return
  1058. elseif (pose == "Running") then
  1059. playAnimation("walk", 0.1, Humanoid)
  1060. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  1061. stopAllAnimations()
  1062. amplitude = 0.1
  1063. frequency = 1
  1064. setAngles = true
  1065. end
  1066. if (setAngles) then
  1067. local desiredAngle = amplitude * math.sin(time * frequency)
  1068. RightShoulder:SetDesiredAngle(desiredAngle + climbFudge)
  1069. LeftShoulder:SetDesiredAngle(desiredAngle - climbFudge)
  1070. RightHip:SetDesiredAngle(-desiredAngle)
  1071. LeftHip:SetDesiredAngle(-desiredAngle)
  1072. end
  1073. -- Tool Animation handling
  1074. local tool = getTool()
  1075. if tool and tool:FindFirstChild("Handle") then
  1076. local animStringValueObject = getToolAnim(tool)
  1077. if animStringValueObject then
  1078. toolAnim = animStringValueObject.Value
  1079. -- message recieved, delete StringValue
  1080. animStringValueObject.Parent = nil
  1081. toolAnimTime = time + .3
  1082. end
  1083. if time > toolAnimTime then
  1084. toolAnimTime = 0
  1085. toolAnim = "None"
  1086. end
  1087. animateTool()
  1088. else
  1089. stopToolAnimations()
  1090. toolAnim = "None"
  1091. toolAnimInstance = nil
  1092. toolAnimTime = 0
  1093. end
  1094. end
  1095. -- connect events
  1096. Humanoid.Died:connect(onDied)
  1097. Humanoid.Running:connect(onRunning)
  1098. Humanoid.Jumping:connect(onJumping)
  1099. Humanoid.Climbing:connect(onClimbing)
  1100. Humanoid.GettingUp:connect(onGettingUp)
  1101. Humanoid.FreeFalling:connect(onFreeFall)
  1102. Humanoid.FallingDown:connect(onFallingDown)
  1103. Humanoid.Seated:connect(onSeated)
  1104. Humanoid.PlatformStanding:connect(onPlatformStanding)
  1105. Humanoid.Swimming:connect(onSwimming)
  1106. local runService = game:GetService("RunService");
  1107. playAnimation("idle", 0.1, Humanoid)
  1108. pose = "Standing"
  1109. while Wait(0)do
  1110. local _,time=wait(0)
  1111. move(time)
  1112. end
  1113. end))
  1114. StringValue28.Name = "climb"
  1115. StringValue28.Parent = Script27
  1116. Animation29.Name = "ClimbAnim"
  1117. Animation29.Parent = StringValue28
  1118. Animation29.AnimationId = "http://www.roblox.com/asset/?id=180436334"
  1119. StringValue30.Name = "fall"
  1120. StringValue30.Parent = Script27
  1121. Animation31.Name = "FallAnim"
  1122. Animation31.Parent = StringValue30
  1123. Animation31.AnimationId = "http://www.roblox.com/asset/?id=180436148"
  1124. StringValue32.Name = "idle"
  1125. StringValue32.Parent = Script27
  1126. Animation33.Name = "Animation1"
  1127. Animation33.Parent = StringValue32
  1128. Animation33.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  1129. NumberValue34.Name = "Weight"
  1130. NumberValue34.Parent = Animation33
  1131. NumberValue34.Value = 9
  1132. Animation35.Name = "Animation2"
  1133. Animation35.Parent = StringValue32
  1134. Animation35.AnimationId = "http://www.roblox.com/asset/?id=180435792"
  1135. NumberValue36.Name = "Weight"
  1136. NumberValue36.Parent = Animation35
  1137. NumberValue36.Value = 1
  1138. StringValue37.Name = "jump"
  1139. StringValue37.Parent = Script27
  1140. Animation38.Name = "JumpAnim"
  1141. Animation38.Parent = StringValue37
  1142. Animation38.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  1143. StringValue39.Name = "run"
  1144. StringValue39.Parent = Script27
  1145. Animation40.Name = "RunAnim"
  1146. Animation40.Parent = StringValue39
  1147. Animation40.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1148. StringValue41.Name = "sit"
  1149. StringValue41.Parent = Script27
  1150. Animation42.Name = "SitAnim"
  1151. Animation42.Parent = StringValue41
  1152. Animation42.AnimationId = "http://www.roblox.com/asset/?id=178130996"
  1153. StringValue43.Name = "toolnone"
  1154. StringValue43.Parent = Script27
  1155. Animation44.Name = "ToolNoneAnim"
  1156. Animation44.Parent = StringValue43
  1157. Animation44.AnimationId = "http://www.roblox.com/asset/?id=182393478"
  1158. StringValue45.Name = "walk"
  1159. StringValue45.Parent = Script27
  1160. Animation46.Name = "WalkAnim"
  1161. Animation46.Parent = StringValue45
  1162. Animation46.AnimationId = "http://www.roblox.com/asset/?id=180426354"
  1163. Pants47.Name = "Pants"
  1164. Pants47.Parent = Model1
  1165. Pants47.PantsTemplate = "rbxassetid://36299419"
  1166. Script48.Name = "Health"
  1167. Script48.Parent = Model1
  1168. table.insert(cors,sandbox(Script48,function()
  1169. --Responsible for regening a player's humanoid's health
  1170.  
  1171. -- declarations
  1172. local Figure = script.Parent
  1173. local Head = Figure:WaitForChild("Head")
  1174. local Humanoid = Figure:WaitForChild("Humanoid")
  1175. local regening = false
  1176.  
  1177. -- regeneration
  1178. function regenHealth()
  1179. if regening then return end
  1180. regening = true
  1181.  
  1182. while Humanoid.Health < Humanoid.MaxHealth do
  1183. local s = wait(1)
  1184. local health = Humanoid.Health
  1185. if health > 0 and health < Humanoid.MaxHealth then
  1186. local newHealthDelta = 0.01 * s * Humanoid.MaxHealth
  1187. health = health + newHealthDelta
  1188. Humanoid.Health = math.min(health,Humanoid.MaxHealth)
  1189. end
  1190. end
  1191.  
  1192. if Humanoid.Health > Humanoid.MaxHealth then
  1193. Humanoid.Health = Humanoid.MaxHealth
  1194. end
  1195.  
  1196. regening = false
  1197. end
  1198.  
  1199. Humanoid.HealthChanged:connect(regenHealth)
  1200.  
  1201. end))
  1202. Script49.Name = "Respawn"
  1203. Script49.Parent = Model1
  1204. table.insert(cors,sandbox(Script49,function()
  1205. --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
  1206. local AdvancedRespawnScript=script;
  1207. local Laina=AdvancedRespawnScript.Parent;
  1208. local GameDerbis=Game:GetService("Debris");
  1209. repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model";
  1210. local LainaHumanoid;
  1211. for _,Child in pairs(Laina:GetChildren())do
  1212. if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
  1213. LainaHumanoid=Child;
  1214. end;
  1215. end;
  1216. local Respawndant=Laina:Clone();
  1217. coroutine.resume(coroutine.create(function()
  1218. if not Laina.Humanoid.Status:FindFirstChild("AvalibleSpawns")then
  1219. SpawnModel=Instance.new("Model");
  1220. SpawnModel.Parent=Laina.Humanoid.Status;
  1221. SpawnModel.Name="AvalibleSpawns";
  1222. else
  1223. SpawnModel=Laina.Humanoid.Status:FindFirstChild("AvalibleSpawns");
  1224. end;
  1225. function FindSpawn(SearchValue)
  1226. local PartsArchivable=SearchValue:GetChildren();
  1227. for AreaSearch=1,#PartsArchivable do
  1228. if PartsArchivable[AreaSearch].className=="SpawnLocation"then
  1229. local PositionValue=Instance.new("Vector3Value",SpawnModel);
  1230. PositionValue.Value=PartsArchivable[AreaSearch].Position;
  1231. PositionValue.Name=PartsArchivable[AreaSearch].Duration;
  1232. end;
  1233. FindSpawn(PartsArchivable[AreaSearch]);
  1234. end;
  1235. end;
  1236. FindSpawn(Game.Workspace);
  1237. local SpawnChilden=SpawnModel:GetChildren();
  1238. if#SpawnChilden>0 then
  1239. local SpawnItself=SpawnChilden[math.random(1,#SpawnChilden)];
  1240. local RespawningForceField=Instance.new("ForceField");
  1241. RespawningForceField.Parent=Laina;
  1242. RespawningForceField.Name="SpawnForceField";
  1243. GameDerbis:AddItem(RespawningForceField,SpawnItself.Name);
  1244. Laina:MoveTo(SpawnItself.Value+Vector3.new(0,3.5,0));
  1245. else
  1246. if Laina:FindFirstChild("SpawnForceField")then
  1247. Laina:FindFirstChild("SpawnForceField"):Destroy();
  1248. end;
  1249. Laina:MoveTo(Vector3.new(0,115,0));
  1250. end;
  1251. end));
  1252. function Respawn()
  1253. Wait(5);
  1254. Respawndant.Parent=Laina.Parent;
  1255. Respawndant:makeJoints();
  1256. Respawndant:FindFirstChild("Head"):MakeJoints();
  1257. Respawndant:FindFirstChild("Torso"):MakeJoints();
  1258. Laina:remove();
  1259. end;
  1260. LainaHumanoid.Died:connect(Respawn);
  1261. --[[ By: Brutez, 2/28/2015, 1:34 AM, (UTC-08:00) Pacific Time (US & Canada) ]]--
  1262. end))
  1263. CharacterMesh50.Name = "3.0 Female Left Arm"
  1264. CharacterMesh50.Parent = Model1
  1265. CharacterMesh50.MeshId = 83001137
  1266. CharacterMesh50.BodyPart = Enum.BodyPart.LeftArm
  1267. CharacterMesh51.Name = "3.0 Female Left Leg"
  1268. CharacterMesh51.Parent = Model1
  1269. CharacterMesh51.MeshId = 81628361
  1270. CharacterMesh51.BodyPart = Enum.BodyPart.LeftLeg
  1271. CharacterMesh52.Name = "3.0 Female Right Arm"
  1272. CharacterMesh52.Parent = Model1
  1273. CharacterMesh52.MeshId = 83001181
  1274. CharacterMesh52.BodyPart = Enum.BodyPart.RightArm
  1275. CharacterMesh53.Name = "3.0 Female Right Leg"
  1276. CharacterMesh53.Parent = Model1
  1277. CharacterMesh53.MeshId = 81628308
  1278. CharacterMesh53.BodyPart = Enum.BodyPart.RightLeg
  1279. CharacterMesh54.Name = "3.0 Female Torso"
  1280. CharacterMesh54.Parent = Model1
  1281. CharacterMesh54.MeshId = 82987757
  1282. CharacterMesh54.BodyPart = Enum.BodyPart.Torso
  1283. Hat55.Name = "LongHairHeadBand Black"
  1284. Hat55.Parent = Model1
  1285. Hat55.AttachmentForward = Vector3.new(-0, -0.0995037183, -0.995037198)
  1286. Hat55.AttachmentPos = Vector3.new(0, 0.899999976, 0)
  1287. Hat55.AttachmentUp = Vector3.new(0, 0.995037198, -0.0995037183)
  1288. Part56.Name = "Handle"
  1289. Part56.Parent = Hat55
  1290. Part56.Rotation = Vector3.new(5.71000004, 0, 0)
  1291. Part56.CanCollide = false
  1292. Part56.FormFactor = Enum.FormFactor.Plate
  1293. Part56.Size = Vector3.new(1, 2.4000001, 2)
  1294. Part56.CFrame = CFrame.new(-75.9998779, 4.10449409, 0.910446644, 1, 0, 0, 0, 0.995037198, -0.0995037183, 0, 0.0995037183, 0.995037198)
  1295. Part56.BottomSurface = Enum.SurfaceType.Smooth
  1296. Part56.TopSurface = Enum.SurfaceType.Smooth
  1297. Part56.Position = Vector3.new(-75.9998779, 4.10449409, 0.910446644)
  1298. Part56.Orientation = Vector3.new(5.71000004, 0, 0)
  1299. SpecialMesh57.Parent = Part56
  1300. SpecialMesh57.MeshId = "rbxassetid://13070796"
  1301. SpecialMesh57.TextureId = "rbxassetid://14765363"
  1302. SpecialMesh57.MeshType = Enum.MeshType.FileMesh
  1303. Script58.Name = "LainaMain"
  1304. Script58.Parent = Model1
  1305. table.insert(cors,sandbox(Script58,function()
  1306. --[[ By: Brutez. ]]--
  1307. local LainaScript=script;
  1308. repeat Wait(0)until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
  1309. local Laina=LainaScript.Parent;
  1310. local LainaHumanoid;
  1311. for _,Child in pairs(Laina:GetChildren())do
  1312. if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
  1313. LainaHumanoid=Child;
  1314. end;
  1315. end;
  1316. local LainaWeld;
  1317. local LainaBodyGyro;
  1318. RecreateThingies=function()
  1319. LainaWeld=Instance.new("Weld");
  1320. LainaWeld.Name="LainaWeld";
  1321. LainaBodyGyro=Instance.new("BodyGyro");
  1322. LainaBodyGyro.Name="LainaBodyGyro";
  1323. LainaBodyGyro.cframe=CFrame.new(Vector3.new(0,0,0),Vector3.new(0,5000000,0));
  1324. LainaBodyGyro.D=300;
  1325. LainaBodyGyro.maxTorque=Vector3.new(99999e99999,99999e99999,0);
  1326. LainaBodyGyro.P=7000;
  1327. end;
  1328. RecreateThingies();
  1329. local IsOnTop=false;
  1330. function RayCast(Position, Direction, MaxDistance, IgnoreList)
  1331. return Game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(Position, Direction.unit * (MaxDistance or 999.999)), IgnoreList)
  1332. end;
  1333. while Wait(0)do
  1334. if LainaScript and Laina and Laina:FindFirstChild("Torso") and LainaHumanoid and LainaHumanoid.Health>0.001 then
  1335. local TargetPoint=LainaHumanoid.TargetPoint;
  1336. 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})
  1337. local Jumpable=false;
  1338. if Blockage then
  1339. Jumpable=true;
  1340. if Blockage and Blockage.Parent and Blockage.Parent.ClassName~="Workspace"then
  1341. local BlockageHumanoid;
  1342. for _,Child in pairs(Blockage.Parent:GetChildren())do
  1343. if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
  1344. BlockageHumanoid=Child;
  1345. end;
  1346. end;
  1347. if Blockage and Blockage:IsA("Terrain")then
  1348. local CellPos=Blockage:WorldToCellPreferSolid((BlockagePos-Vector3.new(0,2,0)));
  1349. local CellMaterial,CellShape,CellOrientation=Blockage:GetCell(CellPos.X,CellPos.Y,CellPos.Z);
  1350. if CellMaterial==Enum.CellMaterial.Water then
  1351. Jumpable=false;
  1352. end;
  1353. elseif BlockageHumanoid or Blockage.ClassName=="TrussPart"or Blockage.ClassName=="WedgePart"then
  1354. Jumpable=false;
  1355. end;
  1356. end;
  1357. if Jumpable and LainaScript and Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and not LainaHumanoid.Sit and not IsOnTop then
  1358. LainaHumanoid.Jump=true;
  1359. end;
  1360. end;
  1361. end;
  1362. if Laina and LainaHumanoid and LainaHumanoid.Health<0.001 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")then
  1363. Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://116692982";
  1364. Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=false;
  1365. Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=true;
  1366. end;
  1367. if Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")and not IsOnTop then
  1368. Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://116690930";
  1369. Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=false;
  1370. Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=false;
  1371. elseif Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and Laina:FindFirstChild("Head") and Laina:FindFirstChild("Head"):FindFirstChild("face")and Laina:FindFirstChild("Head"):FindFirstChild("Hearts")and Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts")and IsOnTop then
  1372. Laina:FindFirstChild("Head"):FindFirstChild("face").Texture="rbxassetid://116649842";
  1373. Laina:FindFirstChild("Head"):FindFirstChild("Hearts").Enabled=true;
  1374. Laina:FindFirstChild("Head"):FindFirstChild("BrokenHearts").Enabled=false;
  1375. end;
  1376. if Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and not LainaHumanoid.AutoJumpEnabled then
  1377. LainaHumanoid.AutoJumpEnabled=true;
  1378. end;
  1379. if Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and not LainaHumanoid.AutoRotate then
  1380. LainaHumanoid.AutoRotate=true;
  1381. end;
  1382. if Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and LainaHumanoid.PlatformStand then
  1383. LainaHumanoid.PlatformStand=false;
  1384. end;
  1385. if Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and LainaHumanoid.Sit and not IsOnTop then
  1386. LainaHumanoid.Sit=false;
  1387. end;
  1388. if Laina and LainaHumanoid and LainaHumanoid.Health>0.001 then
  1389. LainaHumanoid.JumpPower=70;
  1390. LainaHumanoid.WalkSpeed=20;
  1391. end;
  1392. local JumpChance=math.random(1,300);
  1393. if Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and JumpChance==1 and not IsOnTop then
  1394. LainaHumanoid.Jump=true;
  1395. end;
  1396. local NoticeDistance=99999e99999;
  1397. for _,TargetModel in pairs(Game:GetService("Workspace"):GetChildren())do
  1398. if TargetModel and TargetModel.className=="Model"and TargetModel~=Laina and TargetModel:FindFirstChild("Torso")and TargetModel:FindFirstChild("Head")then
  1399. local TargetPart=TargetModel:FindFirstChild("Torso");
  1400. local FoundHumanoid;
  1401. for _,Child in pairs(TargetModel:GetChildren())do
  1402. if Child.ClassName=="Humanoid"then
  1403. FoundHumanoid=Child;
  1404. end;
  1405. end;
  1406. if Laina and Laina:FindFirstChild("HumanoidRootPart")and LainaHumanoid and LainaHumanoid.Health>0.001 and TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude<NoticeDistance and not IsOnTop then
  1407. NoticeDistance=(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude;
  1408. if Laina and Laina:FindFirstChild("HumanoidRootPart")and LainaHumanoid and LainaHumanoid.Health>0.001 and TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and FoundHumanoid.Jump and not IsOnTop then
  1409. LainaHumanoid.Jump=true;
  1410. end;
  1411. LainaHumanoid:MoveTo(TargetPart.Position+(TargetPart.Position-Laina:FindFirstChild("Torso").Position).unit*2,Game:GetService("Workspace"):FindFirstChild("Terrain"));
  1412. if TargetPart and FoundHumanoid and FoundHumanoid.Health>0 and(TargetPart.Position-Laina:FindFirstChild("HumanoidRootPart").Position).magnitude<5 and not IsOnTop then
  1413. IsOnTop=true;
  1414. LainaWeld.Parent=Laina:FindFirstChild("Torso");
  1415. LainaWeld.Part1=Laina:FindFirstChild("Torso");
  1416. LainaWeld.C0=CFrame.new(0,-0.1,-1.4)*CFrame.fromEulerAnglesXYZ(-0.7+math.sin(tick()*10)*0.3,math.pi,0);
  1417. LainaWeld.Part0=TargetPart;
  1418. LainaBodyGyro.Parent=TargetPart;
  1419. 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.001 and Laina and LainaHumanoid and LainaHumanoid.Health>0.001 then
  1420. if TargetModel and FoundHumanoid and FoundHumanoid.Health>0.001 and FoundHumanoid:FindFirstChild("Status")and FoundHumanoid:FindFirstChild("Status").ClassName=="Status"then
  1421. local JumpOk=LainaScript:FindFirstChild("JumpOk"):Clone();
  1422. JumpOk.Parent=TargetModel;
  1423. JumpOk.Disabled=false;
  1424. elseif TargetModel and FoundHumanoid and FoundHumanoid.Health>0.001 and FoundHumanoid:FindFirstChild("Status")and FoundHumanoid:FindFirstChild("Status").ClassName=="Model"or TargetModel and FoundHumanoid and FoundHumanoid.Health>0.001 and not FoundHumanoid:FindFirstChild("Status")then
  1425. local JumpOkNPC=LainaScript:FindFirstChild("JumpOkNPC"):Clone();
  1426. JumpOkNPC.Parent=TargetModel;
  1427. JumpOkNPC.Disabled=false;
  1428. end;
  1429. end;
  1430. coroutine.resume(coroutine.create(function()
  1431. while Wait(0)do
  1432. if TargetModel.Parent~=nil and TargetPart.Parent~=nil and FoundHumanoid.Parent~=nil and LainaWeld.Parent~=nil and LainaBodyGyro.Parent~=nil and FoundHumanoid.Health>0.001 and Laina and LainaHumanoid and LainaHumanoid.Health>0.001 then
  1433. LainaHumanoid.Sit=true;
  1434. if Laina and LainaHumanoid and LainaHumanoid.Health>0.001 and Laina:FindFirstChild("Torso")and LainaWeld then
  1435. LainaWeld.C0=CFrame.new(0,-0.1,-1.4)*CFrame.fromEulerAnglesXYZ(-0.7+math.sin(tick()*10)*0.3,math.pi,0);
  1436. end;
  1437. if TargetModel~=nil and TargetPart~=nil and FoundHumanoid~=nil and FoundHumanoid.Health>0.001 then
  1438. FoundHumanoid.Jump=false;
  1439. FoundHumanoid.Sit=true;
  1440. end;
  1441. else
  1442. IsOnTop=false;
  1443. if LainaWeld then
  1444. LainaWeld:Destroy();
  1445. end;
  1446. if LainaBodyGyro then
  1447. LainaBodyGyro:Destroy();
  1448. end;
  1449. RecreateThingies();
  1450. break
  1451. end;
  1452. end;
  1453. end));
  1454. end;
  1455. end;
  1456. end;
  1457. end;
  1458. end;
  1459. --[[ By: Brutez. ]]--
  1460. end))
  1461. LocalScript59.Name = "JumpOk"
  1462. LocalScript59.Parent = Script58
  1463. LocalScript59.Disabled = true
  1464. table.insert(cors,sandbox(LocalScript59,function()
  1465. --[[ By: Brutez. ]]--
  1466. local JumpScript=script;
  1467. repeat Wait(0);until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
  1468. local ROBLOXian=JumpScript.Parent;
  1469. local ROBLOXianHumanoid;
  1470. for _,Child in pairs(ROBLOXian:GetChildren())do
  1471. if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
  1472. ROBLOXianHumanoid=Child;
  1473. end;
  1474. end;
  1475. if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 then
  1476. ROBLOXianHumanoid.Changed:connect(function()
  1477. 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
  1478. ROBLOXianHumanoid.Jump=false;
  1479. end;
  1480. end);
  1481. end;
  1482. while Wait(0)do
  1483. 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
  1484. JumpScript.Disabled=true;
  1485. JumpScript:Destroy();
  1486. break
  1487. end;
  1488. end;
  1489. --[[ By: Brutez. ]]--
  1490. end))
  1491. Script60.Name = "JumpOkNPC"
  1492. Script60.Parent = Script58
  1493. Script60.Disabled = true
  1494. table.insert(cors,sandbox(Script60,function()
  1495. --[[ By: Brutez. ]]--
  1496. local JumpScript=script;
  1497. repeat Wait(0);until script and script.Parent and script.Parent.ClassName=="Model"and script.Parent:FindFirstChild("Head")and script.Parent:FindFirstChild("Torso");
  1498. local ROBLOXian=JumpScript.Parent;
  1499. local ROBLOXianHumanoid;
  1500. for _,Child in pairs(ROBLOXian:GetChildren())do
  1501. if Child and Child.ClassName=="Humanoid"and Child.Health>0.001 then
  1502. ROBLOXianHumanoid=Child;
  1503. end;
  1504. end;
  1505. if JumpScript and ROBLOXian and ROBLOXian.ClassName=="Model"and ROBLOXian:FindFirstChild("Head")and ROBLOXian:FindFirstChild("Torso")and ROBLOXianHumanoid and ROBLOXianHumanoid.Health>0.001 then
  1506. ROBLOXianHumanoid.Changed:connect(function()
  1507. 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
  1508. ROBLOXianHumanoid.Jump=false;
  1509. end;
  1510. end);
  1511. end;
  1512. while Wait(0)do
  1513. 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
  1514. JumpScript.Disabled=true;
  1515. JumpScript:Destroy();
  1516. break
  1517. end;
  1518. end;
  1519. --[[ By: Brutez. ]]--
  1520. end))
  1521. for i,v in pairs(mas:GetChildren()) do
  1522. v.Parent = workspace
  1523. pcall(function() v:MakeJoints() end)
  1524. end
  1525. mas:Destroy()
  1526. for i,v in pairs(cors) do
  1527. spawn(function()
  1528. pcall(v)
  1529. end)
  1530. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement