Advertisement
End_Wolf

Untitled

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