Advertisement
Aaronremmers14

Spoopy pop up

Jun 4th, 2016
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1. s = Instance.new("Sound", workspace) s.SoundId = "rbxassetid://176238381" s.Volume = 10 s:Play()
  2. --Created with ttyyuu12345's compiler
  3. --ttyyuu12345 is not responsible for damages caused to your game
  4. --This plugin does not remove things
  5. --ttyyuu12345 cannot be held resonsible for manual deletion for the purpose of testing
  6. --Keep in mind, any items that cause errors in compilation will be skipped and documented within the last line of the disclaimer comments
  7. --Thank you for using my plugin and enjoy :)
  8. --It is free to use, however I do accept donations
  9. --Errors:
  10. Create = function(itemClass,tabl)
  11. local item = Instance.new(itemClass)
  12. for i,v in pairs(tabl) do
  13. local a,b = ypcall(function() return item[i] end)
  14. if a then
  15. item[i] = tabl[i]
  16. end
  17. end
  18. return item
  19. end
  20. function runDummyScript(f,scri)
  21. local oldenv = getfenv(f)
  22. local newenv = setmetatable({}, {
  23. __index = function(_, k)
  24. if k:lower() == 'script' then
  25. return scri
  26. else
  27. return oldenv[k]
  28. end
  29. end
  30. })
  31. setfenv(f, newenv)
  32. ypcall(function() f() end)
  33. end
  34. cors = {}
  35. mas = Instance.new("Model",game:GetService("Lighting"))
  36. mas.Name = "CompiledModel"
  37. o1 = Create("Part",{
  38. ["Name"] = "Invisible Scary Pop-up",
  39. ["Parent"] = mas,
  40. ["BrickColor"] = BrickColor.new("Dark stone grey"),
  41. ["Transparency"] = 1,
  42. ["Position"] = Vector3.new(634.530823, 33.7999954, 49.4307251),
  43. ["Rotation"] = Vector3.new(0, 90, 0),
  44. ["Anchored"] = true,
  45. ["CFrame"] = CFrame.new(634.530823, 33.7999954, 49.4307251, 0, 0, 1, 0, 1, 0, -1, 0, 0),
  46. ["FormFactor"] = Enum.FormFactor.Custom,
  47. ["Size"] = Vector3.new(1114.3501, 67.5999908, 1766.82996),
  48. ["BottomSurface"] = Enum.SurfaceType.Smooth,
  49. ["RightSurface"] = Enum.SurfaceType.Weld,
  50. ["TopSurface"] = Enum.SurfaceType.Smooth,
  51. ["Color"] = Color3.new(0.388235, 0.372549, 0.384314),
  52. })
  53. o2 = Create("BlockMesh",{
  54. ["Parent"] = o1,
  55. })
  56. o3 = Create("Sound",{
  57. ["Name"] = "Scream",
  58. ["Parent"] = o1,
  59. ["Pitch"] = 0.69999998807907,
  60. ["Volume"] = 1,
  61. })
  62. o4 = Create("Script",{
  63. ["Name"] = "ScaryScript!",
  64. ["Parent"] = o1,
  65. })
  66. table.insert(cors,coroutine.create(function()
  67. wait()
  68. runDummyScript(function()
  69. Sound = script.Parent.Scream
  70. Popup = script.Parent.Popup
  71. Ready = true
  72. function onTouch(hit)
  73. local h = hit.Parent:FindFirstChild("Humanoid")
  74. if h ~= nil and Ready == true then
  75. Ready = false
  76. local plyr = game.Players:FindFirstChild(h.Parent.Name)
  77. local c = Popup:clone()
  78. c.Parent = plyr.PlayerGui
  79. local s = Sound:clone()
  80. s.Parent = plyr
  81. wait(5)
  82. c:remove()
  83. s:remove()
  84. wait(.1)
  85. Ready = true
  86. end
  87. end
  88.  
  89. script.Parent.Touched:connect(onTouch)
  90.  
  91. end,o4)
  92. end))
  93. o5 = Create("ScreenGui",{
  94. ["Name"] = "Popup",
  95. ["Parent"] = o1,
  96. })
  97. o6 = Create("Frame",{
  98. ["Name"] = "BackGround",
  99. ["Parent"] = o5,
  100. ["Position"] = UDim2.new(0,0,-0.10000000149012,0),
  101. ["Size"] = UDim2.new(1.1000000238419,0,1.2000000476837,0),
  102. ["BackgroundColor3"] = Color3.new(0.109804, 0.109804, 0.109804),
  103. })
  104. o7 = Create("ImageLabel",{
  105. ["Name"] = "Image",
  106. ["Parent"] = o6,
  107. ["Transparency"] = 1,
  108. ["Position"] = UDim2.new(0.15000000596046,0,0.050000000745058,0),
  109. ["Size"] = UDim2.new(0.59999996423721,0,0.89999997615814,0),
  110. ["BackgroundColor3"] = Color3.new(0, 0, 0),
  111. ["BackgroundTransparency"] = 1,
  112. ["Image"] = "http://www.roblox.com/asset/?id=98531625",
  113. })
  114. mas.Parent = workspace
  115. mas:MakeJoints()
  116. local mas1 = mas:GetChildren()
  117. for i=1,#mas1 do
  118. mas1[i].Parent = script
  119. ypcall(function() mas1[i]:MakeJoints() end)
  120. end
  121. mas:Destroy()
  122. for i=1,#cors do
  123. coroutine.resume(cors[i])
  124. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement