Advertisement
KrYn0MoRe

dog boom

Dec 23rd, 2023 (edited)
988
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.79 KB | None | 0 0
  1. local chr = owner.Character
  2. local root = chr.HumanoidRootPart
  3. booming = false
  4.  
  5. local dogGui = Instance.new("ScreenGui")
  6. dogGui.Name = "dogImg"
  7.  
  8. local dogImg = Instance.new("ImageLabel")
  9. dogImg.Size = UDim2.new(0.5, 0, 0.5, 0)
  10. dogImg.Position = UDim2.new(0.25, 0, 0.25, 0)
  11. dogImg.BorderSizePixel = 0
  12. dogImg.BackgroundColor3 = Color3.new(1, 1, 1)
  13. dogImg.Image = "rbxassetid://7399605928"
  14. dogImg.BackgroundTransparency = 1
  15. dogImg.ImageTransparency = 1
  16. dogImg.Parent = dogGui
  17.  
  18. local boom = Instance.new("Sound")
  19. boom.SoundId = "rbxassetid://6823153536"
  20. boom.Volume = 1
  21. boom.PlayOnRemove = true
  22.  
  23. function dog(person)
  24.     local gui = dogGui:Clone()
  25.     gui.Parent = person.PlayerGui
  26.     local dogClone = gui.ImageLabel
  27.        
  28.     local tweenTime = Random.new():NextNumber(0.25, 0.5)
  29.     local randomSize = Random.new():NextNumber(0.75, 1.25)
  30.     local randomPosX = Random.new():NextNumber(-0.125, 0.125)
  31.     local randomPosY = Random.new():NextNumber(-0.125, 0.125)
  32.    
  33.     local dogTween = game:GetService"TweenService":Create(
  34.         dogClone,
  35.         TweenInfo.new(tweenTime, Enum.EasingStyle.Bounce, Enum.EasingDirection.Out),
  36.         {Size = UDim2.new(randomSize, 0, randomSize, 0), Position = UDim2.new(randomPosX, 0, randomPosY, 0), ImageTransparency = 0}
  37.     )
  38.     dogTween:Play()
  39.    
  40.     task.spawn(function()
  41.         task.wait(0.5)
  42.        
  43.         local dogTween2 = game:GetService"TweenService":Create(
  44.             dogClone,
  45.             TweenInfo.new(tweenTime, Enum.EasingStyle.Sine, Enum.EasingDirection.Out),
  46.             {ImageTransparency = 1}
  47.         )
  48.         dogTween2:Play()
  49.        
  50.         task.wait(0.25)
  51.     end)
  52.        
  53.     local explosion = boom:Clone()
  54.     explosion.Parent = person.PlayerGui
  55.     explosion:Play()
  56.     explosion:Destroy()
  57.        
  58.     task.wait(Random.new():NextNumber(0.01, 0.1))
  59. end
  60.  
  61. local remote = Instance.new('RemoteEvent')
  62. remote.Name = 'KeybindConnection'
  63. remote.Parent = owner:FindFirstChildOfClass("PlayerGui")
  64.  
  65. NLS([[
  66. local chr = game:GetService("Players").LocalPlayer
  67. repeat wait() until script.Parent
  68. local remote = script.Parent
  69. local UIS = game:GetService('UserInputService')
  70. UIS.InputBegan:Connect(function(key,g)
  71.     if not g then
  72.         remote:FireServer(key.KeyCode,'keydown')
  73.     end
  74. end)
  75. UIS.InputEnded:Connect(function(key)
  76.     remote:FireServer(key.KeyCode,'keyup')
  77. end)
  78. ]],remote)
  79.  
  80. remote.OnServerEvent:Connect(function(lplr,key,input)
  81.     if lplr == owner then else return end
  82.     if key == Enum.KeyCode.Q then
  83.         if input == "keydown" then
  84.             boomed = not boomed
  85.         end
  86.     end
  87. end)
  88.  
  89. game:GetService("RunService").Heartbeat:Connect(function()
  90.     if boomed == true then
  91.         for i,v in pairs(game:GetService("Players"):GetPlayers()) do
  92.             dog(v)
  93.         end
  94.     end
  95. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement