Advertisement
ERROR_CODE

FNAF1

Feb 7th, 2024 (edited)
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.22 KB | None | 0 0
  1. Map = game:GetObjects("rbxassetid://16275693682")[1]
  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. local FnafSong = Instance.new("Sound")
  19. local GameUserInterface = Instance.new("ScreenGui")
  20. local FullScreenBlack = Instance.new("Frame")
  21. local PlayButton = Instance.new("TextButton")
  22. local QuiteButton = Instance.new("TextButton")
  23. local Value_1 = 0
  24. local Value_2 = -135.34
  25. local Players = game:GetService("Players")
  26. local LocalPlayer = Players.LocalPlayer
  27. local CameraPart = Instance.new("Part")
  28. local Character = LocalPlayer.Character
  29. local cam = workspace.CurrentCamera
  30. LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
  31. Sky = Instance.new("Sky")
  32. Model0 = Instance.new("Model")
  33. Script = Instance.new("Script")
  34.  
  35. cam.CameraType = Enum.CameraType.Attach
  36. cam.CameraSubject = CameraPart
  37. GameUserInterface.Parent = game.CoreGui
  38. Map.Parent = game.Workspace
  39.  
  40. CameraPart.Parent = workspace
  41. CameraPart.Anchored = true
  42. CameraPart.Size = Vector3.new(4, 1, 2)
  43. CameraPart.CanCollide = false
  44. CameraPart.Rotation = Vector3.new(0, 180, 0)
  45. CameraPart.Position = Vector3.new(107.58, 3843.68, Value_2)
  46. CameraPart.Transparency = 1
  47.  
  48. Sky.Name = "Sky"
  49. Sky.SkyboxBk = "http://www.roblox.com/asset/?id=248431616"
  50. Sky.SkyboxDn = "http://www.roblox.com/asset/?id=248431677"
  51. Sky.SkyboxFt = "http://www.roblox.com/asset/?id=248431598"
  52. Sky.SkyboxLf = "http://www.roblox.com/asset/?id=248431686"
  53. Sky.SkyboxRt = "http://www.roblox.com/asset/?id=248431611"
  54. Sky.SkyboxUp = "http://www.roblox.com/asset/?id=248431605"
  55. Sky.Parent = game.Lighting
  56.  
  57. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(75.473, 3861.811, -59.104)
  58.  
  59. Script.Parent = Model0
  60. table.insert(cors,sandbox(Script,function()
  61. while true do
  62. game.Lighting.Brightness = 0
  63. wait(0)
  64. game.Lighting.Brightness = 9999999
  65. wait(0)
  66. game.Lighting.Brightness = 0
  67. wait(0)
  68. game.Lighting.Brightness = 9999999
  69. wait(0)
  70. game.Lighting.Brightness = 0
  71. wait(0)
  72. game.Lighting.Brightness = 9999999
  73. wait(0)
  74. game.Lighting.Brightness = 0
  75. wait(7)
  76. script.Sound:Play()
  77. wait(5)
  78. game.Lighting.Brightness = 0
  79. wait(0)
  80. game.Lighting.Brightness = 9999999
  81. wait(0)
  82. game.Lighting.Brightness = 0
  83. wait(0)
  84. game.Lighting.Brightness = 9999999
  85. wait(0)
  86. game.Lighting.Brightness = 0
  87. wait(0)
  88. game.Lighting.Brightness = 9999999
  89. wait(0)
  90. game.Lighting.Brightness = 0
  91. wait(5)
  92. game.Lighting.Brightness = 0
  93. wait(0)
  94. game.Lighting.Brightness = 9999999
  95. wait(0)
  96. game.Lighting.Brightness = 0
  97. wait(0)
  98. game.Lighting.Brightness = 9999999
  99. wait(0)
  100. game.Lighting.Brightness = 0
  101. wait(0)
  102. game.Lighting.Brightness = 9999999
  103. wait(0)
  104. game.Lighting.Brightness = 0
  105. wait(5)
  106. game.Lighting.Brightness = 0
  107. wait(0)
  108. game.Lighting.Brightness = 9999999
  109. wait(0)
  110. game.Lighting.Brightness = 0
  111. wait(0)
  112. game.Lighting.Brightness = 9999999
  113. wait(0)
  114. game.Lighting.Brightness = 0
  115. wait(0)
  116. game.Lighting.Brightness = 9999999
  117. wait(0)
  118. game.Lighting.Brightness = 0
  119. wait(1)
  120. wait(0)
  121. game.Lighting.Brightness = 0
  122. wait(0)
  123. game.Lighting.Brightness = 9999999
  124. wait(0)
  125. game.Lighting.Brightness = 0
  126. wait(0)
  127. game.Lighting.Brightness = 9999999
  128. wait(0)
  129. game.Lighting.Brightness = 0
  130. wait(0)
  131. game.Lighting.Brightness = 9999999
  132. wait(0)
  133. game.Lighting.Brightness = 0
  134. wait(1)
  135. game.Lighting.Brightness = 0
  136. wait(0)
  137. game.Lighting.Brightness = 9999999
  138. wait(0)
  139. game.Lighting.Brightness = 0
  140. wait(0)
  141. game.Lighting.Brightness = 9999999
  142. wait(0)
  143. game.Lighting.Brightness = 0
  144. wait(0)
  145. game.Lighting.Brightness = 9999999
  146. wait(0)
  147. game.Lighting.Brightness = 0
  148. wait(0)
  149. game.Lighting.Brightness = 0
  150. wait(0)
  151. game.Lighting.Brightness = 9999999
  152. wait(0)
  153. game.Lighting.Brightness = 0
  154. wait(0)
  155. game.Lighting.Brightness = 9999999
  156. wait(0)
  157. game.Lighting.Brightness = 0
  158. wait(0)
  159. game.Lighting.Brightness = 9999999
  160. wait(0)
  161. game.Lighting.Brightness = 0
  162. wait(7)
  163. end
  164. end))
  165.  
  166.  
  167. PlayButton.Name = "PlayButton"
  168. PlayButton.Parent = GameUserInterface
  169. PlayButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  170. PlayButton.BackgroundTransparency = 1
  171. PlayButton.Position = UDim2.new(0.05, 0, 0.88, 0)
  172. PlayButton.Size = UDim2.new(0, 190, 0, 50)
  173. PlayButton.AutoButtonColor = false
  174. PlayButton.Font = Enum.Font.Arcade
  175. PlayButton.Text = "Play"
  176. PlayButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  177. PlayButton.TextSize = 14.000
  178. PlayButton.TextScaled = true
  179. PlayButton.TextWrapped = true
  180.  
  181. QuiteButton.Name = "QuiteButton"
  182. QuiteButton.Parent = GameUserInterface
  183. QuiteButton.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  184. QuiteButton.BackgroundTransparency = 1
  185. QuiteButton.Position = UDim2.new(0.75, 0, 0.88, 0)
  186. QuiteButton.Size = UDim2.new(0, 190, 0, 50)
  187. QuiteButton.AutoButtonColor = false
  188. QuiteButton.Font = Enum.Font.Arcade
  189. QuiteButton.Text = "Quite"
  190. QuiteButton.TextColor3 = Color3.fromRGB(255, 255, 255)
  191. QuiteButton.TextSize = 14.000
  192. QuiteButton.TextScaled = true
  193. QuiteButton.TextWrapped = true
  194.  
  195. FullScreenBlack.Parent = GameUserInterface
  196. FullScreenBlack.Position = UDim2.new(0.5, 0, 0.455, 0)
  197. FullScreenBlack.Size = UDim2.new(1, 1, 1.11, 1)
  198. FullScreenBlack.AnchorPoint = Vector2.new(0.5, 0.5)
  199. FullScreenBlack.BackgroundTransparency = Value_1
  200. FullScreenBlack.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  201. FullScreenBlack.BorderSizePixel = 0
  202.  
  203. FnafSong.Parent = game.Workspace
  204. FnafSong.SoundId = "rbxassetid://6913550990"
  205. FnafSong.Playing = true
  206. FnafSong.Looped = false
  207. FnafSong.Volume = 1
  208. FnafSong:Stop()
  209.  
  210. spawn(function()
  211. for i = 1,50 do
  212. wait(0)
  213. Value_1 = Value_1 + 0.02
  214. FullScreenBlack.BackgroundTransparency = Value_1
  215. end
  216. end)
  217.  
  218. spawn(function()
  219. for i = 1,150 do
  220. wait(0)
  221. Value_2 = Value_2 - 0.08
  222. CameraPart.Position= Vector3.new(107.58, 3843.68, Value_2)
  223. end
  224. end)
  225.  
  226. FnafSong:Play()
  227.  
  228.  
  229. PlayButton.MouseButton1Click:Connect(function()
  230. FnafSong:Stop()
  231. cam.CameraSubject = Character
  232. cam.CameraType = Enum.CameraType.Track
  233. Script:Destroy()
  234. PlayButton.Visible = false
  235. QuiteButton.Visible = false
  236. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(21.379, 3815.431, 47.049)
  237. end)
  238.  
  239. QuiteButton.MouseButton1Click:Connect(function()
  240. LocalPlayer:Kick("See You Soon")
  241. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement