Advertisement
astronaut32

medical supplies

Dec 20th, 2016
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.11 KB | None | 0 0
  1. --[[
  2. Medical Supplies
  3. Models:
  4. - Syringe:
  5. - 0, Morphene
  6. - 1, Poison
  7. - 2, Poison Antidote
  8. - 3, Adrenaline
  9. - 4, Metabolism
  10. - 5, Knock-Out Shot
  11. - Pill Bottle:
  12. - 6, Buffout
  13. - 7, Painkillers
  14. - Medical Pack, 8
  15. --]]
  16.  
  17.  
  18. if script == nil then return end
  19.  
  20.  
  21. ModelType = script:FindFirstChild("ModelType") ~= nil and loadstring("return " ..script.ModelType.Value)() or 8
  22. ModelName = (function()
  23. if ModelType == 0 then
  24. return "Morphene Shot"
  25. elseif ModelType == 1 then
  26. return "Poison Shot"
  27. elseif ModelType == 2 then
  28. return "Poison Antidote Shot"
  29. elseif ModelType == 3 then
  30. return "Adrenaline Shot"
  31. elseif ModelType == 4 then
  32. return "Metabolism Shot"
  33. elseif ModelType == 5 then
  34. return "Knock-Out Shot"
  35. elseif ModelType == 6 then
  36. return "Buffout"
  37. elseif ModelType == 7 then
  38. return "Painkillers"
  39. elseif ModelType == 8 then
  40. return "Medical Pack"
  41. end
  42. end)()
  43. Player = script:FindFirstChild("Player") ~= nil and script.Player.Value or game:GetService("Players"):FindFirstChild("DarkShadow6")
  44. Selected = false
  45. Connected = false
  46. Button1Down = false
  47. CanUse = true
  48. FirstPerson = game:GetService("InsertService"):LoadAsset(60568552)["FirstPerson"].Value
  49. MouseAim = game:GetService("InsertService"):LoadAsset(61527949)["MouseAim"].Value
  50.  
  51.  
  52. function CheckPlayer()
  53. if Player.Character == nil then return false end
  54. if Player.Character:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Right Arm") == nil or Player.Character:FindFirstChild("Humanoid") == nil then return false end
  55. if Player.Character.Humanoid.Health <= 0 then return false end
  56. return true
  57. end
  58.  
  59.  
  60. loadstring(game:GetService("InsertService"):LoadAsset(65363615)["tagHumanoid"].Value)()
  61.  
  62.  
  63. loadstring(game:GetService("InsertService"):LoadAsset(63178291)["CameraPunch"].Value)()
  64.  
  65.  
  66. loadstring(game:GetService("InsertService"):LoadAsset(62991657)["PacketFunctions"].Value)()
  67.  
  68.  
  69. function CreateParts(Parent, Format)
  70. if Parent == nil then return end
  71. local Parts = Instance.new("Model")
  72. Parts.Name = ModelName
  73. if Format == 1 then
  74. Parts.Name = Parts.Name.. " (Holstered)"
  75. end
  76. Parts.Parent = Parent
  77.  
  78. if ModelType <= 5 then
  79. local MasterPart = Instance.new("Part")
  80. MasterPart.Name = "Handle"
  81. MasterPart.BrickColor = BrickColor.new("Institutional white")
  82. MasterPart.TopSurface = 0
  83. MasterPart.BottomSurface = 0
  84. MasterPart.Transparency = 0.5
  85. MasterPart.FormFactor = "Custom"
  86. MasterPart.Size = Vector3.new(1, 1, 1)
  87. MasterPart.Parent = Parts
  88. local Weld = Instance.new("Weld")
  89. Weld.Part0 = MasterPart
  90. if Format == 1 then
  91. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  92. Weld.C1 = CFrame.new(-0.3, 0.1, -0.6) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  93. elseif Format == 2 then
  94. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  95. Weld.C0 = CFrame.new(0, 0.1, 1.1) * CFrame.fromEulerAnglesXYZ(math.rad(70), 0, 0)
  96. end
  97. Weld.Parent = Weld.Part0
  98. Instance.new("CylinderMesh", MasterPart).Scale = Vector3.new(0.25, 1, 0.25)
  99.  
  100. local Part = Instance.new("Part")
  101. Part.Name = "Fluid"
  102. Part.BrickColor = BrickColor.new((function()
  103. if ModelType == 0 then
  104. return "Institutional white"
  105. elseif ModelType == 1 then
  106. return "Royal purple"
  107. elseif ModelType == 2 then
  108. return "New yeller"
  109. elseif ModelType == 3 then
  110. return "Neon orange"
  111. elseif ModelType == 4 then
  112. return "Neon green"
  113. elseif ModelType == 5 then
  114. return "Really blue"
  115. end
  116. end)())
  117. Part.TopSurface = 0
  118. Part.BottomSurface = 0
  119. Part.FormFactor = "Custom"
  120. Part.Size = Vector3.new(1, 1, 1)
  121. Part.Parent = Parts
  122. Instance.new("CylinderMesh", Part).Scale = Vector3.new(0.16, 0.9, 0.16)
  123. local Weld = Instance.new("Weld")
  124. Weld.Part0 = Part
  125. Weld.Part1 = MasterPart
  126. Weld.C0 = CFrame.new(0, 0.05, 0)
  127. Weld.Parent = Weld.Part0
  128.  
  129. local Part = Instance.new("Part")
  130. Part.Name = "Valve 1"
  131. Part.BrickColor = BrickColor.new("Institutional white")
  132. Part.TopSurface = 0
  133. Part.BottomSurface = 0
  134. Part.Transparency = 0.5
  135. Part.FormFactor = "Custom"
  136. Part.Size = Vector3.new(1, 1, 1)
  137. Part.Parent = Parts
  138. Instance.new("CylinderMesh", Part).Scale = Vector3.new(0.15, 0.5, 0.15)
  139. local Weld = Instance.new("Weld")
  140. Weld.Part0 = Part
  141. Weld.Part1 = MasterPart
  142. Weld.C0 = CFrame.new(0, -0.75, 0)
  143. Weld.Parent = Weld.Part0
  144.  
  145. local Part = Instance.new("Part")
  146. Part.Name = "Valve 2"
  147. Part.BrickColor = BrickColor.new("Institutional white")
  148. Part.TopSurface = 0
  149. Part.BottomSurface = 0
  150. Part.Transparency = 0.5
  151. Part.FormFactor = "Custom"
  152. Part.Size = Vector3.new(1, 1, 1)
  153. Part.Parent = Parts
  154. Instance.new("CylinderMesh", Part).Scale = Vector3.new(0.3, 0.01, 0.3)
  155. local Weld = Instance.new("Weld")
  156. Weld.Part0 = Part
  157. Weld.Part1 = MasterPart
  158. Weld.C0 = CFrame.new(0, -1, 0)
  159. Weld.Parent = Weld.Part0
  160.  
  161. local Part = Instance.new("Part")
  162. Part.Name = "Tip"
  163. Part.BrickColor = BrickColor.new("Institutional white")
  164. Part.TopSurface = 0
  165. Part.BottomSurface = 0
  166. Part.FormFactor = "Custom"
  167. Part.Size = Vector3.new(1, 1, 1)
  168. Part.Parent = Parts
  169. Instance.new("CylinderMesh", Part).Scale = Vector3.new(0.2, 0.1, 0.2)
  170. local Weld = Instance.new("Weld")
  171. Weld.Part0 = Part
  172. Weld.Part1 = MasterPart
  173. Weld.C0 = CFrame.new(0, 0.5, 0)
  174. Weld.Parent = Weld.Part0
  175.  
  176. local Part = Instance.new("Part")
  177. Part.Name = "Needle"
  178. Part.BrickColor = BrickColor.new(Format == 1 and "Institutional white" or "Silver")
  179. Part.TopSurface = 0
  180. Part.BottomSurface = 0
  181. Part.FormFactor = "Custom"
  182. Part.Size = Vector3.new(1, 1, 1)
  183. Part.Parent = Parts
  184. Instance.new("CylinderMesh", Part).Scale = Format == 1 and Vector3.new(0.15, 0.5, 0.15) or Vector3.new(0.01, 0.5, 0.01)
  185. local Weld = Instance.new("Weld")
  186. Weld.Part0 = Part
  187. Weld.Part1 = MasterPart
  188. Weld.C0 = CFrame.new(0, 0.75, 0)
  189. Weld.Parent = Weld.Part0
  190. elseif ModelType <= 7 then
  191. local MasterPart = Instance.new("Part")
  192. MasterPart.Name = "Handle"
  193. MasterPart.BrickColor = BrickColor.new((function()
  194. if ModelType == 6 then
  195. return "Reddish brown"
  196. elseif ModelType == 7 then
  197. return "Institutional white"
  198. end
  199. end)())
  200. MasterPart.TopSurface = 0
  201. MasterPart.BottomSurface = 0
  202. MasterPart.FormFactor = "Custom"
  203. MasterPart.Size = Vector3.new(0.8, 0.9, 0.8)
  204. MasterPart.Parent = Parts
  205. local Weld = Instance.new("Weld")
  206. Weld.Part0 = MasterPart
  207. if Format == 1 then
  208. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  209. Weld.C1 = CFrame.new(0, 0, 0.7) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  210. elseif Format == 2 then
  211. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  212. Weld.C0 = CFrame.new(0, 0, 1.1) * CFrame.fromEulerAnglesXYZ(math.rad(90), 0, 0)
  213. end
  214. Weld.Parent = Weld.Part0
  215. Instance.new("CylinderMesh", MasterPart)
  216.  
  217. local Part = Instance.new("Part")
  218. Part.Name = "Base"
  219. Part.BrickColor = MasterPart.BrickColor
  220. Part.TopSurface = 0
  221. Part.BottomSurface = 0
  222. Part.FormFactor = "Custom"
  223. Part.Size = Vector3.new(0.8, 0.4, 0.8)
  224. Part.Parent = Parts
  225. Instance.new("SpecialMesh", Part).MeshType = "Head"
  226. local Weld = Instance.new("Weld")
  227. Weld.Part0 = Part
  228. Weld.Part1 = MasterPart
  229. Weld.C0 = CFrame.new(0, 0.45, 0)
  230. Weld.Parent = Weld.Part0
  231.  
  232. local Part = Instance.new("Part")
  233. Part.Name = "Neck"
  234. Part.BrickColor = MasterPart.BrickColor
  235. Part.TopSurface = 0
  236. Part.BottomSurface = 0
  237. Part.FormFactor = "Custom"
  238. Part.Size = Vector3.new(0.6, 0.2, 0.6)
  239. Part.Parent = Parts
  240. Instance.new("CylinderMesh", Part)
  241. local Weld = Instance.new("Weld")
  242. Weld.Part0 = Part
  243. Weld.Part1 = MasterPart
  244. Weld.C0 = CFrame.new(0, -0.45, 0)
  245. Weld.Parent = Weld.Part0
  246.  
  247. local Part = Instance.new("Part")
  248. Part.Name = "Cap"
  249. Part.BrickColor = BrickColor.new("White")
  250. Part.TopSurface = 0
  251. Part.BottomSurface = 0
  252. Part.FormFactor = "Custom"
  253. Part.Size = Vector3.new(0.65, 0.2, 0.65)
  254. Part.Parent = Parts
  255. Instance.new("CylinderMesh", Part)
  256. local Weld = Instance.new("Weld")
  257. Weld.Part0 = Part
  258. Weld.Part1 = MasterPart
  259. Weld.C0 = CFrame.new(0, -0.65, 0)
  260. Weld.Parent = Weld.Part0
  261. else
  262. local MasterPart = Instance.new("Part")
  263. MasterPart.Name = "Handle"
  264. MasterPart.BrickColor = BrickColor.new("Really black")
  265. MasterPart.TopSurface = 0
  266. MasterPart.BottomSurface = 0
  267. MasterPart.FormFactor = "Custom"
  268. MasterPart.Size = Vector3.new(2.2, 0.2, 1.45)
  269. MasterPart.Parent = Parts
  270. local Weld = Instance.new("Weld")
  271. Weld.Part0 = MasterPart
  272. if Format == 1 then
  273. Weld.Part1 = Player.Character:FindFirstChild("Torso")
  274. Weld.C1 = CFrame.new(0, -0.15, 0.55) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(180), 0)
  275. elseif Format == 2 then
  276. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  277. Weld.C0 = CFrame.new(0, 1.15, -0.6)
  278. end
  279. Weld.Parent = Weld.Part0
  280.  
  281. local Part = Instance.new("Part")
  282. Part.Name = "Front"
  283. Part.BrickColor = BrickColor.new("Really red")
  284. Part.TopSurface = 0
  285. Part.BottomSurface = 0
  286. Part.FormFactor = "Custom"
  287. Part.Size = Vector3.new(2.25, 0.2, 1.5)
  288. Part.Parent = Parts
  289. Instance.new("BlockMesh", Part).Bevel = 0.025
  290. local Weld = Instance.new("Weld")
  291. Weld.Part0 = Part
  292. Weld.Part1 = MasterPart
  293. Weld.C0 = CFrame.new(0, 0.11, 0)
  294. Weld.Parent = Weld.Part0
  295.  
  296. local Part = Instance.new("Part")
  297. Part.Name = "Back"
  298. Part.BrickColor = BrickColor.new("Really red")
  299. Part.TopSurface = 0
  300. Part.BottomSurface = 0
  301. Part.FormFactor = "Custom"
  302. Part.Size = Vector3.new(2.25, 0.3, 1.5)
  303. Part.Parent = Parts
  304. Instance.new("BlockMesh", Part).Bevel = 0.025
  305. local Weld = Instance.new("Weld")
  306. Weld.Part0 = Part
  307. Weld.Part1 = MasterPart
  308. Weld.C0 = CFrame.new(0, -0.16, 0)
  309. Weld.Parent = Weld.Part0
  310.  
  311. local Part = Instance.new("Part")
  312. Part.Name = "Front Cross Background"
  313. Part.BrickColor = BrickColor.new("Institutional white")
  314. Part.TopSurface = 0
  315. Part.BottomSurface = 0
  316. Part.FormFactor = "Custom"
  317. Part.Size = Vector3.new(1.3, 0.2, 1)
  318. Part.Parent = Parts
  319. local Weld = Instance.new("Weld")
  320. Weld.Part0 = Part
  321. Weld.Part1 = MasterPart
  322. Weld.C0 = CFrame.new(0, 0.115, 0)
  323. Weld.Parent = Weld.Part0
  324.  
  325. local Part = Instance.new("Part")
  326. Part.Name = "Front Cross 1"
  327. Part.BrickColor = BrickColor.new("Really red")
  328. Part.TopSurface = 0
  329. Part.BottomSurface = 0
  330. Part.FormFactor = "Custom"
  331. Part.Size = Vector3.new(0.8, 0.2, 0.2)
  332. Part.Parent = Parts
  333. local Weld = Instance.new("Weld")
  334. Weld.Part0 = Part
  335. Weld.Part1 = MasterPart
  336. Weld.C0 = CFrame.new(0, 0.12, 0)
  337. Weld.Parent = Weld.Part0
  338.  
  339. local Part = Instance.new("Part")
  340. Part.Name = "Front Cross 2"
  341. Part.BrickColor = BrickColor.new("Really red")
  342. Part.TopSurface = 0
  343. Part.BottomSurface = 0
  344. Part.FormFactor = "Custom"
  345. Part.Size = Vector3.new(0.2, 0.2, 0.8)
  346. Part.Parent = Parts
  347. local Weld = Instance.new("Weld")
  348. Weld.Part0 = Part
  349. Weld.Part1 = MasterPart
  350. Weld.C0 = CFrame.new(0, 0.12, 0)
  351. Weld.Parent = Weld.Part0
  352.  
  353. local Part = Instance.new("Part")
  354. Part.Name = "Handle Left"
  355. Part.BrickColor = BrickColor.new("Really black")
  356. Part.TopSurface = 0
  357. Part.BottomSurface = 0
  358. Part.FormFactor = "Custom"
  359. Part.Size = Vector3.new(0.2, 0.2, 0.3)
  360. Part.Parent = Parts
  361. local Weld = Instance.new("Weld")
  362. Weld.Part0 = Part
  363. Weld.Part1 = MasterPart
  364. Weld.C0 = CFrame.new(0.4, -0.1, 0.75)
  365. Weld.Parent = Weld.Part0
  366.  
  367. local Part = Instance.new("Part")
  368. Part.Name = "Handle Right"
  369. Part.BrickColor = BrickColor.new("Really black")
  370. Part.TopSurface = 0
  371. Part.BottomSurface = 0
  372. Part.FormFactor = "Custom"
  373. Part.Size = Vector3.new(0.2, 0.2, 0.3)
  374. Part.Parent = Parts
  375. local Weld = Instance.new("Weld")
  376. Weld.Part0 = Part
  377. Weld.Part1 = MasterPart
  378. Weld.C0 = CFrame.new(-0.4, -0.1, 0.75)
  379. Weld.Parent = Weld.Part0
  380.  
  381. local Part = Instance.new("Part")
  382. Part.Name = "Handle Top"
  383. Part.BrickColor = BrickColor.new("Really black")
  384. Part.TopSurface = 0
  385. Part.BottomSurface = 0
  386. Part.FormFactor = "Custom"
  387. Part.Size = Vector3.new(1, 0.2, 0.2)
  388. Part.Parent = Parts
  389. local Weld = Instance.new("Weld")
  390. Weld.Part0 = Part
  391. Weld.Part1 = MasterPart
  392. Weld.C0 = CFrame.new(0, -0.1, 0.95)
  393. Weld.Parent = Weld.Part0
  394. end
  395.  
  396. for _, Part in pairs(Parts:GetChildren()) do
  397. Part.Locked = true
  398. Part.CanCollide = false
  399. end
  400. end
  401.  
  402.  
  403. function RemoveParts(Parent, Format)
  404. if Format == 1 then
  405. pcall(function() Parent[ModelName.. " (Holstered)"]:Remove() end)
  406. elseif Format == 2 then
  407. pcall(function() Parent[ModelName]:Remove() end)
  408. end
  409. end
  410.  
  411.  
  412. function SetAngle(Joint, Angle, Character)
  413. if Character == nil then return false end
  414. local Joints = {
  415. Character.Torso:FindFirstChild("Right Shoulder 2"),
  416. Character.Torso:FindFirstChild("Left Shoulder 2"),
  417. Character.Torso:FindFirstChild("Right Hip 2"),
  418. Character.Torso:FindFirstChild("Left Hip 2")
  419. }
  420. if Joints[Joint] == nil then return false end
  421. if Joint == 1 or Joint == 3 then
  422. Joints[Joint].DesiredAngle = Angle
  423. end
  424. if Joint == 2 or Joint == 4 then
  425. Joints[Joint].DesiredAngle = -Angle
  426. end
  427. end
  428.  
  429.  
  430. function ForceAngle(Joint, Angle, Character)
  431. if Character == nil then return false end
  432. local Joints = {
  433. Character.Torso:FindFirstChild("Right Shoulder 2"),
  434. Character.Torso:FindFirstChild("Left Shoulder 2"),
  435. Character.Torso:FindFirstChild("Right Hip 2"),
  436. Character.Torso:FindFirstChild("Left Hip 2")
  437. }
  438. if Joints[Joint] == nil then return false end
  439. if Joint == 1 or Joint == 3 then
  440. Joints[Joint].DesiredAngle = Angle
  441. Joints[Joint].CurrentAngle = Angle
  442. end
  443. if Joint == 2 or Joint == 4 then
  444. Joints[Joint].DesiredAngle = -Angle
  445. Joints[Joint].CurrentAngle = -Angle
  446. end
  447. end
  448.  
  449.  
  450. function SetSpeed(Joint, Speed, Character)
  451. if Character == nil then return false end
  452. local Joints = {
  453. Character.Torso:FindFirstChild("Right Shoulder 2"),
  454. Character.Torso:FindFirstChild("Left Shoulder 2"),
  455. Character.Torso:FindFirstChild("Right Hip 2"),
  456. Character.Torso:FindFirstChild("Left Hip 2")
  457. }
  458. if Joints[Joint] == nil then return false end
  459. Joints[Joint].MaxVelocity = Speed
  460. end
  461.  
  462.  
  463. function DisableLimb(Limb, Character)
  464. if Character == nil then return false end
  465. if Character:FindFirstChild("Torso") == nil then return false end
  466. local Joints = {
  467. Character.Torso:FindFirstChild("Right Shoulder"),
  468. Character.Torso:FindFirstChild("Left Shoulder"),
  469. Character.Torso:FindFirstChild("Right Hip"),
  470. Character.Torso:FindFirstChild("Left Hip")
  471. }
  472. local Limbs = {
  473. Character:FindFirstChild("Right Arm"),
  474. Character:FindFirstChild("Left Arm"),
  475. Character:FindFirstChild("Right Leg"),
  476. Character:FindFirstChild("Left Leg")
  477. }
  478. if Joints[Limb] == nil then return false end
  479. if Limbs[Limb] == nil then return false end
  480. local Joint = Instance.new("Motor6D")
  481. Joint.Parent = Character.Torso
  482. Joint.Part0 = Character.Torso
  483. Joint.Part1 = Limbs[Limb]
  484. if Limb == 1 then
  485. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  486. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  487. Joint.Name = "Right Shoulder 2"
  488. elseif Limb == 2 then
  489. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  490. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  491. Joint.Name = "Left Shoulder 2"
  492. elseif Limb == 3 then
  493. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  494. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  495. Joint.Name = "Right Hip 2"
  496. elseif Limb == 4 then
  497. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  498. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  499. Joint.Name = "Left Hip 2"
  500. end
  501. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  502. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  503. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  504. Joints[Limb]:Remove()
  505. end
  506.  
  507.  
  508. function ResetLimbCFrame(Limb, Character)
  509. if Character == nil then return false end
  510. if Character.Parent == nil then return false end
  511. if Character:FindFirstChild("Torso") == nil then return false end
  512. local Joints = {
  513. Character.Torso:FindFirstChild("Right Shoulder 2"),
  514. Character.Torso:FindFirstChild("Left Shoulder 2"),
  515. Character.Torso:FindFirstChild("Right Hip 2"),
  516. Character.Torso:FindFirstChild("Left Hip 2")
  517. }
  518. local Limbs = {
  519. Character:FindFirstChild("Right Arm"),
  520. Character:FindFirstChild("Left Arm"),
  521. Character:FindFirstChild("Right Leg"),
  522. Character:FindFirstChild("Left Leg")
  523. }
  524. if Joints[Limb] == nil then return false end
  525. if Limbs[Limb] == nil then return false end
  526. if Limb == 1 then
  527. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  528. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  529. elseif Limb == 2 then
  530. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  531. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  532. elseif Limb == 3 then
  533. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  534. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  535. elseif Limb == 4 then
  536. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  537. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  538. end
  539. end
  540.  
  541.  
  542. function EnableLimb(Limb, Character)
  543. if Character == nil then return false end
  544. if Character:FindFirstChild("Torso") == nil then return false end
  545. local Joints = {
  546. Character.Torso:FindFirstChild("Right Shoulder 2"),
  547. Character.Torso:FindFirstChild("Left Shoulder 2"),
  548. Character.Torso:FindFirstChild("Right Hip 2"),
  549. Character.Torso:FindFirstChild("Left Hip 2")
  550. }
  551. local Limbs = {
  552. Character:FindFirstChild("Right Arm"),
  553. Character:FindFirstChild("Left Arm"),
  554. Character:FindFirstChild("Right Leg"),
  555. Character:FindFirstChild("Left Leg")
  556. }
  557. if Joints[Limb] == nil then return false end
  558. if Limbs[Limb] == nil then return false end
  559. if Limb == 1 then
  560. Joints[Limb].Name = "Right Shoulder"
  561. elseif Limb == 2 then
  562. Joints[Limb].Name = "Left Shoulder"
  563. elseif Limb == 3 then
  564. Joints[Limb].Name = "Right Hip"
  565. elseif Limb == 4 then
  566. Joints[Limb].Name = "Left Hip"
  567. end
  568. Animate = Character:FindFirstChild("Animate")
  569. if Animate == nil then return false end
  570. Animate = Animate:Clone()
  571. Character.Animate:Remove()
  572. Animate.Parent = Character
  573. end
  574.  
  575.  
  576. function onButton1Down(Mouse)
  577. if Button1Down == true then return end
  578. Button1Down = true
  579. if CheckPlayer() == false then return end
  580. if CanUse == true then
  581. local Model = nil
  582. if Mouse.Target ~= nil then
  583. if Mouse.Target.Parent:FindFirstChild("Humanoid") ~= nil and Mouse.Target.Parent:FindFirstChild("Torso") ~= nil then
  584. if (Mouse.Target.Parent.Torso.Position - Player.Character[ModelName].Handle.Position).magnitude < 8 then
  585. Model = Mouse.Target.Parent
  586. end
  587. elseif Mouse.Target.Parent.Parent:FindFirstChild("Humanoid") ~= nil and Mouse.Target.Parent.Parent:FindFirstChild("Torso") ~= nil then
  588. if (Mouse.Target.Parent.Parent.Torso.Position - Player.Character[ModelName].Handle.Position).magnitude < 8 then
  589. Model = Mouse.Target.Parent.Parent
  590. end
  591. end
  592. end
  593. if Model == nil then
  594. if Player.Character:FindFirstChild("Humanoid") ~= nil and Player.Character:FindFirstChild("Torso") ~= nil then
  595. Model = Player.Character
  596. end
  597. end
  598. if Model == nil then return end
  599. if ModelType <= 5 then
  600. if (ModelType == 0 or ModelType == 7) and Model.Humanoid.Health == Model.Humanoid.MaxHealth then return end
  601. if ModelType == 1 and Model:FindFirstChild("IsPoisoned") ~= nil then return end
  602. if ModelType == 2 and Model:FindFirstChild("IsPoisoned") == nil then return end
  603. if ModelType == 3 and Model:FindFirstChild("WalkSpeedChanged") ~= nil then return end
  604. if ModelType == 5 and Model:FindFirstChild("IsKnockedOut") ~= nil then return end
  605. if (ModelType == 4 or ModelType == 6 or ModelType == 7) and (Model:FindFirstChild("IsUsingBuffout") ~= nil or Model:FindFirstChild("IsUsingPills") ~= nil) then return end
  606. CanUse = false
  607. ForceAngle(1, math.rad(90), Player.Character)
  608. if Model == Player.Character then
  609. SetSpeed(1, 0.2, Player.Character)
  610. SetAngle(1, math.rad(5), Player.Character)
  611. for i = 1, 0, -0.1 do
  612. pcall(function()
  613. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * i), 0)
  614. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  615. end)
  616. wait()
  617. end
  618. pcall(function()
  619. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0)
  620. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  621. end)
  622. end
  623. SoundToServer("Stick", "http://www.roblox.com/Asset/?id=46153268", 5, 0.5, false, Player.Character.Torso)
  624. for i = 0, 1, 0.2 do
  625. pcall(function()
  626. Player.Character[ModelName]["Valve 1"].Weld.C0 = CFrame.new(0, -0.75 + (0.5 * i), 0)
  627. Player.Character[ModelName]["Valve 2"].Weld.C0 = CFrame.new(0, -1 + (0.5 * i), 0)
  628. Player.Character[ModelName].Fluid.Mesh.Scale = Vector3.new(0.16, 0.9 * (1 - i), 0.16)
  629. Player.Character[ModelName].Fluid.Weld.C0 = CFrame.new(0, 0.05 + (0.45 * i), 0)
  630. end)
  631. wait()
  632. end
  633. if ModelType == 0 then
  634. Model.Humanoid.Health = math.min(Model.Humanoid.Health + 25, Model.Humanoid.MaxHealth)
  635. elseif ModelType == 1 then
  636. SendToServer([[Instance.new("Configuration", Model).Name = "IsPoisoned"
  637. local Victim = game:GetService("Players"):GetPlayerFromCharacter(Model)
  638. if Victim ~= nil then
  639. if Victim:FindFirstChild("PlayerGui") ~= nil then
  640. local Gui = Instance.new("ScreenGui", Victim.PlayerGui)
  641. Gui.Name = "Poison"
  642. local Frame = Instance.new("Frame", Gui)
  643. Frame.Name = "Dark Purple"
  644. Frame.Size = UDim2.new(2, 0, 2, 0)
  645. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  646. Frame.BackgroundColor3 = Color3.new(0.05, 0, 0.1)
  647. Frame.BackgroundTransparency = 1
  648. coroutine.wrap(function()
  649. while true do
  650. if Model:FindFirstChild("Humanoid") == nil then break end
  651. if Model:FindFirstChild("IsPoisoned") == nil then break end
  652. Frame.BackgroundTransparency = Model.Humanoid.Health / Model.Humanoid.MaxHealth
  653. wait()
  654. end
  655. for i = Frame.BackgroundTransparency, 1, 0.05 do
  656. Frame.BackgroundTransparency = i
  657. wait()
  658. end
  659. Gui:Remove()
  660. end)()
  661. end
  662. end
  663. while true do
  664. if Model:FindFirstChild("Humanoid") == nil then return end
  665. if Model:FindFirstChild("IsPoisoned") == nil then return end
  666. if Model.Humanoid.Health <= 0 then break end
  667. Model.Humanoid:TakeDamage(0.15)
  668. wait()
  669. end
  670. for _, Part in pairs(Model:GetChildren()) do
  671. if Part:IsA("BasePart") then
  672. coroutine.wrap(function()
  673. for i = Part.Transparency, 1, 0.01 do
  674. Part.Transparency = i
  675. Part.BrickColor = BrickColor.new("Royal purple")
  676. wait()
  677. end
  678. Part:Remove()
  679. end)()
  680. end
  681. end
  682. pcall(function() Model.IsPoisoned:Remove() end)]], "Poison", {"Model", Model})
  683. elseif ModelType == 2 then
  684. Model.IsPoisoned:Remove()
  685. elseif ModelType == 3 then
  686. pcall(function() Model.IsKnockedOut:Remove() end)
  687. local OldWalkSpeed = Model.Humanoid.WalkSpeed
  688. for i = 1, 100 do
  689. Model.Humanoid.WalkSpeed = OldWalkSpeed + 5
  690. end
  691. elseif ModelType == 4 then
  692. SendToServer([[for i = 1, 500 do
  693. if Model:FindFirstChild("Humanoid") == nil then return end
  694. if Model:FindFirstChild("IsUsingPills") ~= nil then return end
  695. if Model.Humanoid.Health <= 0 then return end
  696. Model.Humanoid.Health = math.min(Model.Humanoid.Health + 0.1, Model.Humanoid.MaxHealth)
  697. wait()
  698. end]], "Metabolism", {"Model", Model})
  699. elseif ModelType == 5 then
  700. SendToServer([[local Down = Instance.new("Configuration", Model)
  701. Down.Name = "IsKnockedOut"
  702. local Victim = game:GetService("Players"):GetPlayerFromCharacter(Model)
  703. if Victim ~= nil then
  704. if Victim:FindFirstChild("PlayerGui") ~= nil then
  705. local Gui = Instance.new("ScreenGui", Victim.PlayerGui)
  706. Gui.Name = "Knock-Out"
  707. local Frame = Instance.new("Frame", Gui)
  708. Frame.Name = "Black"
  709. Frame.Active = true
  710. Frame.Size = UDim2.new(2, 0, 2, 0)
  711. Frame.Position = UDim2.new(-0.5, 0, -0.5, 0)
  712. Frame.BackgroundColor3 = Color3.new(0, 0, 0)
  713. Frame.BackgroundTransparency = 1
  714. coroutine.wrap(function()
  715. for i = 1, 0, -0.05 do
  716. Frame.BackgroundTransparency = i
  717. wait()
  718. end
  719. Frame.BackgroundTransparency = 0
  720. while Down.Parent ~= nil do wait() end
  721. pcall(function() Model.Torso.Friction = 0 end)
  722. pcall(function() Model.Humanoid.PlatformStand = false end)
  723. for i = 0, 1, 0.01 do
  724. Frame.BackgroundTransparency = i
  725. wait()
  726. end
  727. Gui:Remove()
  728. end)()
  729. end
  730. end
  731. pcall(function() Model.Torso.Friction = 0.5 end)
  732. pcall(function() Model.Humanoid.PlatformStand = true end)
  733. pcall(function()
  734. Model.Humanoid.Changed:connect(function(Property)
  735. if Property == "PlatformStand" and Model.Humanoid.PlatformStand == false and Down.Parent ~= nil then
  736. pcall(function() Model.Humanoid.PlatformStand = true end)
  737. end
  738. end)
  739. end)
  740. wait(math.random(50000, 70000) / 1000)
  741. Down:Remove()]], "Knock-Out", {"Model", Model})
  742. end
  743. wait(0.5)
  744. SetAngle(1, math.rad(90), Player.Character)
  745. if Model == Player.Character then
  746. for i = 0, 1, 0.1 do
  747. Player.Character.Torso["Right Shoulder 2"].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 * i), 0)
  748. Player.Character.Torso["Right Shoulder 2"].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  749. wait()
  750. end
  751. ResetLimbCFrame(1, Player.Character)
  752. end
  753. SoundToServer("Stick", "http://www.roblox.com/Asset/?id=46153268", 4, 0.5, false, Player.Character.Torso)
  754. for i = 1, 0, -0.075 do
  755. pcall(function()
  756. Player.Character[ModelName]["Valve 1"].Weld.C0 = CFrame.new(0, -0.75 + (0.5 * i), 0)
  757. Player.Character[ModelName]["Valve 2"].Weld.C0 = CFrame.new(0, -1 + (0.5 * i), 0)
  758. end)
  759. wait()
  760. end
  761. pcall(function()
  762. Player.Character[ModelName]["Valve 1"].Weld.C0 = CFrame.new(0, -0.75, 0)
  763. Player.Character[ModelName]["Valve 2"].Weld.C0 = CFrame.new(0, -1, 0)
  764. end)
  765. CanUse = true
  766. elseif ModelType == 6 or ModelType == 7 then
  767. CanUse = false
  768. ForceAngle(1, math.rad(90), Player.Character)
  769. wait(0.1)
  770. pcall(function() Player.Character[ModelName].Cap:Remove() end)
  771. wait(0.5)
  772. if ModelType == 6 then
  773. SendToServer([[Instance.new("Configuration", Model).Name = "IsUsingBuffout"
  774. pcall(function() Model.Health.Disabled = true end)
  775. local OldHealth = Model.Humanoid.Health
  776. local OldMaxHealth = Model.Humanoid.MaxHealth
  777. Model.Humanoid.MaxHealth = 10000
  778. Model.Humanoid.Health = 10000 * (OldHealth / OldMaxHealth)
  779. wait(math.random(10000, 25000) / 1000)
  780. pcall(function() Model.Health.Disabled = false end)
  781. pcall(function()
  782. Model.Humanoid.Health = OldHealth * (Model.Humanoid.Health / Model.Humanoid.MaxHealth)
  783. Model.Humanoid.MaxHealth = OldMaxHealth
  784. end)
  785. pcall(function() Model.IsUsingBuffout:Remove() end)]], "Buffout", {"Model", Model})
  786. elseif ModelType == 7 then
  787. SendToServer([[if Model:FindFirstChild("IsUsingPills") ~= nil then
  788. Model.IsUsingPills:Remove()
  789. wait(0.1)
  790. end
  791. Instance.new("Configuration", Model).Name = "IsUsingPills"
  792. pcall(function() Model.Health.Disabled = true end)
  793. local OldHealth = Model.Humanoid.Health
  794. Model.Humanoid.Health = math.min(OldHealth + 50, Model.Humanoid.MaxHealth)
  795. for i = Model.Humanoid.Health, OldHealth, -0.05 do
  796. if Model:FindFirstChild("Humanoid") == nil then return end
  797. if Model:FindFirstChild("IsUsingPills") == nil then break end
  798. if Model.Humanoid.Health <= 0 then return end
  799. if Model.Humanoid.Health <= OldHealth then break end
  800. Model.Humanoid.Health = Model.Humanoid.Health - 0.05
  801. wait()
  802. end
  803. pcall(function() Model.Health.Disabled = false end)
  804. pcall(function() Model.Humanoid.Health = OldHealth end)
  805. pcall(function() Model.IsUsingPills:Remove() end)]], "Painkillers", {"Model", Model})
  806. end
  807. CanUse = true
  808. else
  809. local Sounds = {
  810. "http://www.roblox.com/Asset/?id=10209902",
  811. "http://www.roblox.com/Asset/?id=10209869",
  812. "http://www.roblox.com/Asset/?id=10209845",
  813. "http://www.roblox.com/Asset/?id=10209834",
  814. "http://www.roblox.com/Asset/?id=10209813",
  815. "http://www.roblox.com/Asset/?id=10209810",
  816. "http://www.roblox.com/Asset/?id=10209636"
  817. }
  818. local Hint = Instance.new("Hint", Workspace)
  819. local function Check()
  820. if Button1Down == false or Selected == false then
  821. return false
  822. end
  823. if Player.Character == nil then
  824. return false
  825. end
  826. if Model:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Torso") == nil or Model:FindFirstChild("Humanoid") == nil or Player.Character:FindFirstChild("Humanoid") == nil then
  827. return false
  828. end
  829. if (Model.Torso.Position - Player.Character.Torso.Position).magnitude > 8 then
  830. return false
  831. end
  832. return true
  833. end
  834. for i = 0, 3, 0.015 do
  835. if Check() == false then break end
  836. Hint.Text = "Healing " ..(Model == Player.Character and "yourself" or Model.Name) .. string.rep(".", math.ceil(i))
  837. if math.random(1, 10) == 1 then
  838. SoundToServer("Heal", Sounds[math.random(1, #Sounds)], math.random(500, 1500) / 1000, math.random(250, 500) / 1000, false, Player.Character.Torso)
  839. end
  840. wait()
  841. end
  842. Hint:Remove()
  843. if Check() == false then return end
  844. local Health = Model.Humanoid.Health + math.random(85, 110)
  845. pcall(function()
  846. if Health > Model.Humanoid.MaxHealth then
  847. local MaxHealth = Model.Humanoid.MaxHealth + (Health - Model.Humanoid.MaxHealth)
  848. for i = 1, 100 do
  849. Model.Humanoid.MaxHealth = MaxHealth
  850. end
  851. end
  852. end)
  853. wait()
  854. pcall(function()
  855. for i = 1, 100 do
  856. Model.Humanoid.Health = Health
  857. end
  858. end)
  859. if Model:FindFirstChild("Right Arm") == nil then
  860. local Limb = Instance.new("Part")
  861. Limb.Name = "Right Arm"
  862. pcall(function() Limb.BrickColor = BrickColor.new(tostring(Model["Body Colors"].RightArmColor)) end)
  863. Limb.FormFactor = 0
  864. Limb.Size = Vector3.new(1, 2, 1)
  865. Limb.Parent = Model
  866. Instance.new("Motor6D", Model.Torso).Name = "Right Shoulder"
  867. Model.Torso["Right Shoulder"].MaxVelocity = 0.1
  868. DisableLimb(1, Model)
  869. EnableLimb(1, Model)
  870. end
  871. if Model:FindFirstChild("Left Arm") == nil then
  872. local Limb = Instance.new("Part")
  873. Limb.Name = "Left Arm"
  874. pcall(function() Limb.BrickColor = BrickColor.new(tostring(Model["Body Colors"].LeftArmColor)) end)
  875. Limb.FormFactor = 0
  876. Limb.Size = Vector3.new(1, 2, 1)
  877. Limb.Parent = Model
  878. Instance.new("Motor6D", Model.Torso).Name = "Left Shoulder"
  879. Model.Torso["Left Shoulder"].MaxVelocity = 0.1
  880. DisableLimb(2, Model)
  881. EnableLimb(2, Model)
  882. end
  883. if Model:FindFirstChild("Right Leg") == nil then
  884. local Limb = Instance.new("Part")
  885. Limb.Name = "Right Leg"
  886. pcall(function() Limb.BrickColor = BrickColor.new(tostring(Model["Body Colors"].RightLegColor)) end)
  887. Limb.TopSurface = 0
  888. Limb.BottomSurface = 0
  889. Limb.FormFactor = 0
  890. Limb.Size = Vector3.new(1, 2, 1)
  891. Limb.Parent = Model
  892. Instance.new("Motor6D", Model.Torso).Name = "Right Hip"
  893. Model.Torso["Right Hip"].MaxVelocity = 0.1
  894. DisableLimb(3, Model)
  895. EnableLimb(3, Model)
  896. end
  897. if Model:FindFirstChild("Left Leg") == nil then
  898. local Limb = Instance.new("Part")
  899. Limb.Name = "Left Leg"
  900. pcall(function() Limb.BrickColor = BrickColor.new(tostring(Model["Body Colors"].LeftLegColor)) end)
  901. Limb.TopSurface = 0
  902. Limb.BottomSurface = 0
  903. Limb.FormFactor = 0
  904. Limb.Size = Vector3.new(1, 2, 1)
  905. Limb.Parent = Model
  906. Instance.new("Motor6D", Model.Torso).Name = "Left Hip"
  907. Model.Torso["Left Hip"].MaxVelocity = 0.1
  908. DisableLimb(4, Model)
  909. EnableLimb(4, Model)
  910. end
  911. end
  912. Selected = true
  913. onDeselected(Mouse)
  914. RemoveParts(Player.Character, 1)
  915. script.Parent:Remove()
  916. end
  917. end
  918.  
  919.  
  920. function onButton1Up(Mouse)
  921. Button1Down = false
  922. end
  923.  
  924.  
  925. function onKeyDown(Key, Mouse)
  926. if Selected == false then return end
  927. Key = Key:lower()
  928. if Button1Down == false and CanUse == true and CheckPlayer() == true then
  929. if Key == "q" then
  930. if Mouse.Target == nil then return end
  931. if CheckPlayer() == false then return end
  932. local NewPlayer = game:GetService("Players"):GetPlayerFromCharacter(Mouse.Target.Parent)
  933. if NewPlayer == nil then return end
  934. if NewPlayer.Character == nil then return end
  935. if NewPlayer.Character:FindFirstChild("Torso") == nil then return end
  936. if (NewPlayer.Character.Torso.Position - Player.Character.Torso.Position).magnitude > 10 then return end
  937. onDeselected(Mouse)
  938. wait()
  939. RemoveParts(Player.Character, 1)
  940. script.Parent.Parent = NewPlayer.Backpack
  941. Player = NewPlayer
  942. elseif Key == "g" then
  943. CanUse = false
  944. ForceAngle(1, math.rad(90), Player.Character)
  945. SetSpeed(1, 0.55, Player.Character)
  946. SetSpeed(2, 0.55, Player.Character)
  947. SetAngle(1, math.rad(175), Player.Character)
  948. SetAngle(2, math.rad(175), Player.Character)
  949. SoundToServer("Slash", "rbxasset://sounds/swordslash.wav", 2, 1, false, Player.Character.Torso)
  950. wait(0.1)
  951. SetSpeed(1, 0.85, Player.Character)
  952. SetSpeed(2, 0.85, Player.Character)
  953. SetAngle(1, math.rad(10), Player.Character)
  954. SetAngle(2, math.rad(10), Player.Character)
  955. local HasHit = false
  956. local _, HitConnection = pcall(function() return (Player.Character[ModelName]:FindFirstChild("Needle") or Player.Character[ModelName].Handle).Touched:connect(function(Hit)
  957. if HasHit == true or Hit:IsDescendantOf(Player.Character) then return end
  958. HasHit = true
  959. SoundToServer("Bash", "http://www.roblox.com/Asset/?id=46153268", Player.Character[ModelName]:FindFirstChild("Needle") and 10 or 2, 0.25, false, Player.Character.Torso)
  960. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  961. if Humanoid ~= nil then
  962. tagHumanoid(Humanoid)
  963. Humanoid:TakeDamage(20)
  964. wait()
  965. pcall(function() untagHumanoid(Humanoid) end)
  966. end
  967. end) end)
  968. wait(0.1)
  969. pcall(function() HitConnection:disconnect() end)
  970. SetSpeed(1, 0.2, Player.Character)
  971. SetSpeed(2, 0.2, Player.Character)
  972. SetAngle(1, math.rad(90), Player.Character)
  973. SetAngle(2, math.rad(90), Player.Character)
  974. wait(0.2)
  975. CanUse = true
  976. end
  977. end
  978. end
  979.  
  980.  
  981. function onSelected(Mouse)
  982. if Selected == true or CanUse == false then return end
  983. CanUse = false
  984. while true do
  985. if CheckPlayer() == true then
  986. if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil and Player.Character.Torso:FindFirstChild("Left Shoulder") ~= nil then
  987. break
  988. end
  989. end
  990. wait(0.1)
  991. end
  992. Selected = true
  993. DisableLimb(1, Player.Character)
  994. SetSpeed(1, 0.5, Player.Character)
  995. SetAngle(1, math.rad(90), Player.Character)
  996. wait()
  997. RemoveParts(Player.Character, 1)
  998. CreateParts(Player.Character, 2)
  999. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  1000. Mouse.Button1Down:connect(function() onButton1Down(Mouse) end)
  1001. Mouse.Button1Up:connect(function() onButton1Up(Mouse) end)
  1002. Mouse.KeyDown:connect(function(Key) onKeyDown(Key, Mouse) end)
  1003. CanUse = true
  1004. end
  1005.  
  1006.  
  1007. function onDeselected(Mouse)
  1008. if Selected == false then return end
  1009. Selected = false
  1010. while CanUse == false do wait() end
  1011. if Selected == true then return end
  1012. CanUse = false
  1013. SetSpeed(1, 0.15, Player.Character)
  1014. SetAngle(1, 0, Player.Character)
  1015. ResetLimbCFrame(1, Player.Character)
  1016. RemoveParts(Player.Character, 2)
  1017. CreateParts(Player.Character, 1)
  1018. EnableLimb(1, Player.Character)
  1019. CanUse = true
  1020. end
  1021.  
  1022.  
  1023. if script.Parent.ClassName ~= "HopperBin" then
  1024. if Player == nil then print("Error: Player not found!") return end
  1025. Tool = Instance.new("HopperBin")
  1026. Tool.Name = ModelName
  1027. Tool.Parent = Player.Backpack
  1028. Instance.new("IntValue", script).Name = "Magazine"
  1029. script.Name = "Main"
  1030. script.Parent = Tool
  1031. elseif script.Parent.ClassName == "HopperBin" and Connected == false then
  1032. Connected = true
  1033. Player = script.Parent.Parent.Parent
  1034. script.Parent.Selected:connect(onSelected)
  1035. script.Parent.Deselected:connect(onDeselected)
  1036. CreateParts(Player.Character, 1)
  1037. coroutine.wrap(loadstring(FirstPerson))()
  1038. coroutine.wrap(loadstring(MouseAim))()
  1039. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement