Pozu2

Murder Mystery 2 Script

Oct 30th, 2018
500
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.05 KB | None | 0 0
  1. local uis = game:GetService("UserInputService")
  2. local sg = game:GetService("StarterGui")
  3. local wp = game:GetService("Workspace")
  4. local cmr = wp.Camera
  5. local rs = game:GetService("ReplicatedStorage")
  6. local lgt = game:GetService("Lighting")
  7. local plrs = game:GetService("Players")
  8. local lplr = plrs.LocalPlayer
  9. local mouse = lplr:GetMouse()
  10.  
  11. local faces = {"Back","Bottom","Front","Left","Right","Top"}
  12. local speed = 20
  13. local nameMap = ""
  14.  
  15. function SendChat(String) -- Send a chat to the game chat
  16. game.StarterGui:SetCore("ChatMakeSystemMessage", {
  17. Text = '[OUTPUT]: ' .. String
  18. })
  19. end
  20.  
  21. function enableESPCode()
  22. for _, o in pairs(plrs:GetPlayers()) do
  23. if o.Name ~= lplr.Name then
  24. o.CharacterAdded:Connect(function(characterModel)
  25. wait(2)
  26. local bgui = Instance.new("BillboardGui",o.Character.Head)
  27. bgui.Name = ("EGUI")
  28. bgui.AlwaysOnTop = true
  29. bgui.ExtentsOffset = Vector3.new(0,3,0)
  30. bgui.Size = UDim2.new(0,200,0,50)
  31. local nam = Instance.new("TextLabel",bgui)
  32. nam.Text = o.Name
  33. nam.BackgroundTransparency = 1
  34. nam.TextSize = 14
  35. nam.Font = ("Arial")
  36. nam.TextColor3 = Color3.fromRGB(75, 151, 75)
  37. nam.Size = UDim2.new(0,200,0,50)
  38. for _, p in pairs(o.Character:GetChildren()) do
  39. if p.Name == ("Head") then
  40. for _, f in pairs(faces) do
  41. local m = Instance.new("SurfaceGui",p)
  42. m.Name = ("EGUI")
  43. m.Face = f
  44. m.Active = true
  45. m.AlwaysOnTop = true
  46. local mf = Instance.new("Frame",m)
  47. mf.Size = UDim2.new(1,0,1,0)
  48. mf.BorderSizePixel = 0
  49. mf.BackgroundTransparency = 0.5
  50. mf.BackgroundColor3 = Color3.fromRGB(75, 151, 75)
  51.  
  52. o.Backpack.ChildAdded:connect(function(b)
  53. if b.Name == "Gun" or b.Name == "Revolver" then
  54. mf.BackgroundColor3 = Color3.fromRGB(13, 105, 172)
  55. elseif b.Name == "Knife" or b.Name == "Blade" or b.Name == "Battleaxe" then
  56. mf.BackgroundColor3 = Color3.fromRGB(196, 40, 28)
  57. end
  58. end)
  59.  
  60. o.Character.ChildAdded:connect(function(c)
  61. if c.Name == "Gun" or c.Name == "Revolver" then
  62. mf.BackgroundColor3 = Color3.fromRGB(13, 105, 172)
  63. elseif c.Name == "Knife" or c.Name == "Blade" or c.Name == "Battleaxe" then
  64. mf.BackgroundColor3 = Color3.fromRGB(196, 40, 28)
  65. end
  66. end)
  67. end
  68. end
  69. end
  70.  
  71. o.Backpack.ChildAdded:connect(function(b)
  72. if b.Name == "Gun" or b.Name == "Revolver" then
  73. nam.TextColor3 = Color3.fromRGB(13, 105, 172)
  74. elseif b.Name == "Knife" or b.Name == "Blade" or b.Name == "Battleaxe" then
  75. nam.TextColor3 = Color3.fromRGB(196, 40, 28)
  76. end
  77. end)
  78.  
  79. o.Character.ChildAdded:connect(function(c)
  80. if c.Name == "Gun" or c.Name == "Revolver" then
  81. nam.TextColor3 = Color3.fromRGB(13, 105, 172)
  82. elseif c.Name == "Knife" or c.Name == "Blade" or c.Name == "Battleaxe" then
  83. nam.TextColor3 = Color3.fromRGB(196, 40, 28)
  84. end
  85. end)
  86.  
  87. end)
  88. end
  89. end
  90.  
  91. plrs.PlayerAdded:Connect(function(newPlayer)
  92. if newPlayer.Name ~= lplr.Name then
  93. newPlayer.CharacterAdded:Connect(function(characterModel)
  94. wait(2)
  95. local bgui = Instance.new("BillboardGui",newPlayer.Character.Head)
  96. bgui.Name = ("EGUI")
  97. bgui.AlwaysOnTop = true
  98. bgui.ExtentsOffset = Vector3.new(0,3,0)
  99. bgui.Size = UDim2.new(0,200,0,50)
  100. local nam = Instance.new("TextLabel",bgui)
  101. nam.Text = newPlayer.Name
  102. nam.BackgroundTransparency = 1
  103. nam.TextSize = 14
  104. nam.Font = ("Arial")
  105. nam.TextColor3 = Color3.fromRGB(75, 151, 75)
  106. nam.Size = UDim2.new(0,200,0,50)
  107. for _, p in pairs(newPlayer.Character:GetChildren()) do
  108. if p.Name == ("Head") then
  109. for _, f in pairs(faces) do
  110. local m = Instance.new("SurfaceGui",p)
  111. m.Name = ("EGUI")
  112. m.Face = f
  113. m.Active = true
  114. m.AlwaysOnTop = true
  115. local mf = Instance.new("Frame",m)
  116. mf.Size = UDim2.new(1,0,1,0)
  117. mf.BorderSizePixel = 0
  118. mf.BackgroundTransparency = 0.5
  119. mf.BackgroundColor3 = Color3.fromRGB(75, 151, 75)
  120.  
  121. newPlayer.Backpack.ChildAdded:connect(function(b)
  122. if b.Name == "Gun" or b.Name == "Revolver" then
  123. mf.BackgroundColor3 = Color3.fromRGB(13, 105, 172)
  124. elseif b.Name == "Knife" or b.Name == "Blade" or b.Name == "Battleaxe" then
  125. mf.BackgroundColor3 = Color3.fromRGB(196, 40, 28)
  126. end
  127. end)
  128.  
  129. newPlayer.Character.ChildAdded:connect(function(c)
  130. if c.Name == "Gun" or c.Name == "Revolver" then
  131. mf.BackgroundColor3 = Color3.fromRGB(13, 105, 172)
  132. elseif c.Name == "Knife" or c.Name == "Blade" or c.Name == "Battleaxe" then
  133. mf.BackgroundColor3 = Color3.fromRGB(196, 40, 28)
  134. end
  135. end)
  136. end
  137. end
  138. end
  139.  
  140. newPlayer.Backpack.ChildAdded:connect(function(b)
  141. if b.Name == "Gun" or b.Name == "Revolver" then
  142. nam.TextColor3 = Color3.fromRGB(13, 105, 172)
  143. elseif b.Name == "Knife" or b.Name == "Blade" or b.Name == "Battleaxe" then
  144. nam.TextColor3 = Color3.fromRGB(196, 40, 28)
  145. end
  146. end)
  147.  
  148. newPlayer.Character.ChildAdded:connect(function(c)
  149. if c.Name == "Gun" or c.Name == "Revolver" then
  150. nam.TextColor3 = Color3.fromRGB(13, 105, 172)
  151. elseif c.Name == "Knife" or c.Name == "Blade" or c.Name == "Battleaxe" then
  152. nam.TextColor3 = Color3.fromRGB(196, 40, 28)
  153. end
  154. end)
  155. end)
  156. end
  157. end)
  158.  
  159. lplr.Character.Humanoid.WalkSpeed = speed
  160.  
  161. lplr.Character.Humanoid:GetPropertyChangedSignal("WalkSpeed"):connect(function()
  162. if lplr.Character.Humanoid.WalkSpeed ~= speed then
  163. lplr.Character.Humanoid.WalkSpeed = speed
  164. end
  165. end)
  166.  
  167. lplr.CharacterAdded:Connect(function(characterModel)
  168. wait(0.5)
  169. characterModel.Humanoid.WalkSpeed = speed
  170. characterModel.Humanoid:GetPropertyChangedSignal("WalkSpeed"):connect(function()
  171. if characterModel.Humanoid.WalkSpeed ~= speed then
  172. characterModel.Humanoid.WalkSpeed = speed
  173. end
  174. end)
  175. end)
  176.  
  177.  
  178. wp.ChildAdded:connect(function(m)
  179. if tostring(m) == "Bank" or tostring(m) == "Bank2" or tostring(m) == "BioLab" or tostring(m) == "Factory" then
  180. nameMap = m.Name
  181. print(nameMap)
  182. elseif tostring(m) == "House2" or tostring(m) == "Office3" or tostring(m) == "Office2" then
  183. nameMap = m.Name
  184. print(nameMap)
  185. elseif tostring(m) == "Workplace" or tostring(m) == "Mineshaft" or tostring(m) == "Hotel" then
  186. nameMap = m.Name
  187. print(nameMap)
  188. elseif tostring(m) == "MilBase" or tostring(m) == "PoliceStation" then
  189. nameMap = m.Name
  190. print(nameMap)
  191. elseif tostring(m) == "Hospital2" or tostring(m) == "Mansion2" or tostring(m) == "Lab2" then
  192. nameMap = m.Name
  193. print(nameMap)
  194. end
  195.  
  196. if tostring(m) == "GunDrop" then
  197. local bgui = Instance.new("BillboardGui",m)
  198. bgui.Name = ("EGUI")
  199. bgui.AlwaysOnTop = true
  200. bgui.ExtentsOffset = Vector3.new(0,0,0)
  201. bgui.Size = UDim2.new(1,0,1,0)
  202. local nam = Instance.new("TextLabel",bgui)
  203. nam.Text = "Gun Drop"
  204. nam.BackgroundTransparency = 1
  205. nam.TextSize = 10
  206. nam.Font = ("Arial")
  207. nam.TextColor3 = Color3.fromRGB(245, 205, 48)
  208. nam.Size = UDim2.new(1,0,1,0)
  209. end
  210. end)
  211. end
  212.  
  213. enableESPCode()
  214.  
  215. function espFirst()
  216. for _, o in pairs(plrs:GetPlayers()) do
  217. if o.Name ~= lplr.Name then
  218. local bgui = Instance.new("BillboardGui",o.Character.Head)
  219. bgui.Name = ("EGUI")
  220. bgui.AlwaysOnTop = true
  221. bgui.ExtentsOffset = Vector3.new(0,3,0)
  222. bgui.Size = UDim2.new(0,200,0,50)
  223. local nam = Instance.new("TextLabel",bgui)
  224. nam.Text = o.Name
  225. nam.BackgroundTransparency = 1
  226. nam.TextSize = 14
  227. nam.Font = ("Arial")
  228. nam.TextColor3 = Color3.fromRGB(75, 151, 75)
  229. nam.Size = UDim2.new(0,200,0,50)
  230. for _, p in pairs(o.Character:GetChildren()) do
  231. if p.Name == ("Head") then
  232. for _, f in pairs(faces) do
  233. local m = Instance.new("SurfaceGui",p)
  234. m.Name = ("EGUI")
  235. m.Face = f
  236. m.Active = true
  237. m.AlwaysOnTop = true
  238. local mf = Instance.new("Frame",m)
  239. mf.Size = UDim2.new(1,0,1,0)
  240. mf.BorderSizePixel = 0
  241. mf.BackgroundTransparency = 0.5
  242. mf.BackgroundColor3 = Color3.fromRGB(75, 151, 75)
  243.  
  244. o.Backpack.ChildAdded:connect(function(b)
  245. if b.Name == "Gun" or b.Name == "Revolver" then
  246. mf.BackgroundColor3 = Color3.fromRGB(13, 105, 172)
  247. elseif b.Name == "Knife" or b.Name == "Blade" or b.Name == "Battleaxe" then
  248. mf.BackgroundColor3 = Color3.fromRGB(196, 40, 28)
  249. end
  250. end)
  251.  
  252. o.Character.ChildAdded:connect(function(c)
  253. if c.Name == "Gun" or c.Name == "Revolver" then
  254. mf.BackgroundColor3 = Color3.fromRGB(13, 105, 172)
  255. elseif c.Name == "Knife" or c.Name == "Blade" or c.Name == "Battleaxe" then
  256. mf.BackgroundColor3 = Color3.fromRGB(196, 40, 28)
  257. end
  258. end)
  259.  
  260. if o.Backpack:FindFirstChild("Gun") or o.Backpack:FindFirstChild("Revolver") or o.Character:FindFirstChild("Gun") or o.Character:FindFirstChild("Revolver") then
  261. mf.BackgroundColor3 = Color3.fromRGB(13, 105, 172)
  262. elseif o.Backpack:FindFirstChild("Knife") or o.Backpack:FindFirstChild("Blade") or o.Backpack:FindFirstChild("Battleaxe") or o.Character:FindFirstChild("Knife") or o.Character:FindFirstChild("Blade") or o.Character:FindFirstChild("Battleaxe") then
  263. mf.BackgroundColor3 = Color3.fromRGB(196, 40, 28)
  264. end
  265. end
  266. end
  267. end
  268.  
  269. o.Backpack.ChildAdded:connect(function(b)
  270. if b.Name == "Gun" or b.Name == "Revolver" then
  271. nam.TextColor3 = Color3.fromRGB(13, 105, 172)
  272. elseif b.Name == "Knife" or b.Name == "Blade" or b.Name == "Battleaxe" then
  273. nam.TextColor3 = Color3.fromRGB(196, 40, 28)
  274. end
  275. end)
  276.  
  277. o.Character.ChildAdded:connect(function(c)
  278. if c.Name == "Gun" or c.Name == "Revolver" then
  279. nam.TextColor3 = Color3.fromRGB(13, 105, 172)
  280. elseif c.Name == "Knife" or c.Name == "Blade" or c.Name == "Battleaxe" then
  281. nam.TextColor3 = Color3.fromRGB(196, 40, 28)
  282. end
  283. end)
  284.  
  285. if o.Backpack:FindFirstChild("Gun") or o.Backpack:FindFirstChild("Revolver") or o.Character:FindFirstChild("Gun") or o.Character:FindFirstChild("Revolver") then
  286. nam.TextColor3 = Color3.fromRGB(13, 105, 172)
  287. elseif o.Backpack:FindFirstChild("Knife") or o.Backpack:FindFirstChild("Blade") or o.Backpack:FindFirstChild("Battleaxe") or o.Character:FindFirstChild("Knife") or o.Character:FindFirstChild("Blade") or o.Character:FindFirstChild("Battleaxe") then
  288. nam.TextColor3 = Color3.fromRGB(196, 40, 28)
  289. end
  290. end
  291. end
  292.  
  293. for _, v in pairs(wp:GetChildren()) do
  294. if tostring(v) == "Bank" or tostring(v) == "Bank2" or tostring(v) == "BioLab" or tostring(v) == "Factory" then
  295. nameMap = v.Name
  296. print(nameMap)
  297. elseif tostring(v) == "House2" or tostring(v) == "Office3" or tostring(v) == "Office2" then
  298. nameMap = v.Name
  299. print(nameMap)
  300. elseif tostring(v) == "Workplace" or tostring(v) == "Mineshaft" or tostring(v) == "Hotel" then
  301. nameMap = v.Name
  302. print(nameMap)
  303. elseif tostring(v) == "MilBase" or tostring(v) == "PoliceStation" then
  304. nameMap = m.Name
  305. print(nameMap)
  306. elseif tostring(v) == "Hospital2" or tostring(v) == "Mansion2" or tostring(v) == "Lab2" then
  307. nameMap = v.Name
  308. print(nameMap)
  309. end
  310.  
  311. if tostring(m) == "GunDrop" then
  312. local bgui = Instance.new("BillboardGui",m)
  313. bgui.Name = ("EGUI")
  314. bgui.AlwaysOnTop = true
  315. bgui.ExtentsOffset = Vector3.new(0,0,0)
  316. bgui.Size = UDim2.new(1,0,1,0)
  317. local nam = Instance.new("TextLabel",bgui)
  318. nam.Text = "Gun Drop"
  319. nam.BackgroundTransparency = 1
  320. nam.TextSize = 10
  321. nam.Font = ("Arial")
  322. nam.TextColor3 = Color3.fromRGB(245, 205, 48)
  323. nam.Size = UDim2.new(1,0,1,0)
  324. end
  325. end
  326. end
  327.  
  328. function tpCoin()
  329. if nameMap ~= "" and wp[nameMap] ~= nil then
  330. if lplr.PlayerGui.MainGUI.Game.CashBag:FindFirstChild("Elite") then
  331. if tostring(lplr.PlayerGui.MainGUI.Game.CashBag.Coins.Text) ~= "10" then
  332. for i = 10, 1, -1 do
  333. local s = wp[nameMap]:FindFirstChild("CoinContainer")
  334. local e = lplr.Character:FindFirstChild("LowerTorso")
  335. if e and s then
  336. for i,c in pairs(s:GetChildren()) do
  337. c.Transparency = 0.5
  338. c.CFrame = lplr.Character.LowerTorso.CFrame
  339. end
  340. end
  341. if tostring(lplr.PlayerGui.MainGUI.Game.CashBag.Coins.Text) == "10" then
  342. break
  343. end
  344. wait(0.7)
  345. end
  346. end
  347. elseif lplr.PlayerGui.MainGUI.Game.CashBag:FindFirstChild("Coins") then
  348. if tostring(lplr.PlayerGui.MainGUI.Game.CashBag.Coins.Text) ~= "15" then
  349. for i = 15, 1, -1 do
  350. local s = wp[nameMap]:FindFirstChild("CoinContainer")
  351. local e = lplr.Character:FindFirstChild("LowerTorso")
  352. if e and s then
  353. for i,c in pairs(s:GetChildren()) do
  354. c.Transparency = 0.5
  355. c.CFrame = lplr.Character.LowerTorso.CFrame
  356. end
  357. end
  358. if tostring(lplr.PlayerGui.MainGUI.Game.CashBag.Coins.Text) == "15" then
  359. break
  360. end
  361. wait(0.7)
  362. end
  363. end
  364. end
  365. end
  366. end
  367.  
  368. function bringGun()
  369. if wp:FindFirstChild("GunDrop") then
  370. wp.GunDrop.CFrame = lplr.Character.HumanoidRootPart.CFrame + Vector3.new(2,0,0)
  371. end
  372. end
  373.  
  374. function changeWS(typeWS)
  375. if typeWS == 0 then
  376. speed = speed + 5
  377. lplr.Character.Humanoid.WalkSpeed = speed
  378. elseif typeWS == 1 then
  379. if speed >= 0 then
  380. speed = speed - 5
  381. lplr.Character.Humanoid.WalkSpeed = speed
  382. end
  383. if speed < 0 then
  384. speed = 0
  385. lplr.Character.Humanoid.WalkSpeed = speed
  386. end
  387. end
  388. end
  389.  
  390. mouse.KeyDown:connect(function(keyDown)
  391.  
  392. if keyDown == "l" then
  393. tpCoin()
  394. end
  395.  
  396. if keyDown == "k" then
  397. bringGun()
  398. end
  399.  
  400. if keyDown == "c" then
  401. changeWS(0)
  402. SendChat("Walk Speed :" .. lplr.Character.Humanoid.WalkSpeed)
  403. end
  404.  
  405. if keyDown == "v" then
  406. changeWS(1)
  407. SendChat("Walk Speed :" .. lplr.Character.Humanoid.WalkSpeed)
  408. end
  409. end)
  410.  
  411. espFirst()
Add Comment
Please, Sign In to add comment