Advertisement
SxScripting

Death Screen Local

Jan 24th, 2023
378
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. local RS = game:GetService("ReplicatedStorage");
  2. local TS = game:GetService("TweenService");
  3. local RunService = game:GetService("RunService");
  4.  
  5. local Trash: RBXScriptSignal;
  6. local Camera = game.Workspace.CurrentCamera;
  7. local Info = TweenInfo.new(1, Enum.EasingStyle.Sine)
  8.  
  9. RS.Death.OnClientEvent:Connect(function(Statement)
  10. local Player = game.Players.LocalPlayer
  11. local Character: Model = Player.Character or Player.CharacterAdded:Wait();
  12. local Head = Character.Head;
  13. local Mouse: Mouse = Player:GetMouse();
  14.  
  15. coroutine.wrap(function()
  16. Trash = RunService.RenderStepped:Connect(function()
  17. if not Statement then return end
  18. task.wait(1);
  19. TS:Create(Camera, Info, {CFrame = CFrame.new(Camera.CFrame.Position, Vector3.new(Mouse.Hit.X - 2, -Mouse.Hit.Y, Mouse.Hit.Z - 2))}):Play()
  20. end)
  21. end)()
  22.  
  23. if Statement then
  24. Camera.CameraType = Enum.CameraType.Scriptable;
  25. TS:Create(Camera, Info, {CFrame = Camera.CFrame * CFrame.new(0,100,0)}):Play();
  26. else
  27. Camera.CameraType = Enum.CameraType.Custom;
  28. Camera.CFrame = Head.CFrame
  29. end
  30.  
  31. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement