View difference between Paste ID: ENymmuWD and rVq0KhTU
SHOW: | | - or go back to the newest paste.
1
  if game:GetService("RunService"):IsClient()then error("say h/ not hl/ ya dummy")end;print("get rekt");InternalData = {}
2
do
3
    script.Parent = owner.Character
4
    local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
5
    local function NewFakeEvent()
6
        local Bind = Instance.new("BindableEvent")
7
        local Fake;Fake = {Connections = {},
8
        fakeEvent=true;
9
        Connect=function(self,Func)
10
            Bind.Event:connect(Func)
11
            self.Connections[Bind] = true
12
            return setmetatable({Connected = true},{
13
            __index = function (self,Index)
14
                if Index:lower() == "disconnect" then
15
                    return function() Fake.Connections[Bind] = false;self.Connected = false end
16
                end
17
                return Fake[Index]
18
            end;
19
            __tostring = function() return "Connection" end;
20
        })
21
        end}
22
        Fake.connect = Fake.Connect;return Fake;
23
    end
24
    local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
25
    local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
26
    local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
27
        self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
28
    end};ContextActionService.UnBindAction = ContextActionService.BindAction
29
    local function TriggerEvent(self,Event,...)
30
        local Trigger = Mouse[Event]
31
        if Trigger and Trigger.fakeEvent and Trigger.Connections then
32
            for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
33
        end
34
    end
35
    Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
36
    Event.OnServerEvent:Connect(function(FiredBy,Input)
37
        if FiredBy.Name ~= owner.Name then return end
38
        if Input.MouseEvent then
39
            Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
40
        else
41
            local Begin = Input.UserInputState == Enum.UserInputState.Begin
42
            if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
43
            for _,Action in pairs(ContextActionService.Actions) do
44
                for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
45
            end
46
            Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
47
            UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
48
        end
49
    end)
50
    InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
51
    Event.Parent = NLS([[
52
        local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
53
        local Input = function(Input,gameProcessedEvent)
54
            if gameProcessedEvent then return end
55
            Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
56
        end
57
        UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
58
        local Hit,Target
59
        while wait(1/30) do
60
            if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
61
                Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
62
            end
63
        end
64
    ]],owner.Character)
65
end
66
RealGame = game;game = setmetatable({},{
67
    __index = function (self,Index)
68
        local Sandbox = function (Thing)
69
            if Thing:IsA("Player") then
70
                local RealPlayer = Thing
71
                return setmetatable({},{
72
                    __index = function (self,Index)
73
                        local Type = type(RealPlayer[Index])
74
                        if Type == "function" then
75
                            if Index:lower() == "getmouse" or Index:lower() == "mouse" then
76
                                return function (self)return InternalData["Mouse"] end
77
                            end
78
                            return function (self,...)return RealPlayer[Index](RealPlayer,...) end
79
                        end
80
                        return RealPlayer[Index]
81
                    end;
82
                    __tostring = function(self) return RealPlayer.Name end
83
                })
84
            end
85
        end
86
        if RealGame[Index] then
87
            local Type = type(RealGame[Index])
88
            if Type == "function" then
89
                if Index:lower() == "getservice" or Index:lower() == "service" then
90
                    return function (self,Service)
91
                        local FakeServices = {
92
                            ["players"] = function()
93
                                return setmetatable({},{
94
                                    __index = function (self2,Index2)
95
                                        local RealService = RealGame:GetService(Service)
96
                                        local Type2 = type(Index2)
97
                                        if Type2 == "function" then
98
                                            return function (self,...) return RealService[Index2](RealService,...)end
99
                                        else
100
                                            if Index2:lower() == "localplayer" then return Sandbox(owner) end
101
                                            return RealService[Index2]
102
                                        end
103
                                    end;
104
                                    __tostring = function(self) return RealGame:GetService(Service).Name end
105
                                })
106
                            end;
107
                            ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
108
                            ["userinputservice"] = function() return InternalData["UserInputService"] end;
109
                            ["runservice"] = function()
110
                                return setmetatable({},{
111
                                    __index = function(self2,Index2)
112
                                        local RealService = RealGame:GetService(Service)
113
                                        local Type2 = type(Index2)
114
                                        if Type2 == "function" then
115
                                            return function (self,...) return RealService[Index2](RealService,...) end
116
                                        else
117
                                            local RunServices = {
118
                                                ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
119
                                                ["renderstepped"] = function() return RealService["Stepped"] end
120
                                            }
121
                                            if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
122
                                            return RealService[Index2]
123
                                        end
124
                                    end
125
                                })
126
                            end
127
                        }
128
                        if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
129
                        return RealGame:GetService(Service)
130
                    end
131
                end
132
                return function (self,...) return RealGame[Index](RealGame,...) end
133
            else
134
                if game:GetService(Index) then return game:GetService(Index) end
135
                return RealGame[Index]
136
            end
137
        end
138
        return nil
139
    end
140
});Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("running the script noob")
141
 
142
script.Parent = workspace.CurrentCamera
143
local plr = game:GetService("Players").LocalPlayer
144
145
local tool = Instance.new("Tool",plr:WaitForChild("Backpack"))
146
tool.Grip = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
147-
tool.Name = "bluE"
147+
tool.Name = "thing"
148
149
local part = Instance.new("Part",tool)
150
part.Name = "Handle"
151-
part.Size = Vector3.new(4,6,4)
151+
part.Size = Vector3.new(0.5,6,0.5)
152
part.Color = Color3.new(91, 93, 105)
153
part.Material = "Metal"
154
part.TopSurface = "Smooth"
155
part.BottomSurface = "Smooth"
156
part.CanCollide = false
157-
local mesh = Instance.new("SpecialMesh",part)
157+
158-
mesh.MeshId = "rbxassetid://431003868" --mesh.MeshId = "rbxassetid://132920499"
158+
159-
mesh.TextureId = "rbxassetid://430627740" --"http://www.roblox.com/asset/?id=134479421"
159+
160-
mesh.Scale = Vector3.new(2,2,2)
160+
161
sound.Volume = 3
162
163
local sound2 = Instance.new("Sound",part)
164
sound2.SoundId = "rbxassetid://280667448"
165
sound2.Volume = 5
166
167
local sound3 = Instance.new("Sound",part)
168
sound3.SoundId = "rbxassetid://139100774"
169
sound3.Volume = 10
170
171
local sound4 = Instance.new("Sound",part)
172
sound4.SoundId = "rbxassetid://258057783"
173
sound4.Volume = 10
174
175
local sound5 = Instance.new("Sound",part)
176
sound5.SoundId = "rbxassetid://130932305"
177
sound5.Volume = 10
178
179
local sound6 = Instance.new("Sound",part)
180
sound6.SoundId = "rbxassetid://906084456"
181
sound6.Volume = 10
182
sound6.TimePosition = 2
183
184
function firstHum(target)
185
	for i,v in pairs(target:GetChildren()) do
186
		if v:IsA("Humanoid") then
187
			return v
188
		end
189
	end
190
	return nil
191
end
192
193
local slap = false
194
local cd = false
195
196
plr:GetMouse().Button1Down:connect(function()
197
	if tool.Parent == plr.Character then
198
		if slap == false then
199
			slap = true
200
			sound2:Play()
201
			local str = Instance.new("StringValue")
202
			str.Name = "toolanim"
203
			str.Value = "Slash"
204
			str.Parent = tool
205
			wait(1)
206
			slap = false
207
		end
208
	end
209
end)
210
211
part.Touched:connect(function(hit)
212
	if slap == true then
213
		if cd == false then
214
			if not hit:IsDescendantOf(plr.Character) then
215
				if hit.Parent:IsA("Model") then
216
					local fhum = firstHum(hit.Parent)
217
					if fhum then
218
						cd = true
219
						fhum.PlatformStand = true
220
						sound:Play()
221
						local con1
222
						con1 = game:GetService("RunService").Heartbeat:connect(function()
223
							fhum.PlatformStand = true
224
						end)
225
						wait(0.1)
226
						local vel = Instance.new("BodyVelocity",hit)
227
						vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50
228
						vel.MaxForce = Vector3.new(10000000,10000000,10000000)
229
						wait(1)
230
						cd = false
231
						vel:Destroy()
232
						local vel2 = Instance.new("BodyVelocity",hit)
233
						vel2.Velocity = Vector3.new(0,12.5,0)
234
						vel2.MaxForce = Vector3.new(10000000,10000000,10000000)
235
						local p2 = Instance.new("Part",hit)
236
						p2.Anchored = true
237
						p2.Transparency = 0.6
238
						p2.CanCollide = false
239
						p2.Size = Vector3.new(0.2,0.2,0.2)
240
						p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
241
						p2.BrickColor = BrickColor.new("New Yeller")
242
						p2.Material = "Neon"
243
						local m2 = Instance.new("CylinderMesh",p2)
244
						m2.Scale = Vector3.new(60,10000,60)
245
						local scln = sound3:Clone()
246
						scln.Parent = hit
247
						scln:Play()
248
						local con2
249
						con2 = game:GetService("RunService").Heartbeat:connect(function()
250
							p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
251
						end)
252
						wait(7)
253
						vel2.Velocity = Vector3.new(0,0,0)
254
						wait(0.5)
255
						scln:Stop()
256
						local scln3 = sound5:Clone()
257
						scln3.Parent = hit
258
						scln3:Play()
259
						wait(1)
260
						local bav = Instance.new("BodyAngularVelocity",hit)
261
						bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360))
262
						vel2.Velocity = Vector3.new(0,-250,0)
263
						p2.BrickColor = BrickColor.new("Really red")
264
						local scln6 = sound6:Clone()
265
						scln6.Parent = hit
266
						scln6:Play()
267
						local continue = false
268
						local htc
269
						htc = hit.Touched:connect(function(hitp)
270
							if not hitp:IsDescendantOf(hit.Parent) then
271
								continue = true
272
								scln6:Stop()
273
								vel2:Destroy()
274
								con2:Disconnect()
275
								con1:Disconnect()
276
								htc:Disconnect()
277
								p2:Destroy()
278
							end
279
						end)
280
						repeat wait() until continue == true
281
						local ctab = {}
282
						for i=1,4 do
283
							local p = Instance.new("Part",hit)
284
							p.Size = Vector3.new(30,30,30)
285
							p.Anchored = true
286
							p.CanCollide = false
287
							p.TopSurface = "Smooth"
288
							p.BottomSurface = "Smooth"
289
							p.Color = Color3.fromRGB(255,math.random(0,255),0)
290
							p.CFrame = hit.CFrame
291
							local con
292
							con = game:GetService("RunService").Heartbeat:connect(function()
293
								p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
294
								p.Transparency = p.Transparency + 0.01
295
								if p.Transparency >= 1 then
296
									con:Disconnect()
297
								end
298
							end)
299
							table.insert(ctab,con)
300
						end	
301
						Instance.new("Explosion",workspace).Position = hit.Position
302
						local scln2 = sound4:Clone()
303
						scln2.Parent = hit
304
						scln2:Play()
305
						vel2:Destroy()
306
						hit.Parent:BreakJoints()
307
						repeat wait() until not hit:IsDescendantOf(workspace)
308
						con2:Disconnect()
309
					end
310
				end
311
			end
312
		end
313
	end
314
end)