Hey, i have a problem i dont know how to add a dev product that once you purchase it the nuke spawns but idk how to add it into the script, can anyone help please?
local rep = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local original = game.ReplicatedStorage.DeathScriptForNuke
local Nuke = game.ReplicatedStorage.Cloud
local EventProduct = rep:WaitForChild("Product1")
local setCameraShake = rep:WaitForChild("SetCameraShake")
local button1 = script.parent
button1.MouseClick:Connect(function()
setCameraShake:FireAllClients(true)
wait(3)
setCameraShake:FireAllClients(false)
game.Workspace.SFX.Missile.Playing = true
wait(7)
game.Workspace.SFX.Alarm.Playing = true
game.Workspace.AlarmLight.Part1.alarm.Playing = true
game.Workspace.AlarmLight.Part1.Script.Disabled = false
wait(10)
local Shockwave = Instance.new("Part")
Shockwave.Parent = game.Workspace
Shockwave.Anchored = true
Shockwave.Position = Vector3.new(363.917, 180.108, -0.407)
Shockwave.Transparency = 1
setCameraShake:FireAllClients(true)
local copy = original:Clone()
copy.Parent = Shockwave
wait(2)
local Nuke1 = Nuke:Clone()
Nuke1.Parent = workspace
Nuke1.Anchored = true
Nuke1.Position = Vector3.new(363.917, 166.158, -0.407)
setCameraShake:FireAllClients(true)
local tweenInfo = TweenInfo.new(20, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 1, false, 1)
local goal = {}
goal.Size = Vector3.new(9000.54, 9000.54, 9000.54)
local tween = TweenService:Create(Shockwave, tweenInfo, goal)
tween:Play()
wait(5)
Shockwave:Destroy()
local tweenInfo = TweenInfo.new(100, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 1, false, 1)
local goal = {}
goal.Size = Vector3.new(9000.54,0, 9000.54)
local tween = TweenService:Create(Nuke1, tweenInfo, goal)
tween:Play()
wait(150)
Nuke1:Destroy()
end
end)
wait(30)
game.Workspace.AlarmLight.Part1.alarm.Playing = false
game.Workspace.SFX.Alarm.Playing = false
game.Workspace.AlarmLight.Part1.Script.Disabled = true
thx for reading.