Open Source Stat Train
- Asporus
- Aug 8, 2020
- 1 min read
This practically just trains a stat named "Stat1" which is a numerical value inside of the player. You click and it does the animation. (animationId is set to 0 so you can add your own animations. this script should be inside a tool inside starterpack, or wherever you want your tool to be.)
local Player = game.Players.LocalPlayer
local Character = Player.Character or Player.CharacterAdded:wait()
local Humanoid = Character:WaitForChild("Humanoid")
local Tool = script.Parent
Tool.Equipped:Connect(function(Equip)
local IdleAnim = Instance.new("Animation")
IdleAnim.AnimationId = "0"
local PlayAnim = Humanoid:LoadAnimation(IdleAnim)
Tool.Activated:Connect(function(Activated)
local ActionAnim = Instance.new("Animation")
IdleAnim.AnimationId = "0"
local ActionPlay = Humanoid:LoadAnimation(ActionAnim)
local Stat1 = Player:WaitForChild("Stat1").Value
wait(ActionAnim.Length)
Stat1 = Stat1 + 0.1
end
end)
Comments