Advertisement
Guest User

Untitled

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