sawgamer1

Untitled

Apr 9th, 2019
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.05 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end
  6. --By Rufus14
  7. mouse = game.Players.LocalPlayer:GetMouse()
  8. --
  9. model = Instance.new("Model", workspace.CurrentCamera)
  10. model.Name = "FPSArms"
  11. local humanoidiiiiiilololololol = Instance.new("Humanoid", model)
  12. game.Players.LocalPlayer.Character.Archivable = true
  13. rhandclone = game.Players.LocalPlayer.Character["Right Arm"]:Clone()
  14. rhandclone:BreakJoints()
  15. local rhandcloneweld = Instance.new("Weld", rhandclone)
  16. rhandcloneweld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  17. rhandcloneweld.Part1 = rhandclone
  18. rhandcloneweld.C0 = CFrame.new(0,0,0.5)
  19. rhandclone.Parent = model
  20. rhandclone.Transparency = 1
  21. --
  22. lhandclone = game.Players.LocalPlayer.Character["Left Arm"]:Clone()
  23. lhandclone:BreakJoints()
  24. local lhandcloneweld = Instance.new("Weld", lhandclone)
  25. lhandcloneweld.Part0 = game.Players.LocalPlayer.Character["Left Arm"]
  26. lhandcloneweld.Part1 = lhandclone
  27. lhandcloneweld.C0 = CFrame.new(0,0,0.5)
  28. lhandclone.Parent = model
  29. lhandclone.Transparency = 1
  30. --
  31. game.Players.LocalPlayer.Character.Torso.Neck.C1 = CFrame.new(0,-0.7,0)
  32. local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
  33. rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
  34. rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
  35. rhandweld.C1 = CFrame.new(0,1,0)
  36. local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character["Right Arm"])
  37. lhandweld.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  38. lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
  39. lhandweld.C0 = CFrame.new(-1.12992668, -1.09744608, 0.0783367157, 0.693704247, -0.719959378, -0.0208011046, 0.719762683, 0.691863716, 0.0571505688, -0.0267545581, -0.0546174534, 0.998148739)
  40. function look()
  41. if mouse.Target then
  42. if mouse.Target.Parent ~= "FPSArms" then
  43. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.p.x,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.y,mouse.Hit.p.z))
  44. rhandweld.C0 = CFrame.new(1.29883623, 0.5, -0.640856385, 0.939692557, 0.342020094, 0, 1.49501727e-08, -4.10752641e-08, -0.99999994, -0.342020124, 0.939692616, -4.37113883e-08) * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0)
  45. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.8,0) * CFrame.fromEulerAnglesXYZ(math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0)
  46. end
  47. else
  48. game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position,Vector3.new(mouse.Hit.p.x,game.Players.LocalPlayer.Character.HumanoidRootPart.Position.y,mouse.Hit.p.z))
  49. rhandweld.C0 = CFrame.new(1.29883623, 0.5, -0.640856385, 0.939692557, 0.342020094, 0, 1.49501727e-08, -4.10752641e-08, -0.99999994, -0.342020124, 0.939692616, -4.37113883e-08) * CFrame.new(0,1,0) * CFrame.fromEulerAnglesXYZ(math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0)
  50. game.Players.LocalPlayer.Character.Torso.Neck.C0 = CFrame.new(0,0.8,0) * CFrame.fromEulerAnglesXYZ(math.asin((mouse.Hit.p-mouse.Origin.p).unit.y),0,0)
  51. end
  52. end
  53. game:GetService("RunService").RenderStepped:connect(look)
  54. --Converted with ttyyuu12345's model to script plugin v4
  55. function sandbox(var,func)
  56. local env = getfenv(func)
  57. local newenv = setmetatable({},{
  58. __index = function(self,k)
  59. if k=="script" then
  60. return var
  61. else
  62. return env[k]
  63. end
  64. end,
  65. })
  66. setfenv(func,newenv)
  67. return func
  68. end
  69. cors = {}
  70. mas = Instance.new("Model",game:GetService("Lighting"))
  71. Part0 = Instance.new("Part")
  72. Sound1 = Instance.new("Sound")
  73. SpecialMesh2 = Instance.new("SpecialMesh")
  74. Part0.Name = "Shotgun"
  75. Part0.Parent = mas
  76. Part0.BrickColor = BrickColor.new("Really black")
  77. Part0.Reflectance = 1
  78. Part0.CanCollide = false
  79. Part0.FormFactor = Enum.FormFactor.Custom
  80. Part0.Size = Vector3.new(0.770000994, 0.930003285, 3.75999236)
  81. Part0.CFrame = CFrame.new(0.730844021, 5.84272289, -1.70900095, 0.999999881, 0, 0, 0, 0.999999881, 0, 0, 0, 0.99999994)
  82. Part0.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  83. Part0.Position = Vector3.new(0.730844021, 5.84272289, -1.70900095)
  84. Part0.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  85. Sound1.Name = "Fire"
  86. Sound1.Parent = Part0
  87. Sound1.SoundId = "rbxassetid://636316879"
  88. Sound1.Volume = 1
  89. SpecialMesh2.Parent = Part0
  90. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=94219391"
  91. SpecialMesh2.Scale = Vector3.new(0.75, 0.75, 0.75)
  92. SpecialMesh2.TextureId = "rbxassetid://1153072548"
  93. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  94. SpecialMesh2.Scale = Vector3.new(0.75, 0.75, 0.75)
  95. for i,v in pairs(mas:GetChildren()) do
  96. v.Parent = game:GetService("Players").LocalPlayer.Character
  97. pcall(function() v:MakeJoints() end)
  98. end
  99. mas:Destroy()
  100. for i,v in pairs(cors) do
  101. spawn(function()
  102. pcall(v)
  103. end)
  104. end
  105. --
  106. function die()
  107. script:Remove()
  108. end
  109. game.Players.LocalPlayer.Character.Humanoid.Died:connect(die)
  110. gunclone = Part0:Clone()
  111. gunclone:BreakJoints()
  112. gunclone.Transparency = 1
  113. local guncloneweld = Instance.new("Weld", gunclone)
  114. guncloneweld.Part0 = Part0
  115. guncloneweld.Part1 = gunclone
  116. guncloneweld.C0 = CFrame.new(0,-0.5,0)
  117. gunclone.Parent = model
  118. --
  119. Weld0 = Instance.new("Weld", game.Players.LocalPlayer.Character["Right Arm"])
  120. Weld0.C0 = CFrame.new(-0.168411255, -1.19799232, -0.142723083, 0.939692438, 1.49501709e-08, -0.342020094, 0.342020065, -4.10752605e-08, 0.939692557, 0, -0.999999821, -4.37113847e-08)
  121. Weld0.Part0 = game.Players.LocalPlayer.Character["Right Arm"]
  122. Weld0.Part1 = Part0
  123. shooting = false
  124. local deflect = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  125. deflect.MaxDistance = 100
  126. deflect.Volume = 10
  127. deflect.SoundId = "rbxassetid://341519743"
  128. deflect.Looped = true
  129. local hitsound = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  130. hitsound.Volume = 10
  131. hitsound.SoundId = "rbxassetid://1489924400"
  132. local hedshot = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  133. hedshot.Volume = 10
  134. hedshot.SoundId = "rbxassetid://147936251"
  135. local wubwub = Instance.new("Sound", game.Players.LocalPlayer.Character.Head)
  136. wubwub.Volume = 5
  137. wubwub.SoundId = "rbxassetid://425221796"
  138. wubbing = false
  139. function wubing(key)
  140. key = key:lower()
  141. if key == "q" then
  142. if not wubbing then
  143. wubbing = true
  144. wubwub:Play()
  145. else
  146. wubbing = false
  147. wubwub:Stop()
  148. end
  149. end
  150. end
  151. mouse.KeyDown:connect(wubing)
  152. function shootdemskids()
  153. if not shooting then
  154. shooting = true
  155. Sound1:Play()
  156. local light = Instance.new("PointLight", Part0)
  157. light.Brightness = 10
  158. for i = 1,5 do
  159. local projectile = Instance.new("Part", workspace)
  160. local clonede = deflect:Clone()
  161. clonede.Parent = projectile
  162. clonede:Play()
  163. projectile.Size = Vector3.new(0.2,0.2,2.5)
  164. projectile.CanCollide = false
  165. projectile.CFrame = Part0.CFrame * CFrame.new(0,0,-4)
  166. projectile.Material = "Neon"
  167. projectile.Name = "Bullett"
  168. projectile.CFrame = CFrame.new(projectile.Position, mouse.Hit.p)
  169. local vel = Instance.new("BodyVelocity", projectile)
  170. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  171. vel.Velocity = mouse.Hit.lookVector * 1000 + Vector3.new(math.random(-50,50),math.random(-50,50),0)
  172. game.Debris:AddItem(projectile, 10)
  173. local function damag(part)
  174. if part.Parent:findFirstChild("ragged") then
  175. projectile:destroy()
  176. end
  177. if part.Name ~= "Shotgun" and part.Name ~= "Bullett" then
  178. if part.Parent.ClassName == "Accessory" or part.Parent.Parent.ClassName == "Accessory" or part.ClassName == "Accessory" then
  179.  
  180. else
  181. projectile:destroy()
  182. end
  183. end
  184. local humanoid = part.Parent:findFirstChildOfClass("Humanoid")
  185. if humanoid then
  186. if humanoid.Parent:findFirstChild("ragged") then
  187. projectile:Remove()
  188. end
  189. end
  190. if humanoid and part.Name ~= "Shotgun" and part.Name ~= "Bullett" and humanoid.Parent:findFirstChild("ragged") == nil then
  191. local damage = math.random(20,40)
  192. if part.Name == "Head" then
  193. hedshot:Play()
  194. humanoid.Parent.Head.Transparency = 1
  195. for i,v in pairs(humanoid.Parent:GetChildren()) do
  196. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  197. local handle = v:findFirstChild("Handle")
  198. if handle then
  199. handle.Transparency = 1
  200. end
  201. end
  202. end
  203. for i,v in pairs(humanoid.Parent.Head:GetChildren()) do
  204. if v.ClassName == "Decal" then
  205. v:destroy()
  206. end
  207. end
  208. humanoid.Health = 0
  209. end
  210. if humanoid.Health <= damage then
  211. local ragdolled = Instance.new("BoolValue", humanoid.Parent)
  212. ragdolled.Name = "ragged"
  213. local uppertorso = humanoid.Parent:findFirstChild("UpperTorso")
  214. if uppertorso then
  215. humanoid.Parent:BreakJoints()
  216. while humanoid.Health >= 0.000000000001 do
  217. game:GetService("RunService").RenderStepped:wait()
  218. end
  219. if humanoid.Parent:findFirstChild("HumanoidRootPart") then
  220. humanoid.Parent.HumanoidRootPart.CanCollide = false
  221. end
  222. local function makeballlimb(attachone, attachtwo, upperang, lowang, twist)
  223. local constraint = Instance.new("BallSocketConstraint", humanoid.Parent)
  224. constraint.Attachment0 = attachone
  225. constraint.Attachment1 = attachtwo
  226. constraint.LimitsEnabled = true
  227. constraint.TwistLimitsEnabled = true
  228. constraint.TwistLowerAngle = lowang
  229. constraint.TwistUpperAngle = upperang
  230. constraint.UpperAngle = twist
  231. end
  232. local function makehingelimb(attachone, attachtwo, upperang, lowang)
  233. local constraint = Instance.new("HingeConstraint", humanoid.Parent)
  234. constraint.Attachment0 = attachone
  235. constraint.Attachment1 = attachtwo
  236. constraint.LimitsEnabled = true
  237. constraint.LowerAngle = lowang
  238. constraint.UpperAngle = upperang
  239. end
  240. for i,v in pairs(humanoid.Parent:GetChildren()) do --scan player
  241. if v.ClassName == "Accessory" then
  242. local findhandle = v:findFirstChild("Handle") --finding handle in accesorry
  243. if findhandle then
  244. local attach = findhandle:findFirstChildOfClass("Attachment")
  245. for q,w in pairs(humanoid.Parent:GetChildren()) do --scan player
  246. if w.Name == "UpperTorso" or w.Name == "Head" then
  247. attach1 = w:findFirstChild(attach.Name) --finding attachment in head/uppertorso
  248. end
  249. end
  250. if attach and attach1 then
  251. local constraint = Instance.new("HingeConstraint", humanoid.Parent) --making fake weld
  252. constraint.Attachment0 = attach
  253. constraint.Attachment1 = attach1
  254. constraint.LimitsEnabled = true
  255. constraint.LowerAngle = 0
  256. constraint.UpperAngle = 0
  257. end
  258. end
  259. end
  260. end
  261. if humanoid.Parent:findFirstChild("Head") and humanoid.Parent:findFirstChild("UpperTorso") then
  262. local attachment = Instance.new("Attachment", humanoid.Parent.Head)
  263. attachment.Position = Vector3.new(0, -0.5, 0)
  264. attachment.Name = "lol"
  265. attachment.Visible = false
  266. humanoid.Parent.UpperTorso.NeckAttachment.Visible = false
  267. humanoid.Parent.UpperTorso.NeckAttachment.Position = humanoid.Parent.UpperTorso.NeckAttachment.Position + Vector3.new(0,0,0)
  268. local ball = Instance.new("BallSocketConstraint", humanoid.Parent)
  269. ball.Attachment0 = humanoid.Parent.UpperTorso.NeckAttachment
  270. ball.Attachment1 = attachment
  271. ball.LimitsEnabled = true
  272. ball.TwistLimitsEnabled = true
  273. ball.UpperAngle = 40
  274. ball.Restitution = 0.5
  275. ball.TwistUpperAngle = 40
  276. ball.TwistLowerAngle = -40
  277. local collidepartofleftleg = Instance.new("Part", humanoid.Parent.UpperTorso)
  278. collidepartofleftleg.Name = "Bone"
  279. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  280. collidepartofleftleg.Transparency = 1
  281. collidepartofleftleg:BreakJoints()
  282. local weeld = Instance.new("Weld", collidepartofleftleg)
  283. weeld.Part0 = collidepartofleftleg
  284. weeld.Part1 = humanoid.Parent["Head"]
  285. if humanoid.Parent.Head:findFirstChild("Neck") then
  286. humanoid.Parent.Head.Neck:destroy()
  287. end
  288. if humanoid.Parent.Head:findFirstChild("face") then
  289. humanoid.Parent.Head.face.Texture = "http://www.roblox.com/asset/?id=810245460"
  290. end
  291. end
  292. local LeftUpperLeg = humanoid.Parent:findFirstChild("LeftUpperLeg")
  293. local LeftLowerLeg = humanoid.Parent:findFirstChild("LeftLowerLeg")
  294. --
  295. local RightUpperLeg = humanoid.Parent:findFirstChild("RightUpperLeg")
  296. local RightLowerLeg = humanoid.Parent:findFirstChild("RightLowerLeg")
  297. --
  298. local RightUpperArm = humanoid.Parent:findFirstChild("RightUpperArm")
  299. local RightLowerArm = humanoid.Parent:findFirstChild("RightLowerArm")
  300. --
  301. local LeftUpperArm = humanoid.Parent:findFirstChild("LeftUpperArm")
  302. local LeftLowerArm = humanoid.Parent:findFirstChild("LeftLowerArm")
  303. --Foot & Hands--
  304.  
  305. local LeftFoot = humanoid.Parent:findFirstChild("LeftFoot")
  306. local RightFoot = humanoid.Parent:findFirstChild("RightFoot")
  307. --
  308. local LeftHand = humanoid.Parent:findFirstChild("LeftHand")
  309. local RightHand = humanoid.Parent:findFirstChild("RightHand")
  310.  
  311. --END--
  312. --TORSOS--
  313.  
  314. local UpperTorso = humanoid.Parent:findFirstChild("UpperTorso")
  315. local LowerTorso = humanoid.Parent:findFirstChild("LowerTorso")
  316.  
  317. --END--
  318. local function search(datone)
  319. for i,v in pairs(datone:GetChildren()) do
  320. search(v)
  321. if v.ClassName == "Sound" then
  322. v.Volume = 0
  323. end
  324. end
  325. end
  326. search(humanoid.Parent)
  327. local clonede = hitsound:Clone()
  328. clonede.Parent = part
  329. clonede:Play()
  330. if part.Name == "Head" then
  331. humanoid.Parent.Head.Transparency = 1
  332. for i,v in pairs(humanoid.Parent:GetChildren()) do
  333. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  334. local handle = v:findFirstChild("Handle")
  335. if handle then
  336. handle.Transparency = 1
  337. end
  338. end
  339. end
  340. for i,v in pairs(humanoid.Parent.Head:GetChildren()) do
  341. if v.ClassName == "Decal" then
  342. v:destroy()
  343. end
  344. end
  345. humanoid.Parent:BreakJoints()
  346. end
  347. if LowerTorso then
  348. if LeftUpperLeg then
  349. local function uncollidee()
  350. LeftUpperLeg.CanCollide = false
  351. end
  352. game:GetService("RunService").Stepped:connect(uncollidee)
  353. makeballlimb(LowerTorso["LeftHipRigAttachment"], LeftUpperLeg["LeftHipRigAttachment"], 50,-50, 90)
  354. end
  355. if RightUpperLeg then
  356. local function uncollidee()
  357. RightUpperLeg.CanCollide = false
  358. end
  359. game:GetService("RunService").Stepped:connect(uncollidee)
  360. makeballlimb(LowerTorso["RightHipRigAttachment"], RightUpperLeg["RightHipRigAttachment"], 50,-50, 90)
  361. end
  362. if LeftLowerLeg then
  363. makehingelimb(LeftUpperLeg["LeftKneeRigAttachment"], LeftLowerLeg["LeftKneeRigAttachment"], 0,-90)
  364. end
  365. if RightLowerLeg then
  366. makehingelimb(RightUpperLeg["RightKneeRigAttachment"], RightLowerLeg["RightKneeRigAttachment"], 0,-90)
  367. end
  368. if LeftFoot then
  369. makehingelimb(LeftLowerLeg["LeftAnkleRigAttachment"], LeftFoot["LeftAnkleRigAttachment"], 30, -30)
  370. end
  371. if RightFoot then
  372. makehingelimb(RightLowerLeg["RightAnkleRigAttachment"], RightFoot["RightAnkleRigAttachment"], 30, -30)
  373. end
  374. if UpperTorso then
  375. makehingelimb(UpperTorso["WaistRigAttachment"], LowerTorso["WaistRigAttachment"], 30, -30)
  376. end
  377. end
  378. if UpperTorso then
  379. local vel = Instance.new("BodyVelocity", UpperTorso)
  380. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  381. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 10
  382. game.Debris:AddItem(vel, 0.1)
  383. local canhit = true
  384. local hitval = 15
  385. local uptor = humanoid.Parent.UpperTorso
  386. if RightUpperArm then
  387. local function uncollidee()
  388. RightUpperArm.CanCollide = false
  389. end
  390. game:GetService("RunService").Stepped:connect(uncollidee)
  391. makeballlimb(RightUpperArm["RightShoulderRigAttachment"], UpperTorso["RightShoulderRigAttachment"], 90,-50, 180)
  392. end
  393. if RightLowerArm then
  394. makehingelimb(RightLowerArm["RightElbowRigAttachment"], RightUpperArm["RightElbowRigAttachment"], 0,-90)
  395. end
  396. if RightHand then
  397. makehingelimb(RightHand["RightWristRigAttachment"], RightLowerArm["RightWristRigAttachment"], 30,30)
  398. end
  399. if LeftUpperArm then
  400. local function uncollidee()
  401. LeftUpperArm.CanCollide = false
  402. end
  403. game:GetService("RunService").Stepped:connect(uncollidee)
  404. makeballlimb(LeftUpperArm["LeftShoulderRigAttachment"], UpperTorso["LeftShoulderRigAttachment"], 90,-50, 180)
  405. end
  406. if LeftLowerArm then
  407. makehingelimb(LeftLowerArm["LeftElbowRigAttachment"], LeftUpperArm["LeftElbowRigAttachment"], 0,-90)
  408. end
  409. if LeftHand then
  410. makehingelimb(LeftHand["LeftWristRigAttachment"], LeftLowerArm["LeftWristRigAttachment"], 30,30)
  411. end
  412. end
  413. elseif humanoid.Parent:findFirstChild("Torso") then
  414. humanoid.Parent.Archivable = true
  415. humanoid.PlatformStand = true
  416. local function search(datone)
  417. for i,v in pairs(datone:GetChildren()) do
  418. search(v)
  419. if v.ClassName == "Sound" then
  420. v.Volume = 0
  421. end
  422. end
  423. end
  424. search(humanoid.Parent)
  425. local clonede = hitsound:Clone()
  426. clonede.Parent = part
  427. clonede:Play()
  428. if part.Name == "Head" then
  429. humanoid.Parent.Head.Transparency = 1
  430. for i,v in pairs(humanoid.Parent:GetChildren()) do
  431. if v.ClassName == "Accessory" or v.ClassName == "Hat" then
  432. local handle = v:findFirstChild("Handle")
  433. if handle then
  434. handle.Transparency = 1
  435. end
  436. end
  437. end
  438. for i,v in pairs(humanoid.Parent.Head:GetChildren()) do
  439. if v.ClassName == "Decal" then
  440. v:destroy()
  441. end
  442. end
  443. humanoid.Parent:BreakJoints()
  444. end
  445. local clone = humanoid.Parent:Clone()
  446. clone.Parent = workspace
  447. game.Debris:AddItem(clone, 60)
  448. for i,v in pairs(clone:GetChildren()) do
  449. if v.ClassName == "Script" or v.ClassName == "LocalScript" then
  450. v:Remove()
  451. end
  452. for i,p in pairs(v:GetChildren()) do
  453. if p.ClassName == "Weld" or p.ClassName == "Motor6D" or p.ClassName == "BodyVelocity" then
  454. p:Remove()
  455. end
  456. end
  457. end
  458. for i,t in pairs(humanoid.Parent:GetChildren()) do
  459. if t.ClassName == "Accessory" or t.ClassName == "ForceField" then
  460. t:Remove()
  461. end
  462. end
  463. local vel = Instance.new("BodyVelocity", clone.Torso)
  464. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  465. vel.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * 15
  466. game.Debris:AddItem(vel, 0.1)
  467. vel = Instance.new("BodyVelocity", clone.Torso)
  468. vel.Velocity = clone.Torso.CFrame.lookVector * -5
  469. vel.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
  470. using = false
  471. hit = Instance.new("Sound", clone.Torso)
  472. hit.SoundId = "rbxassetid://260430060"
  473. hit.Volume = 0
  474. hit1 = Instance.new("Sound", clone.Torso)
  475. hit1.SoundId = "rbxassetid://138087186"
  476. hit1.Volume = 0
  477. hit2 = Instance.new("Sound", clone.Torso)
  478. hit2.SoundId = "rbxassetid://131237241"
  479. hit2.Volume = 0
  480. hit3 = Instance.new("Sound", clone.Torso)
  481. hit3.SoundId = "rbxassetid://278062209"
  482. hit3.Volume = 0
  483. hit3.TimePosition = 0.33
  484. ded = Instance.new("Sound", clone.Torso)
  485. ded.SoundId = "rbxassetid://418892870"
  486. ded.Volume = 0
  487. local leftarm = clone:findFirstChild("Left Arm")
  488. local rightrm = clone:findFirstChild("Right Arm")
  489. local leftleg = clone:findFirstChild("Left Leg")
  490. local rightleg = clone:findFirstChild("Right Leg")
  491. local head = clone:findFirstChild("Head")
  492. for i, g in pairs(humanoid.Parent:GetChildren()) do
  493. if g.ClassName == "Part" then
  494. g:destroy()
  495. end
  496. end
  497. for i, h in pairs(humanoid.Parent:GetChildren()) do
  498. if h.ClassName == "Accesory" then
  499. h:destroy()
  500. end
  501. end
  502. for z,x in pairs(clone:GetChildren()) do
  503. if x.ClassName == "Accessory" then
  504. local handle = x:findFirstChild("Handle")
  505. if handle then
  506. local attachment = handle:findFirstChildOfClass("Attachment")
  507. if attachment then
  508. for q,w in pairs(clone:GetChildren()) do
  509. if w.Name == "Torso" or w.Name == "Head" then
  510. local anotherone = w:findFirstChild(attachment.Name)
  511. if attachment and anotherone then
  512. local constraint = Instance.new("HingeConstraint", clone) --making fake weld
  513. constraint.Attachment0 = attachment
  514. constraint.Attachment1 = anotherone
  515. constraint.LimitsEnabled = true
  516. constraint.LowerAngle = 0
  517. constraint.UpperAngle = 0
  518. end
  519. end
  520. end
  521. end
  522. end
  523. end
  524. end
  525. if head and clone.Torso:findFirstChild("NeckAttachment") then
  526. local attachment = Instance.new("Attachment", clone.Head)
  527. attachment.Position = Vector3.new(0, -0.5, 0)
  528. attachment.Name = "lol"
  529. attachment.Visible = false
  530. clone.Torso.NeckAttachment.Visible = false
  531. clone.Torso.NeckAttachment.Position = clone.Torso.NeckAttachment.Position + Vector3.new(0,0,0)
  532. local ball = Instance.new("BallSocketConstraint", clone)
  533. ball.Attachment0 = clone.Torso.NeckAttachment
  534. ball.Attachment1 = attachment
  535. ball.LimitsEnabled = true
  536. ball.TwistLimitsEnabled = true
  537. ball.UpperAngle = 90
  538. ball.Restitution = 0.5
  539. ball.TwistUpperAngle = 90
  540. ball.TwistLowerAngle = -90
  541. local collidepartofleftleg = Instance.new("Part", clone.Torso)
  542. collidepartofleftleg.Name = "Bone"
  543. collidepartofleftleg.Size = Vector3.new(0.7,0.7,0.7)
  544. collidepartofleftleg.Transparency = 1
  545. collidepartofleftleg:BreakJoints()
  546. local weeld = Instance.new("Weld", collidepartofleftleg)
  547. weeld.Part0 = collidepartofleftleg
  548. weeld.Part1 = clone["Head"]
  549. end
  550. if leftleg ~= nil then
  551. leftleg:BreakJoints()
  552. local glue = Instance.new("Glue", clone.Torso)
  553. glue.Part0 = clone.Torso
  554. glue.Part1 = leftleg
  555. glue.Name = "Left leg"
  556. local collider = Instance.new("Part", leftleg)
  557. collider.Position = Vector3.new(0,999,0)
  558. collider.Size = Vector3.new(1.5, 1, 1)
  559. collider.Shape = "Cylinder"
  560. local weld = Instance.new("Weld", collider)
  561. weld.Part0 = leftleg
  562. weld.Part1 = collider
  563. weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  564. collider.TopSurface = "Smooth"
  565. collider.BottomSurface = "Smooth"
  566. collider.formFactor = "Symmetric"
  567. glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  568. glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  569. collider.Transparency = 1
  570. end
  571. ------------
  572. if rightleg ~= nil then
  573. rightleg:BreakJoints()
  574. local glue1 = Instance.new("Glue", clone.Torso)
  575. glue1.Part0 = clone.Torso
  576. glue1.Part1 = rightleg
  577. glue1.Name = "Right leg"
  578. local collider1 = Instance.new("Part", rightleg)
  579. collider1.Position = Vector3.new(0,999,0)
  580. collider1.Size = Vector3.new(1.5, 1, 1)
  581. collider1.Shape = "Cylinder"
  582. local weld1 = Instance.new("Weld", collider1)
  583. weld1.Part0 = rightleg
  584. weld1.Part1 = collider1
  585. weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  586. collider1.TopSurface = "Smooth"
  587. collider1.BottomSurface = "Smooth"
  588. collider1.formFactor = "Symmetric"
  589. glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  590. glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  591. collider1.Transparency = 1
  592. end
  593. ------------
  594. if rightrm ~= nil then
  595. rightrm:BreakJoints()
  596. rightrm.CFrame = clone.Torso.CFrame * CFrame.new(1.7,0,0)
  597. local glue11 = Instance.new("Glue", clone.Torso)
  598. glue11.Part0 = clone.Torso
  599. glue11.Part1 = rightrm
  600. glue11.Name = "Right shoulder"
  601. local collider11 = Instance.new("Part", rightrm)
  602. collider11.Position = Vector3.new(0,9999,0)
  603. collider11.Size = Vector3.new(1.5,1,1)
  604. collider11.Shape = "Cylinder"
  605. local weld11 = Instance.new("Weld", collider11)
  606. weld11.Part0 = rightrm
  607. weld11.Part1 = collider11
  608. weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  609. collider11.TopSurface = "Smooth"
  610. collider11.BottomSurface = "Smooth"
  611. collider11.formFactor = "Symmetric"
  612. glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  613. glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
  614. collider11.Transparency = 1
  615. end
  616. ------------
  617. if leftarm ~= nil then
  618. leftarm.CFrame = clone.Torso.CFrame * CFrame.new(-1.7,0,0)
  619. leftarm:BreakJoints()
  620. local glue111 = Instance.new("Glue", clone.Torso)
  621. glue111.Part0 = clone.Torso
  622. glue111.Part1 = leftarm
  623. glue111.Name = "Left shoulder"
  624. local collider111 = Instance.new("Part", leftarm)
  625. collider111.Position = Vector3.new(0,9999,0)
  626. collider111.Size = Vector3.new(1.5,1,1)
  627. collider111.Shape = "Cylinder"
  628. local weld111 = Instance.new("Weld", collider111)
  629. weld111.Part0 = leftarm
  630. weld111.Part1 = collider111
  631. weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2)
  632. collider111.TopSurface = "Smooth"
  633. collider111.BottomSurface = "Smooth"
  634. collider111.formFactor = "Symmetric"
  635. glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  636. glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  637. collider111.Transparency = 1
  638. ----------------
  639. sensoring = Instance.new("Part", clone.Torso)
  640. sensoring.Size = Vector3.new(1.2,1.1,0.8)
  641. sensoring.CanCollide = false
  642. sensoring.Position = clone.Torso.Position
  643. local welder = Instance.new("Weld", sensoring)
  644. welder.Part0 = clone.Torso
  645. welder.Part1 = sensoring
  646. welder.C0 = welder.C0 * CFrame.new(0,0,1.05)
  647. sensoring.Transparency = 1
  648. -----------------
  649. sensoring1 = Instance.new("Part", clone.Torso)
  650. sensoring1.Size = Vector3.new(1.2,1.1,0.8)
  651. sensoring1.CanCollide = false
  652. sensoring1.Position = clone.Torso.Position
  653. local welder1 = Instance.new("Weld", sensoring)
  654. welder1.Part0 = clone.Torso
  655. welder1.Part1 = sensoring1
  656. welder1.C0 = welder1.C0 * CFrame.new(0,0,-1.05)
  657. sensoring1.Transparency = 1
  658. end
  659. local mathname = math.random(1,10)
  660. if mathname == 1 then
  661. clone.Name = humanoid.Parent.Name.." (Shot to death by "..game.Players.LocalPlayer.Name..")"
  662. end
  663. if mathname == 2 then
  664. clone.Name = humanoid.Parent.Name.." (Killed by "..game.Players.LocalPlayer.Name..")"
  665. end
  666. if mathname == 3 then
  667. clone.Name = humanoid.Parent.Name.." (Shot by "..game.Players.LocalPlayer.Name..")"
  668. end
  669. if mathname == 4 then
  670. clone.Name = humanoid.Parent.Name.." (Rekted by "..game.Players.LocalPlayer.Name..")"
  671. end
  672. if mathname == 5 then
  673. clone.Name = humanoid.Parent.Name.." (rip by "..game.Players.LocalPlayer.Name..")"
  674. end
  675. if mathname == 6 then
  676. clone.Name = humanoid.Parent.Name.." (rest in piss "..humanoid.Parent.Name.." by "..game.Players.LocalPlayer.Name..")"
  677. end
  678. if mathname == 7 then
  679. clone.Name = humanoid.Parent.Name.." (rip in pepperoni "..humanoid.Parent.Name.." by "..game.Players.LocalPlayer.Name..")"
  680. end
  681. if mathname == 8 then
  682. clone.Name = humanoid.Parent.Name.." (uuhhh.wav'd by "..game.Players.LocalPlayer.Name..")"
  683. end
  684. if mathname == 9 then
  685. clone.Name = humanoid.Parent.Name.." (oof'd by "..game.Players.LocalPlayer.Name..")"
  686. end
  687. if mathname == 10 then
  688. clone.Name = humanoid.Parent.Name.." (insert child hurt sound by "..game.Players.LocalPlayer.Name..")"
  689. end
  690. ded:Play()
  691. vel:destroy()
  692. wait(0.5)
  693. local function touch()
  694. if not using then
  695. using = true
  696. local Math = math.random(1,4)
  697. if Math == 1 then
  698. hit:Play()
  699. end
  700. if Math == 2 then
  701. hit1:Play()
  702. end
  703. if Math == 3 then
  704. hit2:Play()
  705. end
  706. if Math == 4 then
  707. hit3:Play()
  708. end
  709. wait(0.1)
  710. using = false
  711. end
  712. end
  713. sensoring.Touched:connect(touch)
  714. sensoring1.Touched:connect(touch)
  715. while true do
  716. if clone:findFirstChild("Head") then
  717. clone.Head.CanCollide = false
  718. end
  719. game:GetService("RunService").Stepped:wait()
  720. end
  721. end
  722. else
  723. local clonede = hitsound:Clone()
  724. clonede.Parent = part
  725. clonede:Play()
  726. humanoid.Health = humanoid.Health - damage
  727. end
  728. end
  729. end
  730. projectile.Touched:connect(damag)
  731. end
  732. for i = 1,5 do
  733. rhandweld.C1 = rhandweld.C1 * CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(-0.04,0,0)
  734. game:GetService("RunService").RenderStepped:wait()
  735. end
  736. light:destroy()
  737. for i = 1,10 do
  738. rhandweld.C1 = rhandweld.C1 * CFrame.new(0,0.1,0) * CFrame.fromEulerAnglesXYZ(0.02,0,0)
  739. game:GetService("RunService").RenderStepped:wait()
  740. end
  741. rhandweld.C1 = CFrame.new(0,1,0)
  742. shooting = false
  743. end
  744. end
  745. mouse.Button1Down:connect(shootdemskids)
  746. while true do
  747. if (workspace.CurrentCamera.CFrame.p - game.Players.LocalPlayer.Character.Head.Position).magnitude < 2 then
  748. gunclone.Transparency = 0
  749. rhandclone.Transparency = 0
  750. lhandclone.Transparency = 0
  751. else
  752. gunclone.Transparency = 1
  753. rhandclone.Transparency = 1
  754. lhandclone.Transparency = 1
  755. end
  756. if Sound1.Parent == nil then
  757. Sound1.Parent = Part0
  758. end
  759. if deflect.Parent == nil then
  760. deflect.Parent = Part0
  761. end
  762. if hitsound.Parent == nil then
  763. hitsound.Parent = Part0
  764. end
  765. if hedshot.Parent == nil then
  766. hedshot.Parent = Part0
  767. end
  768. if wubwub.Parent == nil then
  769. wubwub.Parent = Part0
  770. end
  771. game:GetService("RunService").RenderStepped:wait()
  772. end
Advertisement
Add Comment
Please, Sign In to add comment