Advertisement
lafur

Untitled

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