Advertisement
Joriangames

Death Cam script

Jan 21st, 2021
8,030
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.32 KB | None | 0 0
  1. --Thanks for using this script
  2. --This script is made by Joriangames/Problox Studio Scripts
  3. --Want to know how to use this? Watch my tutorial: https://youtu.be/XjtCqL0V6t0
  4. local cam = game.Workspace.CurrentCamera
  5. local KillText = script.Parent.KillText
  6. local plr = game.Players.LocalPlayer or game.Players.PlayerAdded:Wait()
  7. local char = plr.Character or plr.CharacterAdded:Wait()
  8. local hum = char:WaitForChild("Humanoid")
  9. local ImageLabel = KillText.ImageLabel
  10. local Green = Color3.fromRGB(0, 255, 0)
  11. local Red = Color3.fromRGB(255, 0, 4)
  12.  
  13. hum.Died:Connect(function()
  14.     local mur = char.Humanoid:FindFirstChild("creator")
  15.     local murChar = mur.Value.Character
  16.     local murName = mur.Value.Name
  17.     local murHealth = murChar:FindFirstChild("Humanoid").Health
  18.     local murId = mur.Value.UserId
  19.    
  20.     if mur.Value then
  21.         KillText.Visible = true
  22.         cam.CameraSubject = murChar.Humanoid
  23.         KillText.MuderName.Text = murName
  24.         local roundValue = (math.floor(murHealth))
  25.         local maxH = murChar:FindFirstChild("Humanoid").MaxHealth
  26.         KillText.MurderHP.Text = roundValue
  27.         KillText.MurderHP.TextColor3 = Red:lerp(Green, roundValue / maxH)
  28.         ImageLabel.Image = game.Players:GetUserThumbnailAsync(murId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size420x420)
  29.        
  30.         wait(5)
  31.         KillText.Visible = false
  32.         cam.CameraSubject = hum
  33.     end
  34. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement