Advertisement
Familycade

Untitled

Nov 25th, 2024
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.52 KB | None | 0 0
  1. -- Get Player and GUI
  2. local player = game.Players.LocalPlayer
  3. local playerGui = player:WaitForChild("PlayerGui")
  4.  
  5. -- Function to update GUI text
  6. local function updateGuiText()
  7. local screenGui = playerGui:FindFirstChild("ScreenGui")
  8. if screenGui then
  9. local magicHealthFrame = screenGui:FindFirstChild("MagicHealth")
  10. if magicHealthFrame then
  11. local textLabel = magicHealthFrame:FindFirstChild("TextLabel")
  12. if textLabel then
  13. textLabel.Text = "RAMPANT ANGER"
  14. end
  15. end
  16. end
  17. end
  18.  
  19. -- Connect GUI updates
  20. playerGui.DescendantAdded:Connect(updateGuiText)
  21. updateGuiText()
  22.  
  23. -- Function to handle animations
  24. local function playAnimation(humanoid, animationId, newAnimationId, speed, stopDelay)
  25. for _, animTrack in pairs(humanoid:GetPlayingAnimationTracks()) do
  26. animTrack:Stop()
  27. end
  28.  
  29. local anim = Instance.new("Animation")
  30. anim.AnimationId = "rbxassetid://" .. newAnimationId
  31.  
  32. local animTrack = humanoid:LoadAnimation(anim)
  33. animTrack:Play()
  34. animTrack:AdjustSpeed(speed or 1)
  35.  
  36. if stopDelay then
  37. delay(stopDelay, function()
  38. animTrack:Stop()
  39. end)
  40. end
  41. end
  42.  
  43. -- List of animations
  44. local animations = {
  45. [12273188754] = {newId = 15121659862, speed = 1}, -- Move 1
  46. [12296113986] = {newId = 17120635926, speed = 0.5}, -- Move 2
  47. [12309835105] = {newId = 18716478642, speed = 1.1, stopDelay = 1.8}, -- Move 3
  48. [13603396939] = {newId = 18716683497, speed = 1} -- Move 4
  49. }
  50.  
  51. -- Animation event handler
  52. local function onAnimationPlayed(animationTrack)
  53. local humanoid = player.Character:WaitForChild("Humanoid")
  54. local config = animations[tonumber(animationTrack.Animation.AnimationId:match("%d+"))]
  55.  
  56. if config then
  57. playAnimation(humanoid, animationTrack.Animation.AnimationId, config.newId, config.speed, config.stopDelay)
  58. end
  59. end
  60.  
  61. -- Connect humanoid animation events
  62. local character = player.Character or player.CharacterAdded:Wait()
  63. local humanoid = character:WaitForChild("Humanoid")
  64.  
  65. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  66.  
  67. -- Handle new character spawns
  68. player.CharacterAdded:Connect(function(newCharacter)
  69. character = newCharacter
  70. humanoid = character:WaitForChild("Humanoid")
  71. humanoid.AnimationPlayed:Connect(onAnimationPlayed)
  72. end)
  73.  
  74. getgenv().color = Color3.new(1, 0.13, 0)
  75.  
  76. loadstring(game:HttpGet("https://raw.githubusercontent.com/felixsidzed/veryCoolScripts/refs/heads/main/Change%20Effects%20TSBG.lua"))()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement