--localscript
RS = game:GetService("ReplicatedStorage")
local InputService = game:GetService("UserInputService")
InputService.InputBegan:Connect(function(input)
	if script.Parent.Name == "defaultkid99" or script.Parent.isadmin.Value == true then
		if input.KeyCode == Enum.KeyCode.F and workspace.timestopped == false then
			RS.Abilities.timeevent:FireServer(script.Parent)
		elseif input.KeyCode == Enum.KeyCode.F and workspace.timestopped == true and workspace.timeowner == script.Parent then
			RS.Abilities.timecontinue:FireServer()
		end
	end
end)




--script
RS = game:GetService("ReplicatedStorage")
local ts = RS.Abilities.timeevent

ts.OnServerEvent:Connect(function(player)
	for i,v in next, workspace:GetDescendants() do
		if v:IsA("Part") or v:IsA("UnionOperation") or v:IsA("WedgePart") and v:DescendantOf(player) == false then
			if v.Anchored == false then 
				workspace.timestopped = true
				workspace.timeowner = player
				game.Lighting.timestopeffect.Enabled = true
				v.Anchored = true
				local vel = v.Velocity
				v.Velocity = Vector3.new(0,0,0)
				game.ReplicatedStorage.Abilities.timecontinue.OnServerEvent:Connect(function()
					v.Anchored = false
					v.Velocity = vel
					game.Lighting.timestopeffect.Enabled = false
				end)
			end
		end
	end
end)

This is the full two scripts for that one person who said give full script when i did give full script.

2 comments

0

You need to describe what you are doing more, we have no idea what the context is.

0

i'm just trying to anchor everything in workspace that isnt anchored except for my character