Advertisement
jassm11

Untitled

Jun 28th, 2017
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. print("Thanks for using im2awsm's Kazotsky Kick tool! :D")
  2. wait(1)
  3.  
  4. local idleAnim = script.Parent.jassm11
  5. local style = script.Parent.CurrentStyle
  6. local hasMusic = false
  7. local maxStyles = 4
  8. local style1 = "rbxassetid://" .. "451775707"
  9. local style2 = "rbxassetid://" .. "452426407"
  10. local style3 = "rbxassetid://" .. "452428499"
  11. local style4 = "rbxassetid://" .. "452431028"
  12.  
  13. script.Parent.Equipped:connect(function(mouse)
  14. character = script.Parent.Parent
  15. player = game.Players:GetPlayerFromCharacter(character)
  16. idlePlay = character.Humanoid:LoadAnimation(idleAnim)
  17. character.Humanoid.WalkSpeed = 8
  18. idlePlay:Play()
  19. styleGui = script.Parent.StyleGui:Clone()
  20. styleGui.Parent = player.PlayerGui
  21. styleGui.Frame.Visible = true
  22. styleGui.Frame.Number.Text = style.Value
  23. if hasMusic == false then
  24. sound = Instance.new("Sound", player)
  25. sound.SoundId = "rbxassetid://"
  26. sound.Looped = true
  27. hasMusic = true
  28. end
  29. sound:Play()
  30.  
  31. styleGui.Frame.Plus.MouseButton1Down:connect(function()
  32. if style.Value + 1 ~= maxStyles + 1 then
  33. style.Value = style.Value + 1
  34. script.Parent.ToolTip = "Current Style: " .. style.Value
  35. styleGui.Frame.Number.Text = style.Value
  36. animChange()
  37. end
  38. end)
  39.  
  40. styleGui.Frame.Minus.MouseButton1Down:connect(function()
  41. if style.Value - 1 ~= 0 then
  42. style.Value = style.Value - 1
  43. script.Parent.ToolTip = "Current Style: " .. style.Value
  44. styleGui.Frame.Number.Text = style.Value
  45. animChange()
  46. end
  47. end)
  48. end)
  49.  
  50. function animChange()
  51. idlePlay:Stop()
  52. if style.Value == 1 then
  53. idleAnim.AnimationId = style1
  54. idlePlay = character.Humanoid:LoadAnimation(idleAnim)
  55. idlePlay:Play()
  56. elseif style.Value == 2 then
  57. idleAnim.AnimationId = style2
  58. idlePlay = character.Humanoid:LoadAnimation(idleAnim)
  59. idlePlay:Play()
  60. elseif style.Value == 3 then
  61. idleAnim.AnimationId = style3
  62. idlePlay = character.Humanoid:LoadAnimation(idleAnim)
  63. idlePlay:Play()
  64. elseif style.Value == 4 then
  65. idleAnim.AnimationId = style4
  66. idlePlay = character.Humanoid:LoadAnimation(idleAnim)
  67. idlePlay:Play()
  68. end
  69. end
  70. script.Parent.Unequipped:connect(function(mouse)
  71. sound:Stop()
  72. idlePlay:Stop()
  73. styleGui:Destroy()
  74. character.Humanoid.WalkSpeed = 16
  75. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement