PlayBackSpeed
Heres The Example Of PlayBackSpeed
Hello I liked To Share My Module It’s Simple To Use Everybody Can Edit it.
Code
local soundeffect = {}
--| Script By Kihrix |-- Last Updated 9.03.23
local Settings = require(script.Settings)
local TweenService = game:GetService("TweenService")
function soundeffect.SoundEffect(target, duration)
if target.ClassName == "Sound" then
if Settings.DEVELOPER_MODE == true then
print("Success")
end
local SoundEffect = TweenService:Create(target, TweenInfo.new(duration), {PlaybackSpeed = 0}):Play()
if Settings.PAUSE_THE_MUSIC_AFTER_PLAYBACK == true then
wait(duration)
target:Pause()
end
else
if Settings.DEVELOPER_MODE == true then
warn("Cant Found The Sound!")
end
end
end
function soundeffect.SoundEffectNormal(target, duration)
if target.ClassName == "Sound" then
if Settings.DEVELOPER_MODE == true then
print("Success")
end
local SoundEffect = TweenService:Create(target, TweenInfo.new(duration), {PlaybackSpeed = 1}):Play()
if target.IsPaused then
target:Play()
end
else
if Settings.DEVELOPER_MODE == true then
warn("Cant Found The Sound!")
end
end
end
function soundeffect.SoundEffectCostum(target, duration, number)
if target.ClassName == "Sound" then
if Settings.DEVELOPER_MODE == true then
print("Success")
end
local SoundEffect = TweenService:Create(target, TweenInfo.new(duration), {PlaybackSpeed = number}):Play()
if target.IsPaused then
target:Play()
end
else
if Settings.DEVELOPER_MODE == true then
warn("Cant Found The Sound!")
end
end
end
return soundeffect
--Settings
local module = {
DEVELOPER_MODE = true,
PAUSE_THE_MUSIC_AFTER_PLAYBACK = false
}
-- Gonna Add More soon
return module
- Example Of How It’s Works
- Have Fun Using It
(Report Bugs If You Find Any)