Advertisement
TheYoutuber_Pro

BAHAmma

Dec 7th, 2023 (edited)
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.05 KB | None | 0 0
  1. -- Customize the Ban Hammer model ID, texture ID, and click options
  2. local banHammerModelId = "rbxassetid://10604848"
  3. local banHammerTextureId = "rbxassetid://10605252"
  4. local clickToVanish = true -- Set to false if you want to use a different method to trigger the vanish
  5.  
  6. -- Customize the idle animation ID
  7. local idleAnimationId = "rbxassetid://15566392299"
  8.  
  9. -- Load Ban Hammer model
  10. local banHammerModel = Instance.new("Model")
  11. banHammerModel.Name = "BanHammerModel"
  12.  
  13. local handle = Instance.new("Part")
  14. handle.Name = "Handle"
  15. handle.Size = Vector3.new(1, 5, 1)
  16. handle.Anchored = false
  17. handle.Parent = banHammerModel
  18.  
  19. local mesh = Instance.new("SpecialMesh")
  20. mesh.MeshType = Enum.MeshType.FileMesh
  21. mesh.MeshId = banHammerModelId
  22. mesh.Parent = handle
  23.  
  24. -- Load the Ban Hammer texture
  25. local handleTexture = Instance.new("Texture")
  26. handleTexture.Texture = banHammerTextureId
  27. handleTexture.Parent = handle
  28.  
  29. local clickDetector = Instance.new("ClickDetector")
  30. clickDetector.Parent = handle
  31.  
  32. -- Set primary part for Ban Hammer model
  33. banHammerModel:SetPrimaryPartCFrame(handle.CFrame)
  34.  
  35. -- Load idle animation
  36. local player = game.Players.LocalPlayer
  37. local humanoid = player.Character and player.Character:FindFirstChildOfClass("Humanoid")
  38. if humanoid then
  39. local animation = Instance.new("Animation")
  40. animation.AnimationId = idleAnimationId
  41. local animationTrack = humanoid:LoadAnimation(animation)
  42. animationTrack:Play()
  43. end
  44.  
  45. -- Define vanish function
  46. local function vanishPlayer(target)
  47. -- Perform actions to 'vanish' the player (you can customize this)
  48. print("Player vanished:", target.Name)
  49. target:Remove()
  50. end
  51.  
  52. -- Handle click events
  53. clickDetector.MouseClick:Connect(function()
  54. if not clickToVanish then
  55. local target = clickDetector.Parent
  56. if target:IsA("Model") and target:FindFirstChild("Handle") then
  57. vanishPlayer(player)
  58. end
  59. end
  60. end)
  61.  
  62. -- Optionally, you can parent the Ban Hammer model to the player's character for visibility.
  63. banHammerModel.Parent = player.Character
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement