Advertisement
Guest User

Death Note Roblox Script

a guest
Feb 28th, 2024
1,787
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.41 KB | Source Code | 0 0
  1.  
  2. --- 8888
  3. -- helps you find kiras (also has a tp to id option)
  4.  
  5. local Players = game:GetService("Players");
  6. local ReplicatedStorage = game:GetService("ReplicatedStorage")
  7. local GameFolder = ReplicatedStorage.Game
  8. local Client = Players.LocalPlayer;
  9. local ClientGUI = Client.PlayerGui
  10.  
  11. local KiraList = {}
  12. local Gamemode, Timer, GamePhase = GameFolder.Gamemode, GameFolder.Timer, GameFolder.GamePhase
  13. local CurrentUserId = nil
  14.  
  15. local SecondaryMapOption = nil
  16.  
  17.  
  18. local function MkUICorner()
  19.     return Instance.new("UICorner")
  20. end
  21.  
  22. local function MkUIStroke(Thickness)
  23.     local strk = Instance.new("UIStroke")
  24.     strk.Thickness = Thickness
  25.    
  26.     return strk
  27. end
  28.  
  29.  
  30. local UI = Instance.new("ScreenGui");
  31. UI.Parent = ClientGUI;
  32.  
  33. local Frame = Instance.new("Frame");
  34. Frame.Position = UDim2.new(0.35, 0,0.374, 0);
  35. Frame.Size = UDim2.new(0.3, 0,0.25, 0);
  36. Frame.BackgroundColor3 = Color3.fromRGB(53, 1, 1)
  37. Frame.Draggable = true
  38. Frame.Selectable = true
  39. Frame.Active = true
  40. MkUIStroke(4).Parent = Frame
  41. Frame.Parent = UI
  42.  
  43. local KiraLabel = Instance.new("TextLabel");
  44. KiraLabel.Position = UDim2.new(0.044, 0,0.064, 0);
  45. KiraLabel.Size = UDim2.new(0.273, 0,0.439, 0);
  46. KiraLabel.BackgroundTransparency = 1
  47. KiraLabel.TextScaled = true
  48. KiraLabel.Font = Enum.Font.Gotham
  49. KiraLabel.Text = "Kira ; "
  50. KiraLabel.Parent = Frame
  51.  
  52. local Kiras = Instance.new("TextLabel");
  53. Kiras.Position = UDim2.new(0.317, 0,0.064, 0);
  54. Kiras.Size = UDim2.new(0.665, 0,0.439, 0)
  55. Kiras.BackgroundTransparency = 1
  56. Kiras.TextScaled = true
  57. Kiras.TextColor3 = Color3.new(1, 0, 0)
  58. Kiras.Font = Enum.Font.Gotham
  59. Kiras.Text = ":3 (Press on $ sign to start, preferably if you aren't in the lobby)"
  60. Kiras.Parent = Frame
  61.  
  62. local CleanUpButton = Instance.new("TextButton");
  63. CleanUpButton.Size = UDim2.new(0.5, 0,0.3, 0);
  64. CleanUpButton.Position = UDim2.new(0.244, 0,0.581, 0);
  65. CleanUpButton.TextScaled = true
  66. CleanUpButton.BackgroundColor3 = Color3.new(0, 0, 0)
  67. CleanUpButton.TextColor3 = Color3.new(1, 1, 1)
  68. CleanUpButton.Font = Enum.Font.Gotham
  69. CleanUpButton.Text = "Clear"
  70. MkUICorner().Parent = CleanUpButton
  71. CleanUpButton.Parent = Frame
  72.  
  73. local TPButton = Instance.new("TextButton");
  74. TPButton.Size = UDim2.new(0.5, 0,0.3, 0);
  75. TPButton.Position = UDim2.new(0.244, 0,1.105, 0);
  76. TPButton.BackgroundColor3 = Color3.new(0, 0, 0)
  77. TPButton.TextColor3 = Color3.new(0.796078, 0.796078, 0.796078)
  78. TPButton.TextScaled = true
  79. TPButton.Font = Enum.Font.Gotham
  80. TPButton.Text = "Teleport To ID"
  81. MkUICorner().Parent = TPButton
  82. TPButton.Parent = Frame
  83.  
  84. local DollaSign = Instance.new("TextButton");
  85. DollaSign.Size = UDim2.new(0.061, 0,0.115, 0);
  86. DollaSign.Position = UDim2.new(0.919, 0,0.837, 0);
  87. DollaSign.TextScaled = true
  88. DollaSign.Text = "$"
  89. MkUICorner().Parent = DollaSign
  90. DollaSign.BackgroundColor3 = Color3.new(0.0666667, 0, 1)
  91. DollaSign.Parent = Frame
  92.  
  93.  
  94. local function Noclip(Bool)
  95.     for i, v in pairs(Client.Character:GetDescendants()) do
  96.         if v:IsA("BasePart") then
  97.             v.CanCollide = not Bool
  98.         end
  99.     end
  100. end
  101.  
  102. local function closestPlayerAtPos(Position)
  103.     local MaxRange = math.huge;
  104.     local Closest = nil;
  105.  
  106.     for _, v in Players:GetPlayers() do
  107.         local RootPart = v.Character and v.Character:FindFirstChild("HumanoidRootPart");
  108.         if not RootPart then
  109.             continue;
  110.         end;
  111.  
  112.         local Magnitude = (RootPart.Position - Position).Magnitude;
  113.         if Magnitude < MaxRange then
  114.             Closest = v.Character;
  115.             MaxRange = Magnitude;
  116.         end;
  117.     end;
  118.  
  119.     return Closest;
  120. end;
  121.  
  122.  
  123. local function FetchCurrentId(Map)
  124.     for _, v in Map:GetChildren() do
  125.         if v.Name == "Id" then
  126.             if v.SurfaceGui.Frame.PlayerName.Text == Client.Name or v.SurfaceGui.Frame.PlayerName.Text == Client.DisplayName then
  127.                 return v
  128.             end
  129.         end
  130.     end
  131. end
  132.  
  133.  
  134. local CanBypass = true
  135.  
  136.  
  137. CleanUpButton.MouseButton1Click:Connect(function()
  138.     Kiras.Text = ""
  139.     KiraList = {}
  140. end)
  141.  
  142.  
  143. TPButton.MouseButton1Click:Connect(function()
  144.    
  145.    
  146.     CurrentUserId = FetchCurrentId(workspace.Map)
  147.    
  148.     if CurrentUserId ~= nil and (Client.Character) then
  149.         Noclip(true)
  150.         Client.Character.HumanoidRootPart.CFrame = CurrentUserId.CFrame
  151.         task.wait(0.5)
  152.         Noclip(false)
  153.     else
  154.         TPButton.Text = "Your ID isn't in game !"
  155.         task.wait(0.75)
  156.         TPButton.Text = "Teleport To Your Id"
  157.     end
  158. end)
  159.  
  160.  
  161. GamePhase:GetPropertyChangedSignal("Value"):Connect(function()
  162.     if GamePhase.Value == "Starting" then
  163.         KiraList = {}
  164.         CanBypass = true
  165.     end
  166. end)
  167.  
  168.  
  169. DollaSign.MouseButton1Click:Connect(function()
  170.     if CanBypass then
  171.         local Map = workspace.Map;
  172.         if Map then
  173.             CanBypass = false
  174.             Kiras.Text = ""
  175.             for _, v in Map:GetChildren() do
  176.                 if v.Name == "Id" then
  177.                     local Position = v.Position;
  178.  
  179.                     local SurfaceGui = v:FindFirstChild("SurfaceGui");
  180.                     if not SurfaceGui then
  181.                         continue;
  182.                     end;
  183.  
  184.                     SurfaceGui:GetPropertyChangedSignal("Enabled"):Connect(function()
  185.                         local Kira = closestPlayerAtPos(Position);
  186.                         if Kira and Timer.Value < 178.5 and GamePhase.Value == "IdScatter" then
  187.                             local KiraPlr = Players:GetPlayerFromCharacter(Kira)
  188.                             if not table.find(KiraList, KiraPlr) and KiraPlr ~= Client then
  189.                                 if #Kiras.Text == 0 then
  190.                                     Kiras.Text = KiraPlr.DisplayName .. " (" .. Kira.Name .. ")"
  191.                                     table.insert(KiraList, KiraPlr)
  192.                                 else
  193.                                     Kiras.Text = Kiras.Text .. ", " .. KiraPlr.DisplayName .. " (" .. Kira.Name .. ")"
  194.                                     table.insert(KiraList, KiraPlr)
  195.                                 end
  196.                             end
  197.                         end;
  198.                     end);
  199.                 end;
  200.             end;
  201.         end
  202.     end
  203. end)
  204.  
  205.  
Tags: Roblox Script
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement