Advertisement
wamandnj

Untitled

Feb 12th, 2019
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 KB | None | 0 0
  1. function ShowDamage(Pos, Text, Time, Color)
  2. local Rate = (1 / 30)
  3. local Pos = (Pos or Vector3.new(0, 0, 0))
  4. local Text = (Text or "")
  5. local Time = (Time or 2)
  6. local Color = (Color or Color3.new(255, 255, 1))
  7. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  8. EffectPart.Anchored = true
  9. local BillboardGui = Create("BillboardGui"){
  10. Size = UDim2.new(3, 0, 3, 0),
  11. Adornee = EffectPart,
  12. Parent = EffectPart,
  13. }
  14. local TextLabel = Create("TextLabel"){
  15. BackgroundTransparency = 1,
  16. Size = UDim2.new(1, 0, 1, 0),
  17. Text = Text,
  18. Font = "Bodoni",
  19. TextColor3 = Color,
  20. TextScaled = true,
  21. TextStrokeColor3 = Color3.fromRGB(0,0,0),
  22. Parent = BillboardGui,
  23. }
  24. game.Debris:AddItem(EffectPart, (Time))
  25. EffectPart.Parent = game:GetService("Workspace")
  26. delay(0, function()
  27. local Frames = (Time / Rate)
  28. for Frame = 1, Frames do
  29. wait(Rate)
  30. local Percent = (Frame / Frames)
  31. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  32. TextLabel.TextTransparency = Percent
  33. end
  34. if EffectPart and EffectPart.Parent then
  35. EffectPart:Destroy()
  36. end
  37. end)
  38. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement