View difference between Paste ID: rCNhDVte and YFTtzLCb
SHOW: | | - or go back to the newest paste.
1-
if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility by WaverlyCole");InternalData = {}InternalData.RealOwner = owner;InternalData.RealObjs = {};InternalData.SoundLoudness = {};
1+
2-
do
2+
3-
    script.Parent = InternalData.RealOwner.Character
3+
4-
    local Event = Instance.new("RemoteEvent");Event.Name = "UserInput";InternalData.Event = Event
4+
5-
    local function createObject (connections, index)
5+
6-
        local proxy = newproxy (true);local meta = getmetatable (proxy);
6+
7-
        local runbind = function (self, i, ...) connections[i]:Fire (...); end;
7+
8-
        while (#connections > 0) do connections[table.remove(connections, 1)] = Instance.new ('BindableEvent');end;
8+
9-
        meta.__index = function (self, i)
9+
10-
            if (i == 'TriggerEvent') then return runbind end;
10+
11-
            return connections[i] and connections[i].Event or index[i];
11+
12-
        end;
12+
13-
        meta.__newindex = index;meta.__metatable = false;return proxy
13+
14-
    end;
14+
15-
    local Mouse = createObject({"KeyUp","KeyDown","Button1Down","Button1Up","Move","Button2Down","Button2Up"},{["Target"] = nil;["Hit"] = CFrame.new()})
15+
16-
    local UserInputService = createObject({"InputBegan","InputEnded"},{})
16+
17-
    local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
17+
18-
        self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
18+
19-
    end};ContextActionService.UnBindAction = ContextActionService.BindAction
19+
20-
    Event.OnServerEvent:Connect(function(FiredBy,Input)
20+
21-
        if FiredBy ~= InternalData.RealOwner then return end
21+
22-
        if Input.MouseEvent then
22+
23-
            Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
23+
24-
            Mouse:TriggerEvent("Move")
24+
25-
        elseif Input.Sound then
25+
26-
            if InternalData.SoundLoudness[Input.Sound] then InternalData.SoundLoudness[Input.Sound] = Input.Loudness end
26+
27-
        else
27+
28-
            local Begin = Input.UserInputState == Enum.UserInputState.Begin
28+
29-
            if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TriggerEvent(Begin and "Button1Down" or "Button1Up") end
29+
30-
            if Input.UserInputType == Enum.UserInputType.MouseButton2 then return Mouse:TriggerEvent(Begin and "Button2Down" or "Button2Up") end
30+
31-
            for _,Action in pairs(ContextActionService.Actions) do
31+
32-
                for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
32+
33-
            end
33+
34-
            Mouse:TriggerEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower());UserInputService:TriggerEvent(Begin and "InputBegan" or "InputEnded",Input,false)
34+
35-
        end
35+
36-
    end)
36+
37-
    InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
37+
38-
    Event.Parent = NLS([[
38+
39-
        local Player = owner;
39+
40-
        local Sounds = {};
40+
41-
        local Event = script:WaitForChild("UserInput");
41+
42-
        local UserInputService = game:GetService("UserInputService");
42+
43-
        local Mouse = Player:GetMouse();
43+
44-
        local Input = function(Input,gameProcessedEvent)
44+
45-
            if gameProcessedEvent then return end
45+
46-
            Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
46+
47-
        end
47+
48-
        Event.OnClientEvent:connect(function(Args)
48+
49-
            if Args[1] == "NewSound" then table.insert(Sounds,Args[2]) end
49+
50-
        end)
50+
51-
        UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
51+
52-
        local Hit,Target
52+
53-
        while wait(1/30) do
53+
54-
            for x,Sound in pairs(Sounds) do
54+
55-
                if Sound.Parent then Event:FireServer({["Sound"]=Sound,["Loudness"]=Sound.PlaybackLoudness}) end
55+
56-
            end
56+
57-
            if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
57+
58-
                Hit = Mouse.Hit;Target = Mouse.Target;
58+
59-
                Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
59+
60-
            end
60+
61-
        end
61+
62-
    ]],InternalData.RealOwner.Character)
62+
63
PartWeld.C0 = CFrame.new(Vector3.new(-0.115,-0.475,-0.190)*math.random(-Scale,Scale)) * CFrame.Angles(0,0,0)
64-
InternalData.NewOwner = setmetatable({},{
64+
65-
    __index = function (self,Index)
65+
66-
            local Type = type(InternalData.RealOwner[Index])
66+
67-
            if Type == "function" then
67+
68-
                if Index:lower() == "getmouse" or Index:lower() == "mouse" then
68+
69-
                return function (self)return InternalData["Mouse"] end
69+
70-
                end
70+
71-
            return function (self,...)return InternalData.RealOwner[Index](InternalData.RealOwner,...) end
71+
72-
        elseif Index == "FakePlayer" then
72+
73-
            return true
73+
74-
        end
74+
75-
        return InternalData.RealOwner[Index]
75+
76-
    end;
76+
77-
    __tostring = function(self) return tostring(InternalData.RealOwner) end
77+
78-
})
78+
79-
InternalData.LoadLibrary = LoadLibrary;LoadLibrary = function(Library)
79+
80-
    if Library == "RbxUtility" then
80+
81-
        return setmetatable({},{
81+
82-
            __tostring = function() return "RbxUtility" end;
82+
83-
            __index = function(self, Index)
83+
84-
                if Index:lower() == "create" then
84+
85-
                    return function(Type)
85+
86-
                        return function(Data)
86+
87-
                            Data = Data or {}
87+
88-
                            local Inst = Instance.new(Type)
88+
89-
                            for x,y in pairs(Data) do
89+
90-
                                if InternalData.RealObjs[y] then y = InternalData.RealObjs[y] end
90+
91-
                                if y == owner then y = InternalData.RealOwner end
91+
92-
                                Inst[x] = y
92+
93-
                            end
93+
94-
                            return Inst
94+
95-
                        end
95+
96-
                    end
96+
97-
                end
97+
98-
                return InternalData.LoadLibrary(Library)[Index]
98+
99-
            end
99+
100-
        })
100+
101-
    end
101+
102-
    return InternalData.LoadLibrary(Library)
102+
103
PartWeld.Part0 = Handle
104-
InternalData.RealInstance = Instance;Instance = setmetatable({},{
104+
105-
    __index = function (self,Index)
105+
106-
        if Index:lower() == 'new' then
106+
107-
            return function (Type, Parent)
107+
108-
                if Parent == owner then Parent = InternalData.RealOwner end
108+
109-
                if InternalData.RealObjs[Parent] then Parent = InternalData.RealObjs[Parent] end
109+
110-
                local Real = InternalData.RealInstance.new(Type,Parent)
110+
111-
                if not Type then return end
111+
112-
                if Type == "BillboardGui" then
112+
113-
                    local ToReturn = setmetatable({},{
113+
114-
                        __index = function (self,Index)
114+
115-
                            if type(Real[Index]) == "function" then
115+
116-
                                if Index:lower() == "clone" then
116+
117-
                                    return function (self)
117+
118-
                                        local Real = Real:Clone()
118+
119-
                                        local ToReturn = setmetatable({RealObject = Real},{
119+
120-
                                            __index = function (self,Index)
120+
121-
                                                if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
121+
122-
                                                return Real[Index]
122+
123-
                                            end;
123+
124-
                                            __newindex = function (self,Index,Value)
124+
125-
                                                if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
125+
126-
                                                if Value == owner then Value = InternalData.RealOwner end
126+
127-
                                                Real[Index] = Value
127+
128-
                                            end;
128+
129-
                                            __tostring = function(self) return tostring(Real) end;
129+
130-
                                        })
130+
131-
                                        InternalData.RealObjs[ToReturn] = Real;return ToReturn;
131+
132-
                                    end
132+
133-
                                end
133+
134-
                                return function (self,...) return Real[Index](Real,...)end
134+
135-
                            end
135+
136-
                            return Real[Index]
136+
137-
                        end;
137+
138-
                        __newindex = function (self,Index,Value)
138+
139-
                            if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
139+
140-
                            if Value == owner then Value = InternalData.RealOwner end
140+
141-
                            Real[Index] = Value
141+
142-
                        end;
142+
143-
                        __tostring = function(self) return tostring(Real) end;
143+
144-
                    })
144+
145-
                    InternalData.RealObjs[ToReturn] = Real;return ToReturn;
145+
146-
                elseif Type:lower() == "sound" then
146+
147-
                    Real.Parent = owner.Character;
147+
148-
                    local ToReturn = setmetatable({RealObject = Real},{
148+
149-
                        __index = function (self,Index)
149+
150-
                            if Index:lower() == "playbackloudness" then
150+
151-
                                return InternalData.SoundLoudness[Real] or 0
151+
152-
                            elseif type(Real[Index]) == "function" then
152+
153-
                                if Index:lower() == "clone" then
153+
154-
                                    return function (self)
154+
155-
                                        local Real = Real:Clone()
155+
156-
                                        local ToReturn = setmetatable({},{
156+
157-
                                            __index = function (self,Index)
157+
158-
                                                if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
158+
159-
                                                return Real[Index]
159+
160-
                                            end;
160+
161-
                                            __newindex = function (self,Index,Value)
161+
162-
                                                if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
162+
163-
                                                if Value == owner then Value = InternalData.RealOwner end
163+
164-
                                                Real[Index] = Value
164+
165-
                                            end;
165+
166-
                                            __tostring = function(self) return tostring(Real) end;
166+
167-
                                        })
167+
168-
                                        InternalData.RealObjs[ToReturn] = Real;return ToReturn;
168+
169-
                                    end
169+
170-
                                end
170+
171-
                                return function (self,...) return Real[Index](Real,...)end
171+
172-
                            end
172+
173-
                            return Real[Index]
173+
174-
                        end;
174+
175-
                        __newindex = function (self,Index,Value)
175+
176-
                            if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
176+
177-
                            if Value == owner then Value = InternalData.RealOwner end
177+
178-
                            Real[Index] = Value
178+
179-
                        end;
179+
180-
                        __tostring = function(self) return tostring(Real) end;
180+
181-
                    })
181+
182-
                    InternalData.RealObjs[ToReturn] = Real;InternalData.SoundLoudness[Real] = 0;repeat wait() until InternalData.Event.Parent InternalData.Event:FireClient(InternalData.RealOwner,{"NewSound",Real}) return ToReturn;
182+
183-
                else
183+
184-
                    local ToReturn = setmetatable({RealObject = Real},{
184+
185-
                        __index = function (self,Index)
185+
186-
                            if type(Real[Index]) == "function" then
186+
187-
                                if Index:lower() == "clone" then
187+
188-
                                    return function (self)
188+
189-
                                        local Real = Real:Clone()
189+
190-
                                        local ToReturn = setmetatable({},{
190+
191-
                                            __index = function (self,Index)
191+
192-
                                                if type(Real[Index]) == "function" then return function (self,...) return Real[Index](Real,...)end end
192+
193-
                                                return Real[Index]
193+
194-
                                            end;
194+
195-
                                            __newindex = function (self,Index,Value)
195+
196-
                                                if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
196+
197-
                                                if Value == owner then Value = InternalData.RealOwner end
197+
198-
                                                Real[Index] = Value
198+
199-
                                            end;
199+
200-
                                            __tostring = function(self) return tostring(Real) end;
200+
201-
                                        })
201+
202-
                                        InternalData.RealObjs[ToReturn] = Real;return ToReturn;
202+
203-
                                    end
203+
204-
                                end
204+
205-
                                return function (self,...) return Real[Index](Real,...)end
205+
206-
                            end
206+
207-
                            return Real[Index]
207+
208-
                        end;
208+
209-
                        __newindex = function (self,Index,Value)
209+
210-
                            if InternalData.RealObjs[Value] then Value = InternalData.RealObjs[Value] end
210+
211-
                            if Value == owner then Value = InternalData.RealOwner end
211+
212-
                            Real[Index] = Value
212+
213-
                        end;
213+
214-
                        __tostring = function(self) return tostring(Real) end;
214+
215-
                    })
215+
216-
                    InternalData.RealObjs[ToReturn] = Real;return ToReturn;
216+
217-
                end
217+
218-
            end
218+
219-
        end
219+
220-
        return InternalData.RealInstance[Index]
220+
221-
    end;
221+
222-
    __tostring = function(self) return tostring(InternalData.RealInstance) end;
222+
223-
});
223+
224-
InternalData.RealGame = game;game = setmetatable({},{
224+
225-
    __index = function (self,Index)
225+
226-
        if InternalData.RealGame[Index] then
226+
227-
            local Type = type(InternalData.RealGame[Index])
227+
228-
            if Type == "function" then
228+
229-
                if Index:lower() == "getservice" or Index:lower() == "service" then
229+
230-
                    return function (self,Service)
230+
231-
                        local FakeServices = {
231+
232-
                            ["players"] = function()
232+
233-
                                return setmetatable({},{
233+
234-
                                    __index = function (self2,Index2)
234+
235-
                                        local RealService = InternalData.RealGame:GetService(Service)
235+
236-
                                        local Type2 = type(RealService[Index2])
236+
237-
                                        if Type2 == "function" then
237+
238-
                                            return function (self,...) return RealService[Index2](RealService,...)end
238+
239-
                                        else
239+
240-
                                            if Index2:lower() == "localplayer" then return InternalData.NewOwner end
240+
241-
                                            return RealService[Index2]
241+
242-
                                        end
242+
243-
                                    end;
243+
244-
                                    __tostring = function(self) return tostring(InternalData.RealGame:GetService(Service)) end
244+
245-
                                })
245+
246-
                            end;
246+
247-
                            ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
247+
248-
                            ["userinputservice"] = function() return InternalData["UserInputService"] end;
248+
249-
                            ["debris"] = function()
249+
250-
                                return setmetatable({},{
250+
251-
                                    __index = function(self2,Index2)
251+
252-
                                        local RealService = InternalData.RealGame:GetService(Service)
252+
253-
                                        local Type2 = type(RealService[Index2])
253+
254-
                                        if Type2 == "function" then
254+
255-
                                            if Index2:lower() == "additem" then
255+
256-
                                                return function (self,Item,Time)
256+
257-
                                                    if InternalData.RealObjs[Item] then Item = InternalData.RealObjs[Item] end
257+
258-
                                                    return RealService:AddItem(Item,Time)
258+
259-
                                                end
259+
260-
                                            end
260+
261-
                                            return function (self,...) return RealService[Index2](RealService,...) end
261+
262-
                                        end
262+
263-
                                        return RealService[Index2]
263+
264-
                                    end;
264+
265-
                                    __tostring = function(self) return tostring(InternalData.RealGame:GetService("Debris")) end
265+
266-
                                })
266+
267-
                            end;
267+
268-
                            ["runservice"] = function()
268+
269-
                                return setmetatable({},{
269+
270-
                                    __index = function(self2,Index2)
270+
271-
                                        local RealService = InternalData.RealGame:GetService(Service)
271+
272-
                                        local Type2 = type(RealService[Index2])
272+
273-
                                        if Type2 == "function" then
273+
274-
                                            return function (self,...) return RealService[Index2](RealService,...) end
274+
275-
                                        else
275+
276-
                                            local RunServices = {
276+
277-
                                                ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return InternalData.RealGame:GetService("RunService").Stepped:Connect(Function) end end;
277+
278-
                                                ["renderstepped"] = function() return RealService["Stepped"] end
278+
279-
                                            }
279+
280-
                                            if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
280+
281-
                                            return RealService[Index2]
281+
282-
                                        end
282+
283-
                                    end;
283+
284-
                                    __tostring = function(self) return tostring(InternalData.RealGame:GetService("RunService")) end
284+
285-
                                })
285+
286-
                            end
286+
287-
                        }
287+
288-
                        if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
288+
289-
                        return InternalData.RealGame:GetService(Service)
289+
290-
                    end
290+
291-
                end
291+
292-
                return function (self,...) return InternalData.RealGame[Index](InternalData.RealGame,...) end
292+
293-
            else
293+
294-
                if game:GetService(Index) then return game:GetService(Index) end
294+
295-
                return InternalData.RealGame[Index]
295+
296-
            end
296+
297-
        end
297+
298-
        return nil
298+
299-
    end;
299+
300-
    __tostring = function(self) return tostring(InternalData.game) end
300+
301-
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete!")
301+
302-
 
302+
303-
--//Paste script below this line.
303+
304-
local Scale = 3
304+
305-
local Speed = 20*Scale
305+
306-
local Gravity = math.random(-1,1)*100
306+
307
Barrel2.TopSurface = "SmoothNoOutlines"
308
Barrel2.BottomSurface = "SmoothNoOutlines"
309
Barrel2.FrontSurface = "SmoothNoOutlines"
310
Barrel2.BackSurface = "SmoothNoOutlines"
311
Barrel2.RightSurface = "SmoothNoOutlines"
312
Barrel2.LeftSurface = "SmoothNoOutlines"
313
Barrel2.BrickColor = BrickColor.new("Really black")
314
local Mesh = Instance.new("BlockMesh",Barrel2)
315
Mesh.Scale = Vector3.new(0.25,0.25,2) / 0.2 * Scale
316
local Barrel2Weld = Instance.new("Motor6D")
317
Barrel2Weld.Part0 = Barrel
318
Barrel2Weld.Part1 = Barrel2
319
Barrel2Weld.C0 = CFrame.new(Vector3.new(0,0.225,0)*Scale)
320
Barrel2Weld.Parent = Barrel2
321
322
local RealBarrel = Instance.new("Part",Model)
323
RealBarrel.CanCollide = false
324
RealBarrel.Position = Vector3.new(0,100,0)
325
RealBarrel:BreakJoints()
326
RealBarrel.FormFactor = "Custom"
327
RealBarrel.Size = Vector3.new(0.2,0.2,0.2)
328
RealBarrel.TopSurface = "SmoothNoOutlines"
329
RealBarrel.BottomSurface = "SmoothNoOutlines"
330
RealBarrel.FrontSurface = "SmoothNoOutlines"
331
RealBarrel.BackSurface = "SmoothNoOutlines"
332
RealBarrel.RightSurface = "SmoothNoOutlines"
333
RealBarrel.LeftSurface = "SmoothNoOutlines"
334
RealBarrel.BrickColor = BrickColor.new("Dark grey metallic")
335
local Mesh = Instance.new("CylinderMesh",RealBarrel)
336
Mesh.Scale = Vector3.new(0.2,2,0.2) / 0.2 * Scale
337
local RealBarrelWeld = Instance.new("Motor6D")
338
RealBarrelWeld.Part0 = Barrel
339
RealBarrelWeld.Part1 = RealBarrel
340
RealBarrelWeld.C0 = CFrame.new(Vector3.new(0,0.1,-0.01)*Scale) * CFrame.Angles(math.rad(-90),0,0)
341
RealBarrelWeld.Parent = RealBarrel
342
343
for i = 1,75,15 do
344
	local Part = Instance.new("Part",Model)
345
	Part.CanCollide = false
346
	Part.Position = Vector3.new(0,100,0)
347
	Part:BreakJoints()
348
	Part.FormFactor = "Custom"
349
	Part.Size = Vector3.new(0.2,0.2,0.2)
350
	Part.TopSurface = "SmoothNoOutlines"
351
	Part.BottomSurface = "SmoothNoOutlines"
352
	Part.FrontSurface = "SmoothNoOutlines"
353
	Part.BackSurface = "SmoothNoOutlines"
354
	Part.RightSurface = "SmoothNoOutlines"
355
	Part.LeftSurface = "SmoothNoOutlines"
356
	Part.BrickColor = BrickColor.new("Black")
357
	local Mesh = Instance.new("BlockMesh",Part)
358
	Mesh.Scale = Vector3.new(0.05,0.065,0.05) / 0.2 * Scale
359
	local PartWeld = Instance.new("Motor6D")
360
	PartWeld.Part0 = Handle
361
	PartWeld.Part1 = Part
362
	PartWeld.C0 = CFrame.new(Vector3.new(0,0.525,-0.515)*Scale) * CFrame.Angles(math.rad(i),0,0) * CFrame.new(Vector3.new(0,0,0.2)*Scale)
363
	PartWeld.Parent = Part
364
end
365
366
local Part = Instance.new("Part",Model)
367
Part.CanCollide = false
368
Part.Position = Vector3.new(0,100,0)
369
Part:BreakJoints()
370
Part.FormFactor = "Custom"
371
Part.Size = Vector3.new(0.2,0.2,0.2)
372
Part.TopSurface = "SmoothNoOutlines"
373
Part.BottomSurface = "SmoothNoOutlines"
374
Part.FrontSurface = "SmoothNoOutlines"
375
Part.BackSurface = "SmoothNoOutlines"
376
Part.RightSurface = "SmoothNoOutlines"
377
Part.LeftSurface = "SmoothNoOutlines"
378
Part.BrickColor = BrickColor.new("Really black")
379
local Mesh = Instance.new("BlockMesh",Part)
380
Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale
381
local PartWeld = Instance.new("Motor6D")
382
PartWeld.Part0 = Barrel2
383
PartWeld.Part1 = Part
384
PartWeld.C0 = CFrame.new(Vector3.new(0.06,0.135,0.925)*Scale)
385
PartWeld.Parent = Part
386
387
local Part = Instance.new("Part",Model)
388
Part.CanCollide = false
389
Part.Position = Vector3.new(0,100,0)
390
Part:BreakJoints()
391
Part.FormFactor = "Custom"
392
Part.Size = Vector3.new(0.2,0.2,0.2)
393
Part.TopSurface = "SmoothNoOutlines"
394
Part.BottomSurface = "SmoothNoOutlines"
395
Part.FrontSurface = "SmoothNoOutlines"
396
Part.BackSurface = "SmoothNoOutlines"
397
Part.RightSurface = "SmoothNoOutlines"
398
Part.LeftSurface = "SmoothNoOutlines"
399
Part.BrickColor = BrickColor.new("Really black")
400
local Mesh = Instance.new("BlockMesh",Part)
401
Mesh.Scale = Vector3.new(0.05,0.11,0.1) / 0.2 * Scale
402
local PartWeld = Instance.new("Motor6D")
403
PartWeld.Part0 = Barrel2
404
PartWeld.Part1 = Part
405
PartWeld.C0 = CFrame.new(Vector3.new(-0.06,0.135,0.925)*Scale)
406
PartWeld.Parent = Part
407
408
local Part = Instance.new("Part",Model)
409
Part.CanCollide = false
410
Part.Position = Vector3.new(0,100,0)
411
Part:BreakJoints()
412
Part.FormFactor = "Custom"
413
Part.Size = Vector3.new(0.2,0.2,0.2)
414
Part.TopSurface = "SmoothNoOutlines"
415
Part.BottomSurface = "SmoothNoOutlines"
416
Part.FrontSurface = "SmoothNoOutlines"
417
Part.BackSurface = "SmoothNoOutlines"
418
Part.RightSurface = "SmoothNoOutlines"
419
Part.LeftSurface = "SmoothNoOutlines"
420
Part.BrickColor = BrickColor.new("Really black")
421
local Mesh = Instance.new("BlockMesh",Part)
422
Mesh.Scale = Vector3.new(0.025,0.1,0.1) / 0.2 * Scale
423
local PartWeld = Instance.new("Motor6D")
424
PartWeld.Part0 = Barrel2
425
PartWeld.Part1 = Part
426
PartWeld.C0 = CFrame.new(Vector3.new(0,0.135,-0.925)*Scale)
427
PartWeld.Parent = Part
428
429
local Part = Instance.new("Part",Model)
430
Part.CanCollide = false
431
Part.Position = Vector3.new(0,100,0)
432
Part:BreakJoints()
433
Part.FormFactor = "Custom"
434
Part.Size = Vector3.new(0.2,0.2,0.2)
435
Part.Transparency = 1
436
Part.TopSurface = "SmoothNoOutlines"
437
Part.BottomSurface = "SmoothNoOutlines"
438
Part.FrontSurface = "SmoothNoOutlines"
439
Part.BackSurface = "SmoothNoOutlines"
440
Part.RightSurface = "SmoothNoOutlines"
441
Part.LeftSurface = "SmoothNoOutlines"
442
Part.BrickColor = BrickColor.new("Really black")
443
local Mesh = Instance.new("BlockMesh",Part)
444
Mesh.Scale = Vector3.new(0.1,0.1,0.1) / 0.2 * Scale
445
local PartWeld = Instance.new("Motor6D")
446
PartWeld.Part0 = Barrel
447
PartWeld.Part1 = Part
448
PartWeld.C0 = CFrame.new(Vector3.new(0,0,-5)*Scale)
449
PartWeld.Parent = Part
450
451
local Light = Instance.new("PointLight",Part)
452
Light.Color = BrickColor.new("Gold").Color
453
Light.Enabled = true
454
Light.Shadows = true
455
Light.Brightness = 0
456
Light.Range = 6
457
458
local Part = Instance.new("Part",Model)
459
Part.Material = "Neon"
460
Part.CanCollide = false
461
Part.Position = Vector3.new(0,100,0)
462
Part:BreakJoints()
463
Part.FormFactor = "Custom"
464
Part.Size = Vector3.new(0.2,0.2,0.2)
465
Part.TopSurface = "SmoothNoOutlines"
466
Part.BottomSurface = "SmoothNoOutlines"
467
Part.FrontSurface = "SmoothNoOutlines"
468
Part.BackSurface = "SmoothNoOutlines"
469
Part.RightSurface = "SmoothNoOutlines"
470
Part.LeftSurface = "SmoothNoOutlines"
471
Part.BrickColor = BrickColor.new("Bright yellow")
472
Part.Transparency = 0.25
473
local RecoilMesh = Instance.new("SpecialMesh",Part)
474
RecoilMesh.MeshType = "FileMesh"
475
RecoilMesh.MeshId = "http://www.roblox.com/Asset/?id=1323306"
476
RecoilMesh.TextureId = "http://www.roblox.com/Asset/?id=98896228"
477
RecoilMesh.Scale = Vector3.new(0.175,0,0.175) * Scale
478
local PartWeld = Instance.new("Motor6D")
479
PartWeld.Part0 = RealBarrel
480
PartWeld.Part1 = Part
481
PartWeld.C0 = CFrame.new(Vector3.new(0,0.95,0)*Scale)
482
PartWeld.Parent = Part
483
484
function ShootBullet(Target,barrel)
485
coroutine.resume(coroutine.create(function()
486
	local barrel = barrel or Barrel
487
	local Bullet = Instance.new("Part",Workspace)
488
	Barrel.CanCollide = false
489
	Bullet.FormFactor = "Custom"
490
	Bullet.Size = Vector3.new(math.random(5,10)/10,math.random(5,10)/10,math.random(30,50)/10)
491
	Bullet.TopSurface = "Smooth"
492
	Bullet.BottomSurface = "Smooth"
493
	Bullet.Anchored = false
494
	Bullet.CanCollide = true
495
	Bullet.CFrame = CFrame.new((barrel.CFrame*CFrame.new(0,0,-barrel.Size.Z*barrel.Mesh.Scale.Z/2)).p,Target)*CFrame.new(0,0,-Bullet.Size.Z/2)
496
	Bullet.BrickColor = BrickColor.new("Gold")
497
	Bullet:BreakJoints()
498
	IgnoreList[#IgnoreList+1] = Bullet
499
	Bullet.Touched:Connect(function(hit)
500
		hit:Explode()
501
	end)
502
	RenderStepped:wait()
503
	for i = 1,75,1 do -- Loop to do the bullet movement and stuff.
504
		Bullet.CFrame = Bullet.CFrame*CFrame.Angles(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10)*CFrame.new(0,0,-Speed/1.2)
505
		RenderStepped:wait()
506
	end
507
	Bullet:Destroy()
508
end))
509
end
510
511
Mouse.Button1Down:connect(function()
512
	if not Down and not DB then
513
		Down = true
514
		while Down do
515
			if Humanoid.Health == 0 then break end
516
			if not DB then
517
				DB = true
518
				coroutine.resume(coroutine.create(function()
519
					for i = 1,4 do
520
						ShootBullet(Mouse.Hit.p,Barrel1)
521
					end
522
				end))
523
				RecoilMesh.VertexColor = Vector3.new(1,math.random(160,245)/255,20/255)
524
				PartWeld.C0 = PartWeld.C0 * CFrame.Angles(0,math.rad(math.random(-40,40)),0)
525
				local Shell = Instance.new("Part",Workspace)
526
				Shell.FormFactor = "Custom"
527
				Shell.BrickColor = BrickColor.new("Bright yellow")
528
				Shell.Size = Vector3.new(5,1,5)*Scale
529
				Shell.CFrame = Barrel.CFrame*CFrame.new(0.5,0.5,0)*CFrame.Angles(math.rad(-90),0,0)
530
				Shell.Velocity = ((Barrel.CFrame*CFrame.new(5,0,math.random(-2,2))).p-Barrel.CFrame.p)*5*Scale
531
				Spawn(function()
532
					wait(5)
533
					Shell:Destroy()
534
				end)
535
				RenderStepped:wait()
536
				DB = false
537
			end
538
		end
539
	end
540
end)
541
542
Mouse.Button1Up:connect(function()
543
	Down = false
544
end)
545
546
local Weld = Instance.new("Weld")
547
Weld.Part0 = Torso
548
Weld.Part1 = Character["Right Arm"]
549
Weld.Parent = Torso
550
551
local Weld2 = Instance.new("Weld")
552
Weld2.Part0 = Torso
553
Weld2.Part1 = Character.Head
554
Weld2.Parent = Torso
555
556
local RA = Character["Right Arm"]
557
local bestweld = Instance.new("Weld",Character)
558
bestweld.Part0 = Character.Torso
559
bestweld.Part1 = RA
560
bestweld.C1 = CFrame.new(0,-.5,0)
561
bestweld.C0 = CFrame.new(1.5,-.5,0)
562
while true do
563
Gravity = math.random(-1,1)*100
564
for i,v in pairs(game.Players.LocalPlayer.Character:GetDescendants()) do
565
if v:IsA("Part") and v.Name ~= "Head" and v.Parent.ClassName ~= "Accessory" then
566
v.LocalTransparencyModifier = 0
567
end
568
end
569
	for i,v in pairs(Character:GetDescendants()) do
570
	if v:IsA("BlockMesh") or v:IsA("CylinderMesh") then
571
	v.Scale = v.Scale:Lerp(Vector3.new(math.random(3,20)/10,math.random(3,20)/10,math.random(3,20)/10),.3)
572
	v.Offset = v.Offset:Lerp(Vector3.new(math.random(3,20)/10,math.random(3,20)/10,math.random(3,20)/10),.3)
573
	end
574
	end
575
	local CFr = CFrame.new(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10) * CFrame.Angles(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10)
576
	Weld.C0 = Weld.C0:Lerp(Part0Joint * CFr,.3)
577
	Weld.C1 = Part1Joint
578
	Weld.Part0 = Torso
579
	Weld.Part1 = RA
580
	local CFr = CFrame.new(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10) * CFrame.Angles(math.random(-10,10)/10,math.random(-10,10)/10,math.random(-10,10)/10)
581
	Weld2.C0 = Weld2.C0:Lerp(Part0Joint * CFr,.3)
582
	Weld2.C1 = Part1JointHead
583
	Weld2.Part0 = Torso
584
	Weld2.Part1 = Character.Head
585
	local Last = Scale
586
	Speed = 5
587
	bestweld.C0 = bestweld.C0:Lerp(CFrame.new(math.random(-15,15)/10,math.random(-5,5)/10,0) * CFrame.Angles(math.random(-15,15)/10,math.random(-15,15)/10,math.random(-15,15)/10),.3)
588
	HandleWeld.C0 = HandleWeld.C0:Lerp(CFrame.new(math.random(-20,20)/10,math.random(-20,20)/10,math.random(-20,20)/10) * CFrame.Angles(math.random(-20,20)/10,math.random(-20,20)/10,math.random(-20,20)/10),.3)
589
game:GetService("RunService").Stepped:Wait()
590
end