Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local work = game:GetService("Workspace")
- local camera = work.CurrentCamera
- local run = game:GetService("RunService")
- local vim = game:GetService("VirtualInputManager")
- local plr = game:GetService("Players")
- local me = plr.LocalPlayer
- local hum = me.Character:WaitForChild("Humanoid")
- local hrp = me.Character:WaitForChild("HumanoidRootPart")
- local textchat = game:GetService("TextChatService")
- local rep = game:GetService("ReplicatedStorage")
- local function update()
- if me.Character then
- hum = me.Character:WaitForChild("Humanoid")
- hrp = me.Character:WaitForChild("HumanoidRootPart")
- end
- end
- me.CharacterAdded:Connect(update)
- if me.Character then
- update()
- end
- local thrp = plr[getgenv().target].Character.HumanoidRootPart
- local cmds = "!summon = summons stand; !desummon = desummons stand; !reveal = reveals roles; !re = resets stand; !rejoin = rejoins stand; !front,!back,!right,!left = change stand pos"
- local con
- local front
- local back
- local right
- local left
- local killcon
- local shootcon
- local function unallcon()
- if con then
- con:Disconnect()
- con = nil
- elseif front then
- front:Disconnect()
- front = nil
- elseif back then
- back:Disconnect()
- back = nil
- elseif right then
- right:Disconnect()
- right = nil
- elseif right then
- right:Disconnect()
- right = nil
- end
- end
- local part = Instance.new("Part")
- part.Parent = work
- part.Name = "StandHolder"
- part.Transparency = 0.5
- run.RenderStepped:Connect(function()
- part.CFrame = hrp.CFrame * CFrame.new(0,-3.6,0)
- end)
- plr[getgenv().target].Chatted:Connect(function(cht)
- if cht == getgenv().summon or cht == "!summon" then
- con = game:GetService("RunService").RenderStepped:Connect(function()
- hrp.CFrame = thrp.CFrame * CFrame.new(2,2,2)
- if front then
- front:Disconnect()
- front = nil
- elseif left then
- left:Disconnect()
- left = nil
- elseif back then
- back:Disconnect()
- back = nil
- elseif right then
- right:Disconnect()
- right = nil
- end
- end)
- elseif cht == getgenv().desummon or cht == "!desummon" then
- if front then
- front:Disconnect()
- front = nil
- elseif left then
- left:Disconnect()
- left = nil
- elseif back then
- back:Disconnect()
- back = nil
- elseif right then
- right:Disconnect()
- right = nil
- elseif con then
- con:Disconnect()
- con = nil
- end
- elseif cht == "!reveal" then
- for _, role in pairs(plr:GetPlayers()) do
- local character = role.Character
- local backpack = role.Backpack
- if (backpack and backpack:FindFirstChild("Knife")) or (character and character:FindFirstChild("Knife")) then
- if textchat and textchat:FindFirstChild("TextChannels") then
- local tc2 = textchat.TextChannels:FindFirstChild("RBXGeneral")
- if tc2 then
- textchat.TextChannels.RBXGeneral:SendAsync("Murder: "..role.Name)
- end
- elseif rep and rep:FindFirstChild("DefaultChatSystemChatEvents") then
- local oc2 = rep.DefaultChatSystemChatEvents
- if oc2 then
- oc2.SayMessageRequest:FireServer("Murder: "..role.Name, "ALL")
- end
- end
- elseif (backpack and backpack:FindFirstChild("Gun")) or (character and character:FindFirstChild("Gun")) then
- if textchat and textchat:FindFirstChild("TextChannels") then
- local tc2 = textchat.TextChannels:FindFirstChild("RBXGeneral")
- if tc2 then
- textchat.TextChannels.RBXGeneral:SendAsync("Sheriff: "..role.Name)
- end
- elseif rep and rep:FindFirstChild("DefaultChatSystemChatEvents") then
- local oc2 = rep.DefaultChatSystemChatEvents
- if oc2 then
- oc2.SayMessageRequest:FireServer("Sheriff: "..role.Name, "ALL")
- end
- end
- end
- end
- elseif cht == "!re" then
- hum.Health = 0
- elseif cht == "!front" then
- if con then
- con:Disconnect()
- con = nil
- elseif left then
- left:Disconnect()
- left = nil
- elseif back then
- back:Disconnect()
- back = nil
- elseif right then
- right:Disconnect()
- right = nil
- end
- front = run.RenderStepped:Connect(function()
- hrp.CFrame = thrp.CFrame * CFrame.new(0,0,-3)
- end)
- elseif cht == "!back" then
- if con then
- con:Disconnect()
- con = nil
- elseif front then
- front:Disconnect()
- front = nil
- elseif left then
- left:Disconnect()
- left = nil
- elseif right then
- right:Disconnect()
- right = nil
- end
- back = run.RenderStepped:Connect(function()
- hrp.CFrame = thrp.CFrame * CFrame.new(0,0,3)
- end)
- elseif cht == "!right" then
- if con then
- con:Disconnect()
- con = nil
- elseif front then
- front:Disconnect()
- front = nil
- elseif back then
- back:Disconnect()
- back = nil
- elseif left then
- left:Disconnect()
- left = nil
- end
- right = run.RenderStepped:Connect(function()
- hrp.CFrame = thrp.CFrame * CFrame.new(3,0,0)
- end)
- elseif cht == "!left" then
- if con then
- con:Disconnect()
- con = nil
- elseif front then
- front:Disconnect()
- front = nil
- elseif back then
- back:Disconnect()
- back = nil
- elseif right then
- right:Disconnect()
- right = nil
- end
- left = run.RenderStepped:Connect(function()
- hrp.CFrame = thrp.CFrame * CFrame.new(-3,0,0)
- end)
- elseif cht == "!cmds" then
- if textchat and textchat:FindFirstChild("TextChannels") then
- local tc2 = textchat.TextChannels:FindFirstChild("RBXGeneral")
- if tc2 then
- textchat.TextChannels.RBXGeneral:SendAsync(cmds)
- end
- elseif rep and rep:FindFirstChild("DefaultChatSystemChatEvents") then
- local oc2 = rep.DefaultChatSystemChatEvents
- if oc2 then
- oc2.SayMessageRequest:FireServer(cmds, "ALL")
- end
- end
- elseif cht == "!rejoin" then
- local p = game:GetService("Players"):GetPlayers()
- if #p <= 1 then
- p.LocalPlayer:Kick("Rejoin")
- wait()
- game:GetService("TeleportService"):Teleport(game.PlaceId, p.LocalPlayer)
- else
- game:GetService("TeleportService"):TeleportToPlaceInstance(game.PlaceId, game.JobId, p.LocalPlayer)
- end
- elseif cht.sub(1,5) == "!kill" then
- local killargs = cht.sub(7)
- if killargs ~= "" then
- if (me.Backpack and me.Backpack:FindFirstChild("Knife")) then
- unallcon()
- for _, killPlayer in pairs(plr:GetPlayers()) do
- if killPlayer.Name:lower():find(killargs:lower()) or killPlayer.DisplayName:lower():find(killargs:lower()) then
- vim:SendKeyEvent(true, Enum.KeyCode.One, false, nil)
- vim:SendKeyEvent(false, Enum.KeyCode.One, false, nil)
- killcon = run.RenderStepped:Connect(function()
- hrp.CFrame = killPlayer.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,1)
- vim:SendMouseButtonEvent(0,0,0, true, nil, 0)
- vim:SendMouseButtonEvent(0,0,0, false, nil, 0)
- end)
- task.delay(2, function()
- killcon:Disconnect()
- killcon = nil
- hrp.CFrame = thrp.CFrame * CFrame.new(0,100,0)
- vim:SendKeyEvent(true, Enum.KeyCode.One, false, nil)
- vim:SendKeyEvent(false, Enum.KeyCode.One, false, nil)
- end)
- else
- warn("Stand is not murder!")
- end
- end
- end
- end
- elseif cht.sub(1,6) == "!shoot" then
- if (me.Backpack and me.Backpack:FindFirstChild("Gun")) then
- unallcon()
- for _, shootMurd in pairs(plr:GetPlayers()) do
- if (shootMurd.Backpack and shootMurd.Backpack:FindFirstChild("Knife")) or (shootMurd.Character and shootMurd.Character:FindFirstChild("Knife")) then
- me.CameraMaxZoomDistance = 0
- vim:SendKeyEvent(true, Enum.KeyCode.One, false, nil)
- vim:SendKeyEvent(false, Enum.KeyCode.One, false, nil)
- shootcon = run.RenderStepped:Connect(function()
- hrp.CFrame = shootMurd.Character.HumanoidRootPart.CFrame * CFrame.new(0,0,3)
- vim:SendMouseButtonEvent(0,0,0, true, nil, 0)
- vim:SendMouseButtonEvent(0,0,0, false, nil, 0)
- end)
- task.delay(4, function()
- shootcon:Disconnect()
- hrp.CFrame = thrp.CFrame * CFrame.new(0,100,0)
- end)
- end
- end
- else
- warn("Stand is not sheriff!")
- end
- elseif cht.sub(1,5) == "!view" then
- local viewargs = cht:sub(7)
- if viewargs ~= "" then
- for _, viewPlayer in pairs(plr:GetPlayers()) do
- if viewPlayer.Name:lower():find(viewargs:lower()) or viewPlayer.DisplayName:lower():find(viewargs:lower()) then
- work.Camera.CameraSubject = viewPlayer.Character
- end
- end
- end
- elseif cht == "!unview" then
- work.Camera.CameraSubject = me.Character
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement