Advertisement
Sungmingamerpro13

MainScript (Script) SungExetior13RBLX (Sungmin)

Jan 15th, 2025
29
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.23 KB | None | 0 0
  1. --- Sungmingamerpro13
  2.  
  3. -- Services
  4. PlayerService = game:GetService('Players')
  5. TweenService = game:GetService('TweenService')
  6.  
  7. MessageValue = game.ReplicatedStorage.Message
  8. ImageValue = game.ReplicatedStorage.Message.SpeakerImage
  9. SpeakerValue = game.ReplicatedStorage.Message.SpeakerName
  10.  
  11. -- randomPlayer or NPC
  12.  
  13. local randomPlayer
  14.  
  15. -- Functions
  16.  
  17. function BroadCastMessage(Text)
  18.     MessageValue.Value = Text
  19. end
  20.  
  21. function SetMessageSpeaker(Name, Model)
  22.     if Name == "Random" then
  23.         randomPlayer = game.Players:GetChildren()[math.random(1,#game.Players:GetChildren())]
  24.         Name = randomPlayer.Name
  25.     end
  26.     ImageValue.Value = Name or Model
  27.     SpeakerValue.Value = Name
  28. end
  29.  
  30. function ChangeTime(ToTime, TweenDuration)
  31.     local Lightning = game.Lighting
  32.     local TI = TweenInfo.new(TweenDuration,Enum.EasingStyle.Linear)
  33.     local Tween = TweenService:Create(Lightning, TI, {ClockTime = ToTime})
  34.     Tween:Play()
  35. end
  36.  
  37. function ChangeFogend(ChangeTo, TweenDuration,ColourOrNone)
  38.     if ColourOrNone ~= 'None' then
  39.         game.Lighting.FogColor = ColourOrNone
  40.     end
  41.     local FogendValue = Instance.new('IntValue')
  42.     FogendValue.Value = game.Lighting.FogEnd
  43.     FogendValue:GetPropertyChangedSignal('Value'):Connect(function()
  44.         game.Lighting.FogEnd = FogendValue.Value
  45.     end)
  46.     local TI = TweenInfo.new(TweenDuration,Enum.EasingStyle.Linear)
  47.     local Tween = TweenService:Create(FogendValue, TI, {Value = ChangeTo})
  48.     Tween:Play()
  49.     spawn(function()
  50.         Tween.Completed:Connect(function()
  51.             FogendValue:Destroy()
  52.         end)
  53.     end)
  54. end
  55.  
  56. function teleportPlayers(partCFrame)
  57.     local players = game.Players:getPlayers()
  58.     for _,player in pairs(players) do
  59.         if player.Character then
  60.             if player.Character.HumanoidRootPart.Anchored == false then
  61.                 player.Character.Humanoid.Jump = true
  62.             end
  63.         end
  64.     end
  65.     wait(.5)
  66.     for _,player in pairs(players) do
  67.         if player.Character then
  68.             if player.Character.HumanoidRootPart.Anchored == false then
  69.                 player.Character:SetPrimaryPartCFrame(partCFrame)
  70.             end
  71.         end
  72.     end
  73. end
  74.  
  75. function TransitionScreen()
  76.     for _, player in pairs(game.Players:GetPlayers()) do
  77.         spawn(function()
  78.             local NewGui = game.ServerStorage.Assets.TransitionScreen:Clone()
  79.             NewGui.Parent = player.PlayerGui
  80.         end)
  81.     end
  82. end
  83.  
  84. ---- MainScript ----
  85.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement