Advertisement
Mediakiller7Cool

Killer Button

Apr 12th, 2020
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.38 KB | None | 0 0
  1. --Converted with ttyyuu12345's model to script plugin v4
  2. function sandbox(var,func)
  3.     local env = getfenv(func)
  4.     local newenv = setmetatable({},{
  5.         __index = function(self,k)
  6.             if k=="script" then
  7.                 return var
  8.             else
  9.                 return env[k]
  10.             end
  11.         end,
  12.     })
  13.     setfenv(func,newenv)
  14.     return func
  15. end
  16. cors = {}
  17. mas = Instance.new("Model",game:GetService("Lighting"))
  18. Part0 = Instance.new("Part")
  19. Part1 = Instance.new("Part")
  20. ClickDetector2 = Instance.new("ClickDetector")
  21. Script3 = Instance.new("Script")
  22. Part0.Name = "The Button"
  23. Part0.Parent = mas
  24. Part0.CFrame = CFrame.new(2, 2.50999999, 12, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  25. Part0.Orientation = Vector3.new(0, 0, -90)
  26. Part0.Position = Vector3.new(2, 2.50999999, 12)
  27. Part0.Rotation = Vector3.new(0, 0, -90)
  28. Part0.Size = Vector3.new(1, 11, 9)
  29. Part0.Anchored = true
  30. Part0.BottomSurface = Enum.SurfaceType.Smooth
  31. Part0.TopSurface = Enum.SurfaceType.Smooth
  32. Part0.Shape = Enum.PartType.Cylinder
  33. Part1.Name = "The Button"
  34. Part1.Parent = Part0
  35. Part1.CFrame = CFrame.new(2, 3.50999999, 12, 0, 1, -0, -1, 0, 0, 0, 0, 1)
  36. Part1.Orientation = Vector3.new(0, 0, -90)
  37. Part1.Position = Vector3.new(2, 3.50999999, 12)
  38. Part1.Rotation = Vector3.new(0, 0, -90)
  39. Part1.Color = Color3.new(1, 0, 0)
  40. Part1.Size = Vector3.new(1, 13, 7)
  41. Part1.BottomSurface = Enum.SurfaceType.Smooth
  42. Part1.BrickColor = BrickColor.new("Really red")
  43. Part1.TopSurface = Enum.SurfaceType.Smooth
  44. Part1.brickColor = BrickColor.new("Really red")
  45. Part1.Shape = Enum.PartType.Cylinder
  46. ClickDetector2.Parent = Part1
  47. Script3.Parent = ClickDetector2
  48. table.insert(cors,sandbox(Script3,function()
  49. local lol = math.random(1,2)
  50. script.Parent.MouseClick:Connect(function(plr)
  51.     if lol == 1 then
  52.     for i,v in pairs(game.Players:GetPlayers()) do
  53.         v.Character.Humanoid.Health = 0
  54.     end
  55.     end
  56.     if lol == 2 then
  57.         for i,v in pairs(game.Players:GetPlayers()) do
  58.             local chr = v.Character
  59.             game.Lighting.ClockTime = 0
  60.             chr["Left Arm"]:remove()
  61.             chr["Right Arm"]:remove()
  62.             chr["Left Leg"]:remove()
  63.             chr["Right Leg"]:remove()
  64.             workspace["Scary song"]:Play()
  65.             wait(74)
  66.             workspace["Scary song"]:Stop()
  67.             v:LoadCharacter()
  68.             game.Lighting.ClockTime=15
  69.         end
  70.     end
  71. end)
  72. end))
  73. for i,v in pairs(mas:GetChildren()) do
  74.     v.Parent = workspace
  75.     pcall(function() v:MakeJoints() end)
  76. end
  77. mas:Destroy()
  78. for i,v in pairs(cors) do
  79.     spawn(function()
  80.         pcall(v)
  81.     end)
  82. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement