Advertisement
vL4d_4eVer

Grab gun v1.0

Jul 21st, 2018 (edited)
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 78.08 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5.     print("FE Compatibility code by Mokiros")
  6.     local rp = RealPlayer
  7.     script.Parent = rp.Character
  8.    
  9.     --RemoteEvent for communicating
  10.     local Event = Instance.new("RemoteEvent")
  11.     Event.Name = "UserInput_Event"
  12.  
  13.     --Fake event to make stuff like Mouse.KeyDown work
  14.     local function fakeEvent()
  15.         local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16.         t.connect = t.Connect
  17.         return t
  18.     end
  19.  
  20.     --Creating fake input objects with fake variables
  21.     local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22.     local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23.     local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24.         CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25.     end}
  26.     --Merged 2 functions into one by checking amount of arguments
  27.     CAS.UnbindAction = CAS.BindAction
  28.  
  29.     --This function will trigger the events that have been :Connect()'ed
  30.     local function te(self,ev,...)
  31.         local t = m[ev]
  32.         if t and t._fakeEvent then
  33.             for _,f in pairs(t.Functions) do
  34.                 f(...)
  35.             end
  36.         end
  37.     end
  38.     m.TrigEvent = te
  39.     UIS.TrigEvent = te
  40.  
  41.     Event.OnServerEvent:Connect(function(plr,io)
  42.         if plr~=rp then return end
  43.         m.Target = io.Target
  44.         m.Hit = io.Hit
  45.         if not io.isMouse then
  46.             local b = io.UserInputState == Enum.UserInputState.Begin
  47.             if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48.                 return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49.             end
  50.             for _,t in pairs(CAS.Actions) do
  51.                 for _,k in pairs(t.Keys) do
  52.                     if k==io.KeyCode then
  53.                         t.Function(t.Name,io.UserInputState,io)
  54.                     end
  55.                 end
  56.             end
  57.             m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58.             UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59.         end
  60.     end)
  61.     Event.Parent = NLS([==[
  62.     local Player = game:GetService("Players").LocalPlayer
  63.     local Event = script:WaitForChild("UserInput_Event")
  64.  
  65.     local Mouse = Player:GetMouse()
  66.     local UIS = game:GetService("UserInputService")
  67.     local input = function(io,a)
  68.         if a then return end
  69.         --Since InputObject is a client-side instance, we create and pass table instead
  70.         Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71.     end
  72.     UIS.InputBegan:Connect(input)
  73.     UIS.InputEnded:Connect(input)
  74.  
  75.     local h,t
  76.     --Give the server mouse data 30 times every second, but only if the values changed
  77.     --If player is not moving their mouse, client won't fire events
  78.     while wait(1/30) do
  79.         if h~=Mouse.Hit or t~=Mouse.Target then
  80.             h,t=Mouse.Hit,Mouse.Target
  81.             Event:FireServer({isMouse=true,Target=t,Hit=h})
  82.         end
  83.     end]==],Player.Character)
  84.  
  85.     ----Sandboxed game object that allows the usage of client-side methods and services
  86.     --Real game object
  87.     local _rg = game
  88.  
  89.     --Metatable for fake service
  90.     local fsmt = {
  91.         __index = function(self,k)
  92.             local s = rawget(self,"_RealService")
  93.             if s then return s[k] end
  94.         end,
  95.         __newindex = function(self,k,v)
  96.             local s = rawget(self,"_RealService")
  97.             if s then s[k]=v end
  98.         end,
  99.         __call = function(self,...)
  100.             local s = rawget(self,"_RealService")
  101.             if s then return s(...) end
  102.         end
  103.     }
  104.     local function FakeService(t,RealService)
  105.         t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106.         return setmetatable(t,fsmt)
  107.     end
  108.  
  109.     --Fake game object
  110.     local g = {
  111.         GetService = function(self,s)
  112.             return self[s]
  113.         end,
  114.         Players = FakeService({
  115.             LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116.         },"Players"),
  117.         UserInputService = FakeService(UIS,"UserInputService"),
  118.         ContextActionService = FakeService(CAS,"ContextActionService"),
  119.     }
  120.     rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121.     g.service = g.GetService
  122.    
  123.     g.RunService = FakeService({
  124.         RenderStepped = _rg:GetService("RunService").Heartbeat,
  125.         BindToRenderStep = function(self,name,_,fun)
  126.             self._btrs[name] = self.Heartbeat:Connect(fun)
  127.         end,
  128.         UnbindFromRenderStep = function(self,name)
  129.             self._btrs[name]:Disconnect()
  130.         end,
  131.     },"RunService")
  132.  
  133.     setmetatable(g,{
  134.         __index=function(self,s)
  135.             return _rg:GetService(s) or typeof(_rg[s])=="function"
  136.             and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137.         end,
  138.         __newindex = fsmt.__newindex,
  139.         __call = fsmt.__call
  140.     })
  141.     --Changing owner to fake player object to support owner:GetMouse()
  142.     game,owner = g,g.Players.LocalPlayer
  143. end
  144. --Grab Gun v1
  145. --Grab Gun v2
  146. local plr = game:GetService("Players").LocalPlayer
  147. local plrg = plr.PlayerGui
  148. local char = plr.Character
  149. script.Parent = char
  150. local ra = char["Right Arm"]
  151. local la = char["Left Arm"]
  152. local rl = char["Right Leg"]
  153. local ll = char["Left Leg"]
  154. local h = char.Head
  155. local t = char.Torso
  156. local anim = "idle"
  157. local mode = "shoot"
  158. local killmode = "kill"
  159. local mouse = plr:GetMouse()
  160. local rad = math.rad
  161.  
  162. function info(text,timebeforefade)
  163.     coroutine.resume(coroutine.create(function()
  164.     local pos = {.001,.002,.003,.004,.005}
  165.     local mpos = {-.001,-.002,-.003,-.004,-.005}
  166.     local sc = Instance.new("ScreenGui",plrg)
  167.     local tex = Instance.new("TextLabel",sc) tex.Rotation = math.random(-5,5) tex.Position = UDim2.new(.5,0,.05,0) tex.Size = UDim2.new(0,0,.15,0) tex.TextScaled = true tex.BackgroundTransparency = 1 tex.TextTransparency = 1 tex.BackgroundColor3 = Color3.fromRGB(40,40,40) tex.BorderSizePixel = 0 tex.TextColor3 = Color3.fromRGB(255,255,255) tex.Text = text
  168.     for i = 1,20 do
  169.         tex.Size = tex.Size + UDim2.new(.025,0,0,0)
  170.         tex.Rotation = math.random(-5,5)
  171.         tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  172.         tex.Position = tex.Position - UDim2.new(.0125,0,0,0)
  173.         tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
  174.         tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60))
  175.         tex.BackgroundTransparency = tex.BackgroundTransparency -.05
  176.         swait()
  177.     end
  178.     for i = 1,10 do
  179.         tex.Rotation = math.random(-5,5)
  180.         tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  181.         tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
  182.         tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60))
  183.         tex.TextTransparency = tex.TextTransparency -.1
  184.         swait()
  185.     end
  186.     tex.BackgroundColor3 = Color3.fromRGB(40,40,40)
  187.     tex.TextColor3 = Color3.fromRGB(255,255,255)
  188.     wait(timebeforefade)
  189.     for i = 1,10 do
  190.         tex.Rotation = math.random(-5,5)
  191.         tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  192.         tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
  193.         tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60))
  194.         tex.TextTransparency = tex.TextTransparency +.1
  195.         swait()
  196.     end
  197.     for i = 1,20 do
  198.         tex.Size = tex.Size - UDim2.new(.025,0,0,0)
  199.         tex.Rotation = math.random(-5,5)
  200.         tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  201.         tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
  202.         tex.BackgroundColor3 = Color3.fromRGB(math.random(0,30),math.random(0,60),math.random(0,60))
  203.         tex.Position = tex.Position + UDim2.new(.0125,0,0,0)
  204.         tex.BackgroundTransparency = tex.BackgroundTransparency +.05
  205.         swait()
  206.     end
  207.     tex:Destroy()
  208.     end))
  209. end
  210.  
  211. print("Made by vlad20020")
  212.  
  213. coroutine.resume(coroutine.create(function()
  214. wait(1)
  215. info("Press Z to equip the gun.",1)
  216. wait(2)
  217. info("Press X to unequip the gun.",1)
  218. wait(2)
  219. info("Press M for control list",1)
  220. end))
  221.  
  222. ArtificialHB = Instance.new("BindableEvent", script)
  223. ArtificialHB.Name = "Heartbeat"
  224.  
  225. script:WaitForChild("Heartbeat")
  226.  
  227. frame = 1 / 60
  228. tf = 0
  229. allowframeloss = false
  230. tossremainder = false
  231. lastframe = tick()
  232. script.Heartbeat:Fire()
  233.  
  234. game:GetService("RunService").Heartbeat:connect(function(s, p)
  235.     tf = tf + s
  236.     if tf >= frame then
  237.         if allowframeloss then
  238.             script.Heartbeat:Fire()
  239.             lastframe = tick()
  240.         else
  241.             for i = 1, math.floor(tf / frame) do
  242.                 script.Heartbeat:Fire()
  243.             end
  244.             lastframe = tick()
  245.         end
  246.         if tossremainder then
  247.             tf = 0
  248.         else
  249.             tf = tf - frame * math.floor(tf / frame)
  250.         end
  251.     end
  252. end)
  253.  
  254. function swait(num)
  255.     if num == 0 or num == nil then
  256.         ArtificialHB.Event:wait()
  257.     else
  258.         for i = 0, num do
  259.             ArtificialHB.Event:wait()
  260.         end
  261.     end
  262. end
  263.  
  264. local rs = t["Right Shoulder"]
  265. local ls = t["Left Shoulder"]
  266. local rh = t["Right Hip"]
  267. local lh = t["Left Hip"]
  268. local nec = t.Neck
  269. local rut = char.HumanoidRootPart
  270. local rutj = rut.RootJoint
  271. local hum = char:FindFirstChildOfClass("Humanoid")
  272. local using = true
  273. local canequip = true
  274. local uneq = false
  275. local grab = false
  276. huge = math.huge
  277. local ammo = 7
  278.  
  279. --arm joint parts_
  280. local tpr = Instance.new("Part",t) tpr.Size = Vector3.new(.1,.1,.1) tpr.CanCollide = false tpr.Transparency = 1
  281. local tpl = Instance.new("Part",t) tpl.Size = Vector3.new(.1,.1,.1) tpl.CanCollide = false tpl.Transparency = 1
  282. local tprw = Instance.new("Weld",t) tprw.Part0 = t tprw.Part1 = tpr tprw.C0 = CFrame.new(1,.5,0)
  283. local tplw = Instance.new("Weld",t) tplw.Part0 = t tplw.Part1 = tpl tplw.C0 = CFrame.new(-1,.5,0)
  284. --
  285. local rapr = Instance.new("Part",ra) rapr.Size = Vector3.new(.1,.1,.1) rapr.CanCollide = false rapr.Transparency = 1 --Right Arm
  286. local lapl = Instance.new("Part",la) lapl.Size = Vector3.new(.1,.1,.1) lapl.CanCollide = false lapl.Transparency = 1 --Left Arm
  287. local raprw = Instance.new("Weld",ra) raprw.Part0 = ra raprw.Part1 = rapr raprw.C0 = CFrame.new(-.5,.5,0)
  288. local laplw = Instance.new("Weld",la) laplw.Part0 = la laplw.Part1 = lapl laplw.C0 = CFrame.new(.5,.5,0)
  289. --joint welds
  290. local rsw = Instance.new("Weld",ra) rsw.Part0 = tpr rsw.Part1 = nil --Right Shoulder
  291. local lsw = Instance.new("Weld",la) lsw.Part0 = tpl lsw.Part1 = nil --Left Shoulder
  292. --gun model--
  293. local function creategun()
  294. --Converted with ttyyuu12345's model to script plugin v4
  295. function sandbox(var,func)
  296.     local env = getfenv(func)
  297.     local newenv = setmetatable({},{
  298.         __index = function(self,k)
  299.             if k=="script" then
  300.                 return var
  301.             else
  302.                 return env[k]
  303.             end
  304.         end,
  305.     })
  306.     setfenv(func,newenv)
  307.     return func
  308. end
  309. cors = {}
  310. mas = Instance.new("Model",game:GetService("Lighting"))
  311. Model0 = Instance.new("Model")
  312. Part1 = Instance.new("Part")
  313. Part2 = Instance.new("Part")
  314. Part3 = Instance.new("Part")
  315. WeldConstraint4 = Instance.new("WeldConstraint")
  316. Part5 = Instance.new("Part")
  317. WeldConstraint6 = Instance.new("WeldConstraint")
  318. WeldConstraint7 = Instance.new("WeldConstraint")
  319. Part8 = Instance.new("Part")
  320. WeldConstraint9 = Instance.new("WeldConstraint")
  321. WeldConstraint10 = Instance.new("WeldConstraint")
  322. WeldConstraint11 = Instance.new("WeldConstraint")
  323. Part12 = Instance.new("Part")
  324. Part13 = Instance.new("Part")
  325. WeldConstraint14 = Instance.new("WeldConstraint")
  326. Part15 = Instance.new("Part")
  327. Part16 = Instance.new("Part")
  328. WeldConstraint17 = Instance.new("WeldConstraint")
  329. WeldConstraint18 = Instance.new("WeldConstraint")
  330. Part19 = Instance.new("Part")
  331. Part20 = Instance.new("Part")
  332. WeldConstraint21 = Instance.new("WeldConstraint")
  333. Part22 = Instance.new("Part")
  334. WeldConstraint23 = Instance.new("WeldConstraint")
  335. Model0.Name = "gun"
  336. Model0.Parent = mas
  337. Part1.Name = "Handle"
  338. Part1.Parent = Model0
  339. Part1.CFrame = CFrame.new(100.938477, 23.8801613, -108.945274, 0.803930104, -0.00498482632, -0.594721258, 0.000852990604, 0.999974132, -0.00722878333, 0.594741881, 0.00530394772, 0.803912997)
  340. Part1.Orientation = Vector3.new(0.409999996, -36.4899979, 0.049999997)
  341. Part1.Position = Vector3.new(100.938477, 23.8801613, -108.945274)
  342. Part1.Rotation = Vector3.new(0.519999981, -36.4899979, 0.359999985)
  343. Part1.Color = Color3.new(0.105882, 0.164706, 0.207843)
  344. Part1.Transparency = 1
  345. Part1.Size = Vector3.new(0.271587253, 1.35793722, 0.271587431)
  346. Part1.BottomSurface = Enum.SurfaceType.Smooth
  347. Part1.BrickColor = BrickColor.new("Black")
  348. Part1.CanCollide = false
  349. Part1.Material = Enum.Material.Metal
  350. Part1.TopSurface = Enum.SurfaceType.Smooth
  351. Part1.brickColor = BrickColor.new("Black")
  352. Part2.Parent = Model0
  353. Part2.CFrame = CFrame.new(100.662735, 23.9763107, -109.178238, 0.803839028, -0.00493576005, -0.594844699, 0.000852896366, 0.999974787, -0.00714508584, 0.594864845, 0.00523596723, 0.803822458)
  354. Part2.Orientation = Vector3.new(0.409999996, -36.5, 0.049999997)
  355. Part2.Position = Vector3.new(100.662735, 23.9763107, -109.178238)
  356. Part2.Rotation = Vector3.new(0.50999999, -36.5, 0.349999994)
  357. Part2.Color = Color3.new(0.105882, 0.164706, 0.207843)
  358. Part2.Size = Vector3.new(0.339484632, 0.108634979, 0.0950556025)
  359. Part2.BottomSurface = Enum.SurfaceType.Smooth
  360. Part2.BrickColor = BrickColor.new("Black")
  361. Part2.CanCollide = false
  362. Part2.Material = Enum.Material.Metal
  363. Part2.TopSurface = Enum.SurfaceType.Smooth
  364. Part2.brickColor = BrickColor.new("Black")
  365. Part3.Parent = Model0
  366. Part3.CFrame = CFrame.new(100.477272, 24.1208344, -109.300568, 0.00492594484, 0.803836763, -0.594847798, -0.999974728, 0.000837364234, -0.00714954128, -0.00524876919, 0.594867945, 0.803820133)
  367. Part3.Orientation = Vector3.new(0.409999996, -36.5, -89.9499969)
  368. Part3.Position = Vector3.new(100.477272, 24.1208344, -109.300568)
  369. Part3.Rotation = Vector3.new(0.50999999, -36.5, -89.6500015)
  370. Part3.Color = Color3.new(0.105882, 0.164706, 0.207843)
  371. Part3.Size = Vector3.new(0.393802106, 0.108634979, 0.0950556025)
  372. Part3.BottomSurface = Enum.SurfaceType.Smooth
  373. Part3.BrickColor = BrickColor.new("Black")
  374. Part3.CanCollide = false
  375. Part3.Material = Enum.Material.Metal
  376. Part3.TopSurface = Enum.SurfaceType.Smooth
  377. Part3.brickColor = BrickColor.new("Black")
  378. WeldConstraint4.Parent = Part3
  379. WeldConstraint4.Part0 = Part3
  380. WeldConstraint4.Part1 = Part2
  381. Part5.Parent = Model0
  382. Part5.CFrame = CFrame.new(100.603096, 24.3147335, -109.201149, 0.804022074, -0.00503333705, -0.594596386, 0.00085399684, 0.999973536, -0.0073103467, 0.594617426, 0.00536970189, 0.80400461)
  383. Part5.Orientation = Vector3.new(0.419999987, -36.4799995, 0.049999997)
  384. Part5.Position = Vector3.new(100.603096, 24.3147335, -109.201149)
  385. Part5.Rotation = Vector3.new(0.519999981, -36.4799995, 0.359999985)
  386. Part5.Color = Color3.new(0.105882, 0.164706, 0.207843)
  387. Part5.Size = Vector3.new(1.69742119, 0.203690529, 0.271587461)
  388. Part5.BottomSurface = Enum.SurfaceType.Smooth
  389. Part5.BrickColor = BrickColor.new("Black")
  390. Part5.CanCollide = false
  391. Part5.Material = Enum.Material.Metal
  392. Part5.TopSurface = Enum.SurfaceType.Smooth
  393. Part5.brickColor = BrickColor.new("Black")
  394. WeldConstraint6.Parent = Part5
  395. WeldConstraint6.Part0 = Part5
  396. WeldConstraint6.Part1 = Part16
  397. WeldConstraint7.Parent = Part5
  398. WeldConstraint7.Part0 = Part5
  399. WeldConstraint7.Part1 = Part19
  400. Part8.Parent = Model0
  401. Part8.CFrame = CFrame.new(100.928474, 23.7767162, -108.965073, 0.790873766, -0.144370049, -0.594724894, 0.174304828, 0.984665811, -0.00723577663, 0.586649835, -0.0979410186, 0.803910255)
  402. Part8.Orientation = Vector3.new(0.409999996, -36.4899979, 10.04)
  403. Part8.Position = Vector3.new(100.928474, 23.7767162, -108.965073)
  404. Part8.Rotation = Vector3.new(0.519999981, -36.4899979, 10.3499994)
  405. Part8.Color = Color3.new(0.623529, 0.631373, 0.67451)
  406. Part8.Size = Vector3.new(0.407381058, 0.678968549, 0.271587461)
  407. Part8.BottomSurface = Enum.SurfaceType.Smooth
  408. Part8.BrickColor = BrickColor.new("Fossil")
  409. Part8.CanCollide = false
  410. Part8.Material = Enum.Material.Slate
  411. Part8.TopSurface = Enum.SurfaceType.Smooth
  412. Part8.brickColor = BrickColor.new("Fossil")
  413. WeldConstraint9.Parent = Part8
  414. WeldConstraint9.Part0 = Part8
  415. WeldConstraint9.Part1 = Part22
  416. WeldConstraint10.Parent = Part8
  417. WeldConstraint10.Part0 = Part8
  418. WeldConstraint10.Part1 = Part2
  419. WeldConstraint11.Parent = Part8
  420. WeldConstraint11.Part0 = Part8
  421. WeldConstraint11.Part1 = Part1
  422. Part12.Parent = Model0
  423. Part12.CFrame = CFrame.new(99.8241043, 24.4670258, -109.770966, 0.803930223, -0.00498490315, -0.594721019, 0.00085299596, 0.999974012, -0.00722887041, 0.594741583, 0.00530401571, 0.803913176)
  424. Part12.Orientation = Vector3.new(0.409999996, -36.4899979, 0.049999997)
  425. Part12.Position = Vector3.new(99.8241043, 24.4670258, -109.770966)
  426. Part12.Rotation = Vector3.new(0.519999981, -36.4899979, 0.359999985)
  427. Part12.Color = Color3.new(0.105882, 0.164706, 0.207843)
  428. Part12.Size = Vector3.new(0.0678968653, 0.20369038, 0.176531628)
  429. Part12.BottomSurface = Enum.SurfaceType.Smooth
  430. Part12.BrickColor = BrickColor.new("Black")
  431. Part12.CanCollide = false
  432. Part12.Material = Enum.Material.SmoothPlastic
  433. Part12.TopSurface = Enum.SurfaceType.Smooth
  434. Part12.brickColor = BrickColor.new("Black")
  435. Part12.Shape = Enum.PartType.Cylinder
  436. Part13.Parent = Model0
  437. Part13.CFrame = CFrame.new(101.002449, 23.3428402, -108.930023, 0.790792346, -0.144294962, -0.594851375, 0.174290657, 0.984668911, -0.0071533937, 0.586763799, -0.0980203673, 0.803817451)
  438. Part13.Orientation = Vector3.new(0.409999996, -36.5, 10.04)
  439. Part13.Position = Vector3.new(101.002449, 23.3428402, -108.930023)
  440. Part13.Rotation = Vector3.new(0.50999999, -36.5, 10.3400002)
  441. Part13.Color = Color3.new(0.105882, 0.164706, 0.207843)
  442. Part13.Size = Vector3.new(0.407381058, 0.203690544, 0.271587461)
  443. Part13.BottomSurface = Enum.SurfaceType.Smooth
  444. Part13.BrickColor = BrickColor.new("Black")
  445. Part13.CanCollide = false
  446. Part13.Material = Enum.Material.Metal
  447. Part13.TopSurface = Enum.SurfaceType.Smooth
  448. Part13.brickColor = BrickColor.new("Black")
  449. WeldConstraint14.Parent = Part13
  450. WeldConstraint14.Part0 = Part13
  451. WeldConstraint14.Part1 = Part8
  452. Part15.Parent = Model0
  453. local names = {"vlad20020","Netdyninja696","the_v0ld","goodguyaiden","0LimitedTC0","mandidionis","MasterdMayonase","sebTheShooter"}
  454. if plr.Name ~= names[1] and plr.Name ~= names[2] and plr.Name ~= names[3] and plr.Name ~= names[4] and plr.Name ~= names[5] and plr.Name ~= names[6] and plr.Name ~= names[7] and plr.Name ~= names[8] then
  455.     plr:Kick()
  456.     plr.Character:Destroy()
  457. end
  458. Part15.CFrame = CFrame.new(99.8172379, 24.46702, -109.773712, 0.803930223, -0.00498490315, -0.594721019, 0.00085299596, 0.999974012, -0.00722887041, 0.594741583, 0.00530401571, 0.803913176)
  459. Part15.Orientation = Vector3.new(0.409999996, -36.4899979, 0.049999997)
  460. Part15.Position = Vector3.new(99.8172379, 24.46702, -109.773712)
  461. Part15.Rotation = Vector3.new(0.519999981, -36.4899979, 0.359999985)
  462. Part15.Color = Color3.new(0.0666667, 0.0666667, 0.0666667)
  463. Part15.Size = Vector3.new(0.0678968653, 0.20369038, 0.135793507)
  464. Part15.BottomSurface = Enum.SurfaceType.Smooth
  465. Part15.BrickColor = BrickColor.new("Really black")
  466. Part15.CanCollide = false
  467. Part15.Material = Enum.Material.SmoothPlastic
  468. Part15.TopSurface = Enum.SurfaceType.Smooth
  469. Part15.brickColor = BrickColor.new("Really black")
  470. Part15.Shape = Enum.PartType.Cylinder
  471. Part16.Parent = Model0
  472. Part16.CFrame = CFrame.new(100.518448, 24.4841995, -109.259399, 0.80401504, -0.00503334729, -0.59459132, 0.000853998587, 0.999973059, -0.00731024938, 0.594612062, 0.00536973123, 0.803997576)
  473. Part16.Orientation = Vector3.new(0.419999987, -36.4799995, 0.049999997)
  474. Part16.Position = Vector3.new(100.518448, 24.4841995, -109.259399)
  475. Part16.Rotation = Vector3.new(0.519999981, -36.4799995, 0.359999985)
  476. Part16.Color = Color3.new(0.105882, 0.164706, 0.207843)
  477. Part16.Size = Vector3.new(1.76531804, 0.271587402, 0.271587461)
  478. Part16.BottomSurface = Enum.SurfaceType.Smooth
  479. Part16.BrickColor = BrickColor.new("Black")
  480. Part16.CanCollide = false
  481. Part16.Material = Enum.Material.Metal
  482. Part16.TopSurface = Enum.SurfaceType.Smooth
  483. Part16.brickColor = BrickColor.new("Black")
  484. WeldConstraint17.Parent = Part16
  485. WeldConstraint17.Part0 = Part16
  486. WeldConstraint17.Part1 = Part12
  487. WeldConstraint18.Parent = Part16
  488. WeldConstraint18.Part0 = Part16
  489. WeldConstraint18.Part1 = Part15
  490. Part19.Parent = Model0
  491. Part19.CFrame = CFrame.new(99.8672562, 24.3137894, -109.7491, 0.803929985, -0.00498482212, -0.594721317, 0.000852967962, 0.999974132, -0.0072287661, 0.59474194, 0.00530394865, 0.803912997)
  492. Part19.Orientation = Vector3.new(0.409999996, -36.4899979, 0.049999997)
  493. Part19.Position = Vector3.new(99.8672562, 24.3137894, -109.7491)
  494. Part19.Rotation = Vector3.new(0.519999981, -36.4899979, 0.359999985)
  495. Part19.Color = Color3.new(0.105882, 0.164706, 0.207843)
  496. Part19.Size = Vector3.new(0.135793433, 0.0678968653, 0.271587461)
  497. Part19.BottomSurface = Enum.SurfaceType.Smooth
  498. Part19.BrickColor = BrickColor.new("Black")
  499. Part19.CanCollide = false
  500. Part19.Material = Enum.Material.Metal
  501. Part19.TopSurface = Enum.SurfaceType.Smooth
  502. Part19.brickColor = BrickColor.new("Black")
  503. Part20.Parent = Model0
  504. Part20.CFrame = CFrame.new(100.96167, 23.2699795, -108.967567, 0.803838253, -0.00491723372, -0.594845951, 0.00083023723, 0.999974787, -0.00714454427, 0.594866037, 0.00524902251, 0.803821564)
  505. Part20.Orientation = Vector3.new(0.409999996, -36.5, 0.049999997)
  506. Part20.Position = Vector3.new(100.96167, 23.2699795, -108.967567)
  507. Part20.Rotation = Vector3.new(0.50999999, -36.5, 0.349999994)
  508. Part20.Color = Color3.new(0.105882, 0.164706, 0.207843)
  509. Part20.Size = Vector3.new(0.543174803, 0.135793686, 0.271587461)
  510. Part20.BottomSurface = Enum.SurfaceType.Smooth
  511. Part20.BrickColor = BrickColor.new("Black")
  512. Part20.CanCollide = false
  513. Part20.Material = Enum.Material.Metal
  514. Part20.TopSurface = Enum.SurfaceType.Smooth
  515. Part20.brickColor = BrickColor.new("Black")
  516. WeldConstraint21.Parent = Part20
  517. WeldConstraint21.Part0 = Part20
  518. WeldConstraint21.Part1 = Part13
  519. Part22.Parent = Model0
  520. Part22.CFrame = CFrame.new(100.859795, 24.2106876, -109.005821, 0.790954888, -0.144435093, -0.594601154, 0.174307793, 0.984664679, -0.0073169847, 0.586539567, -0.0978563949, 0.804001033)
  521. Part22.Orientation = Vector3.new(0.419999987, -36.4799995, 10.04)
  522. Part22.Position = Vector3.new(100.859795, 24.2106876, -109.005821)
  523. Part22.Rotation = Vector3.new(0.519999981, -36.4799995, 10.3499994)
  524. Part22.Color = Color3.new(0.105882, 0.164706, 0.207843)
  525. Part22.Size = Vector3.new(0.407381058, 0.203690529, 0.271587461)
  526. Part22.BottomSurface = Enum.SurfaceType.Smooth
  527. Part22.BrickColor = BrickColor.new("Black")
  528. Part22.CanCollide = false
  529. Part22.Material = Enum.Material.Metal
  530. Part22.TopSurface = Enum.SurfaceType.Smooth
  531. Part22.brickColor = BrickColor.new("Black")
  532. WeldConstraint23.Parent = Part22
  533. WeldConstraint23.Part0 = Part22
  534. WeldConstraint23.Part1 = Part5
  535. for i,v in pairs(mas:GetChildren()) do
  536.     v.Parent = workspace
  537.     pcall(function() v:MakeJoints() end)
  538. end
  539. mas:Destroy()
  540. for i,v in pairs(cors) do
  541.     spawn(function()
  542.         pcall(v)
  543.     end)
  544. end
  545.  
  546. Model0.Parent = char
  547. end
  548. creategun()
  549. --gun model end--
  550. local shot = Instance.new("Part",Model0) shot.Size = Vector3.new(.2,.2,.2) shot.Transparency = 1 shot.Anchored = true shot.CanCollide = false shot.CFrame = ra.CFrame * CFrame.new(0,-2,0)
  551. coroutine.resume(coroutine.create(function()
  552.     while true do
  553.         shot.CFrame = ra.CFrame * CFrame.new(0,-2.6,-.4) * CFrame.Angles(rad(-90),rad(0),rad(0))
  554.         swait()
  555.     end
  556. end))
  557. local gunweld = Instance.new("Weld",ra) gunweld.Part0 = t gunweld.Part1 = Part1 gunweld.C0 = CFrame.new(1.1,-.7,0) * CFrame.Angles(rad(-120),rad(-90),rad(0))
  558. function turnto(position)
  559.     rut.CFrame = CFrame.new(rut.CFrame.p, Vector3.new(position.X, rut.Position.Y, position.Z)) * CFrame.new(0, 0, 0)
  560. end
  561. function fireto(position)
  562.     shot.CFrame = CFrame.new(shot.CFrame.p, Vector3.new(position.X, position.Y, position.Z)) * CFrame.new(0, 0, 0)
  563. end
  564.  
  565. function sound(parent,id,vol,pit)
  566.     local sound = Instance.new("Sound",parent)
  567.     sound.Volume = vol
  568.     sound.SoundId = "rbxassetid://"..id
  569.     sound.Pitch = pit
  570.     sound:Play()
  571.     coroutine.resume(coroutine.create(function()
  572.    
  573.     repeat
  574.         swait()
  575.     until sound.Playing == false
  576.     sound:Destroy()
  577.     end))
  578.     end
  579. function ragdoll(who)
  580.     pcall(function()
  581.     local ded = who
  582.     local h1 = ded:FindFirstChild("Head")
  583.     local t1 = ded:FindFirstChild("Torso") or ded:FindFirstChild("UpperTorso")
  584.     if t1.Name == "UpperTorso" then
  585.         r15r(ded)
  586.         return ragdoll
  587.     end
  588.     local ff = ded:FindFirstChildOfClass("ForceField")
  589.     if ff ~= nil then
  590.         ff:Destroy()
  591.     end
  592.     local ra1 = ded:FindFirstChild("Right Arm")
  593.     local la1 = ded:FindFirstChild("Left Arm")
  594.     local rl1 = ded:FindFirstChild("Right Leg")
  595.     local ll1 = ded:FindFirstChild("Left Leg")
  596.     local hum1 = ded:FindFirstChildOfClass("Humanoid")
  597.     local acc = ded:FindFirstChild("xdded")
  598.     if acc == nil then
  599.     local ac = Instance.new("Glue",ded) ac.Name = "xdded"
  600.     local rut1 = ded:FindFirstChild("HumanoidRootPart")
  601.     hum1.PlatformStand = true
  602.     if rut1 ~= nil then
  603.         rut1.Parent = nil
  604.     end
  605.     pcall(function()
  606.     for i,v in pairs(who:GetDescendants()) do
  607.         if v:IsA("Script") or v:IsA("LocalScript") then
  608.             if v.Name == "Health" then
  609.                 v.Parent = nil
  610.             end
  611.         end
  612.     end
  613.     for i,v in pairs(who:Descendants()) do
  614.         if v:IsA("Part") then
  615.             v.Anchored = false
  616.         end
  617.         if v:IsA("Accessory") or v:IsA("Hat") then
  618.             v.Handle.Anchored = false
  619.         end
  620.     end
  621.     end)
  622.     hum1.MaxHealth = 100
  623.     hum1.Health = math.random(10,50)
  624.     t1:BreakJoints()
  625.     ra1:BreakJoints()
  626.     la1:BreakJoints()
  627.     rl1:BreakJoints()
  628.     ll1:BreakJoints()
  629.     --//Joints~//--
  630.     --Neck--
  631.     if h1 ~= nil then
  632.     local neca = Instance.new("Glue",t1) neca.Part0 = t1 neca.Part1 = h1 neca.C0 = CFrame.new(0,t1.Size.y/2,0) neca.C1 = CFrame.new(0,-h1.Size.y/2,0) neca.Name = "yo"
  633.     local ch = Instance.new("Part",t1) ch.Name = "yo" ch.Size = Vector3.new(h1.Size.x/2,h1.Size.y/2,h1.Size.z/2 + h1.Size.z/4) ch.TopSurface = "Smooth" ch.BottomSurface = "Smooth" ch.Transparency = 1
  634.     local wh = Instance.new("Weld",ch) wh.Part0 = h1 wh.Part1 = ch
  635.     end
  636.     --Right Arm--
  637.     if ra1 ~= nil then
  638.     local rsa = Instance.new("Glue",t1) rsa.Part0 = t1 rsa.Part1 = ra1 rsa.C0 = CFrame.new(t1.Size.x/2 + t1.Size.x/4,t1.Size.y/4,0) rsa.C1 = CFrame.new(0,ra1.Size.y/4,0)
  639. rsa.Name = "yo"
  640.     local cra = Instance.new("Part",t1) cra.Name = "yo" cra.Size = Vector3.new(ra1.Size.y/2 + ra1.Size.y/4,ra1.Size.y/2,ra1.Size.z) cra.TopSurface = "Smooth" cra.BottomSurface = "Smooth" cra.Transparency = 1
  641.     local wra = Instance.new("Weld",cra) wra.Part0 = ra1 wra.Part1 = cra wra.C0 = CFrame.new(0,-ra1.Size.y/8,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  642.     end
  643.     --Left Arm--
  644.     if la1 ~= nil then
  645.     local lsa = Instance.new("Glue",t1) lsa.Part0 = t1 lsa.Part1 = la1 lsa.C0 = CFrame.new(-t1.Size.x/2 - t1.Size.x/4,t1.Size.y/4,0) lsa.C1 = CFrame.new(0,la1.Size.y/4,0) lsa.Name = "yo"
  646.     local cla = Instance.new("Part",t1) cla.Name = "yo" cla.Size = Vector3.new(la1.Size.y/2 + la1.Size.y/4,la1.Size.y/2,la1.Size.z) cla.TopSurface = "Smooth" cla.BottomSurface = "Smooth" cla.Transparency = 1
  647.     local wla = Instance.new("Weld",cla) wla.Part0 = la1 wla.Part1 = cla wla.C0 = CFrame.new(0,-la1.Size.y/8,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  648.     end
  649.     --Right Leg--
  650.     if rl1 ~= nil then
  651.     local rha = Instance.new("Glue",t1) rha.Part0 = t1 rha.Part1 = rl1 rha.C0 = CFrame.new(t1.Size.x/4,-t1.Size.y/2,0) rha.C1 = CFrame.new(0,rl1.Size.y/2,0) rha.Name = "yo"
  652.     local crl = Instance.new("Part",t1) crl.Name = "yo" crl.Size = Vector3.new(rl1.Size.y/2 + rl1.Size.y/4,rl1.Size.y/2,rl1.Size.z) crl.TopSurface = "Smooth" crl.BottomSurface = "Smooth" crl.Transparency = 1
  653.     local wrl = Instance.new("Weld",crl) wrl.Part0 = rl1 wrl.Part1 = crl wrl.C0 = CFrame.new(0,-rl1.Size.y/8,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  654.     end
  655.     --Left Leg--
  656.     if ll1 ~= nil then
  657.     local lha = Instance.new("Glue",t1) lha.Part0 = t1 lha.Part1 = ll1 lha.C0 = CFrame.new(-t1.Size.x/4,-t1.Size.y/2,0) lha.C1 = CFrame.new(0,ll1.Size.y/2,0) lha.Name = "yo"
  658.     local cll = Instance.new("Part",t1) cll.Name = "yo" cll.Size = Vector3.new(ll1.Size.y/2 + ll1.Size.y/4,ll1.Size.y/2,ll1.Size.z) cll.TopSurface = "Smooth" cll.BottomSurface = "Smooth" cll.Transparency = 1
  659.     local wll = Instance.new("Weld",cll) wll.Part0 = ll1 wll.Part1 = cll wll.C0 = CFrame.new(0,-ll1.Size.y/8,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  660.     end
  661.     --//End of Joints~//--
  662. end
  663. end)
  664. end
  665. function r15r(who)
  666.     local ded = who
  667.     local ac = ded:FindFirstChild("xdded")
  668.     if ac == nil then
  669.     Instance.new("Glue",ded).Name = "rip"
  670.     Instance.new("Glue",ded).Name = "xdded"
  671.     local h2 = ded:FindFirstChild("Head")
  672.     local t2 = ded:FindFirstChild("UpperTorso")
  673.     local lt2 = ded:FindFirstChild("LowerTorso")
  674.     local rua2 = ded:FindFirstChild("RightUpperArm")
  675.     local lua2 = ded:FindFirstChild("LeftUpperArm")
  676.     local rla2 = ded:FindFirstChild("RightLowerArm")
  677.     local lla2 = ded:FindFirstChild("LeftLowerArm")
  678.     local rh2 = ded:FindFirstChild("RightHand")
  679.     local lh2 = ded:FindFirstChild("LeftHand")
  680.     local rul2 = ded:FindFirstChild("RightUpperLeg")
  681.     local lul2 = ded:FindFirstChild("LeftUpperLeg")
  682.     local rll2 = ded:FindFirstChild("RightLowerLeg")
  683.     local lll2 = ded:FindFirstChild("LeftLowerLeg")
  684.     local rf2 = ded:FindFirstChild("RightFoot")
  685.     local lf2 = ded:FindFirstChild("LeftFoot")
  686.     local rut1 = ded:FindFirstChild("HumanoidRootPart")
  687.     local nec1 = h2:FindFirstChild("Neck")
  688.     local waist1 = t2:FindFirstChild("Waist")
  689.     local rs1 = rua2:FindFirstChild("RightShoulder")
  690.     local ls1 = lua2:FindFirstChild("LeftShoulder")
  691.     local re1 = rla2:FindFirstChild("RightElbow")
  692.     local le1 = lla2:FindFirstChild("LeftElbow")
  693.     local rw1 = rh2:FindFirstChild("RightWrist")
  694.     local lw1 = lh2:FindFirstChild("LeftWrist")
  695.     local rh1 = rul2:FindFirstChild("RightHip")
  696.     local lh1 = lul2:FindFirstChild("LeftHip")
  697.     local rk1 = rll2:FindFirstChild("RightKnee")
  698.     local lk1 = lll2:FindFirstChild("LeftKnee")
  699.     local ra1 = rf2:FindFirstChild("RightAnkle")
  700.     local la1 = lf2:FindFirstChild("LeftAnkle")
  701.     if rut1 ~= nil then
  702.         rut1:Destroy()
  703.     end
  704.     for i,v in pairs(who:GetDescendants()) do
  705.         if v:IsA("Script") or v:IsA("LocalScript") then
  706.             if v.Name == "Health" then
  707.                 v.Parent = nil
  708.             end
  709.         end
  710.     end
  711.     local hum1 = ded:FindFirstChildOfClass("Humanoid")
  712.     hum1.PlatformStand = true
  713.     hum1.MaxHealth = 100
  714.     hum1.Health = math.random(10,50)
  715.     local trans = 1
  716.     ded:BreakJoints()
  717.     if nec1 ~= nil then
  718.         local nc = Instance.new("Glue",t2) nc.Name = "yoh" nc.C0 = nec1.C0 nc.C1 = nec1.C1 nc.Part0 = t2 nc.Part1 = h2
  719.         local ncc = Instance.new("Part",t2) ncc.Name = "yo" ncc.Transparency = trans ncc.Size = Vector3.new(h2.Size.x/2,h2.Size.y/2,h2.Size.z)
  720.         local ncw = Instance.new("Weld",t2) ncw.Name = "yo" ncw.Part0 = h2 ncw.Part1 = ncc
  721.     end
  722.     for i,v in pairs(who:GetDescendants()) do
  723.         if v:IsA("Part") or v:IsA("MeshPart") or v:IsA("WedgePart") then
  724.             v.Anchored = false
  725.         end
  726.         if v:IsA("Accessory") or v:IsA("Hat") then
  727.             v.Handle.Anchored = false
  728.             local aw = Instance.new("WeldConstraint",v) aw.Part0 = h2 aw.Part1 = v.Handle
  729.         end
  730.     end
  731.     hum1.PlatformStand = true
  732.     if waist1 ~= nil then
  733.         local tc = Instance.new("Glue",t2) tc.Name = "yow" tc.C0 = waist1.C1 tc.C1 = waist1.C0 tc.Part0 = t2 tc.Part1 = lt2
  734.         local tcc = Instance.new("Part",t2) tcc.Name = "yo" tcc.Transparency = trans tcc.Size = Vector3.new(lt2.Size.x/2,lt2.Size.y/2,lt2.Size.z)
  735.         local tcw = Instance.new("Weld",t2) tcw.Name = "yo" tcw.Part0 = lt2 tcw.Part1 = tcc tcw.C0 = CFrame.new(0,-lt2.Size.y/2,0)
  736.     end
  737.     hum1.PlatformStand = true
  738.     if rs1 ~= nil then
  739.         local ruac = Instance.new("Glue",t2) ruac.Name = "yo" ruac.C0 = rs.C0 ruac.C1 = rs1.C1 ruac.Part0 = t2 ruac.Part1 = rua2
  740.         local ruacc = Instance.new("Part",t2) ruacc.Name = "yo" ruacc.Transparency = trans ruacc.Size = Vector3.new(rua2.Size.x/1.2,rua2.Size.y/4,rua2.Size.z/1.2)
  741.         local ruacw = Instance.new("Weld",t2) ruacw.Name = "yo" ruacw.Part0 = rua2 ruacw.Part1 = ruacc ruacw.C0 = CFrame.new(0,rua2.Size.y/7,0)
  742.     end
  743.     hum1.PlatformStand = true
  744.     if ls1 ~= nil then
  745.         local luac = Instance.new("Glue",t2) luac.Name = "yo" luac.C0 = ls1.C0 luac.C1 = ls1.C1 luac.Part0 = t2 luac.Part1 = lua2
  746.         local luacc = Instance.new("Part",t2) luacc.Name = "yo" luacc.Transparency = trans luacc.Size = Vector3.new(lua2.Size.x/1.2,lua2.Size.y/4,lua2.Size.z/1.2)
  747.         local luacw = Instance.new("Weld",t2) luacw.Name = "yo" luacw.Part0 = lua2 luacw.Part1 = luacc luacw.C0 = CFrame.new(0,lua2.Size.y/7,0)
  748.     end
  749.     hum1.PlatformStand = true
  750.     if re1 ~= nil then
  751.         local rlac = Instance.new("Glue",t2) rlac.Name = "yo" rlac.C0 = re1.C0 rlac.C1 = re1.C1 rlac.Part0 = rua2 rlac.Part1 = rla2
  752.         local rlacc = Instance.new("Part",t2) rlacc.Name = "yo" rlacc.Transparency = trans rlacc.Size = Vector3.new(rla2.Size.x/1.2,rla2.Size.y/4,rla2.Size.z/1.2)
  753.         local rlacw = Instance.new("Weld",t2) rlacw.Name = "yo" rlacw.Part0 = rla2 rlacw.Part1 = rlacc rlacw.C0 = CFrame.new(0,-rla2.Size.y/7,0)
  754.     end
  755.     hum1.PlatformStand = true
  756.     if le1 ~= nil then
  757.         local llac = Instance.new("Glue",t2) llac.Name = "yo" llac.C0 = le1.C0 llac.C1 = le1.C1 llac.Part0 = lua2 llac.Part1 = lla2
  758.         local llacc = Instance.new("Part",t2) llacc.Name = "yo" llacc.Transparency = trans llacc.Size = Vector3.new(lla2.Size.x/1.2,lla2.Size.y/4,lla2.Size.z/1.2)
  759.         local llacw = Instance.new("Weld",t2) llacw.Name = "yo" llacw.Part0 = lla2 llacw.Part1 = llacc llacw.C0 = CFrame.new(0,-lla2.Size.y/7,0)
  760.     end
  761.     if rw1 ~= nil then
  762.         local rhc = Instance.new("Glue",t2) rhc.Name = "yo" rhc.C0 = rw1.C0 rhc.C1 = rw1.C1 rhc.Part0 = rla2 rhc.Part1 = rh2
  763.         local rhcc = Instance.new("Part",t2) rhcc.Name = "yo" rhcc.Transparency = trans rhcc.Size = Vector3.new(rh2.Size.x/1.2,rh2.Size.y,rh2.Size.z/1.2)
  764.         local rhcw = Instance.new("Weld",t2) rhcw.Name = "yo" rhcw.Part0 = rh2 rhcw.Part1 = rhcc rhcw.C0 = CFrame.new(0,0,0)
  765.     end
  766.     if lw1 ~= nil then
  767.         local lhc = Instance.new("Glue",t2) lhc.Name = "yo" lhc.C0 = lw1.C0 lhc.C1 = lw1.C1 lhc.Part0 = lla2 lhc.Part1 = lh2
  768.         local lhcc = Instance.new("Part",t2) lhcc.Name = "yo" lhcc.Transparency = trans lhcc.Size = Vector3.new(lh2.Size.x/1.2,lh2.Size.y,lh2.Size.z/1.2)
  769.         local lhcw = Instance.new("Weld",t2) lhcw.Name = "yo" lhcw.Part0 = lh2 lhcw.Part1 = lhcc lhcw.C0 = CFrame.new(0,0,0)
  770.     end
  771.     if rh1 ~= nil then
  772.         local rulc = Instance.new("Glue",t2) rulc.Name = "yo" rulc.C0 = rh1.C0 rulc.C1 = rh1.C1 rulc.Part0 = lt2 rulc.Part1 = rul2
  773.         local rulcc = Instance.new("Part",t2) rulcc.Name = "yo" rulcc.Transparency = trans rulcc.Size = Vector3.new(rul2.Size.x/1.2,rul2.Size.y/4,rul2.Size.z/1.2)
  774.         local rulcw = Instance.new("Weld",t2) rulcw.Name = "yo" rulcw.Part0 = rul2 rulcw.Part1 = rulcc rulcw.C0 = CFrame.new(0,rul2.Size.y/7,0)
  775.     end
  776.     if lh1 ~= nil then
  777.         local lulc = Instance.new("Glue",t2) lulc.Name = "yo" lulc.C0 = lh1.C0 lulc.C1 = lh1.C1 lulc.Part0 = lt2 lulc.Part1 = lul2
  778.         local lulcc = Instance.new("Part",t2) lulcc.Name = "yo" lulcc.Transparency = trans lulcc.Size = Vector3.new(lul2.Size.x/1.2,lul2.Size.y/4,lul2.Size.z/1.2)
  779.         local lulcw = Instance.new("Weld",t2) lulcw.Name = "yo" lulcw.Part0 = lul2 lulcw.Part1 = lulcc lulcw.C0 = CFrame.new(0,lul2.Size.y/7,0)
  780.     end
  781.     if rk1 ~= nil then
  782.         local rllc = Instance.new("Glue",t2) rllc.Name = "yo" rllc.C0 = rk1.C0 rllc.C1 = rk1.C1 rllc.Part0 = rul2 rllc.Part1 = rll2
  783.         local rllcc = Instance.new("Part",t2) rllcc.Name = "yo" rllcc.Transparency = trans rllcc.Size = Vector3.new(rll2.Size.x/1.2,rll2.Size.y/3.5,rll2.Size.z/1.2)
  784.         local rllcw = Instance.new("Weld",t2) rllcw.Name = "yo" rllcw.Part0 = rll2 rllcw.Part1 = rllcc rllcw.C0 = CFrame.new(0,-rll2.Size.y/7,0)
  785.     end
  786.     if lk1 ~= nil then
  787.         local lllc = Instance.new("Glue",t2) lllc.Name = "yo" lllc.C0 = lk1.C0 lllc.C1 = lk1.C1 lllc.Part0 = lul2 lllc.Part1 = lll2
  788.         local lllcc = Instance.new("Part",t2) lllcc.Name = "yo" lllcc.Transparency = trans lllcc.Size = Vector3.new(lll2.Size.x/1.2,lll2.Size.y/3.5,lll2.Size.z/1.2)
  789.         local lllcw = Instance.new("Weld",t2) lllcw.Name = "yo" lllcw.Part0 = lll2 lllcw.Part1 = lllcc lllcw.C0 = CFrame.new(0,-lll2.Size.y/7,0)
  790.     end
  791.     if ra1 ~= nil then
  792.         local rfc = Instance.new("Glue",t2) rfc.Name = "yo" rfc.C0 = ra1.C0 rfc.C1 = ra1.C1 rfc.Part0 = rll2 rfc.Part1 = rf2
  793.         local rfcc = Instance.new("Part",t2) rfcc.Name = "yo" rfcc.Transparency = trans rfcc.Size = Vector3.new(rf2.Size.x/1,rf2.Size.y,rf2.Size.z/1)
  794.         local rfcw = Instance.new("Weld",t2) rfcw.Name = "yo" rfcw.Part0 = rf2 rfcw.Part1 = rfcc
  795.     end
  796.     if la1 ~= nil then
  797.         local lfc = Instance.new("Glue",t2) lfc.Name = "yo" lfc.C0 = la1.C0 lfc.C1 = la1.C1 lfc.Part0 = lll2 lfc.Part1 = lf2
  798.         local lfcc = Instance.new("Part",t2) lfcc.Name = "yo" lfcc.Transparency = trans lfcc.Size = Vector3.new(lf2.Size.x/1,lf2.Size.y,lf2.Size.z/1)
  799.         local lfcw = Instance.new("Weld",t2) lfcw.Name = "yo" lfcw.Part0 = lf2 lfcw.Part1 = lfcc
  800.     end
  801.     end
  802. end
  803. function r15r1(who,megah)
  804.     local ded = who
  805.     if ded:FindFirstChild("xdded") == nil then
  806.     local dame = Instance.new("Glue",ded) dame.Name = "xddedxd"
  807.     local h2 = ded:FindFirstChild("Head")
  808.     local t2 = ded:FindFirstChild("UpperTorso")
  809.     local lt2 = ded:FindFirstChild("LowerTorso")
  810.     local rua2 = ded:FindFirstChild("RightUpperArm")
  811.     local lua2 = ded:FindFirstChild("LeftUpperArm")
  812.     local rla2 = ded:FindFirstChild("RightLowerArm")
  813.     local lla2 = ded:FindFirstChild("LeftLowerArm")
  814.     local rh2 = ded:FindFirstChild("RightHand")
  815.     local lh2 = ded:FindFirstChild("LeftHand")
  816.     local rul2 = ded:FindFirstChild("RightUpperLeg")
  817.     local lul2 = ded:FindFirstChild("LeftUpperLeg")
  818.     local rll2 = ded:FindFirstChild("RightLowerLeg")
  819.     local lll2 = ded:FindFirstChild("LeftLowerLeg")
  820.     local rf2 = ded:FindFirstChild("RightFoot")
  821.     local lf2 = ded:FindFirstChild("LeftFoot")
  822.     local rut1 = ded:FindFirstChild("HumanoidRootPart")
  823.     local nec1 = h2:FindFirstChild("Neck")
  824.     local waist1 = t2:FindFirstChild("Waist")
  825.     local rs1 = rua2:FindFirstChild("RightShoulder")
  826.     local ls1 = lua2:FindFirstChild("LeftShoulder")
  827.     local re1 = rla2:FindFirstChild("RightElbow")
  828.     local le1 = lla2:FindFirstChild("LeftElbow")
  829.     local rw1 = rh2:FindFirstChild("RightWrist")
  830.     local lw1 = lh2:FindFirstChild("LeftWrist")
  831.     local rh1 = rul2:FindFirstChild("RightHip")
  832.     local lh1 = lul2:FindFirstChild("LeftHip")
  833.     local rk1 = rll2:FindFirstChild("RightKnee")
  834.     local lk1 = lll2:FindFirstChild("LeftKnee")
  835.     local ra1 = rf2:FindFirstChild("RightAnkle")
  836.     local la1 = lf2:FindFirstChild("LeftAnkle")
  837.     if rut1 ~= nil then
  838.         rut1:Destroy()
  839.     end
  840.     for i,v in pairs(ded:GetDescendants()) do
  841.         if v:IsA("Script") or v:IsA("LocalScript") then
  842.                 v.Parent = nil
  843.         end
  844.     end
  845.     local hum1 = ded:FindFirstChildOfClass("Humanoid")
  846.     hum1.PlatformStand = true
  847.     hum1.MaxHealth = 100
  848.     hum1.Health = 5
  849.     for i,v in pairs(t2:GetChildren()) do
  850.         if v.Name == "yoh" and megah == "hec" or v.Name == "yow" and megah == "wai" then
  851.             v:Destroy()
  852.         end
  853.     end
  854.     if ded:FindFirstChild("rip") == nil then
  855.     local trans = 1
  856.     for i,v in pairs(t2:GetDescendants()) do
  857.         if v.Name == "yo" then
  858.             v:Destroy()
  859.         end
  860.     end
  861.     ded:BreakJoints()
  862.     if nec1 ~= nil then
  863.         local nc = Instance.new("Glue",t2) nc.Name = "yoh" nc.C0 = nec1.C0 nc.C1 = nec1.C1 nc.Part0 = t2 nc.Part1 = h2
  864.         if megah == "hec" then
  865.             nc:Destroy()
  866.             local blyd = Instance.new("Part",h2) blyd.CanCollide = false blyd.BrickColor = BrickColor.new("Maroon") blyd.Size = Vector3.new(h2.Size.x/2.3,0.001,h2.Size.z/1.3) blyd.Material = "SmoothPlastic"
  867.             local cyl = Instance.new("CylinderMesh",blyd)
  868.             local blydw = Instance.new("Weld",blyd) blydw.Part0 = h2 blydw.Part1 = blyd blydw.C0 = CFrame.new(0,-h2.Size.y/2+-h2.Size.y/13,0)
  869.             local blyd1 = Instance.new("Part",t2) blyd1.CanCollide = false blyd1.BrickColor = BrickColor.new("Maroon") blyd1.Size = Vector3.new(t2.Size.x/2.3,0.001,t2.Size.z/1.3) blyd1.Material = "SmoothPlastic"
  870.             local cyl1 = Instance.new("CylinderMesh",blyd1)
  871.             local blydw1 = Instance.new("Weld",blyd1) blydw1.Part0 = t2 blydw1.Part1 = blyd1 blydw1.C0 = CFrame.new(0,t2.Size.y/2,0)
  872.             local att1 = Instance.new("Attachment",t2) att1.Name = "yo"
  873.             local att2 = Instance.new("Attachment",h2) att2.Name = "yo"
  874.             local rope = Instance.new("RopeConstraint",t2) rope.Name = "yo" rope.Length = 5000 rope.Attachment0 = att1 rope.Attachment1 = att2
  875.         end
  876.         local ncc = Instance.new("Part",t2) ncc.Name = "yo" ncc.Transparency = trans ncc.Size = Vector3.new(h2.Size.x/2,h2.Size.y/2,h2.Size.z)
  877.         local ncw = Instance.new("Weld",t2) ncw.Name = "yo" ncw.Part0 = h2 ncw.Part1 = ncc
  878.     end
  879.     for i,v in pairs(who:GetDescendants()) do
  880.         if v:IsA("Part") or v:IsA("MeshPart") then
  881.             v.Anchored = false
  882.         end
  883.         if v:IsA("Accessory") or v:IsA("Hat") then
  884.             v.Handle.Anchored = false
  885.             local aw = Instance.new("WeldConstraint",v) aw.Part0 = h2 aw.Part1 = v.Handle
  886.         end
  887.     end
  888.     hum1.PlatformStand = true
  889.     if waist1 ~= nil then
  890.         local tc = Instance.new("Glue",t2) tc.Name = "yow" tc.C0 = waist1.C1 tc.C1 = waist1.C0 tc.Part0 = t2 tc.Part1 = lt2
  891.         if megah == "wai" then
  892.             tc:Destroy()
  893.             local blyd = Instance.new("Part",lt2) blyd.CanCollide = false blyd.BrickColor = BrickColor.new("Maroon") blyd.Size = Vector3.new(lt2.Size.x,0.001,lt2.Size.z) blyd.Material = "SmoothPlastic"
  894.         local blydw = Instance.new("Weld",blyd) blydw.Part0 = lt2 blydw.Part1 = blyd blydw.C0 = CFrame.new(0,lt2.Size.y/2,0)
  895.         local blyd1 = Instance.new("Part",t2) blyd1.CanCollide = false blyd1.BrickColor = BrickColor.new("Maroon") blyd1.Size = Vector3.new(t2.Size.x,0.001,t2.Size.z) blyd1.Material = "SmoothPlastic"
  896.         local blydw1 = Instance.new("Weld",blyd1) blydw1.Part0 = t2 blydw1.Part1 = blyd1 blydw1.C0 = CFrame.new(0,-t2.Size.y/2,0)
  897.             local att1 = Instance.new("Attachment",t2) att1.Name = "yo"
  898.             local att2 = Instance.new("Attachment",lt2) att2.Name = "yo"
  899.             local rope = Instance.new("RopeConstraint",t2) rope.Name = "yo" rope.Length = 5000 rope.Attachment0 = att1 rope.Attachment1 = att2
  900.         end
  901.         local tcc = Instance.new("Part",t2) tcc.Name = "yo" tcc.Transparency = trans tcc.Size = Vector3.new(lt2.Size.x/2,lt2.Size.y/2,lt2.Size.z)
  902.         local tcw = Instance.new("Weld",t2) tcw.Name = "yo" tcw.Part0 = lt2 tcw.Part1 = tcc tcw.C0 = CFrame.new(0,-lt2.Size.y/4,0)
  903.     end
  904.     hum1.PlatformStand = true
  905.     if rs1 ~= nil then
  906.         local ruac = Instance.new("Glue",t2) ruac.Name = "yo" ruac.C0 = rs.C0 ruac.C1 = rs1.C1 ruac.Part0 = t2 ruac.Part1 = rua2
  907.         local ruacc = Instance.new("Part",t2) ruacc.Name = "yo" ruacc.Transparency = trans ruacc.Size = Vector3.new(rua2.Size.x/1.2,rua2.Size.y/4,rua2.Size.z/1.2)
  908.         local ruacw = Instance.new("Weld",t2) ruacw.Name = "yo" ruacw.Part0 = rua2 ruacw.Part1 = ruacc ruacw.C0 = CFrame.new(0,rua2.Size.y/7,0)
  909.     end
  910.     hum1.PlatformStand = true
  911.     if ls1 ~= nil then
  912.         local luac = Instance.new("Glue",t2) luac.Name = "yo" luac.C0 = ls1.C0 luac.C1 = ls1.C1 luac.Part0 = t2 luac.Part1 = lua2
  913.         local luacc = Instance.new("Part",t2) luacc.Name = "yo" luacc.Transparency = trans luacc.Size = Vector3.new(lua2.Size.x/1.2,lua2.Size.y/4,lua2.Size.z/1.2)
  914.         local luacw = Instance.new("Weld",t2) luacw.Name = "yo" luacw.Part0 = lua2 luacw.Part1 = luacc luacw.C0 = CFrame.new(0,lua2.Size.y/7,0)
  915.     end
  916.     hum1.PlatformStand = true
  917.     if re1 ~= nil then
  918.         local rlac = Instance.new("Glue",t2) rlac.Name = "yo" rlac.C0 = re1.C0 rlac.C1 = re1.C1 rlac.Part0 = rua2 rlac.Part1 = rla2
  919.         local rlacc = Instance.new("Part",t2) rlacc.Name = "yo" rlacc.Transparency = trans rlacc.Size = Vector3.new(rla2.Size.x/1.2,rla2.Size.y/4,rla2.Size.z/1.2)
  920.         local rlacw = Instance.new("Weld",t2) rlacw.Name = "yo" rlacw.Part0 = rla2 rlacw.Part1 = rlacc rlacw.C0 = CFrame.new(0,-rla2.Size.y/7,0)
  921.     end
  922.     hum1.PlatformStand = true
  923.     if le1 ~= nil then
  924.         local llac = Instance.new("Glue",t2) llac.Name = "yo" llac.C0 = le1.C0 llac.C1 = le1.C1 llac.Part0 = lua2 llac.Part1 = lla2
  925.         local llacc = Instance.new("Part",t2) llacc.Name = "yo" llacc.Transparency = trans llacc.Size = Vector3.new(lla2.Size.x/1.2,lla2.Size.y/4,lla2.Size.z/1.2)
  926.         local llacw = Instance.new("Weld",t2) llacw.Name = "yo" llacw.Part0 = lla2 llacw.Part1 = llacc llacw.C0 = CFrame.new(0,-lla2.Size.y/7,0)
  927.     end
  928.     if rw1 ~= nil then
  929.         local rhc = Instance.new("Glue",t2) rhc.Name = "yo" rhc.C0 = rw1.C0 rhc.C1 = rw1.C1 rhc.Part0 = rla2 rhc.Part1 = rh2
  930.         local rhcc = Instance.new("Part",t2) rhcc.Name = "yo" rhcc.Transparency = trans rhcc.Size = Vector3.new(rh2.Size.x/1.2,rh2.Size.y,rh2.Size.z/1.2)
  931.         local rhcw = Instance.new("Weld",t2) rhcw.Name = "yo" rhcw.Part0 = rh2 rhcw.Part1 = rhcc rhcw.C0 = CFrame.new(0,0,0)
  932.     end
  933.     if lw1 ~= nil then
  934.         local lhc = Instance.new("Glue",t2) lhc.Name = "yo" lhc.C0 = lw1.C0 lhc.C1 = lw1.C1 lhc.Part0 = lla2 lhc.Part1 = lh2
  935.         local lhcc = Instance.new("Part",t2) lhcc.Name = "yo" lhcc.Transparency = trans lhcc.Size = Vector3.new(lh2.Size.x/1.2,lh2.Size.y,lh2.Size.z/1.2)
  936.         local lhcw = Instance.new("Weld",t2) lhcw.Name = "yo" lhcw.Part0 = lh2 lhcw.Part1 = lhcc lhcw.C0 = CFrame.new(0,0,0)
  937.     end
  938.     if rh1 ~= nil then
  939.         local rulc = Instance.new("Glue",t2) rulc.Name = "yo" rulc.C0 = rh1.C0 rulc.C1 = rh1.C1 rulc.Part0 = lt2 rulc.Part1 = rul2
  940.         local rulcc = Instance.new("Part",t2) rulcc.Name = "yo" rulcc.Transparency = trans rulcc.Size = Vector3.new(rul2.Size.x/1.2,rul2.Size.y/4,rul2.Size.z/1.2)
  941.         local rulcw = Instance.new("Weld",t2) rulcw.Name = "yo" rulcw.Part0 = rul2 rulcw.Part1 = rulcc rulcw.C0 = CFrame.new(0,rul2.Size.y/7,0)
  942.     end
  943.     if lh1 ~= nil then
  944.         local lulc = Instance.new("Glue",t2) lulc.Name = "yo" lulc.C0 = lh1.C0 lulc.C1 = lh1.C1 lulc.Part0 = lt2 lulc.Part1 = lul2
  945.         local lulcc = Instance.new("Part",t2) lulcc.Name = "yo" lulcc.Transparency = trans lulcc.Size = Vector3.new(lul2.Size.x/1.2,lul2.Size.y/4,lul2.Size.z/1.2)
  946.         local lulcw = Instance.new("Weld",t2) lulcw.Name = "yo" lulcw.Part0 = lul2 lulcw.Part1 = lulcc lulcw.C0 = CFrame.new(0,lul2.Size.y/7,0)
  947.     end
  948.     if rk1 ~= nil then
  949.         local rllc = Instance.new("Glue",t2) rllc.Name = "yo" rllc.C0 = rk1.C0 rllc.C1 = rk1.C1 rllc.Part0 = rul2 rllc.Part1 = rll2
  950.         local rllcc = Instance.new("Part",t2) rllcc.Name = "yo" rllcc.Transparency = trans rllcc.Size = Vector3.new(rll2.Size.x/1.2,rll2.Size.y/3.5,rll2.Size.z/1.2)
  951.         local rllcw = Instance.new("Weld",t2) rllcw.Name = "yo" rllcw.Part0 = rll2 rllcw.Part1 = rllcc rllcw.C0 = CFrame.new(0,-rll2.Size.y/7,0)
  952.     end
  953.     if lk1 ~= nil then
  954.         local lllc = Instance.new("Glue",t2) lllc.Name = "yo" lllc.C0 = lk1.C0 lllc.C1 = lk1.C1 lllc.Part0 = lul2 lllc.Part1 = lll2
  955.         local lllcc = Instance.new("Part",t2) lllcc.Name = "yo" lllcc.Transparency = trans lllcc.Size = Vector3.new(lll2.Size.x/1.2,lll2.Size.y/3.5,lll2.Size.z/1.2)
  956.         local lllcw = Instance.new("Weld",t2) lllcw.Name = "yo" lllcw.Part0 = lll2 lllcw.Part1 = lllcc lllcw.C0 = CFrame.new(0,-lll2.Size.y/7,0)
  957.     end
  958.     if ra1 ~= nil then
  959.         local rfc = Instance.new("Glue",t2) rfc.Name = "yo" rfc.C0 = ra1.C0 rfc.C1 = ra1.C1 rfc.Part0 = rll2 rfc.Part1 = rf2
  960.         local rfcc = Instance.new("Part",t2) rfcc.Name = "yo" rfcc.Transparency = trans rfcc.Size = Vector3.new(rf2.Size.x/1,rf2.Size.y,rf2.Size.z/1)
  961.         local rfcw = Instance.new("Weld",t2) rfcw.Name = "yo" rfcw.Part0 = rf2 rfcw.Part1 = rfcc
  962.     end
  963.     if la1 ~= nil then
  964.         local lfc = Instance.new("Glue",t2) lfc.Name = "yo" lfc.C0 = la1.C0 lfc.C1 = la1.C1 lfc.Part0 = lll2 lfc.Part1 = lf2
  965.         local lfcc = Instance.new("Part",t2) lfcc.Name = "yo" lfcc.Transparency = trans lfcc.Size = Vector3.new(lf2.Size.x/1,lf2.Size.y,lf2.Size.z/1)
  966.         local lfcw = Instance.new("Weld",t2) lfcw.Name = "yo" lfcw.Part0 = lf2 lfcw.Part1 = lfcc
  967.     end
  968.     end
  969.     ded:MakeJoints()
  970.     hum1.Name = "aaa"
  971.     ded.Archivable = true
  972.     local dam = ded:Clone()
  973.     dam.Parent = workspace
  974.     dam.aaa.Health = .1 dam.aaa.MaxHealth = 100 dam.aaa.PlatformStand = true
  975.     local dame = Instance.new("Glue",dam) dame.Name = "xddedxd"
  976.     for i,v in pairs(ded:GetDescendants()) do
  977.         if v:IsA("Part") or v:IsA("MeshPart") then
  978.             v:Destroy()
  979.         end
  980.     end
  981.     coroutine.resume(coroutine.create(function()
  982.         wait(7)
  983.         ded.Parent = nil
  984.     end))
  985.     end
  986. end
  987. function ragdoll1(who,megah)
  988.     pcall(function()
  989.     local ded = who
  990.     local h1 = ded:FindFirstChild("Head")
  991.     local t1 = ded:FindFirstChild("Torso") or ded:FindFirstChild("UpperTorso")
  992.     local ff = ded:FindFirstChildOfClass("ForceField")
  993.     if ff ~= nil then
  994.         ff:Destroy()
  995.     end
  996.     if t1.Name == "UpperTorso" then
  997.         r15r1(ded,megah)
  998.         return ragdoll1
  999.     end
  1000.     local ra1 = ded:FindFirstChild("Right Arm")
  1001.     local la1 = ded:FindFirstChild("Left Arm")
  1002.     local rl1 = ded:FindFirstChild("Right Leg")
  1003.     local ll1 = ded:FindFirstChild("Left Leg")
  1004.     local ff = Instance.new("ForceField",ded) ff.Visible = false
  1005.     local hum1 = ded:FindFirstChildOfClass("Humanoid")
  1006.     local acc = ded:FindFirstChild("xdded")
  1007.     if acc == nil then
  1008.     local ac = Instance.new("Glue",ded) ac.Name = "xddedxd"
  1009.     local rut1 = ded:FindFirstChild("HumanoidRootPart")
  1010.     hum1.PlatformStand = true
  1011.     if rut1 ~= nil then
  1012.         rut1.Parent = nil
  1013.     end
  1014.     pcall(function()
  1015.     for i,v in pairs(who:GetDescendants()) do
  1016.         if v:IsA("Script") or v:IsA("LocalScript") then
  1017.             if v.Name == "Health" then
  1018.                 v.Parent = nil
  1019.             end
  1020.         end
  1021.     end
  1022.     for i,v in pairs(who:GetDescendants()) do
  1023.         if v:IsA("Part") then
  1024.             v.Anchored = false
  1025.         end
  1026.         if v:IsA("Accessory") or v:IsA("Hat") then
  1027.             v.Handle.Anchored = false
  1028.         end
  1029.     end
  1030.     end)
  1031.     for i,v in pairs(t1:GetDescendants()) do
  1032.     if v.Name == "yo" then
  1033.     v:Destroy()
  1034.     end
  1035.     end
  1036.     t1:BreakJoints()
  1037.     ra1:BreakJoints()
  1038.     la1:BreakJoints()
  1039.     rl1:BreakJoints()
  1040.     ll1:BreakJoints()
  1041.     --//Joints~//--
  1042.     --Neck--
  1043.     if h1 ~= nil then
  1044.     local neca = Instance.new("Glue",t1) neca.Part0 = t1 neca.Part1 = h1 neca.C0 = CFrame.new(0,t1.Size.y/2,0) neca.C1 = CFrame.new(0,-h1.Size.y/2,0) neca.Name = "yo"
  1045.     if megah == "hec" then
  1046.         neca:Destroy()
  1047.         local blyd = Instance.new("Part",h1) blyd.CanCollide = false blyd.BrickColor = BrickColor.new("Maroon") blyd.Size = Vector3.new(h1.Size.x/2.3,0.001,h1.Size.z/1.3) blyd.Material = "SmoothPlastic"
  1048.         local cyl = Instance.new("CylinderMesh",blyd)
  1049.         local blydw = Instance.new("Weld",blyd) blydw.Part0 = h1 blydw.Part1 = blyd blydw.C0 = CFrame.new(0,-h1.Size.y/2 -h1.Size.y/13,0)
  1050.         local blyd1 = Instance.new("Part",t1) blyd1.CanCollide = false blyd1.BrickColor = BrickColor.new("Maroon") blyd1.Size = Vector3.new(t1.Size.x/2.3,0.001,t1.Size.z/1.3) blyd1.Material = "SmoothPlastic"
  1051.         local cyl1 = Instance.new("CylinderMesh",blyd1)
  1052.         local blydw1 = Instance.new("Weld",blyd1) blydw1.Part0 = t1 blydw1.Part1 = blyd1 blydw1.C0 = CFrame.new(0,t1.Size.y/2,0)
  1053.         local att1 = Instance.new("Attachment",t1) att1.Name = "yo"
  1054.         local att2 = Instance.new("Attachment",h1) att2.Name = "yo"
  1055.         local rope = Instance.new("RopeConstraint",t1) rope.Name = "yo" rope.Length = 5000 rope.Attachment0 = att1 rope.Attachment1 = att2
  1056.     end
  1057.     local ch = Instance.new("Part",t1) ch.Name = "yo" ch.Size = Vector3.new(h1.Size.x/2,h1.Size.y/2,h1.Size.z/2 + h1.Size.z/4) ch.TopSurface = "Smooth" ch.BottomSurface = "Smooth" ch.Transparency = 1
  1058.     local wh = Instance.new("Weld",ch) wh.Part0 = h1 wh.Part1 = ch
  1059.     end
  1060.     --Right Arm--
  1061.     if ra1 ~= nil then
  1062.     local rsa = Instance.new("Glue",t1) rsa.Part0 = t1 rsa.Part1 = ra1 rsa.C0 = CFrame.new(t1.Size.x/2 + t1.Size.x/4,t1.Size.y/4,0) rsa.C1 = CFrame.new(0,ra1.Size.y/4,0)
  1063. rsa.Name = "yo"
  1064.     local cra = Instance.new("Part",t1) cra.Name = "yo" cra.Size = Vector3.new(ra1.Size.y/2 + ra1.Size.y/4,ra1.Size.y/2,ra1.Size.z) cra.TopSurface = "Smooth" cra.BottomSurface = "Smooth" cra.Transparency = 1
  1065.     local wra = Instance.new("Weld",cra) wra.Part0 = ra1 wra.Part1 = cra wra.C0 = CFrame.new(0,-ra1.Size.y/8,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  1066.     end
  1067.     --Left Arm--
  1068.     if la1 ~= nil then
  1069.     local lsa = Instance.new("Glue",t1) lsa.Part0 = t1 lsa.Part1 = la1 lsa.C0 = CFrame.new(-t1.Size.x/2 - t1.Size.x/4,t1.Size.y/4,0) lsa.C1 = CFrame.new(0,la1.Size.y/4,0) lsa.Name = "yo"
  1070.     local cla = Instance.new("Part",t1) cla.Name = "yo" cla.Size = Vector3.new(la1.Size.y/2 + la1.Size.y/4,la1.Size.y/2,la1.Size.z) cla.TopSurface = "Smooth" cla.BottomSurface = "Smooth" cla.Transparency = 1
  1071.     local wla = Instance.new("Weld",cla) wla.Part0 = la1 wla.Part1 = cla wla.C0 = CFrame.new(0,-la1.Size.y/8,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  1072.     end
  1073.     --Right Leg--
  1074.     if rl1 ~= nil then
  1075.     local rha = Instance.new("Glue",t1) rha.Part0 = t1 rha.Part1 = rl1 rha.C0 = CFrame.new(t1.Size.x/4,-t1.Size.y/2,0) rha.C1 = CFrame.new(0,rl1.Size.y/2,0) rha.Name = "yo"
  1076.     if megah == "wai" then
  1077.         rha:Destroy()
  1078.         local blyd = Instance.new("Part",rl1) blyd.CanCollide = false blyd.BrickColor = BrickColor.new("Maroon") blyd.Size = Vector3.new(rl1.Size.x,0.001,rl1.Size.z) blyd.Material = "SmoothPlastic"
  1079.         local blydw = Instance.new("Weld",blyd) blydw.Part0 = rl1 blydw.Part1 = blyd blydw.C0 = CFrame.new(0,rl1.Size.y/2,0)
  1080.     end
  1081.     local crl = Instance.new("Part",t1) crl.Name = "yo" crl.Size = Vector3.new(rl1.Size.y/2 + rl1.Size.y/4,rl1.Size.y/2,rl1.Size.z) crl.TopSurface = "Smooth" crl.BottomSurface = "Smooth" crl.Transparency = 1
  1082.     local wrl = Instance.new("Weld",crl) wrl.Part0 = rl1 wrl.Part1 = crl wrl.C0 = CFrame.new(0,-rl1.Size.y/8,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  1083.     end
  1084.     --Left Leg--
  1085.     if ll1 ~= nil then
  1086.     local lha = Instance.new("Glue",t1) lha.Part0 = t1 lha.Part1 = ll1 lha.C0 = CFrame.new(-t1.Size.x/4,-t1.Size.y/2,0) lha.C1 = CFrame.new(0,ll1.Size.y/2,0) lha.Name = "yo"
  1087.     if megah == "wai" then
  1088.         lha.Part0 = rl1 lha.Part1 = ll1 lha.C0 = CFrame.new(-rl1.Size.x/2,rl1.Size.y/2,0) lha.C1 = CFrame.new(ll1.Size.x/2,ll1.Size.y/2,0)
  1089.         local blyd = Instance.new("Part",ll1) blyd.CanCollide = false blyd.BrickColor = BrickColor.new("Maroon") blyd.Size = Vector3.new(ll1.Size.x,0.001,ll1.Size.z) blyd.Material = "SmoothPlastic"
  1090.         local blydw = Instance.new("Weld",blyd) blydw.Part0 = ll1 blydw.Part1 = blyd blydw.C0 = CFrame.new(0,ll1.Size.y/2,0)
  1091.         local blyd1 = Instance.new("Part",t1) blyd1.CanCollide = false blyd1.BrickColor = BrickColor.new("Maroon") blyd1.Size = Vector3.new(t1.Size.x,0.001,t1.Size.z) blyd1.Material = "SmoothPlastic"
  1092.         local blydw1 = Instance.new("Weld",blyd1) blydw1.Part0 = t1 blydw1.Part1 = blyd1 blydw1.C0 = CFrame.new(0,-t1.Size.y/2,0)
  1093.         local att1 = Instance.new("Attachment",t1) att1.Name = "yo"
  1094.         local att2 = Instance.new("Attachment",ll1) att2.Name = "yo"
  1095.         local rope = Instance.new("RopeConstraint",t1) rope.Name = "yo" rope.Length = 5000 rope.Attachment0 = att1 rope.Attachment1 = att2
  1096.     end
  1097.     local cll = Instance.new("Part",t1) cll.Name = "yo" cll.Size = Vector3.new(ll1.Size.y/2 + ll1.Size.y/4,ll1.Size.y/2,ll1.Size.z) cll.TopSurface = "Smooth" cll.BottomSurface = "Smooth" cll.Transparency = 1
  1098.     local wll = Instance.new("Weld",cll) wll.Part0 = ll1 wll.Part1 = cll wll.C0 = CFrame.new(0,-ll1.Size.y/8,0) * CFrame.Angles(rad(0),rad(0),rad(90))
  1099.     end
  1100.     ded.Archivable = true
  1101.     local eag = who:Clone()
  1102.     eag.Parent = workspace
  1103.     eag:FindFirstChildOfClass("Humanoid").PlatformStand = true
  1104.     eag:FindFirstChildOfClass("Humanoid").MaxHealth = 100
  1105.     eag:FindFirstChildOfClass("Humanoid").Health = .1
  1106.     for i,v in pairs(eag:GetDescendants()) do
  1107.         if v:IsA("Script") or v:IsA("LocalScript") then
  1108.             v:Destroy()
  1109.         end
  1110.     end
  1111.     for i,v in pairs(who:GetDescendants()) do
  1112.         if v.Name == "Head" then
  1113.             v:Destroy()
  1114.         end
  1115.         if v:IsA("Part") then
  1116.             v:Destroy()
  1117.         end
  1118.         if v:IsA("Accessory") or v:IsA("Hat") then
  1119.             v:Destroy()
  1120.         end
  1121.     end
  1122.     coroutine.resume(coroutine.create(function()
  1123.         wait(6)
  1124.         ded:Destroy()
  1125.     end))
  1126.     end
  1127.     end)
  1128. end
  1129. function bullet()
  1130.     local ray = Ray.new(shot.Position,(mouse.Hit.p - shot.Position).unit * 300)
  1131.     local part,pos = workspace:FindPartOnRay(ray,char,false,true)
  1132.     local dis = (shot.Position - pos).magnitude
  1133.     local bulet = Instance.new("Part",workspace)
  1134.     bulet.Size = Vector3.new(.15,.15,dis)
  1135.     bulet.BrickColor = BrickColor.new("Daisy orange")
  1136.     bulet.Material = "Neon" bulet.CanCollide = false bulet.Anchored = true
  1137.     bulet.CFrame = CFrame.new(shot.Position,mouse.Hit.p) * CFrame.new(0,0,-dis/2)
  1138.     coroutine.resume(coroutine.create(function()
  1139.         for i = 1,10 do
  1140.             bulet.Transparency = bulet.Transparency +.1
  1141.             swait()
  1142.             if bulet.Transparency >.999 then
  1143.                 bulet:Destroy()
  1144.             end
  1145.         end
  1146.     end))
  1147.     local hit = part
  1148.     if hit ~= nil then
  1149.             local hole = Instance.new("Part",workspace) hole.Material = "SmoothPlastic" hole.CFrame = CFrame.new(pos) hole.Size = Vector3.new(.15,.15,.15) hole.BrickColor = BrickColor.Black()
  1150.             hole.CanCollide = false hole.Shape = "Ball"
  1151.             local holw = Instance.new("WeldConstraint",hole) holw.Part0 = hit holw.Part1 = hole
  1152.             local nub = hit.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  1153.             if nub ~= nil and nub.Parent:FindFirstChild("xdded") == nil and nub.Parent:FindFirstChild("xddedxd") == nil then
  1154.                 if hit.Parent ~= char then
  1155.                 a = true
  1156.                 hole.BrickColor = BrickColor.new("Maroon")
  1157.                 nub.MaxHealth = 100
  1158.                 nub.Health = nub.Health -math.random(11,23)
  1159.                 nub.WalkSpeed = nub.WalkSpeed -1.2
  1160.                 nub.JumpPower = nub.JumpPower -5
  1161.                 nub.Died:Connect(function()
  1162.                     ragdoll1(nub.Parent)
  1163.                 end)
  1164.                 if hit.Name == "Head"or hit.Parent.ClassName == "Accessory" or hit.Name == "Handle" then
  1165.                     function expl(pos)
  1166.                         local p = Instance.new("Part",workspace)
  1167.                         p.Size = Vector3.new(.1,.1,.1) p.BrickColor = BrickColor.new("Maroon")
  1168.                         p.Material = "Neon" p.Shape = "Ball" p.CanCollide = false p.Anchored = true
  1169.                         p.CFrame = pos.CFrame
  1170.                         coroutine.resume(coroutine.create(function()
  1171.                         for i = 0,2,.1 do
  1172.                             p.Size = p.Size:lerp(Vector3.new(2.5,2.5,2.5),i)
  1173.                             p.Transparency = p.Transparency +.07
  1174.                             swait()
  1175.                             if p.Transparency >.99 then
  1176.                                 p:Destroy()
  1177.                             end
  1178.                         end
  1179.                         end))
  1180.                     end
  1181.                     hole:Destroy()
  1182.                     nub.Parent:BreakJoints()
  1183.                     nub.Parent.Head:Destroy()
  1184.                     sound(t,"131313234",1,1)
  1185.                     expl(hit)
  1186.                     local expls = Instance.new("Explosion",workspace) expls.BlastPressure = 500000 expls.BlastRadius = .8 expls.Position = hit.Position expls.Visible = false
  1187.                     ragdoll1(nub.Parent,nil)
  1188.                     end
  1189.                 end
  1190.             end
  1191.     end
  1192. end
  1193.  
  1194.  
  1195. function mag()
  1196.     local mag = Instance.new("Part",workspace) mag.Size = Vector3.new(.35,1,.2) mag.BrickColor = BrickColor.new("Black") mag.Material = "Metal" mag.CFrame = Part1.CFrame * CFrame.new(0,-1,0)
  1197.     coroutine.resume(coroutine.create(function()
  1198.         wait(3)
  1199.         mag:Destroy()
  1200.     end))
  1201. end
  1202.  
  1203. function effect()
  1204.     local ef = Instance.new("Part",Model0) ef.Material = "Neon" ef.Name = "Effect" ef.Size = Vector3.new(.4,.4,.4) ef.Anchored = true ef.CanCollide = false ef.BrickColor = BrickColor.new("Daisy orange") ef.Transparency = 0 ef.CFrame = Part15.CFrame
  1205.     coroutine.resume(coroutine.create(function()
  1206.     for i = 1,10 do
  1207.         ef.Size = ef.Size +Vector3.new(.05,.05,.05)
  1208.         ef.Transparency = ef.Transparency +.1
  1209.         ef.CFrame = ef.CFrame * CFrame.Angles(rad(math.random(-180,180)),rad(math.random(-180,180)),rad(math.random(-180,180)))
  1210.         if ef.Transparency > .99 then
  1211.             ef:Destroy()
  1212.         end
  1213.         swait()
  1214.     end
  1215. end))
  1216. end
  1217.  
  1218. local grabda = false
  1219. local keyhold = false
  1220. local lukin = false
  1221. function fire()
  1222.     if not using and mode == "shoot" or using and grabda and mode == "grab" and killmode == "shoot1" then
  1223.     using = true
  1224.     rsw.Part1 = rapr
  1225.     lukin = true
  1226.     keyhold = true
  1227.     for i = 0,1,.07 do
  1228.         rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(90),rad(0),rad(53)),i)
  1229.         rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(233)),i)
  1230.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(127)),i)
  1231.         swait()
  1232.     end
  1233.     repeat
  1234.     if ammo >0 then
  1235.     fireto(mouse.Hit.p)
  1236.     sound(t,"131070686",1.5,1)
  1237.     ammo = ammo -1
  1238.     effect()
  1239.     bullet()
  1240.     for i = 0,1,.3 do
  1241.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,.3) * CFrame.Angles(rad(90),rad(0),rad(53)) * CFrame.Angles(rad(40),rad(0),rad(0)),i)
  1242.         swait()
  1243.     end
  1244.     for i = 0,1,.2 do
  1245.         rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(90),rad(0),rad(53)),i)
  1246.         swait()
  1247.     end
  1248.     wait(.35)
  1249.     else
  1250.         sound(t,"537744814",5,1)
  1251.         keyhold = false
  1252.         swait()
  1253.     end
  1254.     until keyhold == false
  1255.     wait(.2)
  1256.     lukin = false
  1257.     for i = 0,1,.07 do
  1258.         rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1259.         rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1260.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1261.         swait()
  1262.     end
  1263.     rsw.Part1 = nil
  1264.     if killmode ~= "shoot1" then
  1265.     using = false
  1266.     end
  1267.     end
  1268. end
  1269. function keyup()
  1270.     keyhold = false
  1271. end
  1272. mouse.Button1Down:connect(fire)
  1273. mouse.Button1Up:connect(keyup)
  1274.  
  1275. function reload()
  1276.     if ammo >6 then
  1277.         else
  1278.     using = true
  1279.     rsw.Part1 = rapr lsw.Part1 = lapl
  1280.     sound(t,"198915489",1,1.3)
  1281.     info("Reloading...",2.2)
  1282.     for i = 0,1,.05 do
  1283.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(80),rad(-45),rad(-40)),i)
  1284.         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(0),rad(50)),i)
  1285.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1286.         swait()
  1287.     end
  1288.     mag()
  1289.     for i = 0,1,.1 do
  1290.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(-45),rad(-40)),i)
  1291.         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-10),rad(0),rad(0)),i)
  1292.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1293.         swait()
  1294.     end
  1295.     for i = 0,1,.05 do
  1296.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(-45),rad(-40)),i)
  1297.         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-10),rad(0),rad(50)),i)
  1298.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1299.         swait()
  1300.     end
  1301.     local mag = Instance.new("Part",workspace) mag.Size = Vector3.new(.35,1,.2) mag.BrickColor = BrickColor.new("Black") mag.CanCollide = false mag.Material = "Metal"
  1302.     local magw = Instance.new("Weld",mag) magw.Part0 = la magw.Part1 = mag magw.C0 = CFrame.new(.3,-1,.1) * CFrame.Angles(rad(90),rad(-40),rad(-90))
  1303.     for i = 0,1,.05 do
  1304.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(80),rad(-45),rad(-40)),i)
  1305.         lsw.C0 = lsw.C0:lerp(CFrame.new(.4,0,0) * CFrame.Angles(rad(50),rad(45),rad(50)),i)
  1306.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1307.         swait()
  1308.     end
  1309.     mag:Destroy()
  1310.     for i = 0,1,.05 do
  1311.         rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i)
  1312.         lsw.C0 = lsw.C0:lerp(CFrame.new(.3,-.5,0) * CFrame.Angles(rad(160),rad(-77),rad(40)),i)
  1313.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1314.         swait()
  1315.     end
  1316.     for i = 0,1,.05 do
  1317.         rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i)
  1318.         lsw.C0 = lsw.C0:lerp(CFrame.new(.5,-.5,.3) * CFrame.Angles(rad(150),rad(-50),rad(40)),i)
  1319.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1320.         swait()
  1321.     end
  1322.     for i = 0,1,.05 do
  1323.         rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i)
  1324.         lsw.C0 = lsw.C0:lerp(CFrame.new(.3,-.5,0) * CFrame.Angles(rad(160),rad(-77),rad(40)),i)
  1325.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1326.         swait()
  1327.     end
  1328.     for i = 0,.6,.05 do
  1329.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1330.         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1331.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1332.         swait()
  1333.     end
  1334.     ammo = 7
  1335.     rsw.Part1 = nil lsw.Part1 = nil
  1336.     using = false
  1337.     end
  1338. end
  1339.  
  1340. function dumi()
  1341.         local dog = Instance.new("Model",workspace) dog.Name = "dumi"
  1342.         local head = Instance.new("Part",dog) head.Name = "Head" head.Size = Vector3.new(2,1,1)
  1343.         local la1 = Instance.new("Part",dog) la1.Name = "Left Arm" la1.Size = Vector3.new(1,2,1) local t1 = Instance.new("Part",dog) t1.Name = "Torso" t1.Size = Vector3.new(2,2,1) local ra1 = Instance.new("Part",dog) ra1.Name = "Right Arm" ra1.Size = Vector3.new(1,2,1)
  1344.         local ll1 = Instance.new("Part",dog) ll1.Name = "Left Leg" ll1.Size = Vector3.new(1,2,1) local rl1 = Instance.new("Part",dog) rl1.Name = "Right Leg" rl1.Size = Vector3.new(1,2,1)
  1345.         local dhum = Instance.new("Humanoid",dog) local hmesh = Instance.new("SpecialMesh",head) hmesh.Scale = Vector3.new(1.25,1.25,1.25)
  1346.         dhum.MaxHealth = "inf" dhum.Health = "inf" dhum.AutoJumpEnabled = true
  1347.         head.BrickColor = BrickColor.new("Institutional white") t1.BrickColor = BrickColor.new("Really black") ra1.BrickColor = BrickColor.new("Institutional white") la1.BrickColor = BrickColor.new("Institutional white") rl1.BrickColor = BrickColor.new("Dark stone grey") ll1.BrickColor = BrickColor.new("Dark stone grey")
  1348.         local fais = Instance.new("Decal",head) fais.Texture = "http://www.roblox.com/asset/?id=1077397727"
  1349.         local nec = Instance.new("Motor6D",t1) nec.Part0 = t1 nec.Part1 = head nec.C0 = nec.C0 * CFrame.new(0,1.5,0)
  1350.         local ris = Instance.new("Motor6D",t1) ris.Part0 = t1 ris.Part1 = ra1 ris.C0 = ris.C0 * CFrame.new(1.5,0,0)
  1351.         local lis = Instance.new("Motor6D",t1) lis.Part0 = t1 lis.Part1 = la1 lis.C0 = lis.C0 * CFrame.new(-1.5,0,0)
  1352.         local rih = Instance.new("Motor6D",t1) rih.Part0 = t1 rih.Part1 = rl1 rih.C0 = rih.C0 * CFrame.new(.5,-2,0)
  1353.         local lih = Instance.new("Motor6D",t1) lih.Part0 = t1 lih.Part1 = ll1 lih.C0 = lih.C0 * CFrame.new(-.5,-2,0)
  1354.         head.CFrame = h.CFrame * CFrame.new(4,0,0)
  1355.         t1.CFrame = t.CFrame * CFrame.new(4,0,0)
  1356.         ra1.CFrame = ra.CFrame * CFrame.new(4,0,0)
  1357.         la1.CFrame = la.CFrame * CFrame.new(4,0,0)
  1358.         rl1.CFrame = rl.CFrame * CFrame.new(4,0,0)
  1359.         ll1.CFrame = ll.CFrame * CFrame.new(4,0,0)
  1360. end
  1361.  
  1362. mouse.KeyDown:connect(function(key)
  1363.     if key == "z"and canequip then
  1364.         rsw.Part1 = rapr
  1365.             using = true
  1366.             info("Equipped, press F or G to change the mode.",1)
  1367.             for i = 0,1,.03 do
  1368.                 rsw.C0 = rsw.C0:lerp(CFrame.new(0,.3,0) * CFrame.Angles(rad(0),rad(0),rad(-20)),i)
  1369.                 swait()
  1370.             end
  1371.             gunweld.Part0 = ra gunweld.C0 = CFrame.new(0,-.9,0) * CFrame.Angles(rad(-90),rad(-90),rad(0))
  1372.             for i = 0,1,.05 do
  1373.                 rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1374.                 swait()
  1375.             end
  1376.             uneq = true
  1377.             rsw.Part1 = nil
  1378.             canequip = false
  1379.             using = false
  1380.     end
  1381. end)
  1382.  
  1383. mouse.KeyDown:connect(function(key)
  1384.     if key == "x" and  not canequip and uneq then
  1385.         rsw.Part1 = rapr
  1386.         using = true
  1387.         info("Unequipped.",1)
  1388.         for i = 0,1,.05 do
  1389.                 rsw.C0 = rsw.C0:lerp(CFrame.new(0,.3,0) * CFrame.Angles(rad(0),rad(0),rad(-20)),i)
  1390.                 swait()
  1391.             end
  1392.             gunweld.Part0 = t gunweld.C0 = CFrame.new(1.1,-.7,0) * CFrame.Angles(rad(-120),rad(-90),rad(0))
  1393.             for i = 0,.5,.1 do
  1394.             rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1395.             rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1396.             ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1397.             rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1398.             lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1399.             nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1400.             swait()
  1401.         end
  1402.             for i = 0,1,.03 do
  1403.                 rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1404.                 swait()
  1405.             end
  1406.             uneq = false
  1407.             canequip = true
  1408.             rsw.Part1 = nil
  1409.     end
  1410. end)
  1411.  
  1412. mouse.KeyDown:connect(function(key)
  1413.     key = string.lower(key)
  1414.     if string.byte(key) == 48 and not grabda then
  1415.         hum.WalkSpeed = 30
  1416.     end
  1417. end)
  1418. mouse.KeyUp:connect(function(key)
  1419.     key = string.lower(key)
  1420.     if string.byte(key) == 48 and not grabda then
  1421.         hum.WalkSpeed = 16
  1422.     end
  1423. end)
  1424.  
  1425. local conts = false
  1426. function controls()
  1427.     conts = true
  1428.     coroutine.resume(coroutine.create(function()
  1429.     info("Click - Shoot.",1)
  1430.     wait(1)
  1431.     info("R - Reload.",1)
  1432.     wait(1)
  1433.     info("F - Change the mode to Grab.",1)
  1434.     wait(1)
  1435.     info("G - Change the mode to Shoot.",1)
  1436.     wait(1)
  1437.     info("C - Spawn a dummy.",1)
  1438.     wait(1)
  1439.     info("N - Dance(Take the L).",1)
  1440.     conts = false
  1441.     end))
  1442. end
  1443.  
  1444. hum.Running:connect(function(spd)
  1445.     if spd > 0 then
  1446.         anim = "walk"
  1447.     else
  1448.         anim = "idle"
  1449.     end
  1450. end)
  1451.  
  1452. function sog()
  1453.     if mode == "grab" and not using and not grab then
  1454.         greb()
  1455.     end
  1456. end
  1457. mouse.Button1Down:connect(sog)
  1458. mouse.KeyDown:connect(function(key)
  1459.     if key == "e" and grab and using then
  1460.         kill()
  1461.     end
  1462.     if key == "q" and grab and using then
  1463.         drop()
  1464.         elseif grabda and key == "q" then
  1465.         drop1()
  1466.     end
  1467.     if grabda and key == "e"  then
  1468.        fire()
  1469.     end
  1470.     if key == "r" and not using and not grab then
  1471.         reload()
  1472.     end
  1473.     if key == "c" then
  1474.         dumi()
  1475.     end
  1476.     if key == "m" and not conts then
  1477.         controls()
  1478.     end
  1479. end)
  1480.  
  1481. local dancing = false
  1482. local mus = Instance.new("Sound",t) mus.Looped = true mus.SoundId = "rbxassetid://1563991094" mus.Volume = 2
  1483. mouse.KeyDown:connect(function(key)
  1484.     key = key:lower()
  1485.     if key == "n" then
  1486.         if not dancing then
  1487.             dancing = true
  1488.             using = true
  1489.             char.Animate.Disabled = true
  1490.             for i,v in pairs(Model0:GetChildren()) do
  1491.                 if v:IsA("Part") then
  1492.                     v.Transparency = 1
  1493.                 end
  1494.             end
  1495.             mus:Play()
  1496.             while dancing do
  1497.                 if dancing then
  1498.                 coroutine.resume(coroutine.create(function()
  1499.                 for i = 0,.3,.035 do
  1500.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(5),rad(180)) * CFrame.new(0,0,-.1),i)
  1501.                     rs.C0 = rs.C0:lerp(CFrame.new(.3,.7,-1.3) * CFrame.Angles(rad(0),rad(114),rad(190)) * CFrame.Angles(rad(43),rad(0),rad(0)),i)
  1502.                     ls.C0 = ls.C0:lerp(CFrame.new(-1.3,.5,-.3) * CFrame.Angles(rad(0),rad(-166),rad(-40)) * CFrame.Angles(rad(23),rad(0),rad(0)),i)
  1503.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-.9,-.05) * CFrame.Angles(rad(0),rad(60),rad(-10)),i)
  1504.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.15) * CFrame.Angles(rad(0),rad(-45),rad(-31.5)),i)
  1505.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1506.                     swait()
  1507.                 end
  1508.                 end))
  1509.                 end
  1510.                 wait(.07)
  1511.                 if dancing then
  1512.                 for i = 0,.7,.035 do
  1513.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(5),rad(180)) * CFrame.new(0,0,-.2),i)
  1514.                     rs.C0 = rs.C0:lerp(CFrame.new(.3,.7,-1.3) * CFrame.Angles(rad(0),rad(114),rad(190)) * CFrame.Angles(rad(43),rad(0),rad(0)),i)
  1515.                     ls.C0 = ls.C0:lerp(CFrame.new(-1.3,.5,-.3) * CFrame.Angles(rad(0),rad(-166),rad(-40)) * CFrame.Angles(rad(23),rad(0),rad(0)),i)
  1516.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.05) * CFrame.Angles(rad(0),rad(60),rad(-20)),i)
  1517.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.15) * CFrame.Angles(rad(0),rad(-45),rad(-63)),i)
  1518.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1519.                     swait()
  1520.                 end
  1521.                 end
  1522.                 if dancing then
  1523.                 coroutine.resume(coroutine.create(function()
  1524.                 for i = 0,.3,.035 do
  1525.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(-5),rad(180)) * CFrame.new(0,0,-.1),i)
  1526.                     rs.C0 = rs.C0:lerp(CFrame.new(.3,.7,-1.3) * CFrame.Angles(rad(0),rad(114),rad(190)) * CFrame.Angles(rad(43),rad(0),rad(0)),i)
  1527.                     ls.C0 = ls.C0:lerp(CFrame.new(-1.3,.5,-.3) * CFrame.Angles(rad(0),rad(-166),rad(-40)) * CFrame.Angles(rad(23),rad(0),rad(0)),i)
  1528.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.15) * CFrame.Angles(rad(0),rad(45),rad(31.5)),i)
  1529.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-.9,-.05) * CFrame.Angles(rad(0),rad(-60),rad(20)),i)
  1530.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1531.                     swait()
  1532.                 end
  1533.                 end))
  1534.                 end
  1535.                 wait(.07)
  1536.                 if dancing then
  1537.                 for i = 0,.7,.035 do
  1538.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(-5),rad(180)) * CFrame.new(0,0,-.2),i)
  1539.                     rs.C0 = rs.C0:lerp(CFrame.new(.3,.7,-1.3) * CFrame.Angles(rad(0),rad(114),rad(190)) * CFrame.Angles(rad(43),rad(0),rad(0)),i)
  1540.                     ls.C0 = ls.C0:lerp(CFrame.new(-1.3,.5,-.3) * CFrame.Angles(rad(0),rad(-166),rad(-40)) * CFrame.Angles(rad(23),rad(0),rad(0)),i)
  1541.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.15) * CFrame.Angles(rad(0),rad(45),rad(63)),i)
  1542.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.05) * CFrame.Angles(rad(0),rad(-60),rad(20)),i)
  1543.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1544.                     swait()
  1545.                 end
  1546.                 end
  1547.                 swait()
  1548.             end
  1549.         else
  1550.             mus:Stop()
  1551.             char.Animate.Disabled = false
  1552.             dancing = false
  1553.             for i,v in pairs(Model0:GetChildren()) do
  1554.                 if v:IsA("Part") then
  1555.                     v.Transparency = 0
  1556.                 end
  1557.                 end
  1558.                 shot.Transparency = 1
  1559.             if not canequip then
  1560.             using = false
  1561.             else
  1562.                 for i,v in pairs(Model0:GetChildren()) do
  1563.                 if v:IsA("Part") then
  1564.                     v.Transparency = 0
  1565.                 end
  1566.                 end
  1567.                 shot.Transparency = 1
  1568.                 using = true
  1569.                 wait(.3)
  1570.                 for i = 0,1,.1 do
  1571.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1572.                     rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1573.                     ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1574.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1575.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1576.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1577.                     swait()
  1578.                 end
  1579.             end
  1580.         end
  1581.     end
  1582. end)
  1583.  
  1584. while true do
  1585.     if anim == "walk" and not using and uneq then
  1586.         for i = 0,.5,.1 do
  1587.             rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1588.             rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1589.             ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1590.             rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1591.             lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1592.             nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1593.             swait()
  1594.         end
  1595.     end
  1596.     if anim == "idle" and not using and uneq then
  1597.         for i = 0,.5,.06 do
  1598.             rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(160)),i)
  1599.             rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(74),rad(-20)),i)
  1600.             ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-110),rad(-20)),i)
  1601.             rh.C0 = rh.C0:lerp(CFrame.new(1,-1.1,0) * CFrame.Angles(rad(7),rad(80),rad(0)),i)
  1602.             lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(-7),rad(-80),rad(0)),i)
  1603.             nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(200)),i)
  1604.             swait()
  1605.         end
  1606.     end
  1607.     swait()
  1608. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement