Advertisement
subaru112g

flamethrower not ended

Mar 20th, 2019
218
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.40 KB | None | 0 0
  1. local plr = owner
  2. local char = plr.Character
  3.  
  4. local h = char.Head
  5. local m = Instance.new("Part",char)
  6. m.Size = Vector3.new(1, 0.8, 1)
  7. m.BrickColor = BrickColor.new("New Yeller")
  8. m.Name = "Mask"
  9. local me = Instance.new("FileMesh",m)
  10. me.MeshId = "http://www.roblox.com/asset/?id=1286427"
  11. me.Scale = Vector3.new(1.1,1.1,1.1)
  12. local w = Instance.new("Weld",char)
  13. w.Part0 = m
  14. w.Part1 = h
  15. w.C1 = CFrame.new(-0.000106811523, 0.137756348, 0.000198364258, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  16.  
  17. local ha = Instance.new("Part",char)
  18. ha.Name = "flamethrower"
  19. ha.Size = Vector3.new(1, 1, 4)
  20. ha.CanCollide = false
  21. local me = Instance.new("FileMesh",ha)
  22. me.MeshId = "http://www.roblox.com/asset/?id=33798955"
  23. me.TextureId = "http://www.roblox.com/asset/?id=34418735"
  24. me.Scale = Vector3.new(1.3, 1.3, 1.5)
  25. local w = Instance.new("Weld",char)
  26. w.Part0 = char["Right Arm"]
  27. w.Part1 = ha
  28. w.C1 = CFrame.new(0.00103759766, -1.90734863e-06, 3, 0.999999046, 0.00103592873, 0.00103649544, 0.0010352243, 4.52942913e-07, -0.999991477, -0.00103580952, 0.999991119, -4.53524081e-07)
  29.  
  30. local pe = Instance.new("ParticleEmitter", ha)
  31. pe.Size = NumberSequence.new(0.2)
  32. pe.EmissionDirection = "Front"
  33. pe.Lifetime = NumberRange.new(0.5)
  34. pe.Rate = 100
  35. pe.Speed = NumberRange.new(10)
  36. pe.Texture = "rbxassetid://4723996"
  37. pe.Enabled = false
  38.  
  39. Tool = char.Torso;
  40. local arms = nil
  41. local torso = nil
  42. local welds = {}
  43.  
  44. arms = {Tool.Parent:FindFirstChild("Left Arm"), Tool.Parent:FindFirstChild("Right Arm")}
  45. torso = Tool.Parent:FindFirstChild("Torso")
  46. if arms ~= nil and torso ~= nil then
  47. local sh = {torso:FindFirstChild("Left Shoulder"), torso:FindFirstChild("Right Shoulder")}
  48. if sh ~= nil then
  49. local yes = true
  50. if yes then
  51. yes = false
  52. sh[1].Part1 = nil
  53. sh[2].Part1 = nil
  54. local weld1 = Instance.new("Weld")
  55. weld1.Part0 = torso
  56. weld1.Parent = torso
  57. weld1.Part1 = arms[1]
  58. weld1.C1 = CFrame.new(-0.249, 1.35, 0.6) * CFrame.fromEulerAnglesXYZ(math.rad(290), 0, math.rad(-90))
  59. welds[1] = weld1
  60. local weld2 = Instance.new("Weld")
  61. weld2.Part0 = torso
  62. weld2.Parent = torso
  63. weld2.Part1 = arms[2]
  64. weld2.C1 = CFrame.new(-1, -0.2, 0.35) * CFrame.fromEulerAnglesXYZ(math.rad(-90), math.rad(-15), 0)
  65. welds[2] = weld2
  66. end
  67. else
  68. print("sh")
  69. end
  70. else
  71. print("arms")
  72. end
  73.  
  74.  
  75. for i,v in pairs(char:GetChildren()) do
  76. if v.ClassName == "Hat" or v.ClassName == "Accessory" or v.ClassName == "Pants" or v.ClassName == "Shirt" or v.ClassName == "CharacterMesh" then
  77. v:Destroy()
  78. end
  79. end
  80.  
  81. local fl = false
  82.  
  83. local col = char["Body Colors"]
  84. col.TorsoColor = BrickColor.new("New Yeller")
  85. col.RightLegColor = BrickColor.new("New Yeller")
  86. col.LeftLegColor = BrickColor.new("New Yeller")
  87.  
  88. char.Head.face.Texture = "rbxassetid://255828374"
  89.  
  90. ha.Touched:Connect(function(hit)
  91. if hit.Parent then
  92. if fl == true then
  93. local character = hit.Parent
  94. if not(character == char and hit.Parent == workspace) then
  95. if not(hit.Name == "Base" or hit.Name == "Baseplate") then
  96. for i,hit in pairs(character:GetChildren()) do
  97. if hit.ClassName == "Part" or hit.ClassName == "MeshPart" then
  98. if not(hit.Parent == workspace) then
  99. hit.Anchored = true
  100. hit.BrickColor = BrickColor.new("Really black")
  101. hit.CanCollide = true
  102. hit.Parent = workspace
  103. hit:MakeJoints()
  104. wait(0.1)
  105. hit.Anchored = false
  106. end
  107. end
  108. end
  109. end
  110. end
  111. end
  112. end
  113. end)
  114.  
  115. local plr = owner
  116. local char = plr.Character
  117. local hum = char:FindFirstChildOfClass("Humanoid")
  118. hum.WalkSpeed = 20
  119. local remote = Instance.new("RemoteEvent", char)
  120. remote.Name = "ReplicationEvent"
  121. local client = NLS([==[
  122. local mouse = game:GetService("Players").LocalPlayer:GetMouse()
  123. local remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  124. spawn(function()
  125. while game:GetService("RunService").Heartbeat:Wait() do
  126. remote = game:GetService("Players").LocalPlayer.Character:WaitForChild("ReplicationEvent")
  127. end
  128. end)
  129. game:GetService("UserInputService").InputBegan:Connect(function(input, isTyping)
  130. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard then
  131. remote:FireServer(1, input.KeyCode)
  132. end
  133. end)
  134. mouse.Button1Down:Connect(function()
  135. remote:FireServer(2)
  136. end)
  137. remote.OnClientEvent:Connect(function()
  138. game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position, Vector3.new(mouse.Hit.Position.X, game:GetService("Players").LocalPlayer.Character.HumanoidRootPart.Position.Y, mouse.Hit.Position.Z))
  139. end)
  140. ]==], char)
  141.  
  142. ---------------------------------
  143. -------------Attacks-------------
  144. ---------------------------------
  145.  
  146. remote.OnServerEvent:Connect(function(Player, number, key)
  147. if number == 1 and plr.Name == Player.Name then
  148. if key == Enum.KeyCode.Q then
  149. fl = fasle
  150. pe.Enabled = false
  151. end
  152.  
  153. if key == Enum.KeyCode.E then
  154. fl = true
  155. pe.Enabled = true
  156. end
  157.  
  158. end
  159.  
  160. end)
  161.  
  162.  
  163. ---------------------------------
  164. -----------Wrapping up-----------
  165. ---------------------------------
  166.  
  167. while game:GetService("RunService").Heartbeat:Wait() do
  168.  
  169. hum.Health = 9999999999999999
  170.  
  171. for i,v in pairs(char:GetChildren()) do
  172. if v.ClassName == "Part" or v.ClassName == "MeshPart" then
  173. v.Anchored = false
  174. end
  175. end
  176.  
  177. remote:FireClient(plr)
  178.  
  179. if remote.Parent == char then
  180. remote.Name = "ReplicationEvent"
  181. else
  182. remote = Instance.new("RemoteEvent", char)
  183. end
  184. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement