Advertisement
justneed

Trashbin troll tsb script

Feb 13th, 2025 (edited)
1,974
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.63 KB | Source Code | 0 0
  1. local plr = game:GetService("Players")
  2. local me  = plr.LocalPlayer
  3. local hum = me.Character:WaitForChild("Humanoid")
  4. local hrp = me.Character:WaitForChild("HumanoidRootPart")
  5.  
  6. local work = game:GetService("Workspace")
  7. local run = game:GetService("RunService")
  8. local camera = work.CurrentCamera
  9.  
  10. local con
  11.  
  12. local function update()
  13.     hum = me.Character:WaitForChild("Humanoid")
  14.     hrp = me.Character:WaitForChild("HumanoidRootPart")
  15. end
  16.  
  17. me.CharacterAdded:Connect(update)
  18.  
  19. if me.Character then
  20.     update()
  21. end
  22.  
  23. local screen  = Instance.new("ScreenGui")
  24. screen.Parent = me.PlayerGui
  25. screen.Name   = "Trash"
  26.  
  27. local frame    = Instance.new("Frame")
  28. frame.Parent   = screen
  29. frame.Size     = UDim2.new(0,250,0,250)
  30. frame.Position = UDim2.new(0,15,0,380)
  31.  
  32. frame.Active     = true
  33. frame.Selectable = true
  34. frame.Draggable  = true
  35.  
  36. local btn    = Instance.new("TextButton")
  37. btn.Parent   = frame
  38. btn.Size     = UDim2.new(0,25,0,25)
  39. btn.Position = UDim2.new(0,225,0,0)
  40. btn.Text     = "X"
  41. btn.TextSize = 12
  42.  
  43. local text             = Instance.new("TextBox")
  44. text.Parent            = frame
  45. text.Size              = UDim2.new(0,80,0,35)
  46. text.Position          = UDim2.new(0,90,0,100)
  47. text.Text              = ""
  48. text.PlaceholderText   = "Trash"
  49. text.PlaceholderColor3 = Color3.fromRGB(70,70,70)
  50. text.TextSize          = 12
  51.  
  52. local btn2    = Instance.new("TextButton")
  53. btn2.Parent   = frame
  54. btn2.Size     = UDim2.new(0,80,0,35)
  55. btn2.Position = UDim2.new(0,30,0,140)
  56. btn2.Text     = "Start"
  57. btn2.TextSize = 12
  58.  
  59. local btn3    = Instance.new("TextButton")
  60. btn3.Parent   = frame
  61. btn3.Size     = UDim2.new(0,80,0,35)
  62. btn3.Position = UDim2.new(0,150,0,140)
  63. btn3.Text     = "Stop"
  64. btn3.TextSize = 12
  65.  
  66. btn.MouseButton1Click:Connect(function()
  67.     screen:Destroy()
  68. end)
  69.  
  70. btn2.MouseButton1Click:Connect(function()
  71.     for _, allAnims in pairs(hum:GetPlayingAnimationTracks()) do
  72.         allAnims:Stop()
  73.     end
  74.  
  75.     local anim = Instance.new("Animation")
  76.     anim.AnimationId = "rbxassetid://17141153099"
  77.     local animtrack = hum.Animator:LoadAnimation(anim)
  78.     animtrack:Play()
  79.  
  80.     local part = Instance.new("Part")
  81.     part.Parent = work
  82.     part.CanCollide = false
  83.     part.Anchored = true
  84.     part.Transparency = 0.999
  85.  
  86.     con = run.RenderStepped:Connect(function()
  87.         part.CFrame = hrp.CFrame * CFrame.new(0,0,-3)
  88.         camera.CameraSubject = part
  89.     end)
  90.  
  91.     task.delay(0.75, function()
  92.         animtrack:AdjustSpeed(0)
  93.     end)
  94.  
  95.     btn3.MouseButton1Click:Connect(function()
  96.         animtrack:Stop()
  97.         if part then
  98.             part:Destroy()
  99.         end
  100.         if con then
  101.             con:Disconnect()
  102.             con = nil
  103.             camera.CameraSubject = me.Character
  104.         end
  105.     end)
  106. end)
  107.  
  108. screen.ResetOnSpawn = false
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement