Advertisement
lafur

Untitled

Jun 21st, 2019
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2. TNT
  3. Old-fashon explosives!
  4. --]]
  5.  
  6.  
  7. if script == nil then return end
  8.  
  9.  
  10. ModelName = "TNT"
  11. Player = script:FindFirstChild("Player") ~= nil and script.Player.Value or game:GetService("Players"):FindFirstChild("timetodie23232223")
  12. Selected = false
  13. Connected = false
  14. Button1Down = false
  15. CanUse = true
  16. Primed = false
  17. Thrown = false
  18. ProjectileData = [[Blast_Size = 25
  19. Blast_Strength = 90
  20. Blast_Sound = false
  21. ]] ..game:GetService("InsertService"):LoadAsset(60548640)["ProjectileData"].Value
  22. FirstPerson = game:GetService("InsertService"):LoadAsset(60568552)["FirstPerson"].Value
  23. MouseAim = game:GetService("InsertService"):LoadAsset(61527949)["MouseAim"].Value
  24.  
  25.  
  26. function CheckPlayer()
  27. if Player.Character == nil then return false end
  28. if Player.Character:FindFirstChild("Torso") == nil or Player.Character:FindFirstChild("Right Arm") == nil or Player.Character:FindFirstChild("Left Arm") == nil or Player.Character:FindFirstChild("Humanoid") == nil then return false end
  29. if Player.Character.Humanoid.Health <= 0 then return false end
  30. return true
  31. end
  32.  
  33.  
  34. loadstring(game:GetService("InsertService"):LoadAsset(65363615)["tagHumanoid"].Value)()
  35.  
  36.  
  37. loadstring(game:GetService("InsertService"):LoadAsset(63178291)["CameraPunch"].Value)()
  38.  
  39.  
  40. loadstring(game:GetService("InsertService"):LoadAsset(62991657)["PacketFunctions"].Value)()
  41.  
  42.  
  43. function CreateParts(Parent, Format)
  44. if Parent == nil then return end
  45. local Parts = Instance.new("Model")
  46. Parts.Name = ModelName
  47. if Format == 1 then
  48. Parts.Name = Parts.Name.. " (Holstered)"
  49. end
  50. Parts.Parent = Parent
  51.  
  52. local MasterPart1 = Instance.new("Part")
  53. MasterPart1.Name = "Handle"
  54. MasterPart1.BrickColor = BrickColor.new("White")
  55. MasterPart1.TopSurface = 0
  56. MasterPart1.BottomSurface = 0
  57. MasterPart1.FormFactor = "Custom"
  58. MasterPart1.Size = Vector3.new(0.51, 0.2, 0.51)
  59. MasterPart1.Parent = Parts
  60. Instance.new("CylinderMesh", MasterPart1)
  61. local Weld = Instance.new("Weld")
  62. Weld.Part0 = MasterPart1
  63. if Format == 1 then
  64. Weld.Part1 = Player.Character:FindFirstChild("Left Leg")
  65. Weld.C0 = CFrame.new(-0.65, 0, 0.8) * CFrame.fromEulerAnglesXYZ(0, math.rad(180), math.rad(90))
  66. elseif Format == 2 then
  67. Weld.Part1 = Player.Character:FindFirstChild("Right Arm")
  68. Weld.C1 = CFrame.new(0, -1.2, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(90), 0)
  69. end
  70. Weld.Parent = Weld.Part0
  71. local Smoke = Instance.new("Smoke", MasterPart1)
  72. Smoke.Enabled = false
  73. Smoke.RiseVelocity = 5
  74. Smoke.Size = 1
  75. Smoke.Opacity = 0.3
  76.  
  77. for i = 1, 3 do
  78. local Part = Instance.new("Part")
  79. Part.Name = "Stick " ..i
  80. Part.BrickColor = BrickColor.new("Really red")
  81. Part.TopSurface = 0
  82. Part.BottomSurface = 0
  83. Part.FormFactor = "Custom"
  84. Part.Size = Vector3.new(0.35, 1.5, 0.35)
  85. Part.Parent = Parts
  86. local Weld = Instance.new("Weld")
  87. Weld.Part0 = Part
  88. Weld.Part1 = MasterPart1
  89. Weld.C0 = CFrame.new(0, 0, 0.19) * CFrame.fromEulerAnglesXYZ(0, math.rad(360) * (i / 3), 0)
  90. Weld.Parent = Weld.Part0
  91. Instance.new("CylinderMesh", Part)
  92.  
  93. local Part = Instance.new("Part")
  94. Part.Name = "Stick Band " ..i
  95. Part.BrickColor = BrickColor.new("White")
  96. Part.TopSurface = 0
  97. Part.BottomSurface = 0
  98. Part.FormFactor = "Custom"
  99. Part.Size = Vector3.new(0.4, 0.2, 0.4)
  100. Part.Parent = Parts
  101. local Weld = Instance.new("Weld")
  102. Weld.Part0 = Part
  103. Weld.Part1 = MasterPart1
  104. Weld.C0 = CFrame.new(0, 0, 0.19) * CFrame.fromEulerAnglesXYZ(0, math.rad(360) * (i / 3), 0)
  105. Weld.Parent = Weld.Part0
  106. Instance.new("CylinderMesh", Part)
  107.  
  108. local Part = Instance.new("Part")
  109. Part.Name = "Stick Wick End " ..i
  110. Part.BrickColor = BrickColor.new("White")
  111. Part.TopSurface = 0
  112. Part.BottomSurface = 0
  113. Part.FormFactor = "Custom"
  114. Part.Size = Vector3.new(0.2, 0.2, 0.2)
  115. Part.Parent = Parts
  116. local Weld = Instance.new("Weld")
  117. Weld.Part0 = Part
  118. Weld.Part1 = MasterPart1
  119. Weld.C0 = CFrame.new(0, -0.75, 0.19) * CFrame.fromEulerAnglesXYZ(0, math.rad(360) * (i / 3), 0)
  120. Weld.Parent = Weld.Part0
  121. Instance.new("CylinderMesh", Part).Scale = Vector3.new(0.3, 0.1, 0.3)
  122.  
  123. local Part = Instance.new("Part")
  124. Part.Name = "Stick Wick " ..i
  125. Part.BrickColor = BrickColor.new("White")
  126. Part.TopSurface = 0
  127. Part.BottomSurface = 0
  128. Part.FormFactor = "Custom"
  129. Part.Size = Vector3.new(0.2, 0.2, 0.2)
  130. Part.Parent = Parts
  131. local Weld = Instance.new("Weld")
  132. Weld.Part0 = Part
  133. Weld.Part1 = MasterPart1
  134. Weld.C0 = CFrame.new(0, -0.75, 0.09) * CFrame.fromEulerAnglesXYZ(0, math.rad(360) * (i / 3), 0)
  135. Weld.Parent = Weld.Part0
  136. local Mesh = Instance.new("SpecialMesh", Part)
  137. Mesh.MeshType = "Brick"
  138. Mesh.Scale = Vector3.new(0.3, 0.1, 0.9)
  139. end
  140.  
  141. local Part = Instance.new("Part")
  142. Part.Name = "Wick"
  143. Part.BrickColor = BrickColor.new("White")
  144. Part.TopSurface = 0
  145. Part.BottomSurface = 0
  146. Part.FormFactor = "Custom"
  147. Part.Size = Vector3.new(0.2, 0.5, 0.2)
  148. Part.Parent = Parts
  149. local Weld = Instance.new("Weld")
  150. Weld.Part0 = Part
  151. Weld.Part1 = MasterPart1
  152. Weld.C0 = CFrame.new(0, -1, 0)
  153. Weld.Parent = Weld.Part0
  154. Instance.new("CylinderMesh", Part).Scale = Vector3.new(0.3, 1, 0.3)
  155.  
  156. local MasterPart2 = Instance.new("Part")
  157. MasterPart2.Name = "Match"
  158. MasterPart2.BrickColor = BrickColor.new("Pastel brown")
  159. MasterPart2.TopSurface = 0
  160. MasterPart2.BottomSurface = 0
  161. MasterPart2.FormFactor = "Custom"
  162. MasterPart2.Size = Vector3.new(0.2, 0.5, 0.2)
  163. MasterPart2.Parent = Parts
  164. Instance.new("CylinderMesh", MasterPart2).Scale = Vector3.new(0.025 / 0.2, 1, 0.025 / 0.2)
  165. local Weld = Instance.new("Weld")
  166. Weld.Part0 = MasterPart2
  167. Weld.Part1 = MasterPart1
  168. Weld.C0 = CFrame.new(0, 0, 0.375)
  169. Weld.Parent = Weld.Part0
  170.  
  171. local Part = Instance.new("Part")
  172. Part.Name = "Match Tip"
  173. Part.BrickColor = BrickColor.new("Bright red")
  174. Part.TopSurface = 0
  175. Part.BottomSurface = 0
  176. Part.FormFactor = "Custom"
  177. Part.Size = Vector3.new(0.2, 0.2, 0.2)
  178. Part.Parent = Parts
  179. local Mesh = Instance.new("SpecialMesh", Part)
  180. Mesh.MeshType = "Sphere"
  181. Mesh.Scale = Vector3.new(0.06 / 0.2, 0.09 / 0.2, 0.06 / 0.2)
  182. local Weld = Instance.new("Weld")
  183. Weld.Part0 = Part
  184. Weld.Part1 = MasterPart2
  185. Weld.C0 = CFrame.new(0, -0.25, 0)
  186. Weld.Parent = Weld.Part0
  187.  
  188. for _, Part in pairs(Parts:GetChildren()) do
  189. Part.Locked = true
  190. Part.CanCollide = false
  191. end
  192. end
  193.  
  194.  
  195. function RemoveParts(Parent, Format)
  196. if Format == 1 then
  197. pcall(function() Parent[ModelName.. " (Holstered)"]:Remove() end)
  198. elseif Format == 2 then
  199. pcall(function() Parent[ModelName]:Remove() end)
  200. end
  201. end
  202.  
  203.  
  204. function SetAngle(Joint, Angle, Character)
  205. if Character == nil then return false end
  206. local Joints = {
  207. Character.Torso:FindFirstChild("Right Shoulder 2"),
  208. Character.Torso:FindFirstChild("Left Shoulder 2"),
  209. Character.Torso:FindFirstChild("Right Hip 2"),
  210. Character.Torso:FindFirstChild("Left Hip 2")
  211. }
  212. if Joints[Joint] == nil then return false end
  213. if Joint == 1 or Joint == 3 then
  214. Joints[Joint].DesiredAngle = Angle
  215. end
  216. if Joint == 2 or Joint == 4 then
  217. Joints[Joint].DesiredAngle = -Angle
  218. end
  219. end
  220.  
  221.  
  222. function ForceAngle(Joint, Angle, Character)
  223. if Character == nil then return false end
  224. local Joints = {
  225. Character.Torso:FindFirstChild("Right Shoulder 2"),
  226. Character.Torso:FindFirstChild("Left Shoulder 2"),
  227. Character.Torso:FindFirstChild("Right Hip 2"),
  228. Character.Torso:FindFirstChild("Left Hip 2")
  229. }
  230. if Joints[Joint] == nil then return false end
  231. if Joint == 1 or Joint == 3 then
  232. Joints[Joint].DesiredAngle = Angle
  233. Joints[Joint].CurrentAngle = Angle
  234. end
  235. if Joint == 2 or Joint == 4 then
  236. Joints[Joint].DesiredAngle = -Angle
  237. Joints[Joint].CurrentAngle = -Angle
  238. end
  239. end
  240.  
  241.  
  242. function SetSpeed(Joint, Speed, Character)
  243. if Character == nil then return false end
  244. local Joints = {
  245. Character.Torso:FindFirstChild("Right Shoulder 2"),
  246. Character.Torso:FindFirstChild("Left Shoulder 2"),
  247. Character.Torso:FindFirstChild("Right Hip 2"),
  248. Character.Torso:FindFirstChild("Left Hip 2")
  249. }
  250. if Joints[Joint] == nil then return false end
  251. Joints[Joint].MaxVelocity = Speed
  252. end
  253.  
  254.  
  255. function DisableLimb(Limb, Character)
  256. if Character == nil then return false end
  257. if Character:FindFirstChild("Torso") == nil then return false end
  258. local Joints = {
  259. Character.Torso:FindFirstChild("Right Shoulder"),
  260. Character.Torso:FindFirstChild("Left Shoulder"),
  261. Character.Torso:FindFirstChild("Right Hip"),
  262. Character.Torso:FindFirstChild("Left Hip")
  263. }
  264. local Limbs = {
  265. Character:FindFirstChild("Right Arm"),
  266. Character:FindFirstChild("Left Arm"),
  267. Character:FindFirstChild("Right Leg"),
  268. Character:FindFirstChild("Left Leg")
  269. }
  270. if Joints[Limb] == nil then return false end
  271. if Limbs[Limb] == nil then return false end
  272. local Joint = Instance.new("Motor6D")
  273. Joint.Parent = Character.Torso
  274. Joint.Part0 = Character.Torso
  275. Joint.Part1 = Limbs[Limb]
  276. if Limb == 1 then
  277. Joint.C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  278. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  279. Joint.Name = "Right Shoulder 2"
  280. elseif Limb == 2 then
  281. Joint.C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  282. Joint.C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  283. Joint.Name = "Left Shoulder 2"
  284. elseif Limb == 3 then
  285. Joint.C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  286. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  287. Joint.Name = "Right Hip 2"
  288. elseif Limb == 4 then
  289. Joint.C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  290. Joint.C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  291. Joint.Name = "Left Hip 2"
  292. end
  293. Joint.MaxVelocity = Joints[Limb].MaxVelocity
  294. Joint.CurrentAngle = Joints[Limb].CurrentAngle
  295. Joint.DesiredAngle = Joints[Limb].DesiredAngle
  296. Joints[Limb]:Remove()
  297. end
  298.  
  299.  
  300. function ResetLimbCFrame(Limb, Character)
  301. if Character == nil then return false end
  302. if Character.Parent == nil then return false end
  303. if Character:FindFirstChild("Torso") == nil then return false end
  304. local Joints = {
  305. Character.Torso:FindFirstChild("Right Shoulder 2"),
  306. Character.Torso:FindFirstChild("Left Shoulder 2"),
  307. Character.Torso:FindFirstChild("Right Hip 2"),
  308. Character.Torso:FindFirstChild("Left Hip 2")
  309. }
  310. local Limbs = {
  311. Character:FindFirstChild("Right Arm"),
  312. Character:FindFirstChild("Left Arm"),
  313. Character:FindFirstChild("Right Leg"),
  314. Character:FindFirstChild("Left Leg")
  315. }
  316. if Joints[Limb] == nil then return false end
  317. if Limbs[Limb] == nil then return false end
  318. if Limb == 1 then
  319. Joints[Limb].C0 = CFrame.new(1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  320. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  321. elseif Limb == 2 then
  322. Joints[Limb].C0 = CFrame.new(-1.5, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  323. Joints[Limb].C1 = CFrame.new(0, 0.5, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  324. elseif Limb == 3 then
  325. Joints[Limb].C0 = CFrame.new(0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  326. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(90), 0)
  327. elseif Limb == 4 then
  328. Joints[Limb].C0 = CFrame.new(-0.5, -1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  329. Joints[Limb].C1 = CFrame.new(0, 1, 0) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90), 0)
  330. end
  331. end
  332.  
  333.  
  334. function EnableLimb(Limb, Character)
  335. if Character == nil then return false end
  336. if Character:FindFirstChild("Torso") == nil then return false end
  337. local Joints = {
  338. Character.Torso:FindFirstChild("Right Shoulder 2"),
  339. Character.Torso:FindFirstChild("Left Shoulder 2"),
  340. Character.Torso:FindFirstChild("Right Hip 2"),
  341. Character.Torso:FindFirstChild("Left Hip 2")
  342. }
  343. local Limbs = {
  344. Character:FindFirstChild("Right Arm"),
  345. Character:FindFirstChild("Left Arm"),
  346. Character:FindFirstChild("Right Leg"),
  347. Character:FindFirstChild("Left Leg")
  348. }
  349. if Joints[Limb] == nil then return false end
  350. if Limbs[Limb] == nil then return false end
  351. if Limb == 1 then
  352. Joints[Limb].Name = "Right Shoulder"
  353. elseif Limb == 2 then
  354. Joints[Limb].Name = "Left Shoulder"
  355. elseif Limb == 3 then
  356. Joints[Limb].Name = "Right Hip"
  357. elseif Limb == 4 then
  358. Joints[Limb].Name = "Left Hip"
  359. end
  360. Animate = Character:FindFirstChild("Animate")
  361. if Animate == nil then return false end
  362. Animate = Animate:Clone()
  363. Character.Animate:Remove()
  364. Animate.Parent = Character
  365. end
  366.  
  367.  
  368. function onButton1Down(Mouse)
  369. if Button1Down == true then return end
  370. Button1Down = true
  371. if CheckPlayer() == false or Primed == true or Thrown == true or CanUse == false then return end
  372. CanUse = false
  373. Primed = true
  374. DisableLimb(2, Player.Character)
  375. SetSpeed(2, 0.25, Player.Character)
  376. SetAngle(2, math.rad(90), Player.Character)
  377. for i = 0, 1, 0.08 do
  378. pcall(function()
  379. Player.Character.Torso["Left Shoulder 2"].C0 =
  380. CFrame.new(-1.5 + (0.4 * i), 0.5, -0.3 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(-90 - (35 * i)), 0)
  381. Player.Character.Torso["Right Shoulder 2"].C0 =
  382. CFrame.new(1.5 - (0.4 * i), 0.5, -0.3 * i) * CFrame.fromEulerAnglesXYZ(0, math.rad(90 + (35 * i)), 0)
  383. end)
  384. wait()
  385. end
  386. pcall(function()
  387. Player.Character.Torso["Left Shoulder 2"].C0 =
  388. CFrame.new(-1.1, 0.5, -0.3) * CFrame.fromEulerAnglesXYZ(0, math.rad(-125), 0)
  389. Player.Character.Torso["Right Shoulder 2"].C0 =
  390. CFrame.new(1.1, 0.5, -0.3) * CFrame.fromEulerAnglesXYZ(0, math.rad(125), 0)
  391. Player.Character[ModelName].Match.Weld.Part1 = Player.Character["Left Arm"]
  392. Player.Character[ModelName].Match.Weld.C0 = CFrame.new()
  393. Player.Character[ModelName].Match.Weld.C1 = CFrame.new(0, -1.01, 0) * CFrame.fromEulerAnglesXYZ(math.rad(-90), 0, 0)
  394. end)
  395. SetSpeed(2, 0.1, Player.Character)
  396. SetAngle(2, math.rad(100), Player.Character)
  397. for i = 0, 1, 0.2 do
  398. pcall(function()
  399. Player.Character.Torso["Left Shoulder 2"].C0 =
  400. CFrame.new(-1.1, 0.5, -0.3) * CFrame.fromEulerAnglesXYZ(0, math.rad(-125 + (10 * i)), 0)
  401. end)
  402. wait()
  403. end
  404. SetAngle(2, math.rad(110), Player.Character)
  405. SetSpeed(2, 0.025, Player.Character)
  406. for i = 0, 1, 0.2 do
  407. pcall(function()
  408. Player.Character.Torso["Left Shoulder 2"].C0 =
  409. CFrame.new(-1.1, 0.5, -0.3) * CFrame.fromEulerAnglesXYZ(0, math.rad(-115 + (5 * i)), 0)
  410. Player.Character[ModelName].Match.Weld.C0 =
  411. CFrame.fromEulerAnglesXYZ(math.rad(i * 50), 0, math.rad(i * 90)) * CFrame.new(-0.15 * i, 0, 0.15 * i)
  412. end)
  413. wait()
  414. end
  415. pcall(function()
  416. Player.Character.Torso["Left Shoulder 2"].C0 =
  417. CFrame.new(-1.1, 0.5, -0.3) * CFrame.fromEulerAnglesXYZ(0, math.rad(-110), 0)
  418. Player.Character[ModelName].Match.Weld.C0 =
  419. CFrame.fromEulerAnglesXYZ(math.rad(50), 0, math.rad(90)) * CFrame.new(-0.15, 0, 0.15)
  420. end)
  421. SetAngle(2, math.rad(50), Player.Character)
  422. SetSpeed(2, 0.1, Player.Character)
  423. SoundToServer("Light", "http://www.roblox.com/Asset/?id=19095020", 1, 1, false, Player.Character.Torso)
  424. do
  425. SendToServer([[while Source.Parent ~= nil do
  426. local Part = Instance.new("Part")
  427. Part.Name = "Flame"
  428. Part.BrickColor = BrickColor.new("Neon orange")
  429. Part.TopSurface = 0
  430. Part.BottomSurface = 0
  431. Part.FormFactor = "Custom"
  432. Part.Size = Vector3.new(0.2, 0.2, 0.2)
  433. Part.Anchored = true
  434. Part.CanCollide = false
  435. Part.CFrame = CFrame.new(Source.CFrame.p) * CFrame.fromEulerAnglesXYZ(math.rad(math.random(-10000, 10000) / 1000), math.rad(math.random(-10000, 10000) / 1000), math.rad(math.random(-10000, 10000) / 1000))
  436. Part.Parent = Workspace
  437. local Mesh = Instance.new("SpecialMesh", Part)
  438. Mesh.MeshType = "Sphere"
  439. Mesh.Scale = Vector3.new(0.08 / 0.2, 0.08 / 0.2, 0.08 / 0.2)
  440. coroutine.wrap(function()
  441. local Velocity = Source.Velocity
  442. for x = 0, 1, 0.05 do
  443. Part.CFrame = Part.CFrame * CFrame.new(0, 0.1, 0) * CFrame.new(Velocity / 50)
  444. Part.Transparency = x
  445. wait()
  446. end
  447. Part:Remove()
  448. end)()
  449. wait(math.random() * 0.1)
  450. end]], "Match", {"Source", Player.Character[ModelName]["Match Tip"]})
  451. end
  452. wait(0.4)
  453. SetAngle(2, math.rad(100), Player.Character)
  454. SetSpeed(2, 0.1, Player.Character)
  455. for i = 0, 1, 0.1 do
  456. pcall(function()
  457. Player.Character.Torso["Right Shoulder 2"].C0 =
  458. CFrame.new(1.1, 0.5, -0.3) * CFrame.fromEulerAnglesXYZ(0, math.rad(125 - (30 * i)), 0)
  459. Player.Character[ModelName].Handle.Weld.C0 =
  460. CFrame.fromEulerAnglesXYZ(math.rad(60 * i), 0, 0)
  461. end)
  462. wait()
  463. end
  464. pcall(function()
  465. Player.Character.Torso["Right Shoulder 2"].C0 =
  466. CFrame.new(1.1, 0.5, -0.3) * CFrame.fromEulerAnglesXYZ(0, math.rad(95), 0)
  467. Player.Character[ModelName].Handle.Weld.C0 =
  468. CFrame.fromEulerAnglesXYZ(math.rad(60), 0, 0)
  469. end)
  470. wait(math.random(900, 1200) / 1000)
  471. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=31760113", 2, 1, true, Player.Character[ModelName].Handle)
  472. SetSpeed(1, 0.1, Player.Character)
  473. SetSpeed(2, 0.1, Player.Character)
  474. SetAngle(1, math.rad(200), Player.Character)
  475. SetAngle(2, 0, Player.Character)
  476. for i = 0, 1, 0.1 do
  477. pcall(function()
  478. Player.Character.Torso["Left Shoulder 2"].C0 =
  479. CFrame.new(-1.1 - (0.4 * i), 0.5, -0.3 * (1 - i)) * CFrame.fromEulerAnglesXYZ(0, math.rad(-110 + (20 * i)), 0)
  480. Player.Character.Torso["Right Shoulder 2"].C0 =
  481. CFrame.new(1.1 + (0.4 * i), 0.5, -0.3 * (1 - i)) * CFrame.fromEulerAnglesXYZ(0, math.rad(95 - (5 * i)), 0)
  482. Player.Character[ModelName].Handle.Weld.C0 =
  483. CFrame.fromEulerAnglesXYZ(math.rad(60 * (1 - i)), 0, 0)
  484. end)
  485. wait()
  486. end
  487. ResetLimbCFrame(1, Player.Character)
  488. ResetLimbCFrame(2, Player.Character)
  489. EnableLimb(1, Player.Character)
  490. EnableLimb(2, Player.Character)
  491. DisableLimb(1, Player.Character)
  492. pcall(function() Player.Character[ModelName].Handle.Weld.C0 = CFrame.new() end)
  493. pcall(function() Player.Character[ModelName].Handle.Smoke.Enabled = true end)
  494. pcall(function() Player.Character[ModelName].Match.Weld:Remove() end)
  495. for _, Part in pairs(Player.Character[ModelName]:GetChildren()) do
  496. if Part.Name == "Match" or Part.Name == "Match Tip" then
  497. pcall(function()
  498. Part.CanCollide = true
  499. Part.Parent = Workspace
  500. game:GetService("Debris"):AddItem(Part, 5)
  501. end)
  502. end
  503. end
  504. wait(0.1)
  505. tagHumanoid(Player.Character[ModelName].Handle)
  506. Instance.new("Configuration", Player.Character[ModelName].Handle).Name = "CanExplode"
  507. SendToServer([[wait(math.random(3000, 10000) / 1000)
  508. if Source.Parent == nil then return end
  509. Source.Parent.Parent = Workspace
  510. pcall(function() Source.Weld:Remove() end)
  511. for i = 1, 10 do
  512. local Sound = Instance.new("Sound")
  513. Sound.Name = "Explode"
  514. Sound.SoundId = "rbxasset://sounds/collide.wav"
  515. Sound.Volume = 1
  516. Sound.Pitch = math.random(400, 600) / 1000
  517. Sound.Parent = Source
  518. Sound:Play()
  519. end
  520. for _, Part in pairs(Source:GetChildren()) do
  521. if Part.Name == "Fire" then
  522. pcall(function()
  523. Part:Stop()
  524. Part.Volume = 0
  525. end)
  526. end
  527. end
  528. ]] ..ProjectileData, "TNT", {"Source", Player.Character[ModelName].Handle})
  529. Player.Character[ModelName].Changed:connect(function(Property)
  530. if Property == "Parent" then
  531. while CanUse == false do wait() end
  532. EnableLimb(1, Player.Character)
  533. UpdateFirstPerson()
  534. script.Parent:Remove()
  535. end
  536. end)
  537. CanUse = true
  538. coroutine.wrap(function()
  539. while Selected == true do
  540. if pcall(function() return Mouse.Target end) == false then
  541. Button1Down = true
  542. onButton1Up({Hit = Player.Character.Torso.CFrame * CFrame.new(0, 10, -10)})
  543. end
  544. wait()
  545. end
  546. end)()
  547. end
  548.  
  549.  
  550. function onButton1Up(Mouse)
  551. if Button1Down == false then return end
  552. Button1Down = false
  553. if CanUse == false then return end
  554. if Player.Character:FindFirstChild(ModelName) ~= nil and Thrown == false then
  555. Thrown = true
  556. SetSpeed(1, 0.75, Player.Character)
  557. SetAngle(1, 0, Player.Character)
  558. wait()
  559. SoundToServer("Fire", "http://www.roblox.com/Asset/?id=31760113", 2, 1, true, Player.Character[ModelName].Handle)
  560. pcall(function() Player.Character[ModelName].Handle.Weld:Remove() end)
  561. for _, Part in pairs(Player.Character[ModelName]:GetChildren()) do
  562. pcall(function() Part.CanCollide = true end)
  563. end
  564. local BodyVelocity = Instance.new("BodyVelocity")
  565. BodyVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
  566. BodyVelocity.velocity = (Mouse.Hit.p - Player.Character[ModelName].Handle.Position).unit * 75
  567. BodyVelocity.Parent = Player.Character[ModelName].Handle
  568. game:GetService("Debris"):AddItem(BodyVelocity, 0.1)
  569. game:GetService("Debris"):AddItem(Player.Character[ModelName], 10)
  570. Player.Character[ModelName].Parent = Workspace
  571. end
  572. end
  573.  
  574.  
  575. function onKeyDown(Key, Mouse)
  576. if Selected == false then return end
  577. Key = Key:lower()
  578. if Button1Down == false and CanUse == true and CheckPlayer() == true then
  579. if Key == "q" then
  580. if Mouse.Target == nil then return end
  581. if CheckPlayer() == false then return end
  582. local NewPlayer = game:GetService("Players"):GetPlayerFromCharacter(Mouse.Target.Parent)
  583. if NewPlayer == nil then return end
  584. if NewPlayer.Character == nil then return end
  585. if NewPlayer.Character:FindFirstChild("Torso") == nil then return end
  586. if (NewPlayer.Character.Torso.Position - Player.Character.Torso.Position).magnitude > 10 then return end
  587. onDeselected(Mouse)
  588. wait()
  589. RemoveParts(Player.Character, 1)
  590. script.Parent.Parent = NewPlayer.Backpack
  591. Player = NewPlayer
  592. elseif Key == "g" then
  593. CanUse = false
  594. SoundToServer("Slash", "rbxasset://sounds/swordslash.wav", 2, 1, false, Player.Character.Torso)
  595. SetAngle(1, math.rad(200), Player.Character)
  596. CameraSlide(math.rad(5), 0, 0.3)
  597. SetSpeed(1, 0.75, Player.Character)
  598. SetAngle(1, 0, Player.Character)
  599. local HasHit = false
  600. local _, HitConnection = pcall(function() return Player.Character[ModelName].Handle.Touched:connect(function(Hit)
  601. if HasHit == true or Hit:IsDescendantOf(Player.Character) then return end
  602. HasHit = true
  603. SoundToServer("Bash", "http://www.roblox.com/Asset/?id=46153268", 1, 0.25, false, Player.Character.Torso)
  604. local Humanoid = Hit.Parent:FindFirstChild("Humanoid") or Hit.Parent.Parent:FindFirstChild("Humanoid")
  605. if Humanoid ~= nil then
  606. tagHumanoid(Humanoid)
  607. Humanoid:TakeDamage(7)
  608. wait()
  609. pcall(function() untagHumanoid(Humanoid) end)
  610. end
  611. end) end)
  612. CameraSlide(math.rad(-20), 0, 0.2)
  613. pcall(function() HitConnection:disconnect() end)
  614. SetSpeed(1, 0.5, Player.Character)
  615. SetAngle(1, math.rad(90), Player.Character)
  616. CameraSlide(math.rad(15), 0, 0.2)
  617. CanUse = true
  618. end
  619. end
  620. end
  621.  
  622.  
  623. function onSelected(Mouse)
  624. if Selected == true or CanUse == false then return end
  625. CanUse = false
  626. while true do
  627. if CheckPlayer() == true then
  628. if Player.Character.Torso:FindFirstChild("Right Shoulder") ~= nil then
  629. break
  630. end
  631. end
  632. wait(0.1)
  633. end
  634. Selected = true
  635. RemoveParts(Player.Character, 1)
  636. CreateParts(Player.Character, 2)
  637. DisableLimb(1, Player.Character)
  638. SetSpeed(1, 0.5, Player.Character)
  639. SetAngle(1, math.rad(90), Player.Character)
  640. Mouse.Icon = "rbxasset://textures\\GunCursor.png"
  641. Mouse.Button1Down:connect(function() onButton1Down(Mouse) end)
  642. Mouse.Button1Up:connect(function() onButton1Up(Mouse) end)
  643. Mouse.KeyDown:connect(function(Key) onKeyDown(Key, Mouse) end)
  644. CanUse = true
  645. end
  646.  
  647.  
  648. function onDeselected(Mouse)
  649. if Selected == false or Primed == true then return end
  650. Selected = false
  651. while CanUse == false do wait() end
  652. if Selected == true then return end
  653. CanUse = false
  654. RemoveParts(Player.Character, 2)
  655. CreateParts(Player.Character, 1)
  656. SetAngle(1, 0, Player.Character)
  657. ResetLimbCFrame(1, Player.Character)
  658. EnableLimb(1, Player.Character)
  659. CanUse = true
  660. end
  661.  
  662.  
  663. if script.Parent.ClassName ~= "HopperBin" then
  664. if Player == nil then print("Error: Player not found!") return end
  665. Tool = Instance.new("HopperBin")
  666. Tool.Name = ModelName
  667. Tool.Parent = Player.Backpack
  668. script.Name = "Main"
  669. script.Parent = Tool
  670. elseif script.Parent.ClassName == "HopperBin" and Connected == false then
  671. Connected = true
  672. Player = script.Parent.Parent.Parent
  673. script.Parent.Selected:connect(onSelected)
  674. script.Parent.Deselected:connect(onDeselected)
  675. CreateParts(Player.Character, 1)
  676. coroutine.wrap(loadstring(FirstPerson))()
  677. coroutine.wrap(loadstring(MouseAim))()
  678. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement