Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Loading Scream by xxdemonslayer12xx2")
- print("All copyrights served © ")
- print("-----------------------------------------------")
- wait(1)
- print("MAINSCRIPT '"..script.Name.."' LOADED")
- local swipe = script.Swipe
- local trumpets = script.Trumpets
- local bells = script.ScaryBells
- local musicbells = script.Bells
- amountchecked = script.AmountChecked
- local maps = game.Lighting.Maps:GetChildren()
- local pickedMap = nil
- local h = Instance.new("Hint")
- local m = Instance.new("Message")
- local plyrs = 2-- least amount of players needed to play
- local it = nil -- nothing
- local PlayerItName = game.Workspace.PlayerItName
- local ViewItTrueorFalse = game.Workspace.ViewIt
- local sherrif = nil
- timerlele = script.TimerCountdown
- function round(a,b)
- return math.floor((a/b)+0.5)*b
- end
- function findAlive()
- wait(1)
- timerlele.Value = timerlele.Value - 1
- amountchecked.Value = amountchecked.Value + 1
- local alive = 0
- local playerLIST = game.Players:GetChildren()
- for i = 1, #playerLIST do
- if playerLIST[i].Alive.Value == true then
- alive = alive + 1
- end
- end
- if alive == 0 then
- h.Parent = game.Workspace
- h.Text = it.Name.. " murdered all the targets."
- wait(4)
- if it ~= nil then
- it.leaderstats.Points.Value = it.leaderstats.Points.Value + 50
- wait(2)
- h:remove()
- EndGame()
- end
- end
- end
- function EndGame()
- timerlele.Value = 250
- amountchecked.Value = 0
- local alive = 0
- local playerLIST = game.Players:GetChildren()
- for i = 1, #playerLIST do
- if playerLIST[i].Alive.Value == true then
- playerLIST[i].leaderstats.Points.Value = playerLIST[i].leaderstats.Points.Value + 20
- end
- end
- game.Lighting.TimeOfDay = "14:00:00"
- musicbells:stop()
- game.Lighting.FogEnd = 100000000
- local list = game.Players:children()
- for i = 1, #list do
- if list[i].Character ~= nil then
- list[i].Character:BreakJoints()
- end
- end
- pickedMap:remove()
- local minutes = 0
- local seconds = 30
- h.Parent = game.Workspace
- for i = 1, (minutes+1) do
- for i = 1, (seconds+1) do
- if seconds < 10 then
- h.Text = seconds.." Seconds ,Screams starting soon!"
- else
- h.Text = seconds.." seconds till Scream starts!"
- end
- seconds = seconds - 1
- wait(1)
- end
- seconds = 40
- minutes = minutes - 1
- end
- h:remove()
- CheckPlayers()
- end
- function ItCountDown()
- local walls = game.Workspace.Walls:GetChildren()
- for i = 1,#walls do if walls[i].className == "Part" then walls[i].Transparency = 0.5 end end
- h.Parent = game.Workspace
- repeat
- h.Text = "There is " .. timerlele.Value .. " more seconds before scream leaves!"
- findAlive()
- until timerlele.Value == 0
- m.Parent = game.Workspace
- m.Text = "scream has left."
- wait(3)
- m:remove()
- PlayerItName.Value = ""
- ViewItTrueorFalse.Value = false
- EndGame()
- end
- function Teleport_It()
- if it ~= nil then
- if it.Character ~= nil then
- if it.Character.Humanoid.Health > 0 then
- head = it.Character.Head
- newhead = head:Clone()
- neck = it.Character.Torso.Neck
- newneck = neck:Clone()
- newhead.Name = "NewHead"
- newhead.Parent = it.Character
- newneck.Name = "NewNeck"
- newneck.Part0 = it.Character.Torso
- newneck.Part1 = newhead
- newneck.Parent = it.Character.Torso
- it.Character.Humanoid.WalkSpeed = 25
- tt = game.Lighting.BillboardGui:Clone()
- tt.Parent = it.Character
- local flightly = game.Lighting.ThrowingKnife:Clone()
- flightly.Parent = it.Backpack
- local s = game.Lighting.ItScript:Clone()
- s.Parent = it.Character
- s.owner.Value = it.Name
- s.Repeater.Disabled = false
- local location = pickedMap.ItSpawn
- it.Character.Humanoid.Jump = true
- wait()
- it.Character.Torso.CFrame = CFrame.new(Vector3.new(location.Position.x,location.Position.y + 3,location.Position.z))
- bells:play()
- wait(0.2)
- musicbells:play()
- end
- end
- ItCountDown()
- else
- h.Text = it.Name.. " Has Died!"
- wait(2)
- h.Text = "Innocent's Have won!!"
- wait(2)
- h:remove()
- end
- EndGame()
- end
- function Teleport_Sherrif()
- if sherrif ~= nil then
- if sherrif.Character ~= nil then
- if sherrif.Character.Humanoid.Health > 0 then
- head = sherrif.Character.Head
- newhead = head:Clone()
- neck = sherrif.Character.Torso.Neck
- newneck = neck:Clone()
- newhead.Name = "NewHead"
- newhead.Parent = sherrif.Character
- newneck.Name = "NewNeck"
- newneck.Part0 = sherrif.Character.Torso
- newneck.Part1 = newhead
- newneck.Parent = sherrif.Character.Torso
- sherrif.Character.Humanoid.WalkSpeed = 25
- tt = game.Lighting.BillboardGui:Clone()
- tt.Parent = sherrif.Character
- local flightly = game.Lighting.Revolver:Clone()
- flightly.Parent = sherrif.Backpack
- local s = game.Lighting.Revolver:Clone()
- s.Parent = sherrif.Character
- s.owner.Value = sherrif.Name
- s.Repeater.Disabled = false
- local location = pickedMap.SherrifSpawn
- sherrif.Character.Humanoid.Jump = true
- wait()
- sherrif.Character.Torso.CFrame = CFrame.new(Vector3.new(location.Position.x,location.Position.y + 3,location.Position.z))
- end
- end
- else
- h:remove()
- end
- EndGame()
- end
- function HideCountDown()
- game.Lighting.TimeOfDay = "0:00:00"
- game.Lighting.FogEnd = 250
- local minutes = 0 -- how many minutes hiders have to hide
- local seconds = 59 -- how many seconds hiders have to hide
- h.Parent = game.Workspace
- for i = 1, (minutes+1) do
- for i = 1, (seconds+1) do
- if seconds < 10 then
- h.Text = "There is "..seconds.." more seconds before scream is released."
- else
- h.Text = "There is "..seconds.." more seconds before scream is released."
- end
- seconds = seconds - 1
- wait(1)
- end
- seconds = 59
- minutes = minutes - 1
- end
- h:remove()
- m.Parent = game.Workspace
- m.Text = "Release scream."
- wait(2)
- m:remove()
- Teleport_It()
- Teleport_Sherrif()
- end
- function Choose_It()
- local list = game.Players:GetChildren()
- h.Parent = game.Workspace
- local f = 1
- local random = math.random(30,45)
- for i = 1, random do
- it = list[f]
- h.Text = "Choosing killer: "..it.Name
- swipe:play()
- wait()
- f = f + 1
- if f > #list then
- f = 1
- end
- wait(0.2)
- end
- h.Text = "The killer is " ..it.Name.. "!"
- trumpets:play()
- wait(4)
- PlayerItName.Value = it.Name
- ViewItTrueorFalse.Value = true
- m:remove()
- Choose_Sherrif()
- end
- function Choose_Sherrif()
- local list = game.Players:GetChildren()
- h.Parent = game.Workspace
- local f = 1
- local random = math.random(30,45)
- for i = 1, random do
- it = list[f]
- h.Text = "Choosing Sherrif: "..sherrif.Name
- swipe:play()
- wait()
- f = f + 1
- if f > #list then
- f = 1
- end
- wait(0.2)
- end
- h.Text = "The Sherrif is " ..sherrif.Name.. "!"
- trumpets:play()
- wait(4)
- PlayerItName.Value = sherrif.Name
- m:remove()
- Start()
- end
- function Start()
- h.Parent = game.Workspace
- local players = game.Players:GetChildren()
- local spawns = pickedMap.Spawns:GetChildren()
- local d = 1
- for x = 1, #players do
- if players[x] ~= it then
- if players[x].Character ~= nil then
- if players[x].Character.Humanoid.Health > 0 then
- players[x].Alive.Value = true
- players[x].Character.Head.Transparency = 1
- h.Text = "Preparing "..players[x].Name
- local location = spawns[d]
- players[x].Character.Humanoid.Jump = true
- game.Lighting.Spectate:clone().Parent = players[x].Backpack
- game.Lighting.Flashlight:clone().Parent = players[x].Backpack
- players[x].Character.Torso.CFrame = CFrame.new(Vector3.new(location.Position.x,location.Position.y + 3,location.Position.z))
- wait(0.2)
- end
- end
- end
- d = d + 1
- if d > #spawns then
- d = 1
- end
- end
- local walls = game.Workspace.Walls:GetChildren()
- for i = 1,#walls do if walls[i].className == "Part" then walls[i].Transparency = 0 end end
- HideCountDown()
- end
- function Choose_Level()
- h.Parent = game.Workspace
- local pM = maps[math.random(1, #maps)]
- pickedMap = pM:clone()
- pickedMap.Parent = game.Workspace
- h.Parent = game.Workspace
- h.Text = "Choosing Map: "..pickedMap.Name
- wait(6)
- h:remove()
- Choose_It()
- end
- function CheckPlayers()
- if game.Players.NumPlayers < plyrs then
- h.Parent = game.Workspace
- h.Text = "Not enough members to start!"
- wait(1)
- CheckPlayers()
- else
- h.Parent = game.Workspace
- h.Text = "Welcome to SCREAM!"
- wait(4)
- h.Text = "SCREAM is about to start."
- wait(2)
- h:remove()
- Choose_Level()
- end
- end
- wait(1)
- CheckPlayers()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement