lllkkklkk

redman V3

Jul 25th, 2024
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.25 KB | None | 0 0
  1. -- Function to change the color of the character's body parts, remove pants, destroy accessories, set animations, and set the humanoid health
  2. local function modifyCharacter(character, color, idleAnimationId, walkRunAnimationId, jumpAnimationId, fallAnimationId)
  3. -- Remove pants
  4. local pants = character:FindFirstChildOfClass("Pants")
  5. if pants then
  6. pants:Destroy()
  7. end
  8.  
  9. -- Remove shirt
  10. local shirt = character:FindFirstChildOfClass("Shirt")
  11. if shirt then
  12. shirt:Destroy()
  13. end
  14.  
  15. -- Destroy all accessories
  16. for _, accessory in pairs(character:GetChildren()) do
  17. if accessory:IsA("Accessory") then
  18. accessory:Destroy()
  19. end
  20. end
  21.  
  22. -- Change the color of the body parts
  23. for _, part in pairs(character:GetChildren()) do
  24. if part:IsA("BasePart") then
  25. part.Color = color
  26. end
  27. end
  28.  
  29. -- Remove face decal
  30. local head = character:FindFirstChild("Head")
  31. if head then
  32. local face = head:FindFirstChild("face")
  33. if face and face:IsA("Decal") then
  34. face:Destroy()
  35. end
  36. end
  37.  
  38. -- Set the animations
  39. local humanoid = character:FindFirstChildOfClass("Humanoid")
  40. if humanoid then
  41. -- Idle Animation
  42. local idleAnimation = Instance.new("Animation")
  43. idleAnimation.AnimationId = "rbxassetid://" .. idleAnimationId
  44. local idleAnimationTrack = humanoid:LoadAnimation(idleAnimation)
  45. idleAnimationTrack:Play()
  46.  
  47. -- Walk/Run Animation
  48. local walkRunAnimation = Instance.new("Animation")
  49. walkRunAnimation.AnimationId = "rbxassetid://" .. walkRunAnimationId
  50. local walkRunAnimationTrack = humanoid:LoadAnimation(walkRunAnimation)
  51. humanoid.WalkSpeed = 16 -- Set a default walk speed if needed
  52.  
  53. -- Jump Animation
  54. local jumpAnimation = Instance.new("Animation")
  55. jumpAnimation.AnimationId = "rbxassetid://" .. jumpAnimationId
  56. local jumpAnimationTrack = humanoid:LoadAnimation(jumpAnimation)
  57.  
  58. -- Fall Animation
  59. local fallAnimation = Instance.new("Animation")
  60. fallAnimation.AnimationId = "rbxassetid://" .. fallAnimationId
  61. local fallAnimationTrack = humanoid:LoadAnimation(fallAnimation)
  62.  
  63. -- Play animations based on state
  64. humanoid.StateChanged:Connect(function(oldState, newState)
  65. if newState == Enum.HumanoidStateType.Freefall then
  66. fallAnimationTrack:Play()
  67. walkRunAnimationTrack:Stop()
  68. idleAnimationTrack:Stop()
  69. elseif newState == Enum.HumanoidStateType.Jumping then
  70. jumpAnimationTrack:Play()
  71. walkRunAnimationTrack:Stop()
  72. idleAnimationTrack:Stop()
  73. elseif newState == Enum.HumanoidStateType.Landed then
  74. fallAnimationTrack:Stop()
  75. jumpAnimationTrack:Stop()
  76. idleAnimationTrack:Play()
  77. end
  78. end)
  79.  
  80. humanoid.Running:Connect(function(speed)
  81. if speed > 0 and humanoid:GetState() ~= Enum.HumanoidStateType.Freefall and humanoid:GetState() ~= Enum.HumanoidStateType.Jumping then
  82. walkRunAnimationTrack:Play()
  83. else
  84. walkRunAnimationTrack:Stop()
  85. end
  86. end)
  87. end
  88.  
  89. -- Add a BillboardGui with TextLabel to the head
  90. if head then
  91. -- BillboardGui
  92. local billboardGui = Instance.new("BillboardGui")
  93. billboardGui.Name = "RedmanBillboardGui"
  94. billboardGui.Size = UDim2.new(0, 150, 0, 50) -- Adjust size for better visibility
  95. billboardGui.StudsOffset = Vector3.new(0, 1, 0) -- Adjust height offset to be closer to the head
  96. billboardGui.AlwaysOnTop = true
  97. billboardGui.MaxDistance = 20 -- Set MaxDistance to 20
  98. billboardGui.Parent = head
  99.  
  100. -- TextLabel
  101. local textLabel = Instance.new("TextLabel")
  102. textLabel.Size = UDim2.new(1, 0, 1, 0)
  103. textLabel.Position = UDim2.new(0, 0, 0, 0)
  104. textLabel.BackgroundTransparency = 1
  105. textLabel.Text = "THE RED MAN"
  106. textLabel.TextColor3 = Color3.fromRGB(255, 0, 0) -- Bright red text color
  107. textLabel.TextStrokeTransparency = 0.5
  108. textLabel.Font = Enum.Font.Michroma -- Change to 'Michroma' font
  109. textLabel.TextSize = 30 -- Adjust text size
  110. textLabel.TextScaled = true
  111. textLabel.Parent = billboardGui
  112. end
  113. end
  114.  
  115. -- Get the player and their character
  116. local player = game.Players.LocalPlayer
  117. local character = player.Character or player.CharacterAdded:Wait()
  118.  
  119. -- Set the desired color, animation IDs, and health
  120. local redColor = Color3.fromRGB(255, 0, 0)
  121. local idleAnimationId = "18631254999"
  122. local walkRunAnimationId = "18631265977"
  123. local jumpAnimationId = "18604398787"
  124. local fallAnimationId = "18604405665"
  125.  
  126. -- Modify the character
  127. modifyCharacter(character, redColor, idleAnimationId, walkRunAnimationId, jumpAnimationId, fallAnimationId)
  128.  
  129. -- Listen for character respawn to apply the changes again
  130. player.CharacterAdded:Connect(function(newCharacter)
  131. modifyCharacter(newCharacter, redColor, idleAnimationId, walkRunAnimationId, jumpAnimationId, fallAnimationId)
  132. end)
  133.  
Add Comment
Please, Sign In to add comment