Tool=script.Parent Debris=Game:GetService("\068\101\098\114\105\115")script.Parent.ToolTip="\067\111\115\116\058 "..(script.Parent.PROPERTIES.ManaCost.Value.." \077\080")function Heal()Character=Tool.Parent Player=Game.Players:GetPlayerFromCharacter(Character)if script.Parent.Enabled==true and Player~=nil then if Player.Stats.Mana.Value>=script.Parent.PROPERTIES.ManaCost.Value then script.Parent.Enabled=false HealAmount=(script.Parent.PROPERTIES.BaseHeal.Value+script.Parent.PROPERTIES.AdditionPerIntelligence.Value*Player.attributes.Intelligence.Value)+math.random(-script.Parent.PROPERTIES.Offset.Value,script.Parent.PROPERTIES.Offset.Value)local t=Instance.new("\066\105\108\108\098\111\097\114\100\071\117\105")t.Size=UDim2.new(0,50,0,100)t.StudsOffset=Vector3.new(0,2,0)local l=Instance.new("\084\101\120\116\076\097\098\101\108")dt=Game.ReplicatedStorage.DynamicText:Clone()l.Font="\083\111\117\114\099\101\083\097\110\115\066\111\108\100"l.FontSize="\083\105\122\101\050\052"l.TextStrokeTransparency=0 l.Size=UDim2.new(1,0,1,0)l.Position=UDim2.new(0,0,0,0)l.BackgroundTransparency=1 l.Parent=t l.TextColor3=Color3.new(0,1,0)dt.Parent=l dt.Disabled=false t.Parent=Character.Head t.Adornee=t.Parent l.Text="\043"..HealAmount Debris:AddItem(t,2)Character.Humanoid.Health=Character.Humanoid.Health+HealAmount Player.Stats.Mana.Value=Player.Stats.Mana.Value-script.Parent.PROPERTIES.ManaCost.Value wait(script.Parent.PROPERTIES.Cooldown.Value)script.Parent.Enabled=true else print("\073\110\115\117\102\102\105\099\105\101\110\116 \109\097\110\097\033")end else print("\069\105\116\104\101\114 \099\111\111\108\100\111\119\110 \105\115 \105\110 \101\102\102\101\099\116 \111\114 \112\108\097\121\101\114 \100\111\101\115\110\'\116 \101\120\105\115\116\033")end end script.Parent.Activated:connect(Heal)


Tool = script.Parent

Debris = Game:GetService("Debris")

script.Parent.ToolTip = "Cost: " .. script.Parent.PROPERTIES.ManaCost.Value .. " MP"

function Heal()
	Character = Tool.Parent
	Player = Game.Players:GetPlayerFromCharacter(Character)
	if script.Parent.Enabled == true and Player ~= nil then
		if Player.Stats.Mana.Value >= script.Parent.PROPERTIES.ManaCost.Value then
			script.Parent.Enabled = false
			HealAmount = script.Parent.PROPERTIES.BaseHeal.Value + (script.Parent.PROPERTIES.AdditionPerIntelligence.Value * Player.attributes.Intelligence.Value) + math.random(-script.Parent.PROPERTIES.Offset.Value, script.Parent.PROPERTIES.Offset.Value)
			
			--Heal text
			local part = Instance.new("BillboardGui")
			part.Size = UDim2.new(0,50,0,100) 
			part.StudsOffset = Vector3.new(0,2,0)
			local part2 = Instance.new("TextLabel") 
			dt = Game.ReplicatedStorage.DynamicText:Clone()
			part2.Font = "SourceSansBold"
			part2.FontSize = "Size24"
			part2.TextStrokeTransparency = 0
			part2.Size = UDim2.new(1,0,1,0) 
			part2.Position = UDim2.new(0,0,0,0) 
			part2.BackgroundTransparency = 1
			part2.Parent = part 
			part2.TextColor3 = Color3.new(0, 1, 0)
			dt.Parent = part2
			dt.Disabled = false
			part.Parent = Character.Head
			part.Adornee = part.Parent
			
			part2.Text = "+" .. HealAmount
			Debris:AddItem(part, 2)		
			
			Character.Humanoid.Health = Character.Humanoid.Health + HealAmount
			Player.Stats.Mana.Value = Player.Stats.Mana.Value - script.Parent.PROPERTIES.ManaCost.Value
			wait(script.Parent.PROPERTIES.Cooldown.Value)
			script.Parent.Enabled = true
		else print("Insufficient mana!")
		end
	else print("Either cooldown is in effect or player doesn't exist!")
	end	
end

script.Parent.Activated:connect(Heal)
