Advertisement
Guest User

Untitled

a guest
Aug 31st, 2017
568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.03 KB | None | 0 0
  1. --[[Medic Script created by:
  2. Fenrier: Everything.
  3. DarkShadow6: The base of the cloning.
  4. ???: I don't know who made the Medigun model. :\
  5. If you're gonna steal this, then please I ask you. Please don't forum,free model, give
  6. away, or anything like that to this script. Thank you very much :)
  7. Percent done: IDK% [I might add Bonesaw, but I also might not. So... Yea.]
  8. ]]
  9. local Owner = game:GetService('Players').LocalPlayer
  10. local Me = Owner.Character
  11. local Head = Me.Head
  12. local Torso = Me.Torso
  13. local LeftArm = Me["Left Arm"]
  14. local LeftLeg = Me["Left Leg"]
  15. local RightArm = Me["Right Arm"]
  16. local RightLeg = Me["Right Leg"]
  17. Target = Me
  18. TargetTorso = Torso
  19. pose = "Standing"
  20. animate = true
  21. toolAnim = "None"
  22. toolAnimTime = 0
  23. climbExtra = 0
  24. UBERCHARGE = 0
  25. CHARGEREADY = false
  26. CHARGED = false
  27. maxhealthdebounce = 0
  28. idledebounce = false
  29. healing = false
  30. walking = false
  31. Mode = "Medigun"
  32. chatcon = nil
  33. necko=CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  34. EnterMedic = {"Medic here!", "Los Weiter!", "Raus Raus!", "Horrido!", "Prepare for your examination.", "Hello, Frauleins!"}
  35. WalkingMedic = {"Move! Schnell!", "Mach shnell!", "Los Weiter!", "Forward!", "Good to go!", "Come over here, I promise I will heal you!"}
  36. DamagedMedic = {"Help!", "I require assistance!", "Assistance bitte!"}
  37. ChargeReadyMedic = {"I am fully charged!", "I am charged!", "Ready for ze charge, Herr doctor."}
  38. ChargedMedic = {"Charge me, Herr doctor.", "Now is ze time Herr doctor.", "Oktoberfest!", "I am ze Ubermensh!", "Schnell! Go get zem!", "Now go!", "Yah."}
  39. IdleMedic = {"That was doctor-assisted homicide!", "All I can tell you about this next procedure is that it will be... excruciating!", "Turn your head and cough.", "Achtung! Spy!", "Defend ze point!", "Another successful procedure.", "I healed the man who will kill you", "Hold still, Schweinhunds. This will only sting for a moment."}
  40. ChargedIdleMedic = {"I am ze Ubermensh!", "Oktoberfest!", "Standing near the point does nothing. Get on the point Dummkopfs!", "Haha, what a bloodbath!", "The healing is not as rewarding as the hurting!", "That was doctor-assisted homicide!", "Nein."}
  41.  
  42. --[[function findNearestTorso(pos)
  43. local list = game.Workspace:children()
  44. local torso = nil
  45. local dist = 1000
  46. local temp = nil
  47. local human = nil
  48. local temp2 = nil
  49. for x = 1, #list do
  50. temp2 = list[x]
  51. if (temp2.className == "Model") and (temp2 ~= Character) and (temp2.Name ~= "Rock Thrower") and (temp2.Name ~= "Fenrier") then
  52. temp = temp2:findFirstChild("Torso")
  53. human = temp2:findFirstChild("Humanoid")
  54. if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then
  55. if (temp.Position - pos).magnitude < dist then
  56. torso = temp
  57. dist = (temp.Position - pos).magnitude
  58. end
  59. end
  60. end
  61. end
  62. return torso
  63. end
  64.  
  65. coroutine.resume(coroutine.create(function()
  66. while true do
  67. wait(1)
  68. Target = findNearestTorso(Character.Torso.Position)
  69. TargetTorso = findNearestTorso(Character.Torso.Position)
  70. end
  71. end)) ]]
  72.  
  73. local decoy = Instance.new("Model")
  74. decoy.Parent = workspace
  75. decoy.Name = "Medic"
  76.  
  77. local decoyhead = Head:Clone()
  78. decoyhead.Parent = decoy
  79.  
  80. local decoytorso = Torso:Clone()
  81. decoytorso.Parent = decoy
  82. if decoytorso:findFirstChild("roblox") ~= nil then
  83. decoytorso.roblox.Parent = nil
  84. end
  85.  
  86. local decoyleftarm = LeftArm:Clone()
  87. decoyleftarm.Parent = decoy
  88.  
  89. local decoyrightarm = RightArm:Clone()
  90. decoyrightarm.Parent = decoy
  91.  
  92. local decoyleftleg = LeftLeg:Clone()
  93. decoyleftleg.Parent = decoy
  94.  
  95. local decoyrightleg = RightLeg:Clone()
  96. decoyrightleg.Parent = decoy
  97.  
  98. local hair = Instance.new("Hat")
  99. hair.Name = "BoySceneHair"
  100. local hairpart = Instance.new("Part")
  101. hairpart.Parent = decoy
  102. hairpart.Size = Vector3.new(1,1,2)
  103. hairpart.Name = "Handle"
  104. hairpart.formFactor = 0
  105. hairpart.BottomSurface = 0
  106. hairpart.TopSurface = 0
  107. hairpart.Locked = true
  108. hairpart.Position = decoyhead.Position
  109. local hairweld = Instance.new("Weld")
  110. hairweld.Parent = decoyhead
  111. hairweld.Part1 = decoyhead
  112. hairweld.Part0 = hairpart
  113. hairweld.C1 = CFrame.new(0, 0.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  114. local hairmesh = Instance.new("SpecialMesh")
  115. hairmesh.Parent = hairpart
  116. hairmesh.MeshId = "http://www.roblox.com/asset/?id=29880227"
  117. hairmesh.TextureId = "http://www.roblox.com/asset/?id=29880238"
  118. hair.Parent = decoy
  119. hair.AttachmentForward = Vector3.new(0, 0, -1)
  120. hair.AttachmentPos = Vector3.new(0, 0.1, -0.05)
  121. hair.AttachmentRight = Vector3.new(1, 0, 0)
  122. hair.AttachmentUp = Vector3.new(0, 1, 0)
  123.  
  124. local glasses = Instance.new("Hat")
  125. glasses.Name = "bunnyears"
  126. local glassespart = Instance.new("Part")
  127. glassespart.Parent = decoy
  128. glassespart.Size = Vector3.new(2,1,1)
  129. glassespart.Name = "Handle"
  130. glassespart.formFactor = 0
  131. glassespart.BottomSurface = 0
  132. glassespart.TopSurface = 0
  133. glassespart.Locked = true
  134. glassespart.Position = decoyhead.Position
  135. local glassesweld = Instance.new("Weld")
  136. glassesweld.Parent = decoyhead
  137. glassesweld.Part1 = decoyhead
  138. glassesweld.Part0 = glassespart
  139. glassesweld.C1 = CFrame.new(0, 0.2, -0.2, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  140. local glassesmesh = Instance.new("SpecialMesh")
  141. glassesmesh.Parent = glassespart
  142. glassesmesh.MeshId = "http://www.roblox.com/asset/?id=11419729"
  143. glassesmesh.TextureId = "http://www.roblox.com/asset/?id=11419678"
  144. glasses.Parent = decoy
  145. glasses.AttachmentForward = Vector3.new(0, 0, -1)
  146. glasses.AttachmentPos = Vector3.new(0, 0.3, 0.2)
  147. glasses.AttachmentRight = Vector3.new(1, 0, 0)
  148. glasses.AttachmentUp = Vector3.new(0, 1, 0)
  149.  
  150. local decoyhumanoid = Instance.new("Humanoid")
  151. decoyhumanoid.Parent = decoy
  152.  
  153. decoytorso.Position = Torso.Position + Vector3.new(0,5,0)
  154. LeftShoulder = Instance.new("Motor")
  155. LeftShoulder.Parent = decoytorso
  156. LeftShoulder.Part0 = decoytorso
  157. LeftShoulder.Part1 = decoyleftarm
  158. LeftShoulder.MaxVelocity = 0.1
  159. LeftShoulder.C0 = CFrame.new(-decoytorso.Size.x / 2 - decoyleftarm.Size.x / 2, decoyleftarm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -3.14 / 2, 0)
  160. LeftShoulder.C1 = CFrame.new(0, decoyleftarm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -3.14 / 2, 0)
  161. LeftShoulder.Name = "Left Shoulder"
  162. RightShoulder = Instance.new("Motor")
  163. RightShoulder.Parent = decoytorso
  164. RightShoulder.Part0 = decoytorso
  165. RightShoulder.Part1 = decoyrightarm
  166. RightShoulder.MaxVelocity = 0.1
  167. RightShoulder.C0 = CFrame.new(decoytorso.Size.x / 2 + decoyrightarm.Size.x / 2, decoyrightarm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, 3.14 / 2, 0)
  168. RightShoulder.C1 = CFrame.new(0, decoyrightarm.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, 3.14 / 2, 0)
  169. RightShoulder.Name = "Right Shoulder"
  170. LeftHip = Instance.new("Motor")
  171. LeftHip.Parent = decoytorso
  172. LeftHip.Part0 = decoytorso
  173. LeftHip.Part1 = decoyleftleg
  174. LeftHip.MaxVelocity = 0.1
  175. LeftHip.C0 = CFrame.new(-decoyleftleg.Size.x / 2, -(decoyleftleg.Size.y / 4) * 3, 0) * CFrame.fromEulerAnglesXYZ(0, -3.14 / 2, 0)
  176. LeftHip.C1 = CFrame.new(0, decoyleftleg.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, -3.14 / 2, 0)
  177. LeftHip.Name = "Left Hip"
  178. RightHip = Instance.new("Motor")
  179. RightHip.Parent = decoytorso
  180. RightHip.Part0 = decoytorso
  181. RightHip.Part1 = decoyrightleg
  182. RightHip.MaxVelocity = 0.1
  183. RightHip.C0 = CFrame.new(decoyrightleg.Size.x / 2, -(decoyrightleg.Size.y / 4) * 3, 0) * CFrame.fromEulerAnglesXYZ(0, 3.14 / 2, 0)
  184. RightHip.C1 = CFrame.new(0, decoyrightleg.Size.y / 4, 0) * CFrame.fromEulerAnglesXYZ(0, 3.14 / 2, 0)
  185. RightHip.Name = "Right Hip"
  186. Neck = Instance.new("Weld")
  187. Neck.Name = "Neck"
  188. Neck.Part0 = decoytorso
  189. Neck.Part1 = decoyhead
  190. Neck.C0 = CFrame.new(0, 1.5 * 1, 0)
  191. Neck.C1 = CFrame.new()
  192. Neck.Parent = decoytorso
  193. local GUI = Instance.new("BillboardGui")
  194. GUI.Adornee = decoytorso
  195. GUI.Parent = decoytorso
  196. GUI.Active = true
  197. GUI.Enabled = true
  198. GUI.Size = UDim2.new(1, 0, 1, 0)
  199. GUI.StudsOffset = Vector3.new(0, 4, 0)
  200. local Chat = Instance.new("TextLabel")
  201. Chat.Parent = GUI
  202. Chat.FontSize = "Size12"
  203. Chat.Position = UDim2.new(0.599999964, 0, 0, 0)
  204. Chat.Visible = true
  205. Chat.Text = " "
  206.  
  207. if Me:FindFirstChild("Animate") ~= nil then
  208. local decoyanimate = Me.Animate:Clone()
  209. decoyanimate.Parent = decoy
  210. end
  211.  
  212. local decoyshirt = Instance.new("Shirt")
  213. decoyshirt.Parent = decoy
  214. decoyshirt.ShirtTemplate = "http://www.roblox.com/asset/?id=257464122"
  215. local decoypants = Instance.new("Pants")
  216. decoypants.Parent = decoy
  217. decoypants.PantsTemplate = "http://www.roblox.com/asset/?id=257464156"
  218.  
  219. local medigun = Instance.new("Model")
  220. medigun.Parent = decoy
  221. medigun.Name = "Medigun"
  222. local medipart1 = Instance.new("Part")
  223. medipart1.Parent = medigun
  224. medipart1.BrickColor = BrickColor.new("Medium stone grey")
  225. medipart1.Name = "H1"
  226. medipart1.TopSurface = "Smooth"
  227. medipart1.BottomSurface = "Smooth"
  228. medipart1.Size = Vector3.new(1,1,1)
  229. medipart1.CanCollide = false
  230. medipart1.Position = decoyleftarm.Position
  231. local medipart2 = medipart1:Clone()
  232. medipart2.Parent = medigun
  233. medipart2.Name = "H2"
  234. local medipart3 = medipart1:Clone()
  235. medipart3.Parent = medigun
  236. medipart3.Name = "H3"
  237. local medipart4 = medipart1:Clone()
  238. medipart4.Parent = medigun
  239. medipart4.Name = "H4"
  240. local medipart5 = medipart1:Clone()
  241. medipart5.Parent = medigun
  242. medipart5.Name = "H5"
  243. local medipart6 = medipart1:Clone()
  244. medipart6.Parent = medigun
  245. medipart6.Name = "H6"
  246. local medipart7 = medipart1:Clone()
  247. medipart7.Parent = medigun
  248. medipart7.Name = "H7"
  249. local medipart8 = medipart1:Clone()
  250. medipart8.Parent = medigun
  251. medipart8.Name = "H8"
  252. local medipart9 = medipart1:Clone()
  253. medipart9.Parent = medigun
  254. medipart9.Name = "H9"
  255. local medipart10 = medipart1:Clone()
  256. medipart10.Parent = medigun
  257. medipart10.Name = "H10"
  258. local medipart11 = medipart1:Clone()
  259. medipart11.Parent = medigun
  260. medipart11.Name = "H11"
  261. local medihandle = medipart1:Clone()
  262. medihandle.Parent = medigun
  263. medihandle.Name = "Handle"
  264. medihandle.BrickColor = BrickColor.new("Bright blue")
  265. local beam = Instance.new("Part")
  266. beam.formFactor = 0
  267. beam.Transparency = 0.3
  268. beam.CanCollide = false
  269. beam.Anchored = true
  270. beam.Locked = true
  271. beam.Name = "Beam"
  272. beam.Size = Vector3.new(1,1,1)
  273. local m = Instance.new("SpecialMesh")
  274. m.Parent = beam
  275.  
  276. local medimesh1 = Instance.new("SpecialMesh")
  277. medimesh1.Parent = medipart1
  278. medimesh1.MeshType = "Head"
  279. medimesh1.Scale = Vector3.new(0.75, 1.25, 0.75)
  280. local medimesh2 = Instance.new("SpecialMesh")
  281. medimesh2.Parent = medipart2
  282. medimesh2.MeshType = "Head"
  283. medimesh2.Scale = Vector3.new(0.35, 1.75, 0.35)
  284. local medimesh3 = Instance.new("SpecialMesh")
  285. medimesh3.Parent = medipart3
  286. medimesh3.MeshType = "Head"
  287. medimesh3.Scale = Vector3.new(0.25, 1.5, 0.25)
  288. local medimesh4 = Instance.new("SpecialMesh")
  289. medimesh4.Parent = medipart4
  290. medimesh4.MeshType = "Head"
  291. medimesh4.Scale = Vector3.new(0.25, 1.5, 0.25)
  292. local medimesh5 = Instance.new("SpecialMesh")
  293. medimesh5.Parent = medipart5
  294. medimesh5.MeshType = "Head"
  295. medimesh5.Scale = Vector3.new(0.25, 1.5, 0.25)
  296. local medimesh6 = Instance.new("SpecialMesh")
  297. medimesh6.Parent = medipart6
  298. medimesh6.MeshType = "Head"
  299. medimesh6.Scale = Vector3.new(1.25, 0.75, 1.25)
  300. local medimesh7 = Instance.new("SpecialMesh")
  301. medimesh7.Parent = medipart7
  302. medimesh7.MeshType = "Head"
  303. medimesh7.Scale = Vector3.new(0.85, 1.5, 0.85)
  304. local medimesh8 = Instance.new("SpecialMesh")
  305. medimesh8.Parent = medipart8
  306. medimesh8.MeshType = "Head"
  307. medimesh8.Scale = Vector3.new(1.15, 0.65, 1.15)
  308. local medimesh9 = Instance.new("SpecialMesh")
  309. medimesh9.Parent = medipart9
  310. medimesh9.MeshType = "Brick"
  311. medimesh9.Scale = Vector3.new(0.35, 1, 0.5)
  312. local medimesh10 = Instance.new("SpecialMesh")
  313. medimesh10.Parent = medipart10
  314. medimesh10.MeshType = "Brick"
  315. medimesh10.Scale = Vector3.new(0.35, 0.25, 0.75)
  316. local medimesh11 = Instance.new("SpecialMesh")
  317. medimesh11.Parent = medipart11
  318. medimesh11.MeshType = "Head"
  319. medimesh11.Scale = Vector3.new(0.86, 1.5, 0.86)
  320. local medimesh1 = Instance.new("SpecialMesh")
  321. medimesh1.Parent = medipart1
  322. medimesh1.MeshType = "Head"
  323. medimesh1.Scale = Vector3.new(0.75, 1.25, 0.75)
  324. local hand = medihandle
  325. local h1 = medipart1
  326. local h2 = medipart2
  327. local h3 = medipart3
  328. local h4 = medipart4
  329. local h5 = medipart5
  330. local h6 = medipart6
  331. local h7 = medipart7
  332. local h8 = medipart8
  333. local h9 = medipart9
  334. local h10 = medipart10
  335. local h11 = medipart11
  336. local medipack = Instance.new("Part")
  337. medipack.formFactor = 0
  338. medipack.TopSurface = 0
  339. medipack.BottomSurface = 0
  340. medipack.Size = Vector3.new(2,2,1)
  341. medipack.BrickColor = BrickColor.new(1)
  342. medipack.Name = "Medipack"
  343. medipack.Locked = true
  344. local decal = Instance.new("Decal")
  345. decal.Face = "Back"
  346. decal.Texture = "http://www.roblox.com/asset/?id=5235213"
  347. decal.Parent = medipack
  348. wait()
  349. local w1 = Instance.new("Weld")
  350. w1.Parent = decoyleftarm
  351. w1.Part0 = decoyleftarm
  352. w1.Part1 = h1
  353. w1.C0 = CFrame.new(0,-0.5,-0.5) * CFrame.fromEulerAnglesXYZ(-math.rad(90),0,math.rad(90))
  354. local w = Instance.new("Weld")
  355. w.Parent = decoytorso
  356. w.Part0 = w.Parent
  357. w.Part1 = medipack
  358. w.C0 = CFrame.new(0,0,1)
  359. local w = Instance.new("Weld")
  360. w.Parent = hand
  361. w.Part0 = hand
  362. w.Part1 = h1
  363. w.C0 = CFrame.fromEulerAnglesXYZ(0,0,1.57)
  364. local w = Instance.new("Weld")
  365. w.Parent = hand
  366. w.Part0 = hand
  367. w.Part1 = h2
  368. w.C0 = CFrame.fromEulerAnglesXYZ(0,0,1.57)
  369. local w = Instance.new("Weld")
  370. w.Parent = hand
  371. w.Part0 = hand
  372. w.Part1 = h3
  373. w.C0 = CFrame.new(0.75,0.5,0.5) * CFrame.fromEulerAnglesXYZ(0.8,0,0)
  374. local w = Instance.new("Weld")
  375. w.Parent = hand
  376. w.Part0 = hand
  377. w.Part1 = h4
  378. w.C0 = CFrame.new(-0.75,0.5,0.5) * CFrame.fromEulerAnglesXYZ(0.8,0,0)
  379. local w = Instance.new("Weld")
  380. w.Parent = hand
  381. w.Part0 = hand
  382. w.Part1 = h5
  383. w.C0 = CFrame.new(0,0.95,0.95) * CFrame.fromEulerAnglesXYZ(0,0,1.57)
  384. local w = Instance.new("Weld")
  385. w.Parent = hand
  386. w.Part0 = hand
  387. w.Part1 = h6
  388. w.C0 = CFrame.new(0,0,-0.6) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
  389. local w = Instance.new("Weld")
  390. w.Parent = hand
  391. w.Part0 = hand
  392. w.Part1 = h7
  393. w.C0 = CFrame.new(0,0,-1.5) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
  394. local w = Instance.new("Weld")
  395. w.Parent = hand
  396. w.Part0 = hand
  397. w.Part1 = h8
  398. w.C0 = CFrame.new(0,0,-2) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
  399. local w = Instance.new("Weld")
  400. w.Parent = hand
  401. w.Part0 = hand
  402. w.Part1 = h9
  403. w.C0 = CFrame.new(0,-0.75,-0.45) * CFrame.fromEulerAnglesXYZ(-0.4,0,0)
  404. local w = Instance.new("Weld")
  405. w.Parent = hand
  406. w.Part0 = hand
  407. w.Part1 = h10
  408. w.C0 = CFrame.new(0,-1.35,-0.3) * CFrame.fromEulerAnglesXYZ(-0.4,0,0)
  409. local w = Instance.new("Weld")
  410. w.Parent = hand
  411. w.Part0 = hand
  412. w.Part1 = h11
  413. w.C0 = CFrame.new(0,0,0.5) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
  414. wait()
  415.  
  416. function EnterMedicChat()
  417. if decoyhumanoid.Health ~= 0 then
  418. coroutine.resume(coroutine.create(function()
  419. Chat.Text = EnterMedic[math.random(1,#EnterMedic)]
  420. wait(5)
  421. Chat.Text = " "
  422. end))
  423. end
  424. end
  425.  
  426. function WalkingMedicChat()
  427. if decoyhumanoid.Health ~= 0 then
  428. coroutine.resume(coroutine.create(function()
  429. Chat.Text = WalkingMedic[math.random(1,#WalkingMedic)]
  430. wait(5)
  431. Chat.Text = " "
  432. end))
  433. end
  434. end
  435.  
  436. function DamagedMedicChat()
  437. coroutine.resume(coroutine.create(function()
  438. Chat.Text = DamagedMedic[math.random(1,#DamagedMedic)]
  439. wait(5)
  440. Chat.Text = " "
  441. end))
  442. end
  443.  
  444. function ChargeReadyMedicChat()
  445. if decoyhumanoid.Health ~= 0 then
  446. coroutine.resume(coroutine.create(function()
  447. Chat.Text = ChargeReadyMedic[math.random(1,#ChargeReadyMedic)]
  448. wait(5)
  449. Chat.Text = " "
  450. end))
  451. end
  452. end
  453.  
  454. function ChargedMedicChat()
  455. if decoyhumanoid.Health ~= 0 then
  456. coroutine.resume(coroutine.create(function()
  457. Chat.Text = ChargedMedic[math.random(1,#ChargedMedic)]
  458. wait(5)
  459. Chat.Text = " "
  460. end))
  461. end
  462. end
  463.  
  464. function IdleMedicChat()
  465. if decoyhumanoid.Health ~= 0 then
  466. coroutine.resume(coroutine.create(function()
  467. if CHARGED ~= true then
  468. Chat.Text = IdleMedic[math.random(1,#IdleMedic)]
  469. else
  470. Chat.Text = ChargedIdleMedic[math.random(1,#ChargedIdleMedic)]
  471. end
  472. wait(5)
  473. Chat.Text = " "
  474. end))
  475. end
  476. end
  477.  
  478. EnterMedicChat()
  479.  
  480. function onChatted2(msg, recipient)
  481. if msg == "CHARGE NAO DOKTAR" or msg == "CHARGE ME" then
  482. if CHARGEREADY == true then
  483. ChargedMedicChat()
  484. CHARGED = true
  485. CHARGEREADY = false
  486. UBERCHARGE = 0
  487. local chargeff = Instance.new("ForceField")
  488. chargeff.Parent = Target
  489. local chargeff2 = Instance.new("ForceField")
  490. chargeff2.Parent = decoy
  491. for i = 0,500 do
  492. wait()
  493. if (Torso.Position - medipart8.Position).magnitude <= 30 then
  494. chargeff.Parent = Target
  495. chargeff2.Parent = decoy
  496. else
  497. chargeff.Parent = nil
  498. end
  499. UBERCHARGE = 0
  500. end
  501. CHARGED = false
  502. chargeff.Parent = nil
  503. chargeff2.Parent = nil
  504. end
  505. end
  506. end
  507.  
  508. function onChatted(msg, recipient)
  509. if string.sub(msg, 0, 5) == "heal/" then
  510. for i, v in pairs(game.Players:GetChildren()) do
  511. if v.Character ~= nil then
  512. if string.sub(msg,6) ~= "" and string.lower(string.sub(v.Name, 1, string.len(string.sub(msg, 6)))) == string.lower(string.sub(msg, 6)) then
  513. if v.Character:FindFirstChild("Torso") ~= nil then
  514. Target = v.Character
  515. TargetTorso = v.Character.Torso
  516. if chatcon ~= nil then
  517. chatcon:disconnect()
  518. chatcon=v.Chatted:connect(function(msg, recipient) onChatted2(msg, recipient) end)
  519. end
  520. end
  521. end
  522. end
  523. end
  524. end
  525. --[[if string.find(msg, "heal/") then
  526. c = game.Players:GetChildren()
  527. for blawg = 1, #c do
  528. if string.find(msg, c[blawg].Name) then
  529. Target = c[blawg].Character
  530. TargetTorso = Target.Torso
  531. else
  532. wait()
  533. end
  534. end
  535. end ]]
  536. end
  537.  
  538. chatcon=Owner.Chatted:connect(function(msg, recipient) onChatted2(msg, recipient) end)
  539.  
  540. function move(time)
  541. if animate == false then return end
  542. local amplitude
  543. local frequency
  544. if pose == "Jumping" then
  545. RightShoulder.MaxVelocity = 0.5
  546. LeftShoulder.MaxVelocity = 0.5
  547. RightShoulder.DesiredAngle = 3.14
  548. LeftShoulder.DesiredAngle = -3.14
  549. RightHip.DesiredAngle = 0
  550. LeftHip.DesiredAngle = 0
  551. return
  552. end
  553. if pose == "FreeFall" then
  554. RightShoulder.MaxVelocity = 0.5
  555. LeftShoulder.MaxVelocity = 0.5
  556. RightShoulder.DesiredAngle = 3.14
  557. LeftShoulder.DesiredAngle = -3.14
  558. RightHip.DesiredAngle = 0
  559. LeftHip.DesiredAngle = 0
  560. return
  561. end
  562. if pose == "Seated" then
  563. RightShoulder.MaxVelocity = 0.15
  564. LeftShoulder.MaxVelocity = 0.15
  565. RightShoulder.DesiredAngle = 3.14 / 2
  566. LeftShoulder.DesiredAngle = -3.14 / 2
  567. RightHip.DesiredAngle = 3.14 / 2
  568. LeftHip.DesiredAngle = -3.14 / 2
  569. return
  570. end
  571. if pose == "Running" then
  572. RightShoulder.MaxVelocity = 0.15
  573. LeftShoulder.MaxVelocity = 0.15
  574. amplitude = 1
  575. frequency = 9
  576. elseif pose == "climbExtra" then
  577. RightShoulder.MaxVelocity = 0.5
  578. LeftShoulder.MaxVelocity = 0.5
  579. amplitude = 1
  580. frequency = 9
  581. climbExtra = 3.14
  582. else
  583. amplitude = 0.1
  584. frequency = 1
  585. end
  586. desiredAngle = amplitude * math.sin(time * frequency)
  587. RightShoulder.DesiredAngle = desiredAngle + climbExtra
  588. LeftShoulder.DesiredAngle = desiredAngle - climbExtra
  589. RightHip.DesiredAngle = -desiredAngle
  590. LeftHip.DesiredAngle = -desiredAngle
  591. for _, Children in ipairs(decoy:GetChildren()) do
  592. if Children.className == "Tool" then
  593. local tool = Children
  594. end
  595. end
  596. if tool then
  597. for _, Children in ipairs(decoy:GetChildren()) do
  598. if Children.Name == "toolanim" and Children.className == "StringValue" then
  599. local animStringValueObject = Children
  600. end
  601. end
  602. if animStringValueObject then
  603. toolAnim = animStringValueObject.Value
  604. animStringValueObject.Parent = nil
  605. elseif time > toolAnimTime then
  606. toolAnimTime = 0
  607. end
  608. if toolAnim == "None" then
  609. RightShoulder.DesiredAngle = 1.57
  610. elseif toolAnim == "Slash" then
  611. RightShoulder.MaxVelocity = 0.5
  612. RightShoulder.DesiredAngle = 0
  613. elseif toolAnim == "Lunge" then
  614. RightShoulder.MaxVelocity = 0.5
  615. LeftShoulder.MaxVelocity = 0.5
  616. RightHip.MaxVelocity = 0.5
  617. LeftHip.MaxVelocity = 0.5
  618. RightShoulder.DesiredAngle = 1.57
  619. LeftShoulder.DesiredAngle = 1.0
  620. RightHip.DesiredAngle = 1.57
  621. LeftHip.DesiredAngle = 1.0
  622. end
  623. else
  624. toolAnim = "None"
  625. toolAnimTime = 0
  626. end
  627. end
  628. decoyhumanoid.Died:connect(function() pose = "Dead" wait(5.5) if decoy == nil then return end decoy:Remove() end)
  629. decoyhumanoid.Running:connect(function(speed) if speed > 0 then pose = "Running" else pose = "Standing" end end)
  630. decoyhumanoid.Jumping:connect(function() pose = "Jumping" end)
  631. decoyhumanoid.Climbing:connect(function() pose = "climbExtra" end)
  632. decoyhumanoid.GettingUp:connect(function() pose = "GettingUp" end)
  633. decoyhumanoid.FreeFalling:connect(function() pose = "FreeFall" end)
  634. decoyhumanoid.FallingDown:connect(function() pose = "FallingDown" end)
  635. decoyhumanoid.Seated:connect(function() pose = "Seated" end)
  636. decoyhumanoid.PlatformStanding:connect(function() pose = "PlatformStanding" end)
  637. Owner.Chatted:connect(function(msg, recipient) onChatted(msg, recipient) end)
  638.  
  639. RW, LW = Instance.new("Weld"), Instance.new("Weld")
  640. RightShoulder.Parent = nil
  641. LeftShoulder.Parent = nil
  642. RW.Part0 = decoytorso
  643. RW.C0 = CFrame.new(1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.3, 0, -0.5)
  644. RW.C1 = CFrame.new(0, 0.5, 0)
  645. RW.Part1 = decoyrightarm
  646. RW.Parent = decoytorso
  647. _G.R = RW
  648. LW.Part0 = decoytorso
  649. LW.C0 = CFrame.new(-1.5, 0.5, 0) --* CFrame.fromEulerAnglesXYZ(1.7, 0, 0.8)
  650. LW.C1 = CFrame.new(0, 0.5, 0)
  651. LW.Part1 = decoyleftarm
  652. LW.Parent = decoytorso
  653. _G.L = LW
  654. wait(1)
  655. for i = 0,1,0.1 do
  656. wait()
  657. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7*i,0,0)
  658. RW.C1 = CFrame.new(0, 0.5, 0)
  659. LW.C0 = CFrame.new(-1.5+1.6*i, 0.5-0.3*i, -1*i) * CFrame.fromEulerAnglesXYZ(1*i,0,0)
  660. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,-0.8*i)
  661. w1.C0 = CFrame.new(0.7*i,-0.5,-0.5+0.1*i) * CFrame.fromEulerAnglesXYZ(-math.rad(90)+0.75*i,0.75*i,math.rad(90)-0.5*i)
  662. end
  663. wait(1)
  664. local b = Instance.new("BodyGyro")
  665. b.P=18000
  666. b.D=600
  667. b.maxTorque=Vector3.new(80000,80000000,80000)*50000000000000000000000000
  668. b.Parent = decoyhead
  669. coroutine.resume(coroutine.create(function()
  670. lhh = decoyhumanoid.Health
  671. while true do
  672. wait()
  673. if decoyhumanoid.Health < lhh then
  674. DamagedMedicChat()
  675. lhh = decoyhumanoid.Health
  676. end
  677. decoyhumanoid.PlatformStand = false
  678. decoyhumanoid.Sit = false
  679. if healing ~= true and Mode == "Medigun" then
  680. WalkingMedicChat()
  681. decoyhumanoid:MoveTo(TargetTorso.Position + Vector3.new(math.random(-30,30),math.random(-30,30),math.random(-30,30)), TargetTorso)
  682. wait(3)
  683. else
  684. for i = 0,100 do
  685. if healing == true and idledebounce == false then
  686. wait()
  687. end
  688. if healing == true then
  689. coroutine.resume(coroutine.create(function()
  690. if idledebounce == false then
  691. idledebounce = true
  692. IdleMedicChat()
  693. wait(10)
  694. idledebounce = false
  695. end
  696. end))
  697. end
  698. end
  699. end
  700. end
  701. end))
  702. coroutine.resume(coroutine.create(function()
  703. while true do
  704. for i = 0,5 do
  705. wait(0.1)
  706. beam.Reflectance = beam.Reflectance + 0.2
  707. m.Scale = m.Scale + Vector3.new(0.1,0,0.1)
  708. end
  709. for i = 0,5 do
  710. wait(0.1)
  711. beam.Reflectance = beam.Reflectance - 0.2
  712. m.Scale = m.Scale - Vector3.new(0.1,0,0.1)
  713. end
  714. end
  715. end))
  716. while true do
  717. wait(0)
  718. move(game:GetService("Workspace").DistributedGameTime)
  719. if (TargetTorso.Position - medipart8.Position).magnitude <= 30 then
  720. healing = true
  721. beam.BrickColor = TargetTorso.BrickColor
  722. beam.Parent = decoy
  723. beam.CFrame = CFrame.new((TargetTorso.Position + medipart8.Position) / 2, TargetTorso.Position) * CFrame.fromEulerAnglesXYZ(1.57,0,0)
  724. m.Scale = (m.Scale - Vector3.new(0,m.Scale.y,0)) + Vector3.new(0,1,0)
  725. m.Scale = m.Scale + Vector3.new(0,(TargetTorso.Position - medipart8.Position).magnitude - 1,0)
  726. Target.Humanoid.Health = Target.Humanoid.Health + 0.3
  727. decoyhumanoid.Health = decoyhumanoid.Health + 0.1
  728. --[[offset=(decoytorso.Position.y-TargetTorso.Position.y)/60
  729. mag=(decoytorso.Position-TargetTorso.Position).magnitude/80
  730. offset=offset/mag
  731. decoytorso.Neck.C0=necko*CFrame.fromEulerAnglesXYZ(offset,0,0)
  732. RW.C0 = CFrame.new(1.5,0.5,0) * CFrame.fromEulerAnglesXYZ(1.2+0.37-offset,0,0)
  733. LW.C0 = CFrame.new(-1.5+1.5,0.5,-1.4) * CFrame.fromEulerAnglesXYZ(1.7,-offset,0.9)
  734. RW.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(1.7-offset,0,0)
  735. RW.C1 = CFrame.new(0, 0.5, 0)
  736. LW.C0 = CFrame.new(-1.5+1.6, 0.5-0.3, -1) * CFrame.fromEulerAnglesXYZ(1,-offset,0)
  737. LW.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0,0,-0.8) ]]
  738. if UBERCHARGE <= 100 then
  739. --if UBERCHARGE <= 50 then
  740. UBERCHARGE = UBERCHARGE + 1
  741. elseif CHARGEREADY == false then
  742. ChargeReadyMedicChat()
  743. CHARGEREADY = true
  744. local s = Instance.new("Sparkles")
  745. s.Parent = medipart8
  746. coroutine.resume(coroutine.create(function()
  747. wait(5)
  748. s.Parent = nil
  749. end))
  750. end
  751. else
  752. healing = false
  753. beam.Parent = nil
  754. end
  755. local dir = (TargetTorso.Position - decoytorso.Position).unit
  756. local spawnpos = decoytorso.Position
  757. local pos = spawnpos + (dir * 1)
  758. b.cframe = CFrame.new(pos, pos + dir)
  759. if Target.Parent == nil and Target == Me then
  760. decoy:BreakJoints()
  761. end
  762. if Target:findFirstChild("Humanoid") ~= nil then
  763. if Target.Humanoid.Health == 0 and Target == Me then
  764. decoy:BreakJoints()
  765. end
  766. else
  767. Target = Me
  768. TargetTorso = Torso
  769. end
  770. end
  771. -- lego This acts as a chat filter. Don't ask why I do it. I just do >.>
  772. --[[
  773. Copyrighted (C) Fenrier 2011
  774. This script is copyrighted for Fenrier. Any use of this script is breaking
  775. this copyright.
  776. All Rights Reserved.
  777. ]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement