Advertisement
firebudgy

Untitled

May 27th, 2018
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 75.75 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. Script1 = Instance.new("Script")
  21. LocalScript2 = Instance.new("LocalScript")
  22. ObjectValue3 = Instance.new("ObjectValue")
  23. Shirt4 = Instance.new("Shirt")
  24. Pants5 = Instance.new("Pants")
  25. Hat6 = Instance.new("Hat")
  26. Part7 = Instance.new("Part")
  27. SpecialMesh8 = Instance.new("SpecialMesh")
  28. Part9 = Instance.new("Part")
  29. Part10 = Instance.new("Part")
  30. Weld11 = Instance.new("Weld")
  31. SpecialMesh12 = Instance.new("SpecialMesh")
  32. Sound13 = Instance.new("Sound")
  33. Sound14 = Instance.new("Sound")
  34. Script15 = Instance.new("Script")
  35. Script16 = Instance.new("Script")
  36. StringValue17 = Instance.new("StringValue")
  37. Animation18 = Instance.new("Animation")
  38. StringValue19 = Instance.new("StringValue")
  39. Animation20 = Instance.new("Animation")
  40. StringValue21 = Instance.new("StringValue")
  41. Animation22 = Instance.new("Animation")
  42. StringValue23 = Instance.new("StringValue")
  43. Animation24 = Instance.new("Animation")
  44. StringValue25 = Instance.new("StringValue")
  45. Animation26 = Instance.new("Animation")
  46. NumberValue27 = Instance.new("NumberValue")
  47. Animation28 = Instance.new("Animation")
  48. NumberValue29 = Instance.new("NumberValue")
  49. StringValue30 = Instance.new("StringValue")
  50. Animation31 = Instance.new("Animation")
  51. StringValue32 = Instance.new("StringValue")
  52. Animation33 = Instance.new("Animation")
  53. Part34 = Instance.new("Part")
  54. Motor6D35 = Instance.new("Motor6D")
  55. Humanoid36 = Instance.new("Humanoid")
  56. Part37 = Instance.new("Part")
  57. ManualWeld38 = Instance.new("ManualWeld")
  58. ManualWeld39 = Instance.new("ManualWeld")
  59. Part40 = Instance.new("Part")
  60. ManualWeld41 = Instance.new("ManualWeld")
  61. Part42 = Instance.new("Part")
  62. Weld43 = Instance.new("Weld")
  63. Part44 = Instance.new("Part")
  64. Part45 = Instance.new("Part")
  65. Weld46 = Instance.new("Weld")
  66. Weld47 = Instance.new("Weld")
  67. Motor6D48 = Instance.new("Motor6D")
  68. Motor6D49 = Instance.new("Motor6D")
  69. Motor6D50 = Instance.new("Motor6D")
  70. Part51 = Instance.new("Part")
  71. SpecialMesh52 = Instance.new("SpecialMesh")
  72. Decal53 = Instance.new("Decal")
  73. Weld54 = Instance.new("Weld")
  74. Model55 = Instance.new("Model")
  75. Script56 = Instance.new("Script")
  76. LocalScript57 = Instance.new("LocalScript")
  77. ObjectValue58 = Instance.new("ObjectValue")
  78. Shirt59 = Instance.new("Shirt")
  79. Pants60 = Instance.new("Pants")
  80. Hat61 = Instance.new("Hat")
  81. Part62 = Instance.new("Part")
  82. SpecialMesh63 = Instance.new("SpecialMesh")
  83. Hat64 = Instance.new("Hat")
  84. Part65 = Instance.new("Part")
  85. SpecialMesh66 = Instance.new("SpecialMesh")
  86. Part67 = Instance.new("Part")
  87. Part68 = Instance.new("Part")
  88. Weld69 = Instance.new("Weld")
  89. SpecialMesh70 = Instance.new("SpecialMesh")
  90. Sound71 = Instance.new("Sound")
  91. Sound72 = Instance.new("Sound")
  92. Script73 = Instance.new("Script")
  93. Script74 = Instance.new("Script")
  94. StringValue75 = Instance.new("StringValue")
  95. Animation76 = Instance.new("Animation")
  96. StringValue77 = Instance.new("StringValue")
  97. Animation78 = Instance.new("Animation")
  98. StringValue79 = Instance.new("StringValue")
  99. Animation80 = Instance.new("Animation")
  100. StringValue81 = Instance.new("StringValue")
  101. Animation82 = Instance.new("Animation")
  102. StringValue83 = Instance.new("StringValue")
  103. Animation84 = Instance.new("Animation")
  104. NumberValue85 = Instance.new("NumberValue")
  105. Animation86 = Instance.new("Animation")
  106. NumberValue87 = Instance.new("NumberValue")
  107. StringValue88 = Instance.new("StringValue")
  108. Animation89 = Instance.new("Animation")
  109. StringValue90 = Instance.new("StringValue")
  110. Animation91 = Instance.new("Animation")
  111. Part92 = Instance.new("Part")
  112. Motor6D93 = Instance.new("Motor6D")
  113. Humanoid94 = Instance.new("Humanoid")
  114. Part95 = Instance.new("Part")
  115. ManualWeld96 = Instance.new("ManualWeld")
  116. ManualWeld97 = Instance.new("ManualWeld")
  117. Part98 = Instance.new("Part")
  118. ManualWeld99 = Instance.new("ManualWeld")
  119. Part100 = Instance.new("Part")
  120. Weld101 = Instance.new("Weld")
  121. Part102 = Instance.new("Part")
  122. Part103 = Instance.new("Part")
  123. Weld104 = Instance.new("Weld")
  124. Weld105 = Instance.new("Weld")
  125. Motor6D106 = Instance.new("Motor6D")
  126. Motor6D107 = Instance.new("Motor6D")
  127. Motor6D108 = Instance.new("Motor6D")
  128. Part109 = Instance.new("Part")
  129. Decal110 = Instance.new("Decal")
  130. SpecialMesh111 = Instance.new("SpecialMesh")
  131. Weld112 = Instance.new("Weld")
  132. Weld113 = Instance.new("Weld")
  133. Model0.Name = ""
  134. Model0.Parent = mas
  135. Model0.PrimaryPart = Part51
  136. Script1.Name = "Ragdoller"
  137. Script1.Parent = Model0
  138. table.insert(cors,sandbox(Script1,function()
  139. print("Ragdoll script activated")
  140. Gibs = game.Workspace
  141.  
  142. function getKillerOfHumanoidIfStillInGame(humanoid)
  143. local tag = humanoid:findFirstChild("creator")
  144. if tag ~= nil then
  145. local killer = tag.Value
  146. if killer.Parent ~= nil then
  147. return killer
  148. end
  149. end
  150. return nil
  151. end
  152.  
  153. function OnDeath(Character)
  154. local svch = Character
  155. local hum = Character:findFirstChild("Humanoid")
  156. local getkiller = getKillerOfHumanoidIfStillInGame(hum)
  157. Character.Archivable = true
  158. local chrclone = Character:clone()
  159. Character.Archivable = false
  160.  
  161. local ch = chrclone:GetChildren()
  162. local i
  163. for i = 1,#ch do
  164. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
  165. ch[i]:remove()
  166. end
  167. end
  168. local function Scan(ch)
  169. local e
  170. for e = 1,#ch do
  171. Scan(ch[e]:GetChildren())
  172. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  173. ch[e]:remove()
  174. end
  175. end
  176. end
  177. Scan(chrclone:GetChildren())
  178.  
  179. local hum2 = chrclone:findFirstChild("Humanoid")
  180.  
  181.  
  182. if hum2 ~= nil then
  183. hum2.Name = "Humanoid2"
  184. hum2.PlatformStand = true
  185. hum2.Sit = true
  186. hum2.MaxHealth = 0
  187. hum2.Health = 0
  188. end
  189.  
  190. local ch = Character:GetChildren()
  191. local i
  192. for i = 1,#ch do
  193. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  194. ch[i]:remove()
  195. end
  196. end
  197.  
  198. wait(0.2)
  199.  
  200. local ch = Character:GetChildren()
  201. local i
  202. for i = 1,#ch do
  203. if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  204. ch[i]:remove()
  205. end
  206. end
  207. Character = chrclone
  208. local Torso = Character.Torso
  209. local movevector = Vector3.new()
  210.  
  211. if Torso then
  212. if getkiller ~= nil then
  213. if getkiller.Character ~= nil then
  214. local killtors = getkiller.Character:findFirstChild("Torso")
  215. if killtors ~= nil then
  216. movevector = CFrame.new(killtors.Position,Torso.Position).lookVector
  217. end
  218. end
  219. end
  220. local Head = Character:FindFirstChild("Head")
  221. if Head then
  222. local Neck = Instance.new("Weld")
  223. Neck.Name = "Neck"
  224. Neck.Part0 = Torso
  225. Neck.Part1 = Head
  226. Neck.C0 = CFrame.new(0, 1.5, 0)
  227. Neck.C1 = CFrame.new()
  228. Neck.Parent = Torso
  229.  
  230. local nsc = script.CamAttach:clone()
  231. nsc.CamPart.Value = hum2.Parent.Head
  232. nsc.Disabled = false
  233. nsc.Parent = svch
  234. end
  235. local Limb = Character:FindFirstChild("Right Arm")
  236. if Limb then
  237.  
  238. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  239. local Joint = Instance.new("Glue")
  240. Joint.Name = "RightShoulder"
  241. Joint.Part0 = Torso
  242. Joint.Part1 = Limb
  243. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  244. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  245. Joint.Parent = Torso
  246.  
  247. local B = Instance.new("Part")
  248. B.TopSurface = 0
  249. B.BottomSurface = 0
  250. B.formFactor = "Symmetric"
  251. B.Size = Vector3.new(1, 1, 1)
  252. B.Transparency = 1
  253. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  254. B.Parent = Character
  255. local W = Instance.new("Weld")
  256. W.Part0 = Limb
  257. W.Part1 = B
  258. W.C0 = CFrame.new(0, -0.5, 0)
  259. W.Parent = Limb
  260.  
  261. end
  262. local Limb = Character:FindFirstChild("Left Arm")
  263. if Limb then
  264.  
  265. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  266. local Joint = Instance.new("Glue")
  267. Joint.Name = "LeftShoulder"
  268. Joint.Part0 = Torso
  269. Joint.Part1 = Limb
  270. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  271. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  272. Joint.Parent = Torso
  273.  
  274. local B = Instance.new("Part")
  275. B.TopSurface = 0
  276. B.BottomSurface = 0
  277. B.formFactor = "Symmetric"
  278. B.Size = Vector3.new(1, 1, 1)
  279. B.Transparency = 1
  280. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  281. B.Parent = Character
  282. local W = Instance.new("Weld")
  283. W.Part0 = Limb
  284. W.Part1 = B
  285. W.C0 = CFrame.new(0, -0.5, 0)
  286. W.Parent = Limb
  287.  
  288. end
  289. local Limb = Character:FindFirstChild("Right Leg")
  290. if Limb then
  291.  
  292. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  293. local Joint = Instance.new("Glue")
  294. Joint.Name = "RightHip"
  295. Joint.Part0 = Torso
  296. Joint.Part1 = Limb
  297. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  298. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  299. Joint.Parent = Torso
  300.  
  301. local B = Instance.new("Part")
  302. B.TopSurface = 0
  303. B.BottomSurface = 0
  304. B.formFactor = "Symmetric"
  305. B.Size = Vector3.new(1, 1, 1)
  306. B.Transparency = 1
  307. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  308. B.Parent = Character
  309. local W = Instance.new("Weld")
  310. W.Part0 = Limb
  311. W.Part1 = B
  312. W.C0 = CFrame.new(0, -0.5, 0)
  313. W.Parent = Limb
  314.  
  315. end
  316. local Limb = Character:FindFirstChild("Left Leg")
  317. if Limb then
  318.  
  319. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  320. local Joint = Instance.new("Glue")
  321. Joint.Name = "LeftHip"
  322. Joint.Part0 = Torso
  323. Joint.Part1 = Limb
  324. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  325. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  326. Joint.Parent = Torso
  327.  
  328. local B = Instance.new("Part")
  329. B.TopSurface = 0
  330. B.BottomSurface = 0
  331. B.formFactor = "Symmetric"
  332. B.Size = Vector3.new(1, 1, 1)
  333. B.Transparency = 1
  334. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  335. B.Parent = Character
  336. local W = Instance.new("Weld")
  337. W.Part0 = Limb
  338. W.Part1 = B
  339. W.C0 = CFrame.new(0, -0.5, 0)
  340. W.Parent = Limb
  341.  
  342. end
  343. --[
  344. local Bar = Instance.new("Part")
  345. Bar.TopSurface = 0
  346. Bar.BottomSurface = 0
  347. Bar.formFactor = "Symmetric"
  348. Bar.Size = Vector3.new(1, 1, 1)
  349. Bar.Transparency = 1
  350. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  351. Bar.Parent = Character
  352. local Weld = Instance.new("Weld")
  353. Weld.Part0 = Torso
  354. Weld.Part1 = Bar
  355. Weld.C0 = CFrame.new(0, 0.5, 0)
  356. Weld.Parent = Torso
  357. --]]
  358. end
  359. Character.Parent = Gibs
  360. game.Debris:AddItem(Character, 65)
  361. if movevector ~= Vector3.new() then
  362. for i = 1,10 do
  363. wait()
  364. Torso.Velocity = movevector * 30
  365. end
  366. end
  367. end
  368.  
  369. script.Parent.Humanoid.Died:connect(function()
  370. OnDeath(script.Parent)
  371. end)
  372.  
  373.  
  374. end))
  375. LocalScript2.Name = "CamAttach"
  376. LocalScript2.Parent = Script1
  377. LocalScript2.Disabled = true
  378. table.insert(cors,sandbox(LocalScript2,function()
  379. wait()
  380. game.Workspace.CurrentCamera.CameraSubject = script.CamPart.Value
  381. end))
  382. ObjectValue3.Name = "CamPart"
  383. ObjectValue3.Parent = LocalScript2
  384. Shirt4.Name = "Blu"
  385. Shirt4.Parent = Model0
  386. Shirt4.ShirtTemplate = "http://www.roblox.com/asset/?id=28984380"
  387. Pants5.Name = "Blu1"
  388. Pants5.Parent = Model0
  389. Pants5.PantsTemplate = "http://www.roblox.com/asset?id=28984542"
  390. Hat6.Name = "BluetoothEarPiece"
  391. Hat6.Parent = Model0
  392. Hat6.AttachmentPos = Vector3.new(0.629999995, 0.300000012, 0.100000001)
  393. Part7.Name = "Handle"
  394. Part7.Parent = Hat6
  395. Part7.Rotation = Vector3.new(0, 90, 0)
  396. Part7.CanCollide = false
  397. Part7.Locked = true
  398. Part7.FormFactor = Enum.FormFactor.Symmetric
  399. Part7.Size = Vector3.new(1, 1, 1)
  400. Part7.CFrame = CFrame.new(-38.9493561, 4.70001602, 135.978348, 1.10270776e-06, -2.81836776e-11, 1, -2.32707343e-12, 1, 2.81836793e-11, -1, -2.32710444e-12, 1.10270787e-06)
  401. Part7.BottomSurface = Enum.SurfaceType.Smooth
  402. Part7.TopSurface = Enum.SurfaceType.Smooth
  403. Part7.Position = Vector3.new(-38.9493561, 4.70001602, 135.978348)
  404. Part7.Orientation = Vector3.new(0, 90, 0)
  405. SpecialMesh8.Parent = Part7
  406. SpecialMesh8.MeshId = "http://www.roblox.com/asset/?id=29760978"
  407. SpecialMesh8.TextureId = "http://www.roblox.com/asset/?id=29760984"
  408. SpecialMesh8.MeshType = Enum.MeshType.FileMesh
  409. Part9.Name = "Handle"
  410. Part9.Parent = Model0
  411. Part9.BrickColor = BrickColor.new("Bright yellow")
  412. Part9.Transparency = 1
  413. Part9.Rotation = Vector3.new(180, -5, 180)
  414. Part9.CanCollide = false
  415. Part9.FormFactor = Enum.FormFactor.Symmetric
  416. Part9.Size = Vector3.new(2, 1, 1)
  417. Part9.CFrame = CFrame.new(-40.4308014, 3.60001612, 134.48288, -0.996194839, -1.19076873e-08, -0.0871546417, -1.19527543e-08, 1, -4.77458784e-12, 0.0871546417, 1.0369815e-09, -0.996194839)
  418. Part9.RightSurface = Enum.SurfaceType.Hinge
  419. Part9.Color = Color3.new(0.960784, 0.803922, 0.188235)
  420. Part9.Position = Vector3.new(-40.4308014, 3.60001612, 134.48288)
  421. Part9.Orientation = Vector3.new(0, -175, 0)
  422. Part9.Color = Color3.new(0.960784, 0.803922, 0.188235)
  423. Part10.Parent = Part9
  424. Part10.BrickColor = BrickColor.new("Dark stone grey")
  425. Part10.Rotation = Vector3.new(-90, 0, 95)
  426. Part10.CanCollide = false
  427. Part10.FormFactor = Enum.FormFactor.Custom
  428. Part10.Size = Vector3.new(0.200000003, 0.799999595, 1)
  429. Part10.CFrame = CFrame.new(-40.8780441, 3.720016, 134.744141, -0.0871543512, -0.996194839, -1.10677654e-08, -1.07280662e-09, -1.19510641e-08, 1, -0.996194839, 0.0871544555, -4.87124785e-11)
  430. Part10.BackSurface = Enum.SurfaceType.Weld
  431. Part10.BottomSurface = Enum.SurfaceType.Weld
  432. Part10.FrontSurface = Enum.SurfaceType.Weld
  433. Part10.LeftSurface = Enum.SurfaceType.Weld
  434. Part10.RightSurface = Enum.SurfaceType.Weld
  435. Part10.TopSurface = Enum.SurfaceType.Weld
  436. Part10.Color = Color3.new(0.388235, 0.372549, 0.384314)
  437. Part10.Position = Vector3.new(-40.8780441, 3.720016, 134.744141)
  438. Part10.Orientation = Vector3.new(-90, 95, 0)
  439. Part10.Color = Color3.new(0.388235, 0.372549, 0.384314)
  440. Weld11.Parent = Part10
  441. Weld11.C0 = CFrame.new(28.2336063, 5.29926586, -3.78005195, 0.087155439, -1.06803189e-09, 0.99619472, 0.99619472, -1.19231904e-08, -0.0871555433, 1.10395817e-08, 1, 4.63730443e-11)
  442. Weld11.C1 = CFrame.new(5.76756954, -3.66005206, 28.0123272, 0.99619472, -1.19248806e-08, -0.087155737, 1.18795027e-08, 1, -1.03932174e-09, 0.087155737, 0, 0.99619472)
  443. Weld11.Part0 = Part10
  444. Weld11.Part1 = Part9
  445. SpecialMesh12.Parent = Part10
  446. SpecialMesh12.MeshId = "http://www.roblox.com/asset/?id=72012671"
  447. SpecialMesh12.Scale = Vector3.new(1, 1.29999995, 1.29999995)
  448. SpecialMesh12.TextureId = "http://www.roblox.com/asset/?id=168091402"
  449. SpecialMesh12.VertexColor = Vector3.new(0.899999976, 0.899999976, 1)
  450. SpecialMesh12.MeshType = Enum.MeshType.FileMesh
  451. SpecialMesh12.Scale = Vector3.new(1, 1.29999995, 1.29999995)
  452. Sound13.Name = "Fire"
  453. Sound13.Parent = Part9
  454. Sound13.SoundId = "http://roblox.com/asset/?id=10209859"
  455. Sound13.Volume = 1
  456. Sound14.Name = "Reload"
  457. Sound14.Parent = Part9
  458. Sound14.SoundId = "http://www.roblox.com/asset/?id=2691591"
  459. Sound14.Volume = 1
  460. Script15.Name = "Control"
  461. Script15.Parent = Model0
  462. table.insert(cors,sandbox(Script15,function()
  463. wait(.1)
  464. local ammo=3
  465. local w=.14
  466. local r=false
  467. local t=script.Parent
  468. Spawn(function()
  469. local c=t:Clone()
  470. wait(1)
  471. t.Humanoid.Died:wait()
  472. wait(65)
  473. c.Parent=workspace
  474. c:MakeJoints()
  475. t:Destroy()
  476. end)
  477. local cf={CFrame.new(.8,.5,.4)*CFrame.Angles(math.rad(270),math.rad(40),0),CFrame.new(-1.2,0.5,0.4)*CFrame.Angles(math.rad(270),math.rad(-5),0)}
  478. local c=LoadLibrary'RbxUtility'.Create
  479. local b1=c'Part'{TopSurface=0;BottomSurface=0;Anchored=true;CanCollide=false;BrickColor=BrickColor.new("Cool yellow");Size=Vector3.new(.2,.2,1);c'SpecialMesh'{MeshType=6;Scale=Vector3.new(.2,.2,1)}};Transparency=.5
  480. local b2=b1:Clone()
  481. b1.Name,b2.Name='1','2'
  482. local mov=c'Part'{Transparency=1;CanCollide=false;Parent=t;Anchored=true}
  483. local h=t:WaitForChild'Handle'
  484. local function reload(boo)
  485. if(boo and ammo~=30)or ammo==0 then
  486. r=true
  487. if w then
  488. w=.03
  489. end
  490. h.Reload:Play()
  491. wait(3)
  492. ammo=30
  493. if w then
  494. w=.14
  495. end
  496. r=false
  497. elseif boo then
  498. wait(.1)
  499. end
  500. end
  501. local function near()
  502. local dis,pl=300,nil
  503. for _,v in ipairs(game.Players:GetPlayers())do
  504. if v.Character and v.Character:FindFirstChild'Humanoid'and v:DistanceFromCharacter(h.Position)<dis then
  505. dis,pl=v:DistanceFromCharacter(h.Position),v
  506. end
  507. end
  508. if pl then
  509. return pl.Character:GetModelCFrame(),dis,CFrame.new(pl.Character.Humanoid.WalkToPoint).lookVector
  510. else
  511. return nil
  512. end
  513. end
  514. Spawn(function()
  515. while true do
  516. t.Humanoid.Jump=true
  517. while not w do wait(.1)end
  518. for i=1,math.random(4,9)do
  519. wait(w)
  520. end
  521. end
  522. end)
  523. Spawn(function()
  524. while wait(math.random(2,7)/10)do
  525. local n=near()
  526. if n and math.random(1,3)==2 or not n then
  527. mov.CFrame=t.Torso.CFrame+t.Torso.CFrame.lookVector*Vector3.new(math.random(-25,25),0,math.random(-25,25))
  528. else
  529. mov.CFrame=n+Vector3.new((math.random(1,2)==1 and 1 or -1)*math.random(25,50),0,(math.random(1,2)==1 and 1 or -1)*math.random(25,50))
  530. end
  531. wait(.1)
  532. t.Humanoid:MoveTo(mov.Position,mov)
  533. end
  534. end)
  535. while true do
  536. local n,mag,hum=near()
  537. if n then
  538. n=n.p
  539. if not r then
  540. w=.14
  541. local dir=h.Position-n
  542. local tst,_=workspace:FindPartOnRay(Ray.new(t.Torso.Position,(n-t.Torso.Position).Unit*999),t)
  543. local aim=n+Vector3.new(math.random(-mag*.015,mag*.015),math.random(-mag*.015,mag*.015),math.random(-mag*.015,mag*.015))*(2+math.random())+hum
  544. if tst and tst.Parent and game.Players:GetPlayerFromCharacter(tst.Parent)then
  545. wait(.08)
  546. h.Fire:Play()
  547. local par,pos=workspace:FindPartOnRay(Ray.new(h.Position,(aim-h.Position).Unit*999),t)
  548. if par then
  549. local h=par.Parent:FindFirstChild'Humanoid'or par.Parent.Parent:FindFirstChild'Humanoid'
  550. if h and h.Health-10>0 then
  551. h.Health=h.Health-10
  552. elseif h then
  553. h.Health=0
  554. h.Parent:BreakJoints()
  555. end
  556. end
  557. ammo=ammo-1
  558. mag=(h.Position-pos).magnitude
  559. b1.Parent,b2.Parent=t,t
  560. b1.CFrame,b2.CFrame=CFrame.new(h.Position:Lerp(pos,.375),pos),CFrame.new(pos:Lerp(h.Position,.125),h.Position)
  561. b1.Mesh.Scale,b2.Mesh.Scale=Vector3.new(.2,.2,mag*.75),Vector3.new(.2,.2,mag/4)
  562. Delay(.03,function()b1.Parent=nil wait(.03)b2.Parent=nil end)
  563. end
  564. wait(.05)
  565. if ammo==0 then
  566. reload()
  567. end
  568. end
  569. else
  570. reload(true)
  571. w=false
  572. end
  573. end
  574.  
  575. end))
  576. Script16.Name = "Animate"
  577. Script16.Parent = Model0
  578. table.insert(cors,sandbox(Script16,function()
  579. wait(5)
  580. function waitForChild(parent, childName)
  581. local child = parent:findFirstChild(childName)
  582. if child then return child end
  583. while true do
  584. child = parent.ChildAdded:wait()
  585. if child.Name==childName then return child end
  586. end
  587. end
  588.  
  589. local Figure = script.Parent
  590. local Torso = waitForChild(Figure, "Torso")
  591. local RightHip = waitForChild(Torso, "Right Hip")
  592. local LeftHip = waitForChild(Torso, "Left Hip")
  593. local Neck = waitForChild(Torso, "Neck")
  594. local Humanoid = waitForChild(Figure, "Humanoid")
  595. local pose = "Standing"
  596.  
  597. local currentAnim = ""
  598. local currentAnimTrack = nil
  599. local currentAnimKeyframeHandler = nil
  600. local oldAnimTrack = nil
  601. local animTable = {}
  602. local animNames = {
  603. idle = {
  604. { id = "http://www.roblox.com/asset/?id=125750544", weight = 9 },
  605. { id = "http://www.roblox.com/asset/?id=125750618", weight = 1 }
  606. },
  607. walk = {
  608. { id = "http://www.roblox.com/asset/?id=125749145", weight = 10 }
  609. },
  610. run = {
  611. { id = "run.xml", weight = 10 }
  612. },
  613. jump = {
  614. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  615. },
  616. fall = {
  617. { id = "http://www.roblox.com/asset/?id=125750759", weight = 10 }
  618. },
  619. climb = {
  620. { id = "http://www.roblox.com/asset/?id=125750800", weight = 10 }
  621. },
  622. toolnone = {
  623. { id = "http://www.roblox.com/asset/?id=125750867", weight = 10 }
  624. },
  625. toolslash = {
  626. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  627. -- { id = "slash.xml", weight = 10 }
  628. },
  629. toollunge = {
  630. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  631. },
  632. wave = {
  633. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  634. },
  635. point = {
  636. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  637. },
  638. dance = {
  639. { id = "http://www.roblox.com/asset/?id=130018893", weight = 10 },
  640. { id = "http://www.roblox.com/asset/?id=132546839", weight = 10 },
  641. { id = "http://www.roblox.com/asset/?id=132546884", weight = 10 }
  642. },
  643. laugh = {
  644. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  645. },
  646. cheer = {
  647. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  648. },
  649. }
  650.  
  651. -- Existance in this list signifies that it is an emote, the value indicates If it is a looping emote
  652. local emoteNames = { wave = false, point = false, dance = true, laugh = false, cheer = false}
  653.  
  654. math.randomseed(tick())
  655.  
  656. -- Setup animation objects
  657. for name, fileList in pairs(animNames) do
  658. animTable[name] = {}
  659. animTable[name].count = 0
  660. animTable[name].totalWeight = 0
  661.  
  662. -- check for config values
  663. local config = script:FindFirstChild(name)
  664. if (config ~= nil) then
  665. -- print("Loading anims " .. name)
  666. local idx = 1
  667. for _, childPart in pairs(config:GetChildren()) do
  668. animTable[name][idx] = {}
  669. animTable[name][idx].anim = childPart
  670. local weightObject = childPart:FindFirstChild("Weight")
  671. if (weightObject == nil) then
  672. animTable[name][idx].weight = 1
  673. else
  674. animTable[name][idx].weight = weightObject.Value
  675. end
  676. animTable[name].count = animTable[name].count + 1
  677. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  678. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  679. idx = idx + 1
  680. end
  681. end
  682.  
  683. -- fallback to defaults
  684. if (animTable[name].count <= 0) then
  685. for idx, anim in pairs(fileList) do
  686. animTable[name][idx] = {}
  687. animTable[name][idx].anim = Instance.new("Animation")
  688. animTable[name][idx].anim.Name = name
  689. animTable[name][idx].anim.AnimationId = anim.id
  690. animTable[name][idx].weight = anim.weight
  691. animTable[name].count = animTable[name].count + 1
  692. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  693. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  694. end
  695. end
  696. end
  697.  
  698. -- ANIMATION
  699.  
  700. -- declarations
  701. local toolAnim = "None"
  702. local toolAnimTime = 0
  703.  
  704. local jumpAnimTime = 0
  705. local jumpAnimDuration = 0.175
  706.  
  707. local toolTransitionTime = 0.1
  708. local fallTransitionTime = 0.2
  709. local jumpMaxLimbVelocity = 0.75
  710.  
  711. -- functions
  712.  
  713. function stopAllAnimations()
  714. local oldAnim = currentAnim
  715.  
  716. -- return to idle If finishing an emote
  717. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  718. oldAnim = "idle"
  719. end
  720.  
  721. currentAnim = ""
  722. if (currentAnimKeyframeHandler ~= nil) then
  723. currentAnimKeyframeHandler:disconnect()
  724. end
  725.  
  726. if (oldAnimTrack ~= nil) then
  727. oldAnimTrack:Stop()
  728. oldAnimTrack:Destroy()
  729. oldAnimTrack = nil
  730. end
  731. if (currentAnimTrack ~= nil) then
  732. currentAnimTrack:Stop()
  733. currentAnimTrack:Destroy()
  734. currentAnimTrack = nil
  735. end
  736. return oldAnim
  737. end
  738.  
  739. function keyFrameReachedFunc(frameName)
  740. if (frameName == "End") then
  741. -- print("Keyframe : ".. frameName)
  742. local repeatAnim = stopAllAnimations()
  743. playAnimation(repeatAnim, 0.0, Humanoid)
  744. end
  745. end
  746.  
  747. -- Preload animations
  748. function playAnimation(animName, transitionTime, humanoid)
  749. if (animName ~= currentAnim) then
  750.  
  751. if (oldAnimTrack ~= nil) then
  752. oldAnimTrack:Stop()
  753. oldAnimTrack:Destroy()
  754. end
  755.  
  756. local roll = math.random(1, animTable[animName].totalWeight)
  757. local origRoll = roll
  758. local idx = 1
  759. while (roll > animTable[animName][idx].weight) do
  760. roll = roll - animTable[animName][idx].weight
  761. idx = idx + 1
  762. end
  763. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  764. local anim = animTable[animName][idx].anim
  765.  
  766. -- load it to the humanoid; get AnimationTrack
  767. oldAnimTrack = currentAnimTrack
  768. currentAnimTrack = humanoid:LoadAnimation(anim)
  769.  
  770. -- play the animation
  771. currentAnimTrack:Play(transitionTime)
  772. currentAnim = animName
  773.  
  774. -- set up keyframe name triggers
  775. if (currentAnimKeyframeHandler ~= nil) then
  776. currentAnimKeyframeHandler:disconnect()
  777. end
  778. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  779. end
  780. end
  781.  
  782. -------------------------------------------------------------------------------------------
  783. -------------------------------------------------------------------------------------------
  784.  
  785. local toolAnimName = ""
  786. local toolOldAnimTrack = nil
  787. local toolAnimTrack = nil
  788. local currentToolAnimKeyframeHandler = nil
  789.  
  790. function toolKeyFrameReachedFunc(frameName)
  791. if (frameName == "End") then
  792. -- print("Keyframe : ".. frameName)
  793. local repeatAnim = stopToolAnimations()
  794. playToolAnimation(repeatAnim, 0.0, Humanoid)
  795. end
  796. end
  797.  
  798.  
  799. function playToolAnimation(animName, transitionTime, humanoid)
  800. if (animName ~= toolAnimName) then
  801.  
  802. if (toolAnimTrack ~= nil) then
  803. toolAnimTrack:Stop()
  804. toolAnimTrack:Destroy()
  805. transitionTime = 0
  806. end
  807.  
  808. local roll = math.random(1, animTable[animName].totalWeight)
  809. local origRoll = roll
  810. local idx = 1
  811. while (roll > animTable[animName][idx].weight) do
  812. roll = roll - animTable[animName][idx].weight
  813. idx = idx + 1
  814. end
  815. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  816. local anim = animTable[animName][idx].anim
  817.  
  818. -- load it to the humanoid; get AnimationTrack
  819. toolOldAnimTrack = toolAnimTrack
  820. toolAnimTrack = humanoid:LoadAnimation(anim)
  821.  
  822. -- play the animation
  823. toolAnimTrack:Play(transitionTime)
  824. toolAnimName = animName
  825.  
  826. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  827. end
  828. end
  829.  
  830. function stopToolAnimations()
  831. local oldAnim = toolAnimName
  832.  
  833. if (currentToolAnimKeyframeHandler ~= nil) then
  834. currentToolAnimKeyframeHandler:disconnect()
  835. end
  836.  
  837. toolAnimName = ""
  838. if (toolAnimTrack ~= nil) then
  839. toolAnimTrack:Stop()
  840. toolAnimTrack:Destroy()
  841. toolAnimTrack = nil
  842. end
  843.  
  844.  
  845. return oldAnim
  846. end
  847.  
  848. -------------------------------------------------------------------------------------------
  849. -------------------------------------------------------------------------------------------
  850.  
  851.  
  852. function onRunning(speed)
  853. if speed>0 then
  854. playAnimation("walk", 0.1, Humanoid)
  855. pose = "Running"
  856. else
  857. playAnimation("idle", 0.1, Humanoid)
  858. pose = "Standing"
  859. end
  860. end
  861.  
  862. function onDied()
  863. pose = "Dead"
  864. end
  865.  
  866. function onJumping()
  867. playAnimation("jump", 0.1, Humanoid)
  868. jumpAnimTime = jumpAnimDuration
  869. pose = "Jumping"
  870. end
  871.  
  872. function onClimbing()
  873. playAnimation("climb", 0.1, Humanoid)
  874. pose = "Climbing"
  875. end
  876.  
  877. function onGettingUp()
  878. pose = "GettingUp"
  879. end
  880.  
  881. function onFreeFall()
  882. if (jumpAnimTime <= 0) then
  883. playAnimation("fall", fallTransitionTime, Humanoid)
  884. end
  885. pose = "FreeFall"
  886. end
  887.  
  888. function onFallingDown()
  889. pose = "FallingDown"
  890. end
  891.  
  892. function onSeated()
  893. pose = "Seated"
  894. end
  895.  
  896. function onPlatformStanding()
  897. pose = "PlatformStanding"
  898. end
  899.  
  900. function onSwimming(speed)
  901. if speed>0 then
  902. pose = "Running"
  903. else
  904. pose = "Standing"
  905. end
  906. end
  907.  
  908. function getTool()
  909. for _, kid in ipairs(Figure:GetChildren()) do
  910. if kid.className == "Tool" then return kid end
  911. end
  912. return nil
  913. end
  914.  
  915. function getToolAnim(tool)
  916. for _, c in ipairs(tool:GetChildren()) do
  917. if c.Name == "toolanim" and c.className == "StringValue" then
  918. return c
  919. end
  920. end
  921. return nil
  922. end
  923.  
  924. function animateTool()
  925.  
  926. if (toolAnim == "None") then
  927. playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  928. return
  929. end
  930.  
  931. if (toolAnim == "Slash") then
  932. playToolAnimation("toolslash", 0, Humanoid)
  933. return
  934. end
  935.  
  936. if (toolAnim == "Lunge") then
  937. playToolAnimation("toollunge", 0, Humanoid)
  938. return
  939. end
  940. end
  941.  
  942. function moveSit()
  943. RightHip:SetDesiredAngle(3.14 /2)
  944. LeftHip:SetDesiredAngle(-3.14 /2)
  945. end
  946.  
  947. local lastTick = 0
  948.  
  949. function move(time)
  950. local amplitude = 1
  951. local frequency = 1
  952. local deltaTime = time - lastTick
  953. lastTick = time
  954.  
  955. local climbFudge = 0
  956. local setAngles = false
  957.  
  958. if (jumpAnimTime > 0) then
  959. jumpAnimTime = jumpAnimTime - deltaTime
  960. end
  961.  
  962. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  963. playAnimation("fall", fallTransitionTime, Humanoid)
  964. elseif (pose == "Seated") then
  965. stopAllAnimations()
  966. moveSit()
  967. return
  968. elseif (pose == "Running") then
  969. playAnimation("walk", 0.1, Humanoid)
  970. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  971. -- print("Wha " .. pose)
  972. amplitude = 0.1
  973. frequency = 1
  974. setAngles = true
  975. end
  976.  
  977. if (setAngles) then
  978. desiredAngle = amplitude * math.sin(time * frequency)
  979.  
  980. RightHip:SetDesiredAngle(-desiredAngle)
  981. LeftHip:SetDesiredAngle(-desiredAngle)
  982. end
  983.  
  984. -- Tool Animation handling
  985. local tool = getTool()
  986. if tool then
  987.  
  988. animStringValueObject = getToolAnim(tool)
  989.  
  990. if animStringValueObject then
  991. toolAnim = animStringValueObject.Value
  992. -- message recieved, delete StringValue
  993. animStringValueObject.Parent = nil
  994. toolAnimTime = time + .3
  995. end
  996.  
  997. if time > toolAnimTime then
  998. toolAnimTime = 0
  999. toolAnim = "None"
  1000. end
  1001.  
  1002. animateTool()
  1003. else
  1004. stopToolAnimations()
  1005. toolAnim = "None"
  1006. toolAnimTime = 0
  1007. end
  1008. end
  1009.  
  1010. -- connect events
  1011. Humanoid.Died:connect(onDied)
  1012. Humanoid.Running:connect(onRunning)
  1013. Humanoid.Jumping:connect(onJumping)
  1014. Humanoid.Climbing:connect(onClimbing)
  1015. Humanoid.GettingUp:connect(onGettingUp)
  1016. Humanoid.FreeFalling:connect(onFreeFall)
  1017. Humanoid.FallingDown:connect(onFallingDown)
  1018. Humanoid.Seated:connect(onSeated)
  1019. Humanoid.PlatformStanding:connect(onPlatformStanding)
  1020. Humanoid.Swimming:connect(onSwimming)
  1021. -- main program
  1022.  
  1023. local runService = game:service("RunService");
  1024.  
  1025. -- initialize to idle
  1026. playAnimation("idle", 0.1, Humanoid)
  1027. pose = "Standing"
  1028.  
  1029. while Figure.Parent~=nil do
  1030. local _, time = wait(0.1)
  1031. move(time)
  1032. end
  1033.  
  1034. end))
  1035. StringValue17.Name = "walk"
  1036. StringValue17.Parent = Script16
  1037. Animation18.Name = "WalkAnim"
  1038. Animation18.Parent = StringValue17
  1039. Animation18.AnimationId = "http://www.roblox.com/asset/?id=125749145"
  1040. StringValue19.Name = "toolnone"
  1041. StringValue19.Parent = Script16
  1042. Animation20.Name = "ToolNoneAnim"
  1043. Animation20.Parent = StringValue19
  1044. Animation20.AnimationId = "http://www.roblox.com/asset/?id=125750867"
  1045. StringValue21.Name = "run"
  1046. StringValue21.Parent = Script16
  1047. Animation22.Name = "RunAnim"
  1048. Animation22.Parent = StringValue21
  1049. Animation22.AnimationId = "http://www.roblox.com/asset/?id=125749145"
  1050. StringValue23.Name = "jump"
  1051. StringValue23.Parent = Script16
  1052. Animation24.Name = "JumpAnim"
  1053. Animation24.Parent = StringValue23
  1054. Animation24.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  1055. StringValue25.Name = "idle"
  1056. StringValue25.Parent = Script16
  1057. Animation26.Name = "Animation2"
  1058. Animation26.Parent = StringValue25
  1059. Animation26.AnimationId = "http://www.roblox.com/asset/?id=125750618"
  1060. NumberValue27.Name = "Weight"
  1061. NumberValue27.Parent = Animation26
  1062. NumberValue27.Value = 1
  1063. Animation28.Name = "Animation1"
  1064. Animation28.Parent = StringValue25
  1065. Animation28.AnimationId = "http://www.roblox.com/asset/?id=125750544"
  1066. NumberValue29.Name = "Weight"
  1067. NumberValue29.Parent = Animation28
  1068. NumberValue29.Value = 9
  1069. StringValue30.Name = "fall"
  1070. StringValue30.Parent = Script16
  1071. Animation31.Name = "FallAnim"
  1072. Animation31.Parent = StringValue30
  1073. Animation31.AnimationId = "http://www.roblox.com/asset/?id=125750759"
  1074. StringValue32.Name = "climb"
  1075. StringValue32.Parent = Script16
  1076. Animation33.Name = "ClimbAnim"
  1077. Animation33.Parent = StringValue32
  1078. Animation33.AnimationId = "http://www.roblox.com/asset/?id=125750800"
  1079. Part34.Name = "HumanoidRootPart"
  1080. Part34.Parent = Model0
  1081. Part34.BrickColor = BrickColor.new("Bright yellow")
  1082. Part34.Transparency = 1
  1083. Part34.Rotation = Vector3.new(0, 90, 0)
  1084. Part34.FormFactor = Enum.FormFactor.Symmetric
  1085. Part34.Size = Vector3.new(2, 2, 1)
  1086. Part34.CFrame = CFrame.new(-38.8493538, 3.00001597, 135.348343, 1.10270776e-06, -2.81836776e-11, 1, -2.32707343e-12, 1, 2.81836793e-11, -1, -2.32710444e-12, 1.10270787e-06)
  1087. Part34.BottomSurface = Enum.SurfaceType.Smooth
  1088. Part34.TopSurface = Enum.SurfaceType.Smooth
  1089. Part34.Color = Color3.new(0.960784, 0.803922, 0.188235)
  1090. Part34.Position = Vector3.new(-38.8493538, 3.00001597, 135.348343)
  1091. Part34.Orientation = Vector3.new(0, 90, 0)
  1092. Part34.Color = Color3.new(0.960784, 0.803922, 0.188235)
  1093. Motor6D35.Name = "RootJoint"
  1094. Motor6D35.Parent = Part34
  1095. Motor6D35.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  1096. Motor6D35.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  1097. Motor6D35.Part0 = Part34
  1098. Motor6D35.Part1 = Part45
  1099. Motor6D35.MaxVelocity = 0.10000000149012
  1100. Humanoid36.Parent = Model0
  1101. Humanoid36.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  1102. Humanoid36.RightLeg = Part37
  1103. Humanoid36.LeftLeg = Part40
  1104. Humanoid36.Torso = Part34
  1105. Humanoid36.WalkSpeed = 8
  1106. Part37.Name = "Right Leg"
  1107. Part37.Parent = Model0
  1108. Part37.BrickColor = BrickColor.new("Pastel brown")
  1109. Part37.Rotation = Vector3.new(0, 90, 0)
  1110. Part37.CanCollide = false
  1111. Part37.FormFactor = Enum.FormFactor.Symmetric
  1112. Part37.Size = Vector3.new(1, 2, 1)
  1113. Part37.CFrame = CFrame.new(-38.8493538, 1.00001597, 134.848343, 1.10270776e-06, -2.81836776e-11, 1, -2.32707343e-12, 1, 2.81836793e-11, -1, -2.32710444e-12, 1.10270787e-06)
  1114. Part37.BottomSurface = Enum.SurfaceType.Smooth
  1115. Part37.Color = Color3.new(1, 0.8, 0.6)
  1116. Part37.Position = Vector3.new(-38.8493538, 1.00001597, 134.848343)
  1117. Part37.Orientation = Vector3.new(0, 90, 0)
  1118. Part37.Color = Color3.new(1, 0.8, 0.6)
  1119. ManualWeld38.Name = "Right Leg Terrain Joint"
  1120. ManualWeld38.Parent = Part37
  1121. ManualWeld38.C1 = CFrame.new(48.1884766, -1.0000329, -34.9884872, -1.23466252e-17, 0, 1, 0, 1, 0, -1, 0, 1.23466252e-17)
  1122. ManualWeld38.Part1 = Part37
  1123. ManualWeld39.Name = "Right Leg Terrain Joint"
  1124. ManualWeld39.Parent = Part37
  1125. ManualWeld39.C1 = CFrame.new(48.1884766, -1.0000329, -34.9884872, -1.23466252e-17, 0, 1, 0, 1, 0, -1, 0, 1.23466252e-17)
  1126. ManualWeld39.Part1 = Part37
  1127. Part40.Name = "Left Leg"
  1128. Part40.Parent = Model0
  1129. Part40.BrickColor = BrickColor.new("Pastel brown")
  1130. Part40.Rotation = Vector3.new(0, 90, 0)
  1131. Part40.CanCollide = false
  1132. Part40.FormFactor = Enum.FormFactor.Symmetric
  1133. Part40.Size = Vector3.new(1, 2, 1)
  1134. Part40.CFrame = CFrame.new(-38.8493538, 1.00001597, 135.848343, 1.10270776e-06, -2.81836776e-11, 1, -2.32707343e-12, 1, 2.81836793e-11, -1, -2.32710444e-12, 1.10270787e-06)
  1135. Part40.BottomSurface = Enum.SurfaceType.Smooth
  1136. Part40.Color = Color3.new(1, 0.8, 0.6)
  1137. Part40.Position = Vector3.new(-38.8493538, 1.00001597, 135.848343)
  1138. Part40.Orientation = Vector3.new(0, 90, 0)
  1139. Part40.Color = Color3.new(1, 0.8, 0.6)
  1140. ManualWeld41.Name = "Left Leg Terrain Joint"
  1141. ManualWeld41.Parent = Part40
  1142. ManualWeld41.C1 = CFrame.new(49.1884766, -1.0000329, -34.9884872, -1.23466252e-17, 0, 1, 0, 1, 0, -1, 0, 1.23466252e-17)
  1143. ManualWeld41.Part1 = Part40
  1144. Part42.Name = "Right Arm"
  1145. Part42.Parent = Model0
  1146. Part42.BrickColor = BrickColor.new("Pastel brown")
  1147. Part42.Rotation = Vector3.new(90, 0, -95)
  1148. Part42.CanCollide = false
  1149. Part42.FormFactor = Enum.FormFactor.Symmetric
  1150. Part42.Size = Vector3.new(1, 2, 1)
  1151. Part42.CFrame = CFrame.new(-39.4520378, 3.40001607, 134.196487, -0.0871546417, 0.996194839, 1.19076873e-08, -4.77458784e-12, 1.19527543e-08, -1, -0.996194839, -0.0871546417, -1.0369815e-09)
  1152. Part42.Color = Color3.new(1, 0.8, 0.6)
  1153. Part42.Position = Vector3.new(-39.4520378, 3.40001607, 134.196487)
  1154. Part42.Orientation = Vector3.new(90, 95, 0)
  1155. Part42.Color = Color3.new(1, 0.8, 0.6)
  1156. Weld43.Name = "RightGrip"
  1157. Weld43.Parent = Part42
  1158. Weld43.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  1159. Weld43.C1 = CFrame.new(0, -0.200000003, 0.200000003, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1160. Weld43.Part0 = Part42
  1161. Weld43.Part1 = Part9
  1162. Part44.Name = "Left Arm"
  1163. Part44.Parent = Model0
  1164. Part44.BrickColor = BrickColor.new("Pastel brown")
  1165. Part44.Rotation = Vector3.new(90, 0, -50)
  1166. Part44.CanCollide = false
  1167. Part44.FormFactor = Enum.FormFactor.Symmetric
  1168. Part44.Size = Vector3.new(1, 2, 1)
  1169. Part44.CFrame = CFrame.new(-39.7466049, 3.40001607, 135.639786, 0.64278841, 0.766043723, 9.16316356e-09, 1.6333478e-11, 1.19479662e-08, -1, -0.766043723, 0.64278841, 7.66750219e-09)
  1170. Part44.Color = Color3.new(1, 0.8, 0.6)
  1171. Part44.Position = Vector3.new(-39.7466049, 3.40001607, 135.639786)
  1172. Part44.Orientation = Vector3.new(90, 50, 0)
  1173. Part44.Color = Color3.new(1, 0.8, 0.6)
  1174. Part45.Name = "Torso"
  1175. Part45.Parent = Model0
  1176. Part45.BrickColor = BrickColor.new("Pastel brown")
  1177. Part45.Rotation = Vector3.new(0, 90, 0)
  1178. Part45.FormFactor = Enum.FormFactor.Symmetric
  1179. Part45.Size = Vector3.new(2, 2, 1)
  1180. Part45.CFrame = CFrame.new(-38.8493538, 3.00001597, 135.348343, 1.10270776e-06, -2.81836776e-11, 1, -2.32707343e-12, 1, 2.81836793e-11, -1, -2.32710444e-12, 1.10270787e-06)
  1181. Part45.LeftSurface = Enum.SurfaceType.Weld
  1182. Part45.RightSurface = Enum.SurfaceType.Weld
  1183. Part45.Color = Color3.new(1, 0.8, 0.6)
  1184. Part45.Position = Vector3.new(-38.8493538, 3.00001597, 135.348343)
  1185. Part45.Orientation = Vector3.new(0, 90, 0)
  1186. Part45.Color = Color3.new(1, 0.8, 0.6)
  1187. Weld46.Parent = Part45
  1188. Weld46.C1 = CFrame.new(-1.20000005, 0.5, 0.400000006, 0.99619472, 0, -0.087155737, 0.087155737, 1.19248806e-08, 0.99619472, 1.03932174e-09, -1, 1.18795027e-08)
  1189. Weld46.Part0 = Part45
  1190. Weld46.Part1 = Part42
  1191. Weld47.Parent = Part45
  1192. Weld47.C1 = CFrame.new(0.800000012, 0.5, 0.400000006, 0.766044438, 0, 0.642787576, -0.642787576, 1.19248806e-08, 0.766044438, -7.66516539e-09, -1, 9.13498877e-09)
  1193. Weld47.Part0 = Part45
  1194. Weld47.Part1 = Part44
  1195. Motor6D48.Name = "Neck"
  1196. Motor6D48.Parent = Part45
  1197. Motor6D48.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  1198. Motor6D48.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  1199. Motor6D48.Part0 = Part45
  1200. Motor6D48.Part1 = Part51
  1201. Motor6D48.MaxVelocity = 0.10000000149012
  1202. Motor6D49.Name = "Left Hip"
  1203. Motor6D49.Parent = Part45
  1204. Motor6D49.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1205. Motor6D49.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  1206. Motor6D49.Part0 = Part45
  1207. Motor6D49.Part1 = Part40
  1208. Motor6D49.MaxVelocity = 0.10000000149012
  1209. Motor6D50.Name = "Right Hip"
  1210. Motor6D50.Parent = Part45
  1211. Motor6D50.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1212. Motor6D50.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  1213. Motor6D50.Part0 = Part45
  1214. Motor6D50.Part1 = Part37
  1215. Motor6D50.MaxVelocity = 0.10000000149012
  1216. Part51.Name = "Head"
  1217. Part51.Parent = Model0
  1218. Part51.BrickColor = BrickColor.new("Pastel brown")
  1219. Part51.Rotation = Vector3.new(0, 90, 0)
  1220. Part51.FormFactor = Enum.FormFactor.Symmetric
  1221. Part51.Size = Vector3.new(2, 1, 1)
  1222. Part51.CFrame = CFrame.new(-38.8493538, 4.50001621, 135.348343, 1.10270776e-06, -2.81836776e-11, 1, -2.32707343e-12, 1, 2.81836793e-11, -1, -2.32710444e-12, 1.10270787e-06)
  1223. Part51.TopSurface = Enum.SurfaceType.Smooth
  1224. Part51.Color = Color3.new(1, 0.8, 0.6)
  1225. Part51.Position = Vector3.new(-38.8493538, 4.50001621, 135.348343)
  1226. Part51.Orientation = Vector3.new(0, 90, 0)
  1227. Part51.Color = Color3.new(1, 0.8, 0.6)
  1228. SpecialMesh52.Parent = Part51
  1229. SpecialMesh52.Scale = Vector3.new(1.25, 1.25, 1.25)
  1230. SpecialMesh52.Scale = Vector3.new(1.25, 1.25, 1.25)
  1231. Decal53.Parent = Part51
  1232. Decal53.Texture = "http://www.roblox.com/asset/?id=383101611"
  1233. Weld54.Name = "HeadWeld"
  1234. Weld54.Parent = Part51
  1235. Weld54.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1236. Weld54.C1 = CFrame.new(0.629999995, 0.300000012, 0.100000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  1237. Weld54.Part0 = Part51
  1238. Weld54.Part1 = Part7
  1239. Model55.Name = "Jacob"
  1240. Model55.Parent = mas
  1241. Model55.PrimaryPart = Part109
  1242. Script56.Name = "Ragdoller"
  1243. Script56.Parent = Model55
  1244. table.insert(cors,sandbox(Script56,function()
  1245. print("Ragdoll script activated")
  1246. Gibs = game.Workspace
  1247.  
  1248. function getKillerOfHumanoidIfStillInGame(humanoid)
  1249. local tag = humanoid:findFirstChild("creator")
  1250. if tag ~= nil then
  1251. local killer = tag.Value
  1252. if killer.Parent ~= nil then
  1253. return killer
  1254. end
  1255. end
  1256. return nil
  1257. end
  1258.  
  1259. function OnDeath(Character)
  1260. local svch = Character
  1261. local hum = Character:findFirstChild("Humanoid")
  1262. local getkiller = getKillerOfHumanoidIfStillInGame(hum)
  1263. Character.Archivable = true
  1264. local chrclone = Character:clone()
  1265. Character.Archivable = false
  1266.  
  1267. local ch = chrclone:GetChildren()
  1268. local i
  1269. for i = 1,#ch do
  1270. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" or ch[i].ClassName == "Script" then
  1271. ch[i]:remove()
  1272. end
  1273. end
  1274. local function Scan(ch)
  1275. local e
  1276. for e = 1,#ch do
  1277. Scan(ch[e]:GetChildren())
  1278. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  1279. ch[e]:remove()
  1280. end
  1281. end
  1282. end
  1283. Scan(chrclone:GetChildren())
  1284.  
  1285. local hum2 = chrclone:findFirstChild("Humanoid")
  1286.  
  1287.  
  1288. if hum2 ~= nil then
  1289. hum2.Name = "Humanoid2"
  1290. hum2.PlatformStand = true
  1291. hum2.Sit = true
  1292. hum2.MaxHealth = 0
  1293. hum2.Health = 0
  1294. end
  1295.  
  1296. local ch = Character:GetChildren()
  1297. local i
  1298. for i = 1,#ch do
  1299. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  1300. ch[i]:remove()
  1301. end
  1302. end
  1303.  
  1304. wait(0.2)
  1305.  
  1306. local ch = Character:GetChildren()
  1307. local i
  1308. for i = 1,#ch do
  1309. if ch[i].ClassName == "Part" or ch[i].ClassName == "Hat" or ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  1310. ch[i]:remove()
  1311. end
  1312. end
  1313. Character = chrclone
  1314. local Torso = Character.Torso
  1315. local movevector = Vector3.new()
  1316.  
  1317. if Torso then
  1318. if getkiller ~= nil then
  1319. if getkiller.Character ~= nil then
  1320. local killtors = getkiller.Character:findFirstChild("Torso")
  1321. if killtors ~= nil then
  1322. movevector = CFrame.new(killtors.Position,Torso.Position).lookVector
  1323. end
  1324. end
  1325. end
  1326. local Head = Character:FindFirstChild("Head")
  1327. if Head then
  1328. local Neck = Instance.new("Weld")
  1329. Neck.Name = "Neck"
  1330. Neck.Part0 = Torso
  1331. Neck.Part1 = Head
  1332. Neck.C0 = CFrame.new(0, 1.5, 0)
  1333. Neck.C1 = CFrame.new()
  1334. Neck.Parent = Torso
  1335.  
  1336. local nsc = script.CamAttach:clone()
  1337. nsc.CamPart.Value = hum2.Parent.Head
  1338. nsc.Disabled = false
  1339. nsc.Parent = svch
  1340. end
  1341. local Limb = Character:FindFirstChild("Right Arm")
  1342. if Limb then
  1343.  
  1344. Limb.CFrame = Torso.CFrame * CFrame.new(1.5, 0, 0)
  1345. local Joint = Instance.new("Glue")
  1346. Joint.Name = "RightShoulder"
  1347. Joint.Part0 = Torso
  1348. Joint.Part1 = Limb
  1349. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1350. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1351. Joint.Parent = Torso
  1352.  
  1353. local B = Instance.new("Part")
  1354. B.TopSurface = 0
  1355. B.BottomSurface = 0
  1356. B.formFactor = "Symmetric"
  1357. B.Size = Vector3.new(1, 1, 1)
  1358. B.Transparency = 1
  1359. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1360. B.Parent = Character
  1361. local W = Instance.new("Weld")
  1362. W.Part0 = Limb
  1363. W.Part1 = B
  1364. W.C0 = CFrame.new(0, -0.5, 0)
  1365. W.Parent = Limb
  1366.  
  1367. end
  1368. local Limb = Character:FindFirstChild("Left Arm")
  1369. if Limb then
  1370.  
  1371. Limb.CFrame = Torso.CFrame * CFrame.new(-1.5, 0, 0)
  1372. local Joint = Instance.new("Glue")
  1373. Joint.Name = "LeftShoulder"
  1374. Joint.Part0 = Torso
  1375. Joint.Part1 = Limb
  1376. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1377. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1378. Joint.Parent = Torso
  1379.  
  1380. local B = Instance.new("Part")
  1381. B.TopSurface = 0
  1382. B.BottomSurface = 0
  1383. B.formFactor = "Symmetric"
  1384. B.Size = Vector3.new(1, 1, 1)
  1385. B.Transparency = 1
  1386. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1387. B.Parent = Character
  1388. local W = Instance.new("Weld")
  1389. W.Part0 = Limb
  1390. W.Part1 = B
  1391. W.C0 = CFrame.new(0, -0.5, 0)
  1392. W.Parent = Limb
  1393.  
  1394. end
  1395. local Limb = Character:FindFirstChild("Right Leg")
  1396. if Limb then
  1397.  
  1398. Limb.CFrame = Torso.CFrame * CFrame.new(0.5, -2, 0)
  1399. local Joint = Instance.new("Glue")
  1400. Joint.Name = "RightHip"
  1401. Joint.Part0 = Torso
  1402. Joint.Part1 = Limb
  1403. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1404. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  1405. Joint.Parent = Torso
  1406.  
  1407. local B = Instance.new("Part")
  1408. B.TopSurface = 0
  1409. B.BottomSurface = 0
  1410. B.formFactor = "Symmetric"
  1411. B.Size = Vector3.new(1, 1, 1)
  1412. B.Transparency = 1
  1413. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1414. B.Parent = Character
  1415. local W = Instance.new("Weld")
  1416. W.Part0 = Limb
  1417. W.Part1 = B
  1418. W.C0 = CFrame.new(0, -0.5, 0)
  1419. W.Parent = Limb
  1420.  
  1421. end
  1422. local Limb = Character:FindFirstChild("Left Leg")
  1423. if Limb then
  1424.  
  1425. Limb.CFrame = Torso.CFrame * CFrame.new(-0.5, -2, 0)
  1426. local Joint = Instance.new("Glue")
  1427. Joint.Name = "LeftHip"
  1428. Joint.Part0 = Torso
  1429. Joint.Part1 = Limb
  1430. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1431. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  1432. Joint.Parent = Torso
  1433.  
  1434. local B = Instance.new("Part")
  1435. B.TopSurface = 0
  1436. B.BottomSurface = 0
  1437. B.formFactor = "Symmetric"
  1438. B.Size = Vector3.new(1, 1, 1)
  1439. B.Transparency = 1
  1440. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  1441. B.Parent = Character
  1442. local W = Instance.new("Weld")
  1443. W.Part0 = Limb
  1444. W.Part1 = B
  1445. W.C0 = CFrame.new(0, -0.5, 0)
  1446. W.Parent = Limb
  1447.  
  1448. end
  1449. --[
  1450. local Bar = Instance.new("Part")
  1451. Bar.TopSurface = 0
  1452. Bar.BottomSurface = 0
  1453. Bar.formFactor = "Symmetric"
  1454. Bar.Size = Vector3.new(1, 1, 1)
  1455. Bar.Transparency = 1
  1456. Bar.CFrame = Torso.CFrame * CFrame.new(0, 0.5, 0)
  1457. Bar.Parent = Character
  1458. local Weld = Instance.new("Weld")
  1459. Weld.Part0 = Torso
  1460. Weld.Part1 = Bar
  1461. Weld.C0 = CFrame.new(0, 0.5, 0)
  1462. Weld.Parent = Torso
  1463. --]]
  1464. end
  1465. Character.Parent = Gibs
  1466. game.Debris:AddItem(Character, 65)
  1467. if movevector ~= Vector3.new() then
  1468. for i = 1,10 do
  1469. wait()
  1470. Torso.Velocity = movevector * 30
  1471. end
  1472. end
  1473. end
  1474.  
  1475. script.Parent.Humanoid.Died:connect(function()
  1476. OnDeath(script.Parent)
  1477. end)
  1478.  
  1479.  
  1480. end))
  1481. LocalScript57.Name = "CamAttach"
  1482. LocalScript57.Parent = Script56
  1483. LocalScript57.Disabled = true
  1484. table.insert(cors,sandbox(LocalScript57,function()
  1485. wait()
  1486. game.Workspace.CurrentCamera.CameraSubject = script.CamPart.Value
  1487. end))
  1488. ObjectValue58.Name = "CamPart"
  1489. ObjectValue58.Parent = LocalScript57
  1490. Shirt59.Name = "Blu"
  1491. Shirt59.Parent = Model55
  1492. Shirt59.ShirtTemplate = "http://www.roblox.com/asset/?id=28984380"
  1493. Pants60.Name = "Blu1"
  1494. Pants60.Parent = Model55
  1495. Pants60.PantsTemplate = "http://www.roblox.com/asset?id=28984542"
  1496. Hat61.Name = "BrownCharmerHair"
  1497. Hat61.Parent = Model55
  1498. Hat61.AttachmentPos = Vector3.new(0, 0.075000003, 0.0500000007)
  1499. Part62.Name = "Handle"
  1500. Part62.Parent = Hat61
  1501. Part62.Rotation = Vector3.new(-180, 89.7699966, 180)
  1502. Part62.CanCollide = false
  1503. Part62.Locked = true
  1504. Part62.FormFactor = Enum.FormFactor.Custom
  1505. Part62.Size = Vector3.new(1.19999957, 1, 1.5999999)
  1506. Part62.CFrame = CFrame.new(-39.3365135, 4.9250145, 131.948425, -1.19208508e-07, -1.32160244e-12, 0.999992132, 1.31094929e-12, 1, 1.25764373e-12, -0.999992132, 1.24701074e-12, -1.19208508e-07)
  1507. Part62.BottomSurface = Enum.SurfaceType.Smooth
  1508. Part62.TopSurface = Enum.SurfaceType.Smooth
  1509. Part62.Position = Vector3.new(-39.3365135, 4.9250145, 131.948425)
  1510. Part62.Orientation = Vector3.new(0, 90, 0)
  1511. SpecialMesh63.Parent = Part62
  1512. SpecialMesh63.MeshId = "http://www.roblox.com/asset/?id=74878559"
  1513. SpecialMesh63.Scale = Vector3.new(1.04999995, 1, 1.04999995)
  1514. SpecialMesh63.TextureId = "http://www.roblox.com/asset/?id=382682502 "
  1515. SpecialMesh63.MeshType = Enum.MeshType.FileMesh
  1516. SpecialMesh63.Scale = Vector3.new(1.04999995, 1, 1.04999995)
  1517. Hat64.Name = "BluetoothEarPiece"
  1518. Hat64.Parent = Model55
  1519. Hat64.AttachmentPos = Vector3.new(0.629999995, 0.300000012, 0.100000001)
  1520. Part65.Name = "Handle"
  1521. Part65.Parent = Hat64
  1522. Part65.Rotation = Vector3.new(-180, 89.7699966, 180)
  1523. Part65.CanCollide = false
  1524. Part65.Locked = true
  1525. Part65.FormFactor = Enum.FormFactor.Symmetric
  1526. Part65.Size = Vector3.new(1, 1, 1)
  1527. Part65.CFrame = CFrame.new(-39.3865128, 4.70001411, 132.578415, -1.19208508e-07, -1.32160244e-12, 0.999992132, 1.31094929e-12, 1, 1.25764373e-12, -0.999992132, 1.24701074e-12, -1.19208508e-07)
  1528. Part65.BottomSurface = Enum.SurfaceType.Smooth
  1529. Part65.TopSurface = Enum.SurfaceType.Smooth
  1530. Part65.Position = Vector3.new(-39.3865128, 4.70001411, 132.578415)
  1531. Part65.Orientation = Vector3.new(0, 90, 0)
  1532. SpecialMesh66.Parent = Part65
  1533. SpecialMesh66.MeshId = "http://www.roblox.com/asset/?id=29760978"
  1534. SpecialMesh66.TextureId = "http://www.roblox.com/asset/?id=29760984"
  1535. SpecialMesh66.MeshType = Enum.MeshType.FileMesh
  1536. Part67.Name = "Handle"
  1537. Part67.Parent = Model55
  1538. Part67.BrickColor = BrickColor.new("Bright yellow")
  1539. Part67.Transparency = 1
  1540. Part67.Rotation = Vector3.new(-180, -5, 180)
  1541. Part67.CanCollide = false
  1542. Part67.FormFactor = Enum.FormFactor.Symmetric
  1543. Part67.Size = Vector3.new(2, 1, 1)
  1544. Part67.CFrame = CFrame.new(-40.8679504, 3.60001421, 131.082977, -0.996186912, -1.18807311e-08, -0.0871551707, -1.19262484e-08, 1, 1.19634988e-12, 0.0871551707, 1.04056197e-09, -0.996186912)
  1545. Part67.RightSurface = Enum.SurfaceType.Hinge
  1546. Part67.Color = Color3.new(0.960784, 0.803922, 0.188235)
  1547. Part67.Position = Vector3.new(-40.8679504, 3.60001421, 131.082977)
  1548. Part67.Orientation = Vector3.new(0, -175, 0)
  1549. Part67.Color = Color3.new(0.960784, 0.803922, 0.188235)
  1550. Part68.Parent = Part67
  1551. Part68.BrickColor = BrickColor.new("Dark stone grey")
  1552. Part68.Rotation = Vector3.new(-90, 0, 95)
  1553. Part68.CanCollide = false
  1554. Part68.FormFactor = Enum.FormFactor.Custom
  1555. Part68.Size = Vector3.new(0.200000003, 0.799999595, 1)
  1556. Part68.CFrame = CFrame.new(-41.3151894, 3.7200141, 131.344223, -0.0871548802, -0.996186912, -1.10408163e-08, -1.06683562e-09, -1.19245582e-08, 1, -0.996186912, 0.0871549845, -4.51245707e-11)
  1557. Part68.BackSurface = Enum.SurfaceType.Weld
  1558. Part68.BottomSurface = Enum.SurfaceType.Weld
  1559. Part68.FrontSurface = Enum.SurfaceType.Weld
  1560. Part68.LeftSurface = Enum.SurfaceType.Weld
  1561. Part68.RightSurface = Enum.SurfaceType.Weld
  1562. Part68.TopSurface = Enum.SurfaceType.Weld
  1563. Part68.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1564. Part68.Position = Vector3.new(-41.3151894, 3.7200141, 131.344223)
  1565. Part68.Orientation = Vector3.new(-90, 95, 0)
  1566. Part68.Color = Color3.new(0.388235, 0.372549, 0.384314)
  1567. Weld69.Parent = Part68
  1568. Weld69.C0 = CFrame.new(28.2336063, 5.29926586, -3.78005195, 0.087155439, -1.06803189e-09, 0.99619472, 0.99619472, -1.19231904e-08, -0.0871555433, 1.10395817e-08, 1, 4.63730443e-11)
  1569. Weld69.C1 = CFrame.new(5.76756954, -3.66005206, 28.0123272, 0.99619472, -1.19248806e-08, -0.087155737, 1.18795027e-08, 1, -1.03932174e-09, 0.087155737, 0, 0.99619472)
  1570. Weld69.Part0 = Part68
  1571. Weld69.Part1 = Part67
  1572. SpecialMesh70.Parent = Part68
  1573. SpecialMesh70.MeshId = "http://www.roblox.com/asset/?id=72012671"
  1574. SpecialMesh70.Scale = Vector3.new(1, 1.29999995, 1.29999995)
  1575. SpecialMesh70.TextureId = "http://www.roblox.com/asset/?id=168091402"
  1576. SpecialMesh70.VertexColor = Vector3.new(0.899999976, 0.899999976, 1)
  1577. SpecialMesh70.MeshType = Enum.MeshType.FileMesh
  1578. SpecialMesh70.Scale = Vector3.new(1, 1.29999995, 1.29999995)
  1579. Sound71.Name = "Fire"
  1580. Sound71.Parent = Part67
  1581. Sound71.SoundId = "http://roblox.com/asset/?id=10209859"
  1582. Sound71.Volume = 1
  1583. Sound72.Name = "Reload"
  1584. Sound72.Parent = Part67
  1585. Sound72.SoundId = "http://www.roblox.com/asset/?id=2691591"
  1586. Sound72.Volume = 1
  1587. Script73.Name = "Control"
  1588. Script73.Parent = Model55
  1589. table.insert(cors,sandbox(Script73,function()
  1590. wait(.1)
  1591. local ammo=3
  1592. local w=.14
  1593. local r=false
  1594. local t=script.Parent
  1595. Spawn(function()
  1596. local c=t:Clone()
  1597. wait(1)
  1598. t.Humanoid.Died:wait()
  1599. wait(65)
  1600. c.Parent=workspace
  1601. c:MakeJoints()
  1602. t:Destroy()
  1603. end)
  1604. local cf={CFrame.new(.8,.5,.4)*CFrame.Angles(math.rad(270),math.rad(40),0),CFrame.new(-1.2,0.5,0.4)*CFrame.Angles(math.rad(270),math.rad(-5),0)}
  1605. local c=LoadLibrary'RbxUtility'.Create
  1606. local b1=c'Part'{TopSurface=0;BottomSurface=0;Anchored=true;CanCollide=false;BrickColor=BrickColor.new("Cool yellow");Size=Vector3.new(.2,.2,1);c'SpecialMesh'{MeshType=6;Scale=Vector3.new(.2,.2,1)}};Transparency=.5
  1607. local b2=b1:Clone()
  1608. b1.Name,b2.Name='1','2'
  1609. local mov=c'Part'{Transparency=1;CanCollide=false;Parent=t;Anchored=true}
  1610. local h=t:WaitForChild'Handle'
  1611. local function reload(boo)
  1612. if(boo and ammo~=30)or ammo==0 then
  1613. r=true
  1614. if w then
  1615. w=.03
  1616. end
  1617. h.Reload:Play()
  1618. wait(3)
  1619. ammo=30
  1620. if w then
  1621. w=.14
  1622. end
  1623. r=false
  1624. elseif boo then
  1625. wait(.1)
  1626. end
  1627. end
  1628. local function near()
  1629. local dis,pl=300,nil
  1630. for _,v in ipairs(game.Players:GetPlayers())do
  1631. if v.Character and v.Character:FindFirstChild'Humanoid'and v:DistanceFromCharacter(h.Position)<dis then
  1632. dis,pl=v:DistanceFromCharacter(h.Position),v
  1633. end
  1634. end
  1635. if pl then
  1636. return pl.Character:GetModelCFrame(),dis,CFrame.new(pl.Character.Humanoid.WalkToPoint).lookVector
  1637. else
  1638. return nil
  1639. end
  1640. end
  1641. Spawn(function()
  1642. while true do
  1643. t.Humanoid.Jump=true
  1644. while not w do wait(.1)end
  1645. for i=1,math.random(4,9)do
  1646. wait(w)
  1647. end
  1648. end
  1649. end)
  1650. Spawn(function()
  1651. while wait(math.random(2,7)/10)do
  1652. local n=near()
  1653. if n and math.random(1,3)==2 or not n then
  1654. mov.CFrame=t.Torso.CFrame+t.Torso.CFrame.lookVector*Vector3.new(math.random(-25,25),0,math.random(-25,25))
  1655. else
  1656. mov.CFrame=n+Vector3.new((math.random(1,2)==1 and 1 or -1)*math.random(25,50),0,(math.random(1,2)==1 and 1 or -1)*math.random(25,50))
  1657. end
  1658. wait(.1)
  1659. t.Humanoid:MoveTo(mov.Position,mov)
  1660. end
  1661. end)
  1662. while true do
  1663. local n,mag,hum=near()
  1664. if n then
  1665. n=n.p
  1666. if not r then
  1667. w=.14
  1668. local dir=h.Position-n
  1669. local tst,_=workspace:FindPartOnRay(Ray.new(t.Torso.Position,(n-t.Torso.Position).Unit*999),t)
  1670. local aim=n+Vector3.new(math.random(-mag*.015,mag*.015),math.random(-mag*.015,mag*.015),math.random(-mag*.015,mag*.015))*(2+math.random())+hum
  1671. if tst and tst.Parent and game.Players:GetPlayerFromCharacter(tst.Parent)then
  1672. wait(.08)
  1673. h.Fire:Play()
  1674. local par,pos=workspace:FindPartOnRay(Ray.new(h.Position,(aim-h.Position).Unit*999),t)
  1675. if par then
  1676. local h=par.Parent:FindFirstChild'Humanoid'or par.Parent.Parent:FindFirstChild'Humanoid'
  1677. if h and h.Health-10>0 then
  1678. h.Health=h.Health-10
  1679. elseif h then
  1680. h.Health=0
  1681. h.Parent:BreakJoints()
  1682. end
  1683. end
  1684. ammo=ammo-1
  1685. mag=(h.Position-pos).magnitude
  1686. b1.Parent,b2.Parent=t,t
  1687. b1.CFrame,b2.CFrame=CFrame.new(h.Position:Lerp(pos,.375),pos),CFrame.new(pos:Lerp(h.Position,.125),h.Position)
  1688. b1.Mesh.Scale,b2.Mesh.Scale=Vector3.new(.2,.2,mag*.75),Vector3.new(.2,.2,mag/4)
  1689. Delay(.03,function()b1.Parent=nil wait(.03)b2.Parent=nil end)
  1690. end
  1691. wait(.05)
  1692. if ammo==0 then
  1693. reload()
  1694. end
  1695. end
  1696. else
  1697. reload(true)
  1698. w=false
  1699. end
  1700. end
  1701.  
  1702. end))
  1703. Script74.Name = "Animate"
  1704. Script74.Parent = Model55
  1705. table.insert(cors,sandbox(Script74,function()
  1706. wait(5)
  1707. function waitForChild(parent, childName)
  1708. local child = parent:findFirstChild(childName)
  1709. if child then return child end
  1710. while true do
  1711. child = parent.ChildAdded:wait()
  1712. if child.Name==childName then return child end
  1713. end
  1714. end
  1715.  
  1716. local Figure = script.Parent
  1717. local Torso = waitForChild(Figure, "Torso")
  1718. local RightHip = waitForChild(Torso, "Right Hip")
  1719. local LeftHip = waitForChild(Torso, "Left Hip")
  1720. local Neck = waitForChild(Torso, "Neck")
  1721. local Humanoid = waitForChild(Figure, "Humanoid")
  1722. local pose = "Standing"
  1723.  
  1724. local currentAnim = ""
  1725. local currentAnimTrack = nil
  1726. local currentAnimKeyframeHandler = nil
  1727. local oldAnimTrack = nil
  1728. local animTable = {}
  1729. local animNames = {
  1730. idle = {
  1731. { id = "http://www.roblox.com/asset/?id=125750544", weight = 9 },
  1732. { id = "http://www.roblox.com/asset/?id=125750618", weight = 1 }
  1733. },
  1734. walk = {
  1735. { id = "http://www.roblox.com/asset/?id=125749145", weight = 10 }
  1736. },
  1737. run = {
  1738. { id = "run.xml", weight = 10 }
  1739. },
  1740. jump = {
  1741. { id = "http://www.roblox.com/asset/?id=125750702", weight = 10 }
  1742. },
  1743. fall = {
  1744. { id = "http://www.roblox.com/asset/?id=125750759", weight = 10 }
  1745. },
  1746. climb = {
  1747. { id = "http://www.roblox.com/asset/?id=125750800", weight = 10 }
  1748. },
  1749. toolnone = {
  1750. { id = "http://www.roblox.com/asset/?id=125750867", weight = 10 }
  1751. },
  1752. toolslash = {
  1753. { id = "http://www.roblox.com/asset/?id=129967390", weight = 10 }
  1754. -- { id = "slash.xml", weight = 10 }
  1755. },
  1756. toollunge = {
  1757. { id = "http://www.roblox.com/asset/?id=129967478", weight = 10 }
  1758. },
  1759. wave = {
  1760. { id = "http://www.roblox.com/asset/?id=128777973", weight = 10 }
  1761. },
  1762. point = {
  1763. { id = "http://www.roblox.com/asset/?id=128853357", weight = 10 }
  1764. },
  1765. dance = {
  1766. { id = "http://www.roblox.com/asset/?id=130018893", weight = 10 },
  1767. { id = "http://www.roblox.com/asset/?id=132546839", weight = 10 },
  1768. { id = "http://www.roblox.com/asset/?id=132546884", weight = 10 }
  1769. },
  1770. laugh = {
  1771. { id = "http://www.roblox.com/asset/?id=129423131", weight = 10 }
  1772. },
  1773. cheer = {
  1774. { id = "http://www.roblox.com/asset/?id=129423030", weight = 10 }
  1775. },
  1776. }
  1777.  
  1778. -- Existance in this list signifies that it is an emote, the value indicates If it is a looping emote
  1779. local emoteNames = { wave = false, point = false, dance = true, laugh = false, cheer = false}
  1780.  
  1781. math.randomseed(tick())
  1782.  
  1783. -- Setup animation objects
  1784. for name, fileList in pairs(animNames) do
  1785. animTable[name] = {}
  1786. animTable[name].count = 0
  1787. animTable[name].totalWeight = 0
  1788.  
  1789. -- check for config values
  1790. local config = script:FindFirstChild(name)
  1791. if (config ~= nil) then
  1792. -- print("Loading anims " .. name)
  1793. local idx = 1
  1794. for _, childPart in pairs(config:GetChildren()) do
  1795. animTable[name][idx] = {}
  1796. animTable[name][idx].anim = childPart
  1797. local weightObject = childPart:FindFirstChild("Weight")
  1798. if (weightObject == nil) then
  1799. animTable[name][idx].weight = 1
  1800. else
  1801. animTable[name][idx].weight = weightObject.Value
  1802. end
  1803. animTable[name].count = animTable[name].count + 1
  1804. animTable[name].totalWeight = animTable[name].totalWeight + animTable[name][idx].weight
  1805. -- print(name .. " [" .. idx .. "] " .. animTable[name][idx].anim.AnimationId .. " (" .. animTable[name][idx].weight .. ")")
  1806. idx = idx + 1
  1807. end
  1808. end
  1809.  
  1810. -- fallback to defaults
  1811. if (animTable[name].count <= 0) then
  1812. for idx, anim in pairs(fileList) do
  1813. animTable[name][idx] = {}
  1814. animTable[name][idx].anim = Instance.new("Animation")
  1815. animTable[name][idx].anim.Name = name
  1816. animTable[name][idx].anim.AnimationId = anim.id
  1817. animTable[name][idx].weight = anim.weight
  1818. animTable[name].count = animTable[name].count + 1
  1819. animTable[name].totalWeight = animTable[name].totalWeight + anim.weight
  1820. -- print(name .. " [" .. idx .. "] " .. anim.id .. " (" .. anim.weight .. ")")
  1821. end
  1822. end
  1823. end
  1824.  
  1825. -- ANIMATION
  1826.  
  1827. -- declarations
  1828. local toolAnim = "None"
  1829. local toolAnimTime = 0
  1830.  
  1831. local jumpAnimTime = 0
  1832. local jumpAnimDuration = 0.175
  1833.  
  1834. local toolTransitionTime = 0.1
  1835. local fallTransitionTime = 0.2
  1836. local jumpMaxLimbVelocity = 0.75
  1837.  
  1838. -- functions
  1839.  
  1840. function stopAllAnimations()
  1841. local oldAnim = currentAnim
  1842.  
  1843. -- return to idle If finishing an emote
  1844. if (emoteNames[oldAnim] ~= nil and emoteNames[oldAnim] == false) then
  1845. oldAnim = "idle"
  1846. end
  1847.  
  1848. currentAnim = ""
  1849. if (currentAnimKeyframeHandler ~= nil) then
  1850. currentAnimKeyframeHandler:disconnect()
  1851. end
  1852.  
  1853. if (oldAnimTrack ~= nil) then
  1854. oldAnimTrack:Stop()
  1855. oldAnimTrack:Destroy()
  1856. oldAnimTrack = nil
  1857. end
  1858. if (currentAnimTrack ~= nil) then
  1859. currentAnimTrack:Stop()
  1860. currentAnimTrack:Destroy()
  1861. currentAnimTrack = nil
  1862. end
  1863. return oldAnim
  1864. end
  1865.  
  1866. function keyFrameReachedFunc(frameName)
  1867. if (frameName == "End") then
  1868. -- print("Keyframe : ".. frameName)
  1869. local repeatAnim = stopAllAnimations()
  1870. playAnimation(repeatAnim, 0.0, Humanoid)
  1871. end
  1872. end
  1873.  
  1874. -- Preload animations
  1875. function playAnimation(animName, transitionTime, humanoid)
  1876. if (animName ~= currentAnim) then
  1877.  
  1878. if (oldAnimTrack ~= nil) then
  1879. oldAnimTrack:Stop()
  1880. oldAnimTrack:Destroy()
  1881. end
  1882.  
  1883. local roll = math.random(1, animTable[animName].totalWeight)
  1884. local origRoll = roll
  1885. local idx = 1
  1886. while (roll > animTable[animName][idx].weight) do
  1887. roll = roll - animTable[animName][idx].weight
  1888. idx = idx + 1
  1889. end
  1890. -- print(animName .. " " .. idx .. " [" .. origRoll .. "]")
  1891. local anim = animTable[animName][idx].anim
  1892.  
  1893. -- load it to the humanoid; get AnimationTrack
  1894. oldAnimTrack = currentAnimTrack
  1895. currentAnimTrack = humanoid:LoadAnimation(anim)
  1896.  
  1897. -- play the animation
  1898. currentAnimTrack:Play(transitionTime)
  1899. currentAnim = animName
  1900.  
  1901. -- set up keyframe name triggers
  1902. if (currentAnimKeyframeHandler ~= nil) then
  1903. currentAnimKeyframeHandler:disconnect()
  1904. end
  1905. currentAnimKeyframeHandler = currentAnimTrack.KeyframeReached:connect(keyFrameReachedFunc)
  1906. end
  1907. end
  1908.  
  1909. -------------------------------------------------------------------------------------------
  1910. -------------------------------------------------------------------------------------------
  1911.  
  1912. local toolAnimName = ""
  1913. local toolOldAnimTrack = nil
  1914. local toolAnimTrack = nil
  1915. local currentToolAnimKeyframeHandler = nil
  1916.  
  1917. function toolKeyFrameReachedFunc(frameName)
  1918. if (frameName == "End") then
  1919. -- print("Keyframe : ".. frameName)
  1920. local repeatAnim = stopToolAnimations()
  1921. playToolAnimation(repeatAnim, 0.0, Humanoid)
  1922. end
  1923. end
  1924.  
  1925.  
  1926. function playToolAnimation(animName, transitionTime, humanoid)
  1927. if (animName ~= toolAnimName) then
  1928.  
  1929. if (toolAnimTrack ~= nil) then
  1930. toolAnimTrack:Stop()
  1931. toolAnimTrack:Destroy()
  1932. transitionTime = 0
  1933. end
  1934.  
  1935. local roll = math.random(1, animTable[animName].totalWeight)
  1936. local origRoll = roll
  1937. local idx = 1
  1938. while (roll > animTable[animName][idx].weight) do
  1939. roll = roll - animTable[animName][idx].weight
  1940. idx = idx + 1
  1941. end
  1942. -- print(animName .. " * " .. idx .. " [" .. origRoll .. "]")
  1943. local anim = animTable[animName][idx].anim
  1944.  
  1945. -- load it to the humanoid; get AnimationTrack
  1946. toolOldAnimTrack = toolAnimTrack
  1947. toolAnimTrack = humanoid:LoadAnimation(anim)
  1948.  
  1949. -- play the animation
  1950. toolAnimTrack:Play(transitionTime)
  1951. toolAnimName = animName
  1952.  
  1953. currentToolAnimKeyframeHandler = toolAnimTrack.KeyframeReached:connect(toolKeyFrameReachedFunc)
  1954. end
  1955. end
  1956.  
  1957. function stopToolAnimations()
  1958. local oldAnim = toolAnimName
  1959.  
  1960. if (currentToolAnimKeyframeHandler ~= nil) then
  1961. currentToolAnimKeyframeHandler:disconnect()
  1962. end
  1963.  
  1964. toolAnimName = ""
  1965. if (toolAnimTrack ~= nil) then
  1966. toolAnimTrack:Stop()
  1967. toolAnimTrack:Destroy()
  1968. toolAnimTrack = nil
  1969. end
  1970.  
  1971.  
  1972. return oldAnim
  1973. end
  1974.  
  1975. -------------------------------------------------------------------------------------------
  1976. -------------------------------------------------------------------------------------------
  1977.  
  1978.  
  1979. function onRunning(speed)
  1980. if speed>0 then
  1981. playAnimation("walk", 0.1, Humanoid)
  1982. pose = "Running"
  1983. else
  1984. playAnimation("idle", 0.1, Humanoid)
  1985. pose = "Standing"
  1986. end
  1987. end
  1988.  
  1989. function onDied()
  1990. pose = "Dead"
  1991. end
  1992.  
  1993. function onJumping()
  1994. playAnimation("jump", 0.1, Humanoid)
  1995. jumpAnimTime = jumpAnimDuration
  1996. pose = "Jumping"
  1997. end
  1998.  
  1999. function onClimbing()
  2000. playAnimation("climb", 0.1, Humanoid)
  2001. pose = "Climbing"
  2002. end
  2003.  
  2004. function onGettingUp()
  2005. pose = "GettingUp"
  2006. end
  2007.  
  2008. function onFreeFall()
  2009. if (jumpAnimTime <= 0) then
  2010. playAnimation("fall", fallTransitionTime, Humanoid)
  2011. end
  2012. pose = "FreeFall"
  2013. end
  2014.  
  2015. function onFallingDown()
  2016. pose = "FallingDown"
  2017. end
  2018.  
  2019. function onSeated()
  2020. pose = "Seated"
  2021. end
  2022.  
  2023. function onPlatformStanding()
  2024. pose = "PlatformStanding"
  2025. end
  2026.  
  2027. function onSwimming(speed)
  2028. if speed>0 then
  2029. pose = "Running"
  2030. else
  2031. pose = "Standing"
  2032. end
  2033. end
  2034.  
  2035. function getTool()
  2036. for _, kid in ipairs(Figure:GetChildren()) do
  2037. if kid.className == "Tool" then return kid end
  2038. end
  2039. return nil
  2040. end
  2041.  
  2042. function getToolAnim(tool)
  2043. for _, c in ipairs(tool:GetChildren()) do
  2044. if c.Name == "toolanim" and c.className == "StringValue" then
  2045. return c
  2046. end
  2047. end
  2048. return nil
  2049. end
  2050.  
  2051. function animateTool()
  2052.  
  2053. if (toolAnim == "None") then
  2054. playToolAnimation("toolnone", toolTransitionTime, Humanoid)
  2055. return
  2056. end
  2057.  
  2058. if (toolAnim == "Slash") then
  2059. playToolAnimation("toolslash", 0, Humanoid)
  2060. return
  2061. end
  2062.  
  2063. if (toolAnim == "Lunge") then
  2064. playToolAnimation("toollunge", 0, Humanoid)
  2065. return
  2066. end
  2067. end
  2068.  
  2069. function moveSit()
  2070. RightHip:SetDesiredAngle(3.14 /2)
  2071. LeftHip:SetDesiredAngle(-3.14 /2)
  2072. end
  2073.  
  2074. local lastTick = 0
  2075.  
  2076. function move(time)
  2077. local amplitude = 1
  2078. local frequency = 1
  2079. local deltaTime = time - lastTick
  2080. lastTick = time
  2081.  
  2082. local climbFudge = 0
  2083. local setAngles = false
  2084.  
  2085. if (jumpAnimTime > 0) then
  2086. jumpAnimTime = jumpAnimTime - deltaTime
  2087. end
  2088.  
  2089. if (pose == "FreeFall" and jumpAnimTime <= 0) then
  2090. playAnimation("fall", fallTransitionTime, Humanoid)
  2091. elseif (pose == "Seated") then
  2092. stopAllAnimations()
  2093. moveSit()
  2094. return
  2095. elseif (pose == "Running") then
  2096. playAnimation("walk", 0.1, Humanoid)
  2097. elseif (pose == "Dead" or pose == "GettingUp" or pose == "FallingDown" or pose == "Seated" or pose == "PlatformStanding") then
  2098. -- print("Wha " .. pose)
  2099. amplitude = 0.1
  2100. frequency = 1
  2101. setAngles = true
  2102. end
  2103.  
  2104. if (setAngles) then
  2105. desiredAngle = amplitude * math.sin(time * frequency)
  2106.  
  2107. RightHip:SetDesiredAngle(-desiredAngle)
  2108. LeftHip:SetDesiredAngle(-desiredAngle)
  2109. end
  2110.  
  2111. -- Tool Animation handling
  2112. local tool = getTool()
  2113. if tool then
  2114.  
  2115. animStringValueObject = getToolAnim(tool)
  2116.  
  2117. if animStringValueObject then
  2118. toolAnim = animStringValueObject.Value
  2119. -- message recieved, delete StringValue
  2120. animStringValueObject.Parent = nil
  2121. toolAnimTime = time + .3
  2122. end
  2123.  
  2124. if time > toolAnimTime then
  2125. toolAnimTime = 0
  2126. toolAnim = "None"
  2127. end
  2128.  
  2129. animateTool()
  2130. else
  2131. stopToolAnimations()
  2132. toolAnim = "None"
  2133. toolAnimTime = 0
  2134. end
  2135. end
  2136.  
  2137. -- connect events
  2138. Humanoid.Died:connect(onDied)
  2139. Humanoid.Running:connect(onRunning)
  2140. Humanoid.Jumping:connect(onJumping)
  2141. Humanoid.Climbing:connect(onClimbing)
  2142. Humanoid.GettingUp:connect(onGettingUp)
  2143. Humanoid.FreeFalling:connect(onFreeFall)
  2144. Humanoid.FallingDown:connect(onFallingDown)
  2145. Humanoid.Seated:connect(onSeated)
  2146. Humanoid.PlatformStanding:connect(onPlatformStanding)
  2147. Humanoid.Swimming:connect(onSwimming)
  2148. -- main program
  2149.  
  2150. local runService = game:service("RunService");
  2151.  
  2152. -- initialize to idle
  2153. playAnimation("idle", 0.1, Humanoid)
  2154. pose = "Standing"
  2155.  
  2156. while Figure.Parent~=nil do
  2157. local _, time = wait(0.1)
  2158. move(time)
  2159. end
  2160.  
  2161. end))
  2162. StringValue75.Name = "walk"
  2163. StringValue75.Parent = Script74
  2164. Animation76.Name = "WalkAnim"
  2165. Animation76.Parent = StringValue75
  2166. Animation76.AnimationId = "http://www.roblox.com/asset/?id=125749145"
  2167. StringValue77.Name = "toolnone"
  2168. StringValue77.Parent = Script74
  2169. Animation78.Name = "ToolNoneAnim"
  2170. Animation78.Parent = StringValue77
  2171. Animation78.AnimationId = "http://www.roblox.com/asset/?id=125750867"
  2172. StringValue79.Name = "run"
  2173. StringValue79.Parent = Script74
  2174. Animation80.Name = "RunAnim"
  2175. Animation80.Parent = StringValue79
  2176. Animation80.AnimationId = "http://www.roblox.com/asset/?id=125749145"
  2177. StringValue81.Name = "jump"
  2178. StringValue81.Parent = Script74
  2179. Animation82.Name = "JumpAnim"
  2180. Animation82.Parent = StringValue81
  2181. Animation82.AnimationId = "http://www.roblox.com/asset/?id=125750702"
  2182. StringValue83.Name = "idle"
  2183. StringValue83.Parent = Script74
  2184. Animation84.Name = "Animation2"
  2185. Animation84.Parent = StringValue83
  2186. Animation84.AnimationId = "http://www.roblox.com/asset/?id=125750618"
  2187. NumberValue85.Name = "Weight"
  2188. NumberValue85.Parent = Animation84
  2189. NumberValue85.Value = 1
  2190. Animation86.Name = "Animation1"
  2191. Animation86.Parent = StringValue83
  2192. Animation86.AnimationId = "http://www.roblox.com/asset/?id=125750544"
  2193. NumberValue87.Name = "Weight"
  2194. NumberValue87.Parent = Animation86
  2195. NumberValue87.Value = 9
  2196. StringValue88.Name = "fall"
  2197. StringValue88.Parent = Script74
  2198. Animation89.Name = "FallAnim"
  2199. Animation89.Parent = StringValue88
  2200. Animation89.AnimationId = "http://www.roblox.com/asset/?id=125750759"
  2201. StringValue90.Name = "climb"
  2202. StringValue90.Parent = Script74
  2203. Animation91.Name = "ClimbAnim"
  2204. Animation91.Parent = StringValue90
  2205. Animation91.AnimationId = "http://www.roblox.com/asset/?id=125750800"
  2206. Part92.Name = "HumanoidRootPart"
  2207. Part92.Parent = Model55
  2208. Part92.BrickColor = BrickColor.new("Bright yellow")
  2209. Part92.Transparency = 1
  2210. Part92.Rotation = Vector3.new(-180, 89.7699966, 180)
  2211. Part92.FormFactor = Enum.FormFactor.Symmetric
  2212. Part92.Size = Vector3.new(2, 2, 1)
  2213. Part92.CFrame = CFrame.new(-39.2865143, 3.00001407, 131.948425, -1.19208508e-07, -1.32160244e-12, 0.999992132, 1.31094929e-12, 1, 1.25764373e-12, -0.999992132, 1.24701074e-12, -1.19208508e-07)
  2214. Part92.BottomSurface = Enum.SurfaceType.Smooth
  2215. Part92.TopSurface = Enum.SurfaceType.Smooth
  2216. Part92.Color = Color3.new(0.960784, 0.803922, 0.188235)
  2217. Part92.Position = Vector3.new(-39.2865143, 3.00001407, 131.948425)
  2218. Part92.Orientation = Vector3.new(0, 90, 0)
  2219. Part92.Color = Color3.new(0.960784, 0.803922, 0.188235)
  2220. Motor6D93.Name = "RootJoint"
  2221. Motor6D93.Parent = Part92
  2222. Motor6D93.C0 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  2223. Motor6D93.C1 = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  2224. Motor6D93.Part0 = Part92
  2225. Motor6D93.Part1 = Part103
  2226. Motor6D93.MaxVelocity = 0.10000000149012
  2227. Humanoid94.Parent = Model55
  2228. Humanoid94.NameOcclusion = Enum.NameOcclusion.NoOcclusion
  2229. Humanoid94.RightLeg = Part95
  2230. Humanoid94.LeftLeg = Part98
  2231. Humanoid94.Torso = Part92
  2232. Humanoid94.WalkSpeed = 8
  2233. Part95.Name = "Right Leg"
  2234. Part95.Parent = Model55
  2235. Part95.BrickColor = BrickColor.new("Pastel brown")
  2236. Part95.Rotation = Vector3.new(-180, 89.7699966, 180)
  2237. Part95.CanCollide = false
  2238. Part95.FormFactor = Enum.FormFactor.Symmetric
  2239. Part95.Size = Vector3.new(1, 2, 1)
  2240. Part95.CFrame = CFrame.new(-39.2865143, 1.00001407, 131.448425, -1.19208508e-07, -1.32160244e-12, 0.999992132, 1.31094929e-12, 1, 1.25764373e-12, -0.999992132, 1.24701074e-12, -1.19208508e-07)
  2241. Part95.BottomSurface = Enum.SurfaceType.Smooth
  2242. Part95.Color = Color3.new(1, 0.8, 0.6)
  2243. Part95.Position = Vector3.new(-39.2865143, 1.00001407, 131.448425)
  2244. Part95.Orientation = Vector3.new(0, 90, 0)
  2245. Part95.Color = Color3.new(1, 0.8, 0.6)
  2246. ManualWeld96.Name = "Right Leg Terrain Joint"
  2247. ManualWeld96.Parent = Part95
  2248. ManualWeld96.C1 = CFrame.new(48.1884766, -1.0000329, -34.9884872, -1.23466252e-17, 0, 1, 0, 1, 0, -1, 0, 1.23466252e-17)
  2249. ManualWeld96.Part1 = Part95
  2250. ManualWeld97.Name = "Right Leg Terrain Joint"
  2251. ManualWeld97.Parent = Part95
  2252. ManualWeld97.C1 = CFrame.new(48.1884766, -1.0000329, -34.9884872, -1.23466252e-17, 0, 1, 0, 1, 0, -1, 0, 1.23466252e-17)
  2253. ManualWeld97.Part1 = Part95
  2254. Part98.Name = "Left Leg"
  2255. Part98.Parent = Model55
  2256. Part98.BrickColor = BrickColor.new("Pastel brown")
  2257. Part98.Rotation = Vector3.new(-180, 89.7699966, 180)
  2258. Part98.CanCollide = false
  2259. Part98.FormFactor = Enum.FormFactor.Symmetric
  2260. Part98.Size = Vector3.new(1, 2, 1)
  2261. Part98.CFrame = CFrame.new(-39.2865143, 1.00001407, 132.448425, -1.19208508e-07, -1.32160244e-12, 0.999992132, 1.31094929e-12, 1, 1.25764373e-12, -0.999992132, 1.24701074e-12, -1.19208508e-07)
  2262. Part98.BottomSurface = Enum.SurfaceType.Smooth
  2263. Part98.Color = Color3.new(1, 0.8, 0.6)
  2264. Part98.Position = Vector3.new(-39.2865143, 1.00001407, 132.448425)
  2265. Part98.Orientation = Vector3.new(0, 90, 0)
  2266. Part98.Color = Color3.new(1, 0.8, 0.6)
  2267. ManualWeld99.Name = "Left Leg Terrain Joint"
  2268. ManualWeld99.Parent = Part98
  2269. ManualWeld99.C1 = CFrame.new(49.1884766, -1.0000329, -34.9884872, -1.23466252e-17, 0, 1, 0, 1, 0, -1, 0, 1.23466252e-17)
  2270. ManualWeld99.Part1 = Part98
  2271. Part100.Name = "Right Arm"
  2272. Part100.Parent = Model55
  2273. Part100.BrickColor = BrickColor.new("Pastel brown")
  2274. Part100.Rotation = Vector3.new(90, 0, -95)
  2275. Part100.CanCollide = false
  2276. Part100.FormFactor = Enum.FormFactor.Symmetric
  2277. Part100.Size = Vector3.new(1, 2, 1)
  2278. Part100.CFrame = CFrame.new(-39.8891945, 3.40001416, 130.796585, -0.0871551707, 0.996186912, 1.18807311e-08, 1.19634988e-12, 1.19262484e-08, -1, -0.996186912, -0.0871551707, -1.04056197e-09)
  2279. Part100.Color = Color3.new(1, 0.8, 0.6)
  2280. Part100.Position = Vector3.new(-39.8891945, 3.40001416, 130.796585)
  2281. Part100.Orientation = Vector3.new(90, 95, 0)
  2282. Part100.Color = Color3.new(1, 0.8, 0.6)
  2283. Weld101.Name = "RightGrip"
  2284. Weld101.Parent = Part100
  2285. Weld101.C0 = CFrame.new(0, -1, 0, 1, 0, -0, 0, 0, 1, 0, -1, 0)
  2286. Weld101.C1 = CFrame.new(0, -0.200000003, 0.200000003, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  2287. Weld101.Part0 = Part100
  2288. Weld101.Part1 = Part67
  2289. Part102.Name = "Left Arm"
  2290. Part102.Parent = Model55
  2291. Part102.BrickColor = BrickColor.new("Pastel brown")
  2292. Part102.Rotation = Vector3.new(90, 0, -50)
  2293. Part102.CanCollide = false
  2294. Part102.FormFactor = Enum.FormFactor.Symmetric
  2295. Part102.Size = Vector3.new(1, 2, 1)
  2296. Part102.CFrame = CFrame.new(-40.1837578, 3.40001416, 132.239868, 0.64278239, 0.766038477, 9.13623932e-09, 1.81264313e-12, 1.19250014e-08, -1, -0.766038477, 0.64278239, 7.6638571e-09)
  2297. Part102.Color = Color3.new(1, 0.8, 0.6)
  2298. Part102.Position = Vector3.new(-40.1837578, 3.40001416, 132.239868)
  2299. Part102.Orientation = Vector3.new(90, 50, 0)
  2300. Part102.Color = Color3.new(1, 0.8, 0.6)
  2301. Part103.Name = "Torso"
  2302. Part103.Parent = Model55
  2303. Part103.BrickColor = BrickColor.new("Pastel brown")
  2304. Part103.Rotation = Vector3.new(-180, 89.7699966, 180)
  2305. Part103.FormFactor = Enum.FormFactor.Symmetric
  2306. Part103.Size = Vector3.new(2, 2, 1)
  2307. Part103.CFrame = CFrame.new(-39.2865143, 3.00001407, 131.948425, -1.19208508e-07, -1.32160244e-12, 0.999992132, 1.31094929e-12, 1, 1.25764373e-12, -0.999992132, 1.24701074e-12, -1.19208508e-07)
  2308. Part103.LeftSurface = Enum.SurfaceType.Weld
  2309. Part103.RightSurface = Enum.SurfaceType.Weld
  2310. Part103.Color = Color3.new(1, 0.8, 0.6)
  2311. Part103.Position = Vector3.new(-39.2865143, 3.00001407, 131.948425)
  2312. Part103.Orientation = Vector3.new(0, 90, 0)
  2313. Part103.Color = Color3.new(1, 0.8, 0.6)
  2314. Weld104.Parent = Part103
  2315. Weld104.C1 = CFrame.new(-1.20000005, 0.5, 0.400000006, 0.99619472, 0, -0.087155737, 0.087155737, 1.19248806e-08, 0.99619472, 1.03932174e-09, -1, 1.18795027e-08)
  2316. Weld104.Part0 = Part103
  2317. Weld104.Part1 = Part100
  2318. Weld105.Parent = Part103
  2319. Weld105.C1 = CFrame.new(0.800000012, 0.5, 0.400000006, 0.766044438, 0, 0.642787576, -0.642787576, 1.19248806e-08, 0.766044438, -7.66516539e-09, -1, 9.13498877e-09)
  2320. Weld105.Part0 = Part103
  2321. Weld105.Part1 = Part102
  2322. Motor6D106.Name = "Neck"
  2323. Motor6D106.Parent = Part103
  2324. Motor6D106.C0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  2325. Motor6D106.C1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  2326. Motor6D106.Part0 = Part103
  2327. Motor6D106.Part1 = Part109
  2328. Motor6D106.MaxVelocity = 0.10000000149012
  2329. Motor6D107.Name = "Left Hip"
  2330. Motor6D107.Parent = Part103
  2331. Motor6D107.C0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  2332. Motor6D107.C1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  2333. Motor6D107.Part0 = Part103
  2334. Motor6D107.Part1 = Part98
  2335. Motor6D107.MaxVelocity = 0.10000000149012
  2336. Motor6D108.Name = "Right Hip"
  2337. Motor6D108.Parent = Part103
  2338. Motor6D108.C0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  2339. Motor6D108.C1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  2340. Motor6D108.Part0 = Part103
  2341. Motor6D108.Part1 = Part95
  2342. Motor6D108.MaxVelocity = 0.10000000149012
  2343. Part109.Name = "Head"
  2344. Part109.Parent = Model55
  2345. Part109.BrickColor = BrickColor.new("Pastel brown")
  2346. Part109.Rotation = Vector3.new(-180, 89.7699966, 180)
  2347. Part109.FormFactor = Enum.FormFactor.Symmetric
  2348. Part109.Size = Vector3.new(2, 1, 1)
  2349. Part109.CFrame = CFrame.new(-39.2865143, 4.50001431, 131.948425, -1.19208508e-07, -1.32160244e-12, 0.999992132, 1.31094929e-12, 1, 1.25764373e-12, -0.999992132, 1.24701074e-12, -1.19208508e-07)
  2350. Part109.TopSurface = Enum.SurfaceType.Smooth
  2351. Part109.Color = Color3.new(1, 0.8, 0.6)
  2352. Part109.Position = Vector3.new(-39.2865143, 4.50001431, 131.948425)
  2353. Part109.Orientation = Vector3.new(0, 90, 0)
  2354. Part109.Color = Color3.new(1, 0.8, 0.6)
  2355. Decal110.Parent = Part109
  2356. Decal110.Texture = "http://www.roblox.com/asset/?id=315622231"
  2357. SpecialMesh111.Parent = Part109
  2358. SpecialMesh111.Scale = Vector3.new(1.25, 1.25, 1.25)
  2359. SpecialMesh111.Scale = Vector3.new(1.25, 1.25, 1.25)
  2360. Weld112.Name = "HeadWeld"
  2361. Weld112.Parent = Part109
  2362. Weld112.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2363. Weld112.C1 = CFrame.new(0, 0.075000003, 0.0500000007, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2364. Weld112.Part0 = Part109
  2365. Weld112.Part1 = Part62
  2366. Weld113.Name = "HeadWeld"
  2367. Weld113.Parent = Part109
  2368. Weld113.C0 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2369. Weld113.C1 = CFrame.new(0.629999995, 0.300000012, 0.100000001, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  2370. Weld113.Part0 = Part109
  2371. Weld113.Part1 = Part65
  2372. for i,v in pairs(mas:GetChildren()) do
  2373. v.Parent = workspace
  2374. pcall(function() v:MakeJoints() end)
  2375. end
  2376. mas:Destroy()
  2377. for i,v in pairs(cors) do
  2378. spawn(function()
  2379. pcall(v)
  2380. end)
  2381. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement