Advertisement
vL4d_4eVer

Grab gun v1.0 FE

Jul 24th, 2018
1,128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 61.78 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. local plr = game:GetService("Players").LocalPlayer
  146. local plrg = plr.PlayerGui
  147. local char = plr.Character
  148. script.Parent = char
  149. local ra = char["Right Arm"]
  150. local la = char["Left Arm"]
  151. local rl = char["Right Leg"]
  152. local ll = char["Left Leg"]
  153. local h = char.Head
  154. local t = char.Torso
  155. local anim = "idle"
  156. local mode = "shoot"
  157. local killmode = "kill"
  158. local mouse = plr:GetMouse()
  159. local rad = math.rad
  160.  
  161. function info(text,timebeforefade)
  162.     coroutine.resume(coroutine.create(function()
  163.     local pos = {.001,.002,.003,.004,.005}
  164.     local mpos = {-.001,-.002,-.003,-.004,-.005}
  165.     local sc = Instance.new("ScreenGui",plrg)
  166.     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
  167.     for i = 1,20 do
  168.         tex.Size = tex.Size + UDim2.new(.025,0,0,0)
  169.         tex.Rotation = math.random(-5,5)
  170.         tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  171.         tex.Position = tex.Position - UDim2.new(.0125,0,0,0)
  172.         tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
  173.         tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60))
  174.         tex.BackgroundTransparency = tex.BackgroundTransparency -.05
  175.         swait()
  176.     end
  177.     for i = 1,10 do
  178.         tex.Rotation = math.random(-5,5)
  179.         tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  180.         tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
  181.         tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60))
  182.         tex.TextTransparency = tex.TextTransparency -.1
  183.         swait()
  184.     end
  185.     tex.BackgroundColor3 = Color3.fromRGB(40,40,40)
  186.     tex.TextColor3 = Color3.fromRGB(255,255,255)
  187.     wait(timebeforefade)
  188.     for i = 1,10 do
  189.         tex.Rotation = math.random(-5,5)
  190.         tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  191.         tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
  192.         tex.BackgroundColor3 = Color3.fromRGB(math.random(0,60),math.random(0,60),math.random(0,60))
  193.         tex.TextTransparency = tex.TextTransparency +.1
  194.         swait()
  195.     end
  196.     for i = 1,20 do
  197.         tex.Size = tex.Size - UDim2.new(.025,0,0,0)
  198.         tex.Rotation = math.random(-5,5)
  199.         tex.TextColor3 = Color3.fromRGB(math.random(0,255),math.random(0,255),math.random(0,255))
  200.         tex.Position = tex.Position +- UDim2.new(0,math.random(-10,10),0,math.random(-10,10))
  201.         tex.BackgroundColor3 = Color3.fromRGB(math.random(0,30),math.random(0,60),math.random(0,60))
  202.         tex.Position = tex.Position + UDim2.new(.0125,0,0,0)
  203.         tex.BackgroundTransparency = tex.BackgroundTransparency +.05
  204.         swait()
  205.     end
  206.     tex:Destroy()
  207.     end))
  208. end
  209.  
  210. print("Made by vlad20020")
  211.  
  212. coroutine.resume(coroutine.create(function()
  213. wait(1)
  214. info("Press Z to equip the gun.",1)
  215. wait(2)
  216. info("Press X to unequip the gun.",1)
  217. wait(2)
  218. info("Press M for control list",1)
  219. end))
  220.  
  221. ArtificialHB = Instance.new("BindableEvent", script)
  222. ArtificialHB.Name = "Heartbeat"
  223.  
  224. script:WaitForChild("Heartbeat")
  225.  
  226. frame = 1 / 60
  227. tf = 0
  228. allowframeloss = false
  229. tossremainder = false
  230. lastframe = tick()
  231. script.Heartbeat:Fire()
  232.  
  233. game:GetService("RunService").Heartbeat:connect(function(s, p)
  234.     tf = tf + s
  235.     if tf >= frame then
  236.         if allowframeloss then
  237.             script.Heartbeat:Fire()
  238.             lastframe = tick()
  239.         else
  240.             for i = 1, math.floor(tf / frame) do
  241.                 script.Heartbeat:Fire()
  242.             end
  243.             lastframe = tick()
  244.         end
  245.         if tossremainder then
  246.             tf = 0
  247.         else
  248.             tf = tf - frame * math.floor(tf / frame)
  249.         end
  250.     end
  251. end)
  252.  
  253. function swait(num)
  254.     if num == 0 or num == nil then
  255.         ArtificialHB.Event:wait()
  256.     else
  257.         for i = 0, num do
  258.             ArtificialHB.Event:wait()
  259.         end
  260.     end
  261. end
  262.  
  263. local rs = t["Right Shoulder"]
  264. local ls = t["Left Shoulder"]
  265. local rh = t["Right Hip"]
  266. local lh = t["Left Hip"]
  267. local nec = t.Neck
  268. local rut = char.HumanoidRootPart
  269. local rutj = rut.RootJoint
  270. local hum = char:FindFirstChildOfClass("Humanoid")
  271. local using = true
  272. local canequip = true
  273. local uneq = false
  274. local grab = false
  275. huge = math.huge
  276. local ammo = 7
  277. char.Animate.idle.Animation2:Destroy()
  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 blood(POSITION)
  580.     local blub = Instance.new("Part",workspace)
  581.     blub.Material = "SmoothPlastic"
  582.     blub.BrickColor = BrickColor.new("Maroon")
  583.     blub.Size = Vector3.new(.3,.3,.3)
  584.     blub.Shape = "Ball"
  585.     blub.CFrame = POSITION.CFrame * CFrame.new(math.random(-1,1),math.random(-1,1),math.random(-1,1)) blub.Transparency = 0
  586.     blub.CanCollide = true blub.Anchored = false blub.Name = "Blood"
  587.     coroutine.resume(coroutine.create(function(PART)
  588.     wait(.5)
  589.     blub.CanCollide = false blub.Anchored = true
  590.     blub.Shape = "Cylinder"
  591.         for i = 0,10 do
  592.             blub.Orientation = Vector3.new(0,0,90)
  593.             blub.Size = blub.Size + Vector3.new(0,.05,.05)
  594.             blub.Size = blub.Size - Vector3.new(.035,0,0)
  595.             wait(.1)
  596.         end
  597.         for i = 0,10 do
  598.        
  599.             blub.Orientation = Vector3.new(0,0,90)
  600.             blub.Size = blub.Size + Vector3.new(0,.05,.05)
  601.             blub.Size = blub.Size - Vector3.new(.035,0,0)
  602.         wait(.1)
  603.         end
  604.         coroutine.resume(coroutine.create(function()
  605.             for i = 0,1,.01 do
  606.                 blub.Color = blub.Color:lerp(Color3.fromRGB(40,0,0),i)
  607.                 swait()
  608.             end
  609.         end))
  610.         for i = 0,10 do
  611.             blub.Size = blub.Size + Vector3.new(0,.025,.025)
  612.             blub.Size = blub.Size - Vector3.new(.035,0,0)
  613.             blub.Transparency = blub.Transparency + .1
  614.             wait(.1)
  615.         end
  616.         if blub.Transparency >= .99 then
  617.             blub:Destroy()
  618.         end
  619.     end))
  620. end
  621. function nubblud(pos)
  622.     local sizes = {.1,.2,.3,.4,.5,.6}
  623.     local poses = {.1,.2,.3,.4,.5}
  624.     local mposes = {-.1,-.2,-.3,-.4,-.5}
  625.     coroutine.resume(coroutine.create(function()
  626.     local blod = Instance.new("Part",workspace) blod.Size = Vector3.new(sizes[math.random(1,6)],sizes[math.random(1,6)],sizes[math.random(1,6)]) blod.BrickColor = BrickColor.new("Maroon") blod.Material = "SmoothPlastic"
  627.     blod.CFrame = pos.CFrame * CFrame.new(math.random(mposes[math.random(1,5)],poses[math.random(1,5)]),math.random(mposes[math.random(1,5)],poses[math.random(1,5)]),math.random(mposes[math.random(1,5)],poses[math.random(1,5)]))
  628.     wait(5)
  629.     blod:Destroy()
  630.     end))
  631. end
  632.  
  633. function bullet()
  634.     local ray = Ray.new(shot.Position,(mouse.Hit.p - shot.Position).unit * 300)
  635.     local part,pos = workspace:FindPartOnRay(ray,char,false,true)
  636.     local dis = (shot.Position - pos).magnitude
  637.     local bulet = Instance.new("Part",workspace)
  638.     bulet.Size = Vector3.new(.15,.15,dis)
  639.     bulet.BrickColor = BrickColor.new("Daisy orange")
  640.     bulet.Material = "Neon" bulet.CanCollide = false bulet.Anchored = true
  641.     bulet.CFrame = CFrame.new(shot.Position,mouse.Hit.p) * CFrame.new(0,0,-dis/2)
  642.     coroutine.resume(coroutine.create(function()
  643.         for i = 1,10 do
  644.             bulet.Transparency = bulet.Transparency +.1
  645.             swait()
  646.             if bulet.Transparency >.999 then
  647.                 bulet:Destroy()
  648.             end
  649.         end
  650.     end))
  651.     local hit = part
  652.     if hit ~= nil then
  653.             local hole = Instance.new("Part",workspace) hole.Material = "SmoothPlastic" hole.CFrame = mouse.Hit hole.Size = Vector3.new(.15,.15,.15) hole.BrickColor = BrickColor.Black()
  654.             hole.CanCollide = false hole.Shape = "Ball"
  655.             local holw = Instance.new("Glue",hole) holw.Part0 = hit holw.Part1 = hole
  656.             local nub = hit.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent.Parent:FindFirstChildOfClass("Humanoid")
  657.             if nub ~= nil then
  658.                 if hit.Parent == char then
  659.                    
  660.                 else
  661.                 a = true
  662.                 hole.BrickColor = BrickColor.new("Maroon")
  663.                 nub.MaxHealth = 100
  664.                 nub.Health = nub.Health -math.random(11,23)
  665.                 nub.WalkSpeed = nub.WalkSpeed -1.2
  666.                 nub.JumpPower = nub.JumpPower -5
  667.                 if hit.Name == "Head" or hit:IsA("Accessory") and hit:IsA("Hat") or hit.Parent:IsA("Accessory") and hit.Parent:IsA("Hat") then
  668.                     function expl(pos)
  669.                         local p = Instance.new("Part",workspace)
  670.                         p.Size = Vector3.new(.1,.1,.1) p.BrickColor = BrickColor.new("Maroon")
  671.                         p.Material = "Neon" p.Shape = "Ball" p.CanCollide = false p.Anchored = true
  672.                         p.CFrame = pos.CFrame
  673.                         coroutine.resume(coroutine.create(function()
  674.                         for i = 0,2,.1 do
  675.                             p.Size = p.Size:lerp(Vector3.new(4,4,4),i)
  676.                             p.Transparency = p.Transparency +.07
  677.                             swait()
  678.                             if p.Transparency >.99 then
  679.                                 p:Destroy()
  680.                             end
  681.                         end
  682.                         end))
  683.                     end
  684.                     hole:Destroy()
  685.                     nub.Parent:BreakJoints()
  686.                     hit.Parent.Head:Destroy()
  687.                     bulet:Destroy()
  688.                     sound(char,"131313234",2,1)
  689.                     expl(hit)
  690.                     local bum = Instance.new("Explosion",workspace) bum.Visible = false bum.BlastPressure = 20000 bum.BlastRadius = .5 bum.Position = hit.Position
  691.                         for i = 1,math.random(2,7) do
  692.                             blood(hit)
  693.                             nubblud(hit)
  694.                         end
  695.                     end
  696.                 end
  697.             end
  698.         end
  699. end
  700.  
  701.  
  702. function mag()
  703.     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)
  704.     coroutine.resume(coroutine.create(function()
  705.         wait(3)
  706.         mag:Destroy()
  707.     end))
  708. end
  709.  
  710. function effect()
  711.     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
  712.     coroutine.resume(coroutine.create(function()
  713.     for i = 1,10 do
  714.         ef.Size = ef.Size +Vector3.new(.05,.05,.05)
  715.         ef.Transparency = ef.Transparency +.1
  716.         ef.CFrame = ef.CFrame * CFrame.Angles(rad(math.random(-180,180)),rad(math.random(-180,180)),rad(math.random(-180,180)))
  717.         if ef.Transparency > .99 then
  718.             ef:Destroy()
  719.         end
  720.         swait()
  721.     end
  722. end))
  723. end
  724.  
  725. local grabda = false
  726. local keyhold = false
  727. local lukin = false
  728. function fire()
  729.     if not using and mode == "shoot" or using and grabda and mode == "grab" and killmode == "shoot1" then
  730.     using = true
  731.     rsw.Part1 = rapr
  732.     lukin = true
  733.     coroutine.resume(coroutine.create(function()
  734.     while lukin do
  735.         turnto(mouse.Hit.p)
  736.         swait()
  737.     end
  738.     end))
  739.     keyhold = true
  740.     for i = 0,1,.07 do
  741.         rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(90),rad(0),rad(53)),i)
  742.         rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(233)),i)
  743.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(127)),i)
  744.         swait()
  745.     end
  746.     repeat
  747.     if ammo >0 then
  748.     fireto(mouse.Hit.p)
  749.     sound(char,"131070686",4,1)
  750.     ammo = ammo -1
  751.     effect()
  752.     bullet()
  753.     for i = 0,1,.3 do
  754.         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)
  755.         swait()
  756.     end
  757.     for i = 0,1,.2 do
  758.         rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(90),rad(0),rad(53)),i)
  759.         swait()
  760.     end
  761.     wait(.35)
  762.     else
  763.         sound(char,"537744814",10,1)
  764.         keyhold = false
  765.         swait()
  766.     end
  767.     until keyhold == false
  768.     wait(.2)
  769.     lukin = false
  770.     for i = 0,1,.07 do
  771.         rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  772.         rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  773.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  774.         swait()
  775.     end
  776.     rsw.Part1 = nil
  777.     if killmode ~= "shoot1" then
  778.     using = false
  779.     end
  780.     end
  781. end
  782. function keyup()
  783.     keyhold = false
  784. end
  785. mouse.Button1Down:connect(fire)
  786. mouse.Button1Up:connect(keyup)
  787.  
  788. function reload()
  789.     if ammo >6 then
  790.         else
  791.     using = true
  792.     rsw.Part1 = rapr lsw.Part1 = lapl
  793.     sound(char,"198915489",2,1.3)
  794.     info("Reloading...",2.2)
  795.     for i = 0,1,.05 do
  796.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(80),rad(-45),rad(-40)),i)
  797.         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(0),rad(50)),i)
  798.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  799.         swait()
  800.     end
  801.     mag()
  802.     for i = 0,1,.1 do
  803.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(-45),rad(-40)),i)
  804.         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-10),rad(0),rad(0)),i)
  805.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  806.         swait()
  807.     end
  808.     for i = 0,1,.05 do
  809.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(60),rad(-45),rad(-40)),i)
  810.         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-10),rad(0),rad(50)),i)
  811.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  812.         swait()
  813.     end
  814.     local mag = Instance.new("Part",workspace) mag.Size = Vector3.new(.35,1,.2) mag.BrickColor = BrickColor.new("Black") mag.CanCollide = false mag.Material = "Metal"
  815.     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))
  816.     for i = 0,1,.05 do
  817.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(80),rad(-45),rad(-40)),i)
  818.         lsw.C0 = lsw.C0:lerp(CFrame.new(.4,0,0) * CFrame.Angles(rad(50),rad(45),rad(50)),i)
  819.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  820.         swait()
  821.     end
  822.     mag:Destroy()
  823.     for i = 0,1,.05 do
  824.         rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i)
  825.         lsw.C0 = lsw.C0:lerp(CFrame.new(.3,-.5,0) * CFrame.Angles(rad(160),rad(-77),rad(40)),i)
  826.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  827.         swait()
  828.     end
  829.     for i = 0,1,.05 do
  830.         rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i)
  831.         lsw.C0 = lsw.C0:lerp(CFrame.new(.5,-.5,.3) * CFrame.Angles(rad(150),rad(-50),rad(40)),i)
  832.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  833.         swait()
  834.     end
  835.     for i = 0,1,.05 do
  836.         rsw.C0 = rsw.C0:lerp(CFrame.new(-.5,-.7,0) * CFrame.Angles(rad(110),rad(0),rad(-47)),i)
  837.         lsw.C0 = lsw.C0:lerp(CFrame.new(.3,-.5,0) * CFrame.Angles(rad(160),rad(-77),rad(40)),i)
  838.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  839.         swait()
  840.     end
  841.     for i = 0,.6,.05 do
  842.         rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
  843.         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
  844.         nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  845.         swait()
  846.     end
  847.     ammo = 7
  848.     rsw.Part1 = nil lsw.Part1 = nil
  849.     using = false
  850.     end
  851. end
  852.  
  853. function greb()
  854.     local hbox = Instance.new("Part",char) hbox.Size = Vector3.new(2,5,.5) hbox.CanCollide = false hbox.Transparency = 1
  855.     local hwb = Instance.new("Weld",hbox) hwb.Part0 = t hwb.Part1 = hbox hwb.C0 = CFrame.new(0,0,-1)
  856.     local aa = false
  857.     function grabd(hit)
  858.         if hit ~= nil and not grab and not aa then
  859.             local aaa = hit.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent.Parent:FindFirstChildOfClass("Humanoid") or hit.Parent.Parent.Parent:FindFirstChildOfClass("Humanoid")
  860.             if aaa ~= nil and not grab then
  861.                 grab = true aa = true
  862.                 hbox:Destroy()
  863.                 if aaa.Parent.Name == "ded" then
  864.                     info("Press E or Q to change the mode",1)
  865.                 else
  866.                     info("Press E or Q to change the mode",1)
  867.                 end
  868.                 local tos = aaa.Parent:FindFirstChild("Torso") or aaa.Parent:FindFirstChild("UpperTorso")
  869.                 aaa.PlatformStand = true
  870.                 local w = Instance.new("Weld",t) w.Name = "grabweld" w.Part0 = t w.Part1 = tos
  871.                 coroutine.resume(coroutine.create(function()
  872.                     for i = 0,.5,.1 do
  873.                         w.C0 = w.C0:lerp(CFrame.new(-.9,0,-.8),i)  
  874.                         swait()
  875.                     end
  876.                 end))
  877.                 if aaa.Parent.Name ~= "ded" then
  878.                 for i = 0,1,.05 do
  879.                     rsw.C0 = rsw.C0:lerp(CFrame.new(.7,0,-.15) * CFrame.Angles(rad(110),rad(0),rad(-80)) * CFrame.Angles(rad(10),rad(0),rad(0)),i)
  880.                     lsw.C0 = lsw.C0:lerp(CFrame.new(-.2,-.2,-.4) * CFrame.Angles(rad(130),rad(10),rad(50)),i)
  881.                     swait()
  882.                 end
  883.                 function kill()
  884.                     if ammo >0 then
  885.                         ammo = ammo -1
  886.     sound(char,"131070686",5,1)
  887.                 coroutine.resume(coroutine.create(function()
  888.                 for i = 0,1,.5 do
  889.                     rsw.C0 = rsw.C0:lerp(CFrame.new(1,0,.45) * CFrame.Angles(rad(110),rad(0),rad(-80)) * CFrame.Angles(rad(10),rad(0),rad(15)),i)
  890.                     swait()
  891.                 end
  892.                 for i = 0,1,.05 do
  893.                     rsw.C0 = rsw.C0:lerp(CFrame.new(.7,0,-.15) * CFrame.Angles(rad(110),rad(0),rad(-80)),i)
  894.                     swait()
  895.                 end
  896.                 end))
  897.                 coroutine.resume(coroutine.create(function()
  898.                 aaa.Health = .1
  899.                 for i,v in pairs(aaa.Parent:GetChildren()) do
  900.                         if v:IsA("Script") then
  901.                             v:Destroy()
  902.                         end
  903.                 end
  904.                 end))
  905.                 wait(.5)
  906.                 coroutine.resume(coroutine.create(function()
  907.                 for i,v in pairs(tos.Parent:GetChildren()) do
  908.                         if v:IsA("BasePart") then
  909.                             v.Anchored = false
  910.                         end
  911.                     end
  912.                 for i,v in pairs(t:GetChildren()) do
  913.                     if v.Name == "grabweld" then
  914.                         v:Destroy()
  915.                     end
  916.                 end
  917.                 end))
  918.                 coroutine.resume(coroutine.create(function()
  919.                 for i = 0,.5,.1 do
  920.                     rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(-15),rad(0),rad(20)),i)
  921.                     lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(110),rad(20),rad(-30)),i)
  922.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(150)),i)
  923.                     swait()
  924.                 end
  925.                 end))
  926.                 aaa.DisplayDistanceType = "None"
  927.                 if tos.Name == "Torso" then
  928.                 coroutine.resume(coroutine.create(function()
  929.                 aaa.PlatformStand = true
  930.                 local disshit = aaa.Parent
  931.                 local h1 = disshit.Head
  932.                 local t1 = disshit.Torso
  933.                 local ra1 = disshit["Right Arm"]
  934.                 local la1 = disshit["Left Arm"]
  935.                 local rl1 = disshit["Right Leg"]
  936.                 local ll1 = disshit["Left Leg"]
  937.                 t1:BreakJoints()
  938.             at2 = Instance.new("Attachment",t1) at2.Position = Vector3.new(1,.7,0) at2.Position = Vector3.new(1,.5,0)
  939.             at = Instance.new("Attachment",ra1) at.Name = "oof" at.Position = Vector3.new(-.5,.7,0)
  940.             balls = Instance.new("BallSocketConstraint",ra1) balls.Attachment0 = at2 balls.Attachment1 = at
  941.             at21 = Instance.new("Attachment",t1) at21.Position = Vector3.new(-1,.7,0) at21.Position = Vector3.new(-1,.5,0) at21.Orientation = Vector3.new(0,180,0)
  942.             at1 = Instance.new("Attachment",la1) at.Name = "oof" at1.Position = Vector3.new(.5,.7,0)
  943.             balls1 = Instance.new("BallSocketConstraint",la1) balls1.Attachment0 = at21 balls1.Attachment1 = at1
  944.             nek = Instance.new("Attachment",h1) nek2 = Instance.new("Attachment",t1) nek2.Position = Vector3.new(0,1,0) nek.Position = Vector3.new(0,-.5,0) nball = Instance.new("BallSocketConstraint",h1) nball.Attachment0 = nek nball.Attachment1 = nek2
  945.             owihatedis = Instance.new("Attachment",t1) owihatedis.Position = Vector3.new(.5,-1,0) oihd = Instance.new("Attachment",rl1) oihd.Position = Vector3.new(0,1,0) oww = Instance.new("BallSocketConstraint",rl1) oww.Attachment0 = owihatedis oww.Attachment1 = oihd
  946.             owihatedis2 = Instance.new("Attachment",t1) owihatedis2.Position = Vector3.new(-.5,-1,0) oihd2 = Instance.new("Attachment",ll1) oihd2.Position = Vector3.new(0,1,0) oww2 = Instance.new("BallSocketConstraint",ll1) oww2.Attachment0 = owihatedis2 oww2.Attachment1 = oihd2
  947.             box = Instance.new("Part",disshit) box.Size = Vector3.new(1,1.3,1) box.Transparency = 1
  948.         box1 = Instance.new("Part",disshit) box1.Size = Vector3.new(1,1.3,1) box1.Transparency = 1
  949.         box2 = Instance.new("Part",disshit) box2.Size = Vector3.new(1,1.3,1) box2.Transparency = 1
  950.         box3 = Instance.new("Part",disshit) box3.Size = Vector3.new(1,1.3,1) box3.Transparency = 1
  951.         box4 = Instance.new("Part",disshit) box4.Size = h.Size - Vector3.new(0,.7,0) box4.Transparency = 1
  952.         bw = Instance.new("Weld",box) bw.Part0 = box bw.Part1 = ra1 bw.C0 = bw.C0 * CFrame.new(0,.45,0)
  953.         bw1 = Instance.new("Weld",box1) bw1.Part0 = box1 bw1.Part1 = la1 bw1.C0 = bw1.C0 * CFrame.new(0,.45,0)
  954.         bw2 = Instance.new("Weld",box2) bw2.Part0 = box2 bw2.Part1 = rl1 bw2.C0 = bw2.C0 * CFrame.new(0,.45,0)
  955.         bw3 = Instance.new("Weld",box3) bw3.Part0 = box3 bw3.Part1 = ll1 bw3.C0 = bw3.C0 * CFrame.new(0,.45,0)
  956.         bw4 = Instance.new("Weld",box4) bw4.Part0 = box4 bw4.Part1 = h1  bw4.C0 = bw4.C0 * CFrame.new(0,0,0)
  957.         aaa.Died:connect(function()
  958.             box:Destroy() box1:Destroy() box2:Destroy() box3:Destroy() box4:Destroy()
  959.         end)
  960.         coroutine.resume(coroutine.create(function()
  961.                 for i = 1,math.random(4,9) do
  962.                     nubblud(h1)
  963.                     wait(.05)
  964.                 end
  965.                 end))
  966.         aaa.PlatformStand = true
  967.         t1.CFrame = t1.CFrame * CFrame.new(0,4,-3)
  968.         local yes = Instance.new("Part",char) yes.Size = t.Size yes.Anchored = true yes.CanCollide = false yes.Transparency = 1 yes.CFrame = rut.CFrame * CFrame.Angles(rad(50),rad(0),rad(0))
  969.         local furs = Instance.new("BodyVelocity",t1) furs.MaxForce = Vector3.new(huge,huge,huge)
  970.         furs.Velocity = yes.CFrame.lookVector * 35
  971.        
  972.         coroutine.resume(coroutine.create(function()
  973.             wait(.1)
  974.             furs:Destroy()
  975.             yes:Destroy()
  976.         end))
  977.         end))
  978.                 end
  979.                     wait(.4)
  980.                     for i = 0,1,.05 do
  981.                     rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  982.                     lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  983.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  984.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  985.                     swait()
  986.                     end
  987.                     if aaa.Parent ~= nil then
  988.                         aaa.Parent:BreakJoints()
  989.                     end
  990.                     using = false
  991.                     grab = false
  992.                     rsw.Part1 = nil lsw.Part1 = nil
  993.                     else
  994.                     aaa.PlatformStand = true
  995.                     sound(char,"537744814",10,1)
  996.                     wait(.5)
  997.                     local furs = Instance.new("BodyVelocity",tos) furs.MaxForce = Vector3.new(huge,huge,huge)
  998.                     furs.Velocity = rut.CFrame.lookVector * 30
  999.                     w:Destroy()
  1000.                     for i = 0,.5,.05 do
  1001.                     rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(-15),rad(0),rad(-20)),i)
  1002.                     lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(90),rad(20),rad(10)),i)
  1003.                     swait()
  1004.                     end
  1005.                     furs:Destroy()
  1006.                     for i = 0,1,.1 do
  1007.                     rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1008.                     lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1009.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1010.                     swait()
  1011.                     end
  1012.                     coroutine.resume(coroutine.create(function()
  1013.                         wait(2)
  1014.                         if aaa.Parent.Name == "ded" then
  1015.                             else
  1016.                         aaa.PlatformStand = false
  1017.                         end
  1018.                     end))
  1019.                     rsw.Part1 = nil lsw.Part1 = nil
  1020.                     grab = false
  1021.                     wait(.3)
  1022.                     using = false
  1023.                     end
  1024.             end    
  1025.                 function drop()
  1026.                     aaa.PlatformStand = true
  1027.                     w:Destroy()
  1028.                     local furs = Instance.new("BodyVelocity",tos) furs.MaxForce = Vector3.new(huge,huge,huge)
  1029.                     furs.Velocity = rut.CFrame.lookVector * 30
  1030.                     for i = 0,.5,.05 do
  1031.                     rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(-15),rad(0),rad(-20)),i)
  1032.                     lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(90),rad(20),rad(10)),i)
  1033.                     swait()
  1034.                     end
  1035.                     furs:Destroy()
  1036.                     for i = 0,1,.05 do
  1037.                     rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1038.                     lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1039.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1040.                     swait()
  1041.                     end
  1042.                     coroutine.resume(coroutine.create(function()
  1043.                         wait(2)
  1044.                         if aaa.Parent.Name == "ded" then
  1045.                         else
  1046.                         aaa.PlatformStand = false
  1047.                         end
  1048.                     end))
  1049.                     rsw.Part1 = nil lsw.Part1 = nil  
  1050.                     grab = false
  1051.                     wait(.3)
  1052.                     using = false
  1053.                 end
  1054.                 else
  1055.                     oldmode = killmode
  1056.                     killmode = "release1"
  1057.                     hum.JumpPower = 0
  1058.                     hum.WalkSpeed = 8
  1059.                     coroutine.resume(coroutine.create(function()
  1060.                     for i = 0,1,.05 do
  1061.                     rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0),i)
  1062.                     lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(-33),rad(0),rad(-30)),i)
  1063.                     swait()
  1064.                     end
  1065.                     end))
  1066.                     grabda = true
  1067.                     w:Destroy()
  1068.                     local ata = Instance.new("Attachment",la) ata.Position = Vector3.new(0,-.8,0)
  1069.                     local ata1 = Instance.new("Attachment",aaa.Parent["Right Leg"]) ata1.Position = Vector3.new(0,-.8,0)
  1070.                     local ba = Instance.new("BallSocketConstraint",ata) ba.Attachment0 = ata ba.Attachment1 = ata1
  1071.                     rsw.Part1 = nil
  1072.                     function drop1()
  1073.                         using = true
  1074.                         grabda = false
  1075.                         killmode = oldmode
  1076.                         ba.Attachment1 = nil
  1077.                         ata:Destroy()
  1078.                         ata1:Destroy()
  1079.                         ba:Destroy()
  1080.                         hum.JumpPower = 50
  1081.                         hum.WalkSpeed = 16
  1082.                     for i = 0,1,.05 do
  1083.                         lsw.C0 = lsw.C0:lerp(CFrame.new(0,0,0),i)
  1084.                         swait()
  1085.                     end
  1086.                     lsw.Part1 = nil
  1087.                     grab = false
  1088.                     wait(.3)
  1089.                     using = false
  1090.                     end
  1091.                 end
  1092.             end
  1093.         end
  1094.     end
  1095.     local tcon = hbox.Touched:connect(grabd)
  1096.     using = true
  1097.     coroutine.resume(coroutine.create(function()
  1098.         for i = 0,.5,.1 do
  1099.             rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1100.             rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1101.             lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1102.             swait()
  1103.         end
  1104.     end))
  1105.     rsw.Part1 = rapr lsw.Part1 = lapl
  1106.     for i = 0,.7,.05 do
  1107.         rsw.C0 = rsw.C0:lerp(CFrame.new(.2,0,-.3) * CFrame.Angles(rad(90),rad(0),rad(70)),i)
  1108.         lsw.C0 = lsw.C0:lerp(CFrame.new(-.2,0,-.5) * CFrame.Angles(rad(90),rad(0),rad(-70)),i)
  1109.         swait()
  1110.     end
  1111.     wait(.25)
  1112.     hbox:Destroy()
  1113.     tcon:disconnect()
  1114.     if grab == false then
  1115.         for i = 0,1,.05 do
  1116.         rsw.C0 = rsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1117.         lsw.C0 = lsw.C0:lerp(CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1118.         swait()
  1119.     end
  1120.     using = false
  1121.     grab = false
  1122.     rsw.Part1 = nil lsw.Part1 = nil
  1123.     end
  1124. end
  1125.  
  1126. function dumi()
  1127.         local dog = Instance.new("Model",workspace) dog.Name = "dumi"
  1128.         local head = Instance.new("Part",dog) head.Name = "Head" head.Size = Vector3.new(2,1,1)
  1129.         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)
  1130.         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)
  1131.         local dhum = Instance.new("Humanoid",dog) local hmesh = Instance.new("SpecialMesh",head) hmesh.Scale = Vector3.new(1.25,1.25,1.25)
  1132.         dhum.MaxHealth = "inf" dhum.Health = "inf" dhum.AutoJumpEnabled = true
  1133.         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")
  1134.         local fais = Instance.new("Decal",head) fais.Texture = "http://www.roblox.com/asset/?id=1077397727"
  1135.         local nec = Instance.new("Motor6D",t1) nec.Part0 = t1 nec.Part1 = head nec.C0 = nec.C0 * CFrame.new(0,1.5,0)
  1136.         local ris = Instance.new("Motor6D",t1) ris.Part0 = t1 ris.Part1 = ra1 ris.C0 = ris.C0 * CFrame.new(1.5,0,0)
  1137.         local lis = Instance.new("Motor6D",t1) lis.Part0 = t1 lis.Part1 = la1 lis.C0 = lis.C0 * CFrame.new(-1.5,0,0)
  1138.         local rih = Instance.new("Motor6D",t1) rih.Part0 = t1 rih.Part1 = rl1 rih.C0 = rih.C0 * CFrame.new(.5,-2,0)
  1139.         local lih = Instance.new("Motor6D",t1) lih.Part0 = t1 lih.Part1 = ll1 lih.C0 = lih.C0 * CFrame.new(-.5,-2,0)
  1140.         head.CFrame = h.CFrame * CFrame.new(4,0,0)
  1141.         t1.CFrame = t.CFrame * CFrame.new(4,0,0)
  1142.         ra1.CFrame = ra.CFrame * CFrame.new(4,0,0)
  1143.         la1.CFrame = la.CFrame * CFrame.new(4,0,0)
  1144.         rl1.CFrame = rl.CFrame * CFrame.new(4,0,0)
  1145.         ll1.CFrame = ll.CFrame * CFrame.new(4,0,0)
  1146. end
  1147.  
  1148. mouse.KeyDown:connect(function(key)
  1149.     if key == "z"and canequip then
  1150.         rsw.Part1 = rapr
  1151.             using = true
  1152.             info("Equipped, press F or G to change the mode.",1)
  1153.             for i = 0,1,.03 do
  1154.                 rsw.C0 = rsw.C0:lerp(CFrame.new(0,.3,0) * CFrame.Angles(rad(0),rad(0),rad(-20)),i)
  1155.                 swait()
  1156.             end
  1157.             gunweld.Part0 = ra gunweld.C0 = CFrame.new(0,-.9,0) * CFrame.Angles(rad(-90),rad(-90),rad(0))
  1158.             for i = 0,1,.05 do
  1159.                 rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1160.                 swait()
  1161.             end
  1162.             uneq = true
  1163.             rsw.Part1 = nil
  1164.             canequip = false
  1165.             using = false
  1166.     end
  1167. end)
  1168.  
  1169. mouse.KeyDown:connect(function(key)
  1170.     if key == "x" and  not canequip and uneq then
  1171.         rsw.Part1 = rapr
  1172.         using = true
  1173.         info("Unequipped.",1)
  1174.         for i = 0,1,.05 do
  1175.                 rsw.C0 = rsw.C0:lerp(CFrame.new(0,.3,0) * CFrame.Angles(rad(0),rad(0),rad(-20)),i)
  1176.                 swait()
  1177.             end
  1178.             gunweld.Part0 = t gunweld.C0 = CFrame.new(1.1,-.7,0) * CFrame.Angles(rad(-120),rad(-90),rad(0))
  1179.             for i = 0,.5,.1 do
  1180.             rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1181.             rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1182.             ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1183.             rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1184.             lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1185.             nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1186.             swait()
  1187.         end
  1188.             for i = 0,1,.03 do
  1189.                 rsw.C0 = rsw.C0:lerp(CFrame.new(0,0,0) * CFrame.Angles(rad(0),rad(0),rad(0)),i)
  1190.                 swait()
  1191.             end
  1192.             uneq = false
  1193.             canequip = true
  1194.             rsw.Part1 = nil
  1195.     end
  1196. end)
  1197.  
  1198. mouse.KeyDown:connect(function(key)
  1199.     key = string.lower(key)
  1200.     if string.byte(key) == 48 and not grabda then
  1201.         hum.WalkSpeed = 30
  1202.     end
  1203. end)
  1204. mouse.KeyUp:connect(function(key)
  1205.     key = string.lower(key)
  1206.     if string.byte(key) == 48 and not grabda then
  1207.         hum.WalkSpeed = 16
  1208.     end
  1209. end)
  1210.  
  1211. local conts = false
  1212. function controls()
  1213.     conts = true
  1214.     coroutine.resume(coroutine.create(function()
  1215.     info("Click - Shoot.",1)
  1216.     wait(1)
  1217.     info("R - Reload.",1)
  1218.     wait(1)
  1219.     info("F - Change the mode to Grab.",1)
  1220.     wait(1)
  1221.     info("G - Change the mode to Shoot.",1)
  1222.     wait(1)
  1223.     info("C - Spawn a dummy.",1)
  1224.     wait(1)
  1225.     info("N - Dance(Take the L).",1)
  1226.     conts = false
  1227.     end))
  1228. end
  1229.  
  1230. hum.Running:connect(function(spd)
  1231.     if spd > 0 then
  1232.         anim = "walk"
  1233.     else
  1234.         anim = "idle"
  1235.     end
  1236. end)
  1237.  
  1238. function sog()
  1239.     if mode == "grab" and not using and not grab then
  1240.         greb()
  1241.     end
  1242. end
  1243. mouse.Button1Down:connect(sog)
  1244.  
  1245. local change = false
  1246. function modegrab()
  1247.     change = true
  1248.     mode = "grab"
  1249.     info("Mode changed to Grab click to perform an action.",1)
  1250.     wait(1)
  1251.     change = false
  1252. end
  1253. function modeshoot()
  1254.     change = true
  1255.     mode = "shoot"
  1256.     info("Mode changed to Shoot click to perform an action.",1)
  1257.     wait(1)
  1258.     change = false
  1259. end
  1260.  
  1261.  
  1262.  
  1263. mouse.KeyDown:connect(function(key)
  1264.     if key == "e" and grab and using then
  1265.         kill()
  1266.     end
  1267.     if key == "q" and grab and using then
  1268.         drop()
  1269.         elseif grabda and key == "q" then
  1270.         drop1()
  1271.     end
  1272.     if grabda and key == "e"  then
  1273.        fire()
  1274.     end
  1275.     if key == "r" and not using and not grab then
  1276.         reload()
  1277.     end
  1278.     if key == "c" then
  1279.         dumi()
  1280.     end
  1281.     if key == "m" and not conts then
  1282.         controls()
  1283.     end
  1284.     if key == "f" and not change and not using then
  1285.         if mode ~= "grab" then
  1286.         modegrab()
  1287.         end
  1288.     end
  1289.     if key == "g" and not change and not using then
  1290.         if mode ~= "shoot" then
  1291.         modeshoot()
  1292.         end
  1293.     end
  1294. end)
  1295.  
  1296. local dancing = false
  1297. local mus = Instance.new("Sound",char) mus.Looped = true mus.SoundId = "rbxassetid://1563991094" mus.Volume = 5
  1298. mouse.KeyDown:connect(function(key)
  1299.     key = key:lower()
  1300.     if key == "n" then
  1301.         if not dancing then
  1302.             dancing = true
  1303.             using = true
  1304.             char.Animate.Disabled = true
  1305.             for i,v in pairs(Model0:GetChildren()) do
  1306.                 if v:IsA("Part") then
  1307.                     v.Transparency = 1
  1308.                 end
  1309.             end
  1310.             mus:Play()
  1311.             while dancing do
  1312.                 if dancing then
  1313.                 coroutine.resume(coroutine.create(function()
  1314.                 for i = 0,.3,.035 do
  1315.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(5),rad(180)) * CFrame.new(0,0,-.1),i)
  1316.                     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)
  1317.                     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)
  1318.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-.9,-.05) * CFrame.Angles(rad(0),rad(60),rad(-10)),i)
  1319.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.15) * CFrame.Angles(rad(0),rad(-45),rad(-31.5)),i)
  1320.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1321.                     swait()
  1322.                 end
  1323.                 end))
  1324.                 end
  1325.                 wait(.07)
  1326.                 if dancing then
  1327.                 for i = 0,.7,.035 do
  1328.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(5),rad(180)) * CFrame.new(0,0,-.2),i)
  1329.                     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)
  1330.                     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)
  1331.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.05) * CFrame.Angles(rad(0),rad(60),rad(-20)),i)
  1332.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.15) * CFrame.Angles(rad(0),rad(-45),rad(-63)),i)
  1333.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1334.                     swait()
  1335.                 end
  1336.                 end
  1337.                 if dancing then
  1338.                 coroutine.resume(coroutine.create(function()
  1339.                 for i = 0,.3,.035 do
  1340.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(-5),rad(180)) * CFrame.new(0,0,-.1),i)
  1341.                     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)
  1342.                     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)
  1343.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.15) * CFrame.Angles(rad(0),rad(45),rad(31.5)),i)
  1344.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-.9,-.05) * CFrame.Angles(rad(0),rad(-60),rad(20)),i)
  1345.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1346.                     swait()
  1347.                 end
  1348.                 end))
  1349.                 end
  1350.                 wait(.07)
  1351.                 if dancing then
  1352.                 for i = 0,.7,.035 do
  1353.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(-5),rad(180)) * CFrame.new(0,0,-.2),i)
  1354.                     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)
  1355.                     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)
  1356.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-.8,-.15) * CFrame.Angles(rad(0),rad(45),rad(63)),i)
  1357.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-.8,-.05) * CFrame.Angles(rad(0),rad(-60),rad(20)),i)
  1358.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1359.                     swait()
  1360.                 end
  1361.                 end
  1362.                 swait()
  1363.             end
  1364.         else
  1365.             mus:Stop()
  1366.             char.Animate.Disabled = false
  1367.             dancing = false
  1368.             for i,v in pairs(Model0:GetChildren()) do
  1369.                 if v:IsA("Part") then
  1370.                     v.Transparency = 0
  1371.                 end
  1372.                 end
  1373.                 shot.Transparency = 1
  1374.             if not canequip then
  1375.             using = false
  1376.             else
  1377.                 for i,v in pairs(Model0:GetChildren()) do
  1378.                 if v:IsA("Part") then
  1379.                     v.Transparency = 0
  1380.                 end
  1381.                 end
  1382.                 shot.Transparency = 1
  1383.                 using = true
  1384.                 wait(.3)
  1385.                 for i = 0,1,.1 do
  1386.                     rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1387.                     rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1388.                     ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1389.                     rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1390.                     lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1391.                     nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1392.                     swait()
  1393.                 end
  1394.             end
  1395.         end
  1396.     end
  1397. end)
  1398.  
  1399. while true do
  1400.     if anim == "walk" and not using and uneq then
  1401.         for i = 0,.5,.1 do
  1402.             rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1403.             rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1404.             ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1405.             rh.C0 = rh.C0:lerp(CFrame.new(1,-1,0) * CFrame.Angles(rad(0),rad(90),rad(0)),i)
  1406.             lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(0),rad(-90),rad(0)),i)
  1407.             nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(180)),i)
  1408.             swait()
  1409.         end
  1410.     end
  1411.     if anim == "idle" and not using and uneq then
  1412.         for i = 0,.5,.06 do
  1413.             rutj.C0 = rutj.C0:lerp(CFrame.Angles(rad(-90),rad(0),rad(160)),i)
  1414.             rs.C0 = rs.C0:lerp(CFrame.new(1,.5,0) * CFrame.Angles(rad(0),rad(74),rad(-20)),i)
  1415.             ls.C0 = ls.C0:lerp(CFrame.new(-1,.5,0) * CFrame.Angles(rad(0),rad(-110),rad(-20)),i)
  1416.             rh.C0 = rh.C0:lerp(CFrame.new(1,-1.1,0) * CFrame.Angles(rad(7),rad(80),rad(0)),i)
  1417.             lh.C0 = lh.C0:lerp(CFrame.new(-1,-1,0) * CFrame.Angles(rad(-7),rad(-80),rad(0)),i)
  1418.             nec.C0 = nec.C0:lerp(CFrame.new(0,1,0) * CFrame.Angles(rad(-90),rad(0),rad(200)),i)
  1419.             swait()
  1420.         end
  1421.     end
  1422.     swait()
  1423. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement