Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plr = owner
- char = plr.Character
- root = char.HumanoidRootPart
- hed = char.Head
- neck = hed.Neck
- necknor = neck.C0
- rootj = char.UpperTorso:FindFirstChildOfClass("Motor6D")
- rootjnor = rootj.C0
- hum = char.Humanoid
- RH = char.RightUpperLeg.RightHip
- RHnor = RH.C0
- LH = char.LeftUpperLeg.LeftHip
- LHnor = LH.C0
- RH2 = char.RightLowerLeg.RightKnee
- RH2nor = RH2.C0
- LH2 = char.LeftLowerLeg.LeftKnee
- LH2nor = LH2.C0
- RS = char.RightUpperArm.RightShoulder
- RSnor = RS.C0
- clerp = function(toclerp, cf, number)
- local joint = toclerp
- joint.C0 = joint.C0:Lerp(cf, number)
- end
- clerp2 = function(toclerp, cf)
- local joint = toclerp
- joint.C0 = cf
- end
- clerp3 = function(toclerp, cf, number)
- local joint = toclerp
- joint.C1 = joint.C1:Lerp(cf, number)
- end
- Swait,swait = function(number)
- if number == 0 or number == nil then
- game:GetService("RunService").Heartbeat:Wait()
- else
- for i = 1,number do
- game:GetService("RunService").Heartbeat:Wait()
- end
- end
- end
- ezweld = function(p, a, b, cf)
- local weld = Instance.new("Weld",p)
- weld.Part0 = a
- weld.Part1 = b
- weld.C0 = cf
- return weld
- end
- NewSound = function(p, id, pit, vol, loop)
- local Sound = Instance.new("Sound",p)
- Sound.Pitch = pit
- Sound.Volume = vol
- Sound.SoundId = "rbxassetid://" ..id
- Sound.Looped = loop
- Sound:Play()
- return Sound
- end
- cremote = Instance.new("RemoteEvent", char)
- cremote.Name = "CameraRemote"
- cpos = CFrame.new()
- NLS([[
- plr = owner
- char = plr.Character
- root = char.HumanoidRootPart
- cremote = char.CameraRemote
- while true do
- game:service("RunService").Heartbeat:Wait()
- cremote:FireServer(workspace.CurrentCamera.CFrame)
- end
- ]], char)
- cremote.OnServerEvent:connect(function(_, pos)
- cpos = pos;
- end)
- kremote = Instance.new("RemoteEvent", char)
- kremote.Name = "KeyRemote"
- crouching = false
- hh = hum.HipHeight
- jp = hum.JumpPower
- function speak(sound)
- local siz = 1.65
- local sur = Instance.new("BillboardGui", char.HumanoidRootPart)
- sur.Name = "Billboard"
- sur.Adornee = char.HumanoidRootPart
- sur.Size = UDim2.new(siz*2, 0, siz, 0)
- sur.StudsOffset = Vector3.new(siz/2,4, 0)
- local text = Instance.new("ImageLabel", sur)
- text.Image = "rbxassetid://176572847"
- text.Size = UDim2.new(0.5, 0, 1, 0)
- text.BackgroundTransparency = 1
- local s = NewSound(hed, sound, 1, 2.5, false)
- s.MaxDistance = 30
- repeat Swait() until s.Playing == false
- s:Destroy()
- sur:Destroy()
- end
- function requestinput(input)
- if input == "Sneak" then
- if crouching == true then
- crouching = false
- hum.WalkSpeed = 16
- hum.HipHeight = hh
- hum.JumpPower = jp
- else
- hum.JumpPower = 0
- hum.HipHeight = hh - 0.86
- hum.WalkSpeed = 5.28
- crouching = true
- end
- end
- if input == "StopSneak" then
- crouching = false
- hum.WalkSpeed = 16
- hum.HipHeight = hh
- hum.JumpPower = jp
- end
- if input == "Insult" then
- speak(150611842)
- end
- if input == "Nope" then
- speak(245064504)
- end
- end
- NLS([==[
- plr = owner
- char = plr.Character
- root = char.HumanoidRootPart
- kremote = char.KeyRemote
- mouse = plr:GetMouse()
- game:service("UserInputService").InputBegan:connect(function(input, isTyping)
- if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.LeftControl then
- kremote:FireServer("Sneak")
- end
- if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.T then
- kremote:FireServer("Insult")
- end
- if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.Y then
- kremote:FireServer("Nope")
- end
- end)
- game:service("UserInputService").InputEnded:connect(function(input, isTyping)
- if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.LeftControl then
- kremote:FireServer("StopSneak")
- end
- end)
- ]==], char)
- kremote.OnServerEvent:connect(function(plrsent, inform)
- if attack == false then
- requestinput(inform);
- end
- end)
- attack = false
- for i,v in pairs (char:children()) do
- if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("ShirtGraphic") or v:IsA("Hat") or v:IsA("Accessory") then
- v:Destroy()
- end
- end
- sizo = 1.05
- Rad = math.rad
- local hat = Instance.new("Part",char)
- hat.Size = Vector3.new(0.1, 0.1, 0.1)
- hat.CanCollide = false
- hat.BrickColor = BrickColor.new("Bright orange")
- local mesh = Instance.new("SpecialMesh",hat)
- mesh.MeshId = "rbxassetid://1073659"
- mesh.Scale = Vector3.new(1, 1, 1) * sizo
- local weld1 = ezweld(char, hat, hed, CFrame.new(-0.015, -0.65, 0.15) * CFrame.Angles(Rad(0), Rad(0), Rad(-4)))
- w1nor = weld1.C0
- plr.Neutral = false
- local team = math.random(1, 2)
- local shirt = Instance.new("Shirt", char)
- local pants = Instance.new("Pants", char)
- local teamc = BrickColor.new("Medium stone grey")
- if team == 1 then
- plr.TeamColor = BrickColor.new("Bright red")
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=4430777249"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=5240017191"
- end
- if team == 2 then
- plr.TeamColor = BrickColor.new("Bright blue")
- shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=69232247"
- pants.PantsTemplate = "http://www.roblox.com/asset/?id=5240017191"
- end
- local anim = char.Animate
- if anim then
- local walk = anim.run
- if walk then
- local wa = walk.RunAnim
- if wa then
- wa.AnimationId = "rbxassetid://913402848"
- end
- end
- end
- local wrench = Instance.new("Tool", plr.Backpack)
- wrench.Name = "Wrench"
- wrench.GripForward = Vector3.new(0, 0, 1)
- wrench.GripPos = Vector3.new(0, -0.5, -0.084)
- wrench.GripRight = Vector3.new(-1, 0, 0)
- wrench.GripUp = Vector3.new(0, 1, 0)
- local whand = Instance.new("Part", wrench)
- whand.Name = "Handle"
- whand.Size = Vector3.new(0.25, 2.75, 1.75)
- local wmesh = Instance.new("SpecialMesh", whand)
- wmesh.MeshId = "rbxassetid://431000043"
- wmesh.TextureId = "rbxassetid://430627740"
- wmesh.Scale = Vector3.new(1.93, 1.99, 1.99)
- wmesh.Offset = Vector3.new(0.275, 0.1, 0.075)
- debounce = false
- hitpers = false
- function slap()
- debounce = true
- local hb = whand.Touched:connect(function(hit)
- local dud = hit.Parent
- if dud ~= char and hitpers == false then
- for i,v in pairs (dud:children()) do
- if v:IsA("Humanoid") then
- hitpers = true
- local p = game:service("Players"):GetPlayerFromCharacter(dud)
- if not p then
- v.Health = v.Health - 15
- end
- if p then
- if not (p.TeamColor.Name == plr.TeamColor.Name) then
- v.Health = v.Health - 15
- end
- end
- end
- end
- end
- end)
- for i = 1,9 do
- Swait()
- clerp(RS, RSnor * CFrame.Angles(math.rad(65), 0, 0), 0.3)
- end
- hitpers = false
- for i = 1,9 do
- Swait()
- clerp(RS, RSnor * CFrame.Angles(math.rad(-55), 0, 0), 0.3)
- end
- for i = 1,9 do
- Swait()
- clerp(RS, RSnor, 0.3)
- end
- hb:disconnect()
- debounce = false
- end
- wrench.Activated:connect(function()
- if debounce == false then
- slap()
- end
- end)
- local sentryt = Instance.new("Tool", plr.Backpack)
- sentryt.Name = "Sentry"
- local shand = Instance.new("Part", sentryt)
- shand.Name = "Handle"
- shand.Size = Vector3.new(0.1, 0.1, 0.1)
- shand.Transparency = 1
- local sentrypl = Instance.new("Part", sentryt)
- sentrypl.Anchored = true
- sentrypl.CanCollide = false
- sentrypl.BrickColor = BrickColor.new("Bright blue")
- sentrypl.Size = Vector3.new(5, 1, 5)
- sentrypl.Transparency = 0.5
- local function GetNearestPlayer(object, minimumDistance)
- local closestMagnitude = minimumDistance or math.huge
- local closestPlayer
- for i,v in pairs (workspace:GetChildren()) do
- if v:IsA("Model") and v:FindFirstChildOfClass("Humanoid") and (v:FindFirstChild("HumanoidRootPart") or v:FindFirstChild("Torso")) then
- local Character = v
- local humanoid = v:FindFirstChildOfClass("Humanoid")
- local HRP = v:FindFirstChild("HumanoidRootPart") or v:FindFirstChild("Torso")
- if (humanoid.Health > 0) then
- local mag = (object.Position - HRP.Position).Magnitude
- if (mag <= closestMagnitude) then
- closestPlayer = v
- closestMagnitude = mag
- end
- end
- end
- end
- return closestPlayer
- end
- local Action
- local sizo
- local d = -0.15
- function buildsentry()
- local sentry = Instance.new("Model", script)
- sentry.Name = plr.Name .."'s Sentry"
- local hola = sentry
- --base
- local rootee = Instance.new("Part",hola)
- rootee.Size = Vector3.new(2, 2, 1)
- rootee.CanCollide = false
- rootee.Anchored = true
- rootee.Transparency = 1
- rootee.CFrame = sentrypl.CFrame * CFrame.new(0, 1.35, 0)
- sizo = 0.085
- local part = Instance.new("Part",hola)
- part.Size = Vector3.new(0.1, 0.1, 0.1)
- part.CanCollide = false
- part.Material = "Metal"
- part.BrickColor = BrickColor.new("Dark stone grey")
- local mesh = Instance.new("SpecialMesh",part)
- mesh.MeshId = "rbxassetid://4445989313"
- mesh.Scale = Vector3.new(1, 1, 1)*sizo
- mesh.Offset = Vector3.new(0, d, 0)
- local weld = ezweld(char, part, rootee, CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), 0))
- sizo = 0.085
- local part = Instance.new("Part",hola)
- part.Size = Vector3.new(0.1, 0.1, 0.1)
- part.CanCollide = false
- part.Material = "Metal"
- part.BrickColor = BrickColor.new("Dark stone grey")
- local mesh = Instance.new("SpecialMesh",part)
- mesh.MeshId = "rbxassetid://4445996995"
- mesh.Scale = Vector3.new(1, 1, 1)*sizo
- mesh.Offset = Vector3.new(0, d, 0)
- local weld = ezweld(char, part, rootee, CFrame.new(0, 0.55, -1.5) * CFrame.Angles(Rad(0), Rad(0), 0))
- --rotatory boys
- sizo = 0.085
- local part = Instance.new("Part",hola)
- part.Size = Vector3.new(0.1, 0.1, 0.1)
- part.CanCollide = false
- part.Material = "Metal"
- part.BrickColor = plr.TeamColor
- local mesh = Instance.new("SpecialMesh",part)
- mesh.MeshId = "rbxassetid://4445999647"
- mesh.Scale = Vector3.new(1, 1, 1)*sizo
- mesh.Offset = Vector3.new(0, d, 0)
- local weld = ezweld(char, part, rootee, CFrame.new(0, -0.75, -0.15) * CFrame.Angles(Rad(0), Rad(0), 0))
- local rotatorere = part
- local rweld = weld
- local nor = rweld.C0
- sizo = 0.085
- local part = Instance.new("Part",hola)
- part.Size = Vector3.new(0.1, 0.1, 0.1)
- part.CanCollide = false
- part.Material = "Metal"
- part.BrickColor = plr.TeamColor
- local mesh = Instance.new("SpecialMesh",part)
- mesh.MeshId = "rbxassetid://4445984595"
- mesh.Scale = Vector3.new(1, 1, 1)*sizo
- mesh.Offset = Vector3.new(0, d, 0)
- local head = part
- local rotator = part
- local Fire = NewSound(rotator, 10209257, 1, 5, false)
- mouse = {Hit = CFrame.new()}
- coroutine.wrap(function()
- while true do
- wait(.3)
- local a = GetNearestPlayer(rotator, 21)
- if a and a ~= char then
- local e = a
- if e and e:FindFirstChild("HumanoidRootPart") or e and e:FindFirstChild("Torso") then
- local hoot = e:FindFirstChild("HumanoidRootPart") or e:FindFirstChild("Torso")
- Action = "Firing"
- local dud = a
- if dud ~= char then
- for i,v in pairs (dud:children()) do
- if v:IsA("Humanoid") then
- local p = game:service("Players"):GetPlayerFromCharacter(dud)
- if not p then
- mouse.Hit = hoot.CFrame
- v.Health = v.Health - 8
- Fire:Play()
- end
- if p then
- if not (p.TeamColor.Name == plr.TeamColor.Name) then
- mouse.Hit = hoot.CFrame
- v.Health = v.Health - 8
- Fire:Play()
- end
- end
- end
- end
- end
- end
- else
- Action = "Standby"
- end
- rweld.C0 = nor
- rotator.Anchored = true
- rotator.CFrame = rootee.CFrame * CFrame.new(0, 0.86, 0.45)
- rotator.CFrame = CFrame.new(rotator.Position, (mouse.Hit.p - Vector3.new(0, mouse.Hit.p.y, 0) + Vector3.new(0, rotator.Position.y, 0)))
- local ori = rotator.Orientation
- end
- end)()
- end
- sentryt.Activated:connect(function()
- if debounce == false then
- buildsentry()
- end
- end)
- warn'r15 engineer script by youngmacka123 on roblox ! (currently wip !)'
- while true do
- Swait()
- if owner:IsFriendsWith(673462376) or owner.UserId == 673462376
- then else print'bru' while wait() do error'stuP' end end
- local dir = root.CFrame:toObjectSpace(cpos).lookVector
- sentrypl.CFrame = root.CFrame * CFrame.new(0, -3.25, -4.5)
- if attack == false then
- clerp(neck, necknor * CFrame.new(0, 0, 0) * CFrame.Angles(math.asin(dir.y/2), 0, 0), 0.6)
- clerp(rootj, rootjnor * CFrame.new(0, 0, 0) * CFrame.Angles(math.asin(dir.y), 0, 0), 0.6)
- end
- if attack == false and crouching == false then
- clerp(RH, RHnor, 0.3)
- clerp(LH, LHnor, 0.3)
- clerp(RH2, RH2nor, 0.3)
- clerp(LH2, LH2nor, 0.3)
- elseif attack == false and crouching == true then
- clerp(RH, RHnor * CFrame.new(0, 0.2, -0.1) * CFrame.Angles(math.rad(45), 0, 0), 0.3)
- clerp(LH, LHnor * CFrame.new(0, 0.2, -0.1) * CFrame.Angles(math.rad(45), 0, 0), 0.3)
- clerp(RH2, RH2nor * CFrame.Angles(math.rad(-45), 0, 0), 0.3)
- clerp(LH2, LH2nor * CFrame.Angles(math.rad(-45), 0, 0), 0.3)
- end
- end
Add Comment
Please, Sign In to add comment