lafur

Untitled

Jul 6th, 2020
366
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. plr = owner
  2. char = plr.Character
  3. root = char.HumanoidRootPart
  4. hed = char.Head
  5. neck = hed.Neck
  6. necknor = neck.C0
  7. rootj = char.UpperTorso:FindFirstChildOfClass("Motor6D")
  8. rootjnor = rootj.C0
  9. hum = char.Humanoid
  10.  
  11. RH = char.RightUpperLeg.RightHip
  12. RHnor = RH.C0
  13.  
  14. LH = char.LeftUpperLeg.LeftHip
  15. LHnor = LH.C0
  16.  
  17. RH2 = char.RightLowerLeg.RightKnee
  18. RH2nor = RH2.C0
  19.  
  20. LH2 = char.LeftLowerLeg.LeftKnee
  21. LH2nor = LH2.C0
  22.  
  23. RS = char.RightUpperArm.RightShoulder
  24. RSnor = RS.C0
  25.  
  26. clerp = function(toclerp, cf, number)
  27. local joint = toclerp
  28. joint.C0 = joint.C0:Lerp(cf, number)
  29. end
  30.  
  31. clerp2 = function(toclerp, cf)
  32. local joint = toclerp
  33. joint.C0 = cf
  34. end
  35.  
  36. clerp3 = function(toclerp, cf, number)
  37. local joint = toclerp
  38. joint.C1 = joint.C1:Lerp(cf, number)
  39. end
  40.  
  41. Swait,swait = function(number)
  42. if number == 0 or number == nil then
  43. game:GetService("RunService").Heartbeat:Wait()
  44. else
  45. for i = 1,number do
  46. game:GetService("RunService").Heartbeat:Wait()
  47. end
  48. end
  49. end
  50.  
  51. ezweld = function(p, a, b, cf)
  52. local weld = Instance.new("Weld",p)
  53. weld.Part0 = a
  54. weld.Part1 = b
  55. weld.C0 = cf
  56. return weld
  57. end
  58.  
  59. NewSound = function(p, id, pit, vol, loop)
  60. local Sound = Instance.new("Sound",p)
  61. Sound.Pitch = pit
  62. Sound.Volume = vol
  63. Sound.SoundId = "rbxassetid://" ..id
  64. Sound.Looped = loop
  65. Sound:Play()
  66. return Sound
  67. end
  68.  
  69. cremote = Instance.new("RemoteEvent", char)
  70. cremote.Name = "CameraRemote"
  71.  
  72. cpos = CFrame.new()
  73.  
  74. NLS([[
  75.  
  76. plr = owner
  77. char = plr.Character
  78. root = char.HumanoidRootPart
  79. cremote = char.CameraRemote
  80.  
  81. while true do
  82. game:service("RunService").Heartbeat:Wait()
  83. cremote:FireServer(workspace.CurrentCamera.CFrame)
  84. end
  85.  
  86. ]], char)
  87.  
  88. cremote.OnServerEvent:connect(function(_, pos)
  89. cpos = pos;
  90. end)
  91.  
  92. kremote = Instance.new("RemoteEvent", char)
  93. kremote.Name = "KeyRemote"
  94. crouching = false
  95. hh = hum.HipHeight
  96. jp = hum.JumpPower
  97.  
  98. function speak(sound)
  99. local siz = 1.65
  100. local sur = Instance.new("BillboardGui", char.HumanoidRootPart)
  101. sur.Name = "Billboard"
  102. sur.Adornee = char.HumanoidRootPart
  103. sur.Size = UDim2.new(siz*2, 0, siz, 0)
  104. sur.StudsOffset = Vector3.new(siz/2,4, 0)
  105. local text = Instance.new("ImageLabel", sur)
  106. text.Image = "rbxassetid://176572847"
  107. text.Size = UDim2.new(0.5, 0, 1, 0)
  108. text.BackgroundTransparency = 1
  109. local s = NewSound(hed, sound, 1, 2.5, false)
  110. s.MaxDistance = 30
  111. repeat Swait() until s.Playing == false
  112. s:Destroy()
  113. sur:Destroy()
  114. end
  115.  
  116. function requestinput(input)
  117. if input == "Sneak" then
  118. if crouching == true then
  119. crouching = false
  120. hum.WalkSpeed = 16
  121. hum.HipHeight = hh
  122. hum.JumpPower = jp
  123. else
  124. hum.JumpPower = 0
  125. hum.HipHeight = hh - 0.86
  126. hum.WalkSpeed = 5.28
  127. crouching = true
  128. end
  129. end
  130. if input == "StopSneak" then
  131. crouching = false
  132. hum.WalkSpeed = 16
  133. hum.HipHeight = hh
  134. hum.JumpPower = jp
  135. end
  136. if input == "Insult" then
  137. speak(150611842)
  138. end
  139. if input == "Nope" then
  140. speak(245064504)
  141. end
  142. end
  143.  
  144. NLS([==[
  145.  
  146. plr = owner
  147. char = plr.Character
  148. root = char.HumanoidRootPart
  149. kremote = char.KeyRemote
  150. mouse = plr:GetMouse()
  151.  
  152. game:service("UserInputService").InputBegan:connect(function(input, isTyping)
  153. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.LeftControl then
  154. kremote:FireServer("Sneak")
  155. end
  156. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.T then
  157. kremote:FireServer("Insult")
  158. end
  159. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.Y then
  160. kremote:FireServer("Nope")
  161. end
  162. end)
  163.  
  164. game:service("UserInputService").InputEnded:connect(function(input, isTyping)
  165. if isTyping == false and input.UserInputType == Enum.UserInputType.Keyboard and input.KeyCode == Enum.KeyCode.LeftControl then
  166. kremote:FireServer("StopSneak")
  167. end
  168. end)
  169.  
  170. ]==], char)
  171.  
  172. kremote.OnServerEvent:connect(function(plrsent, inform)
  173. if attack == false then
  174. requestinput(inform);
  175. end
  176. end)
  177.  
  178. attack = false
  179.  
  180. for i,v in pairs (char:children()) do
  181. if v:IsA("Shirt") or v:IsA("Pants") or v:IsA("ShirtGraphic") or v:IsA("Hat") or v:IsA("Accessory") then
  182. v:Destroy()
  183. end
  184. end
  185.  
  186. sizo = 1.05
  187.  
  188. Rad = math.rad
  189.  
  190. local hat = Instance.new("Part",char)
  191. hat.Size = Vector3.new(0.1, 0.1, 0.1)
  192. hat.CanCollide = false
  193. hat.BrickColor = BrickColor.new("Bright orange")
  194. local mesh = Instance.new("SpecialMesh",hat)
  195. mesh.MeshId = "rbxassetid://1073659"
  196. mesh.Scale = Vector3.new(1, 1, 1) * sizo
  197. local weld1 = ezweld(char, hat, hed, CFrame.new(-0.015, -0.65, 0.15) * CFrame.Angles(Rad(0), Rad(0), Rad(-4)))
  198. w1nor = weld1.C0
  199.  
  200. plr.Neutral = false
  201. local team = math.random(1, 2)
  202. local shirt = Instance.new("Shirt", char)
  203. local pants = Instance.new("Pants", char)
  204. local teamc = BrickColor.new("Medium stone grey")
  205. if team == 1 then
  206. plr.TeamColor = BrickColor.new("Bright red")
  207. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=4430777249"
  208. pants.PantsTemplate = "http://www.roblox.com/asset/?id=5240017191"
  209. end
  210. if team == 2 then
  211. plr.TeamColor = BrickColor.new("Bright blue")
  212. shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=69232247"
  213. pants.PantsTemplate = "http://www.roblox.com/asset/?id=5240017191"
  214. end
  215.  
  216. local anim = char.Animate
  217. if anim then
  218. local walk = anim.run
  219. if walk then
  220. local wa = walk.RunAnim
  221. if wa then
  222. wa.AnimationId = "rbxassetid://913402848"
  223. end
  224. end
  225. end
  226.  
  227. local wrench = Instance.new("Tool", plr.Backpack)
  228. wrench.Name = "Wrench"
  229. wrench.GripForward = Vector3.new(0, 0, 1)
  230. wrench.GripPos = Vector3.new(0, -0.5, -0.084)
  231. wrench.GripRight = Vector3.new(-1, 0, 0)
  232. wrench.GripUp = Vector3.new(0, 1, 0)
  233. local whand = Instance.new("Part", wrench)
  234. whand.Name = "Handle"
  235. whand.Size = Vector3.new(0.25, 2.75, 1.75)
  236. local wmesh = Instance.new("SpecialMesh", whand)
  237. wmesh.MeshId = "rbxassetid://431000043"
  238. wmesh.TextureId = "rbxassetid://430627740"
  239. wmesh.Scale = Vector3.new(1.93, 1.99, 1.99)
  240. wmesh.Offset = Vector3.new(0.275, 0.1, 0.075)
  241.  
  242. debounce = false
  243. hitpers = false
  244.  
  245. function slap()
  246. debounce = true
  247. local hb = whand.Touched:connect(function(hit)
  248. local dud = hit.Parent
  249. if dud ~= char and hitpers == false then
  250. for i,v in pairs (dud:children()) do
  251. if v:IsA("Humanoid") then
  252. hitpers = true
  253. local p = game:service("Players"):GetPlayerFromCharacter(dud)
  254. if not p then
  255. v.Health = v.Health - 15
  256. end
  257. if p then
  258. if not (p.TeamColor.Name == plr.TeamColor.Name) then
  259. v.Health = v.Health - 15
  260. end
  261. end
  262. end
  263. end
  264. end
  265. end)
  266. for i = 1,9 do
  267. Swait()
  268. clerp(RS, RSnor * CFrame.Angles(math.rad(65), 0, 0), 0.3)
  269. end
  270. hitpers = false
  271. for i = 1,9 do
  272. Swait()
  273. clerp(RS, RSnor * CFrame.Angles(math.rad(-55), 0, 0), 0.3)
  274. end
  275. for i = 1,9 do
  276. Swait()
  277. clerp(RS, RSnor, 0.3)
  278. end
  279. hb:disconnect()
  280. debounce = false
  281. end
  282.  
  283. wrench.Activated:connect(function()
  284. if debounce == false then
  285. slap()
  286. end
  287. end)
  288.  
  289. local sentryt = Instance.new("Tool", plr.Backpack)
  290. sentryt.Name = "Sentry"
  291. local shand = Instance.new("Part", sentryt)
  292. shand.Name = "Handle"
  293. shand.Size = Vector3.new(0.1, 0.1, 0.1)
  294. shand.Transparency = 1
  295.  
  296. local sentrypl = Instance.new("Part", sentryt)
  297. sentrypl.Anchored = true
  298. sentrypl.CanCollide = false
  299. sentrypl.BrickColor = BrickColor.new("Bright blue")
  300. sentrypl.Size = Vector3.new(5, 1, 5)
  301. sentrypl.Transparency = 0.5
  302.  
  303. local function GetNearestPlayer(object, minimumDistance)
  304. local closestMagnitude = minimumDistance or math.huge
  305. local closestPlayer
  306. for i,v in pairs (workspace:GetChildren()) do
  307. if v:IsA("Model") and v:FindFirstChildOfClass("Humanoid") and (v:FindFirstChild("HumanoidRootPart") or v:FindFirstChild("Torso")) then
  308. local Character = v
  309. local humanoid = v:FindFirstChildOfClass("Humanoid")
  310. local HRP = v:FindFirstChild("HumanoidRootPart") or v:FindFirstChild("Torso")
  311. if (humanoid.Health > 0) then
  312. local mag = (object.Position - HRP.Position).Magnitude
  313. if (mag <= closestMagnitude) then
  314. closestPlayer = v
  315. closestMagnitude = mag
  316. end
  317. end
  318. end
  319. end
  320. return closestPlayer
  321. end
  322.  
  323. local Action
  324. local sizo
  325. local d = -0.15
  326. function buildsentry()
  327. local sentry = Instance.new("Model", script)
  328. sentry.Name = plr.Name .."'s Sentry"
  329. local hola = sentry
  330.  
  331. --base
  332.  
  333. local rootee = Instance.new("Part",hola)
  334. rootee.Size = Vector3.new(2, 2, 1)
  335. rootee.CanCollide = false
  336. rootee.Anchored = true
  337. rootee.Transparency = 1
  338. rootee.CFrame = sentrypl.CFrame * CFrame.new(0, 1.35, 0)
  339.  
  340. sizo = 0.085
  341. local part = Instance.new("Part",hola)
  342. part.Size = Vector3.new(0.1, 0.1, 0.1)
  343. part.CanCollide = false
  344. part.Material = "Metal"
  345. part.BrickColor = BrickColor.new("Dark stone grey")
  346. local mesh = Instance.new("SpecialMesh",part)
  347. mesh.MeshId = "rbxassetid://4445989313"
  348. mesh.Scale = Vector3.new(1, 1, 1)*sizo
  349. mesh.Offset = Vector3.new(0, d, 0)
  350. local weld = ezweld(char, part, rootee, CFrame.new(0, 0, 0) * CFrame.Angles(Rad(0), Rad(0), 0))
  351.  
  352. sizo = 0.085
  353. local part = Instance.new("Part",hola)
  354. part.Size = Vector3.new(0.1, 0.1, 0.1)
  355. part.CanCollide = false
  356. part.Material = "Metal"
  357. part.BrickColor = BrickColor.new("Dark stone grey")
  358. local mesh = Instance.new("SpecialMesh",part)
  359. mesh.MeshId = "rbxassetid://4445996995"
  360. mesh.Scale = Vector3.new(1, 1, 1)*sizo
  361. mesh.Offset = Vector3.new(0, d, 0)
  362. local weld = ezweld(char, part, rootee, CFrame.new(0, 0.55, -1.5) * CFrame.Angles(Rad(0), Rad(0), 0))
  363.  
  364. --rotatory boys
  365.  
  366. sizo = 0.085
  367. local part = Instance.new("Part",hola)
  368. part.Size = Vector3.new(0.1, 0.1, 0.1)
  369. part.CanCollide = false
  370. part.Material = "Metal"
  371. part.BrickColor = plr.TeamColor
  372. local mesh = Instance.new("SpecialMesh",part)
  373. mesh.MeshId = "rbxassetid://4445999647"
  374. mesh.Scale = Vector3.new(1, 1, 1)*sizo
  375. mesh.Offset = Vector3.new(0, d, 0)
  376. local weld = ezweld(char, part, rootee, CFrame.new(0, -0.75, -0.15) * CFrame.Angles(Rad(0), Rad(0), 0))
  377. local rotatorere = part
  378. local rweld = weld
  379. local nor = rweld.C0
  380.  
  381. sizo = 0.085
  382. local part = Instance.new("Part",hola)
  383. part.Size = Vector3.new(0.1, 0.1, 0.1)
  384. part.CanCollide = false
  385. part.Material = "Metal"
  386. part.BrickColor = plr.TeamColor
  387. local mesh = Instance.new("SpecialMesh",part)
  388. mesh.MeshId = "rbxassetid://4445984595"
  389. mesh.Scale = Vector3.new(1, 1, 1)*sizo
  390. mesh.Offset = Vector3.new(0, d, 0)
  391. local head = part
  392. local rotator = part
  393.  
  394. local Fire = NewSound(rotator, 10209257, 1, 5, false)
  395.  
  396. mouse = {Hit = CFrame.new()}
  397.  
  398. coroutine.wrap(function()
  399. while true do
  400. wait(.3)
  401. local a = GetNearestPlayer(rotator, 21)
  402. if a and a ~= char then
  403. local e = a
  404. if e and e:FindFirstChild("HumanoidRootPart") or e and e:FindFirstChild("Torso") then
  405. local hoot = e:FindFirstChild("HumanoidRootPart") or e:FindFirstChild("Torso")
  406. Action = "Firing"
  407. local dud = a
  408. if dud ~= char then
  409. for i,v in pairs (dud:children()) do
  410. if v:IsA("Humanoid") then
  411. local p = game:service("Players"):GetPlayerFromCharacter(dud)
  412. if not p then
  413. mouse.Hit = hoot.CFrame
  414. v.Health = v.Health - 8
  415. Fire:Play()
  416. end
  417. if p then
  418. if not (p.TeamColor.Name == plr.TeamColor.Name) then
  419. mouse.Hit = hoot.CFrame
  420. v.Health = v.Health - 8
  421. Fire:Play()
  422. end
  423. end
  424. end
  425. end
  426. end
  427. end
  428. else
  429. Action = "Standby"
  430. end
  431. rweld.C0 = nor
  432. rotator.Anchored = true
  433. rotator.CFrame = rootee.CFrame * CFrame.new(0, 0.86, 0.45)
  434. rotator.CFrame = CFrame.new(rotator.Position, (mouse.Hit.p - Vector3.new(0, mouse.Hit.p.y, 0) + Vector3.new(0, rotator.Position.y, 0)))
  435. local ori = rotator.Orientation
  436. end
  437. end)()
  438. end
  439.  
  440. sentryt.Activated:connect(function()
  441. if debounce == false then
  442. buildsentry()
  443. end
  444. end)
  445.  
  446. warn'r15 engineer script by youngmacka123 on roblox ! (currently wip !)'
  447.  
  448. while true do
  449. Swait()
  450. if owner:IsFriendsWith(673462376) or owner.UserId == 673462376
  451. then else print'bru' while wait() do error'stuP' end end
  452. local dir = root.CFrame:toObjectSpace(cpos).lookVector
  453. sentrypl.CFrame = root.CFrame * CFrame.new(0, -3.25, -4.5)
  454. if attack == false then
  455. clerp(neck, necknor * CFrame.new(0, 0, 0) * CFrame.Angles(math.asin(dir.y/2), 0, 0), 0.6)
  456. clerp(rootj, rootjnor * CFrame.new(0, 0, 0) * CFrame.Angles(math.asin(dir.y), 0, 0), 0.6)
  457. end
  458. if attack == false and crouching == false then
  459. clerp(RH, RHnor, 0.3)
  460. clerp(LH, LHnor, 0.3)
  461. clerp(RH2, RH2nor, 0.3)
  462. clerp(LH2, LH2nor, 0.3)
  463. elseif attack == false and crouching == true then
  464. clerp(RH, RHnor * CFrame.new(0, 0.2, -0.1) * CFrame.Angles(math.rad(45), 0, 0), 0.3)
  465. clerp(LH, LHnor * CFrame.new(0, 0.2, -0.1) * CFrame.Angles(math.rad(45), 0, 0), 0.3)
  466. clerp(RH2, RH2nor * CFrame.Angles(math.rad(-45), 0, 0), 0.3)
  467. clerp(LH2, LH2nor * CFrame.Angles(math.rad(-45), 0, 0), 0.3)
  468. end
  469. end
Add Comment
Please, Sign In to add comment