View difference between Paste ID: L2HCZpQn and Fe6Jcfar
SHOW: | | - or go back to the newest paste.
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
 
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
145-
local TweenService = game:GetService("TweenService")
145+
146-
local RbxUtility = LoadLibrary("RbxUtility")
146+
local plr = owner
147-
local Create = RbxUtility.Create
147+
local tool = Instance.new("Tool",plr:WaitForChild("Backpack"))
148
tool.Grip = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
149-
MaskTextureId = 124337542 --124337542 2340547251
149+
tool.Name = "bluE"
150
151
local part = Instance.new("Part",tool)
152
part.Name = "Handle"
153-
ZTfade=false 
153+
part.Size = Vector3.new(4,6,4)
154-
ZT=false
154+
part.TopSurface = "Smooth"
155
part.BottomSurface = "Smooth"
156-
while Player.Character == nil do wait()
156+
part.CanCollide = false
157-
	
157+
part:BreakJoints()
158
159-
	
159+
local mesh = Instance.new("SpecialMesh",part)
160
mesh.MeshId = "rbxassetid://431003868" --mesh.MeshId = "rbxassetid://132920499"
161-
Character= owner.Character
161+
mesh.TextureId = "rbxassetid://430627740" --"http://www.roblox.com/asset/?id=134479421"
162-
Torso = Character.Torso
162+
mesh.Scale = Vector3.new(2,2,2)
163-
Head = Character.Head
163+
164-
Mouse = owner:GetMouse()
164+
local sound = Instance.new("Sound",part)
165-
Humanoid = Character.Humanoid
165+
sound.SoundId = "rbxassetid://511340819"
166-
LeftArm = Character["Left Arm"]
166+
sound.Volume = 3
167-
LeftLeg = Character["Left Leg"]
167+
168-
RightArm = Character["Right Arm"]
168+
local sound2 = Instance.new("Sound",part)
169-
RightLeg = Character["Right Leg"]
169+
sound2.SoundId = "rbxassetid://280667448"
170-
RootPart = Character["HumanoidRootPart"]
170+
sound2.Volume = 5
171-
local Anim="Idle"
171+
172-
local inairvel=0
172+
local sound3 = Instance.new("Sound",part)
173-
local WalkAnimStep = 0
173+
sound3.SoundId = "rbxassetid://139100774"
174-
local sine = 0
174+
sound3.Volume = 10
175-
local change = 1
175+
176-
Animstep = 0
176+
local sound4 = Instance.new("Sound",part)
177-
WalkAnimMove=0.1
177+
sound4.SoundId = "rbxassetid://258057783"
178-
Combo = 0
178+
sound4.Volume = 10
179-
local attack=false
179+
180-
local RJ = Character.HumanoidRootPart:FindFirstChild("RootJoint")
180+
local sound5 = Instance.new("Sound",part)
181-
local Neck = Character.Torso:FindFirstChild("Neck")
181+
sound5.SoundId = "rbxassetid://130932305"
182-
local Tim = ""
182+
sound5.Volume = 10
183-
local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14) 
183+
184-
local NeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
184+
local sound6 = Instance.new("Sound",part)
185-
local ONeckCF = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
185+
sound6.SoundId = "rbxassetid://906084456"
186-
Effects=Instance.new("Folder",Character)
186+
sound6.Volume = 10
187-
Effects.Name="Effects"
187+
sound6.TimePosition = 2
188-
it=Instance.new
188+
189-
vt=Vector3.new
189+
function firstHum(target)
190-
cf=CFrame.new
190+
	for i,v in pairs(target:GetChildren()) do
191-
euler=CFrame.fromEulerAnglesXYZ
191+
192-
angles=CFrame.Angles
192+
			return v
193-
local cn = CFrame.new
193+
194-
mr=math.rad
194+
195-
mememode=false
195+
	return nil
196-
IT = Instance.new
196+
197-
CF = CFrame.new
197+
198-
VT = Vector3.new
198+
local slap = false
199-
RAD = math.rad
199+
local cd = false
200-
C3 = Color3.new
200+
201-
UD2 = UDim2.new
201+
plr:GetMouse().Button1Down:connect(function()
202-
BRICKC = BrickColor.new
202+
	if tool.Parent == plr.Character then
203-
ANGLES = CFrame.Angles
203+
		if slap == false then
204-
EULER = CFrame.fromEulerAnglesXYZ
204+
			slap = true
205-
COS = math.cos
205+
			sound2:Play()
206-
ACOS = math.acos
206+
			local str = Instance.new("StringValue")
207-
SIN = math.sin
207+
			str.Name = "toolanim"
208-
ASIN = math.asin
208+
			str.Value = "Slash"
209-
ABS = math.abs
209+
			str.Parent = tool
210-
MRANDOM = math.random
210+
			wait(1)
211-
FLOOR = math.floor
211+
			slap = false
212-
local lastid= "http://www.roblox.com/asset/?id=468582223"
212+
213-
local s2=it("Sound",Torso)
213+
214-
local CurId = 1
214+
215-
s2.EmitterSize = 30
215+
216-
local s2c=s2:Clone()
216+
part.Touched:connect(function(hit)
217
	if slap == true then
218
		if cd == false then
219
			if not hit:IsDescendantOf(plr.Character) then
220
				if hit.Parent:IsA("Model") then
221
					local fhum = firstHum(hit.Parent)
222-
local crying = "http://www.roblox.com/asset/?id=1452402780"
222+
					if fhum then
223-
local s3=it("Sound",Head)
223+
						cd = true
224
						fhum.PlatformStand = true
225-
s3.EmitterSize = 40
225+
						sound:Play()
226-
local s3c=s3:Clone()
226+
						local con1
227
						con1 = game:GetService("RunService").Heartbeat:connect(function()
228
							fhum.PlatformStand = true
229
						end)
230-
Humanoid.MaxHealth = 99999999999
230+
						wait(0.1)
231-
wait()
231+
						local vel = Instance.new("BodyVelocity",hit)
232
						vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50
233-
Humanoid.Health = 99999999999
233+
						vel.MaxForce = Vector3.new(10000000,10000000,10000000)
234-
Humanoid.Name = "VoidBoss"
234+
						wait(1)
235-
ff = Instance.new("ForceField",Character)
235+
						cd = false
236-
ff.Visible = false
236+
						vel:Destroy()
237-
playsong = true
237+
						local vel2 = Instance.new("BodyVelocity",hit)
238
						vel2.Velocity = Vector3.new(0,12.5,0)
239-
s2.SoundId = lastid
239+
						vel2.MaxForce = Vector3.new(10000000,10000000,10000000)
240-
	if playsong == true then
240+
						local p2 = Instance.new("Part",hit)
241-
	s2:play()		
241+
						p2.Anchored = true
242-
	elseif playsong == false then
242+
						p2.Transparency = 0.6
243-
	s2:stop()			
243+
						p2.CanCollide = false
244
						p2.Size = Vector3.new(0.2,0.2,0.2)
245-
lastsongpos= 0
245+
						p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
246
						p2.BrickColor = BrickColor.new("New Yeller")
247-
crosshair = Instance.new("BillboardGui",Character)
247+
						p2.Material = "Neon"
248-
crosshair.Size = UDim2.new(10,0,10,0)
248+
						local m2 = Instance.new("CylinderMesh",p2)
249-
crosshair.Enabled = false
249+
						m2.Scale = Vector3.new(60,10000,60)
250-
imgl = Instance.new("ImageLabel",crosshair)
250+
						local scln = sound3:Clone()
251-
imgl.Position = UDim2.new(0,0,0,0)
251+
						scln.Parent = hit
252-
imgl.Size = UDim2.new(1,0,1,0)
252+
						scln:Play()
253-
imgl.Image = "rbxassetid://578065407"
253+
						local con2
254-
imgl.BackgroundTransparency = 1
254+
						con2 = game:GetService("RunService").Heartbeat:connect(function()
255-
imgl.ImageTransparency = .7
255+
							p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
256-
imgl.ImageColor3 = Color3.new(1,1,1)
256+
						end)
257-
	crosshair.StudsOffset = Vector3.new(0,0,-1)
257+
						wait(7)
258
						vel2.Velocity = Vector3.new(0,0,0)
259
						wait(0.5)
260-
if Character:FindFirstChild("Animate")then
260+
						scln:Stop()
261-
	Character.Animate:Destroy()
261+
						local scln3 = sound5:Clone()
262
						scln3.Parent = hit
263
						scln3:Play()
264-
function RemoveOutlines(part)
264+
						wait(1)
265-
	part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
265+
						local bav = Instance.new("BodyAngularVelocity",hit)
266
						bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360))
267
						vel2.Velocity = Vector3.new(0,-250,0)
268
						p2.BrickColor = BrickColor.new("Really red")
269-
	
269+
						local scln6 = sound6:Clone()
270
						scln6.Parent = hit
271-
	CFuncs = {
271+
						scln6:Play()
272-
Part = {Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
272+
						local continue = false
273-
	
273+
						local htc
274-
	local Part = Create("Part")({Parent = Parent, Reflectance = Reflectance, Transparency = Transparency, CanCollide = false, Locked = true, BrickColor = BrickColor.new(tostring(BColor)), Name = Name, Size = Size, Material = Material})
274+
						htc = hit.Touched:connect(function(hitp)
275-
	RemoveOutlines(Part)
275+
							if not hitp:IsDescendantOf(hit.Parent) then
276-
	return Part
276+
								continue = true
277
								scln6:Stop()
278-
}
278+
								vel2:Destroy()
279-
, 
279+
								con2:Disconnect()
280-
Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
280+
								con1:Disconnect()
281-
	
281+
								htc:Disconnect()
282-
	local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
282+
								p2:Destroy()
283-
	if Mesh == "SpecialMesh" then
283+
284-
		Msh.MeshType = MeshType
284+
						end)
285-
		Msh.MeshId = MeshId
285+
						repeat wait() until continue == true
286
						local ctab = {}
287-
	return Msh
287+
						for i=1,4 do
288
							local p = Instance.new("Part",hit)
289-
}
289+
							p.Size = Vector3.new(30,30,30)
290-
, 
290+
							p.Anchored = true
291-
Mesh = {Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
291+
							p.CanCollide = false
292-
	
292+
							p.TopSurface = "Smooth"
293-
	local Msh = Create(Mesh)({Parent = Part, Offset = OffSet, Scale = Scale})
293+
							p.BottomSurface = "Smooth"
294-
	if Mesh == "SpecialMesh" then
294+
							p.Color = Color3.fromRGB(255,math.random(0,255),0)
295-
		Msh.MeshType = MeshType
295+
							p.CFrame = hit.CFrame
296-
		Msh.MeshId = MeshId
296+
							local con
297
							con = game:GetService("RunService").Heartbeat:connect(function()
298-
	return Msh
298+
								p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
299
								p.Transparency = p.Transparency + 0.01
300-
}
300+
								if p.Transparency >= 1 then
301-
, 
301+
									con:Disconnect()
302-
Weld = {Create = function(Parent, Part0, Part1, C0, C1)
302+
								end
303-
	
303+
							end)
304-
	local Weld = Create("Weld")({Parent = Parent, Part0 = Part0, Part1 = Part1, C0 = C0, C1 = C1})
304+
							table.insert(ctab,con)
305-
	return Weld
305+
						end	
306
						Instance.new("Explosion",workspace).Position = hit.Position
307-
}
307+
						local scln2 = sound4:Clone()
308-
, 
308+
						scln2.Parent = hit
309-
Sound = {Create = function(id, par, vol, pit)
309+
						scln2:Play()
310-
	
310+
						vel2:Destroy()
311-
	coroutine.resume(coroutine.create(function()
311+
						hit.Parent:BreakJoints()
312-
		
312+
						repeat wait() until not hit:IsDescendantOf(workspace)
313-
		local S = Create("Sound")({Volume = vol, Pitch = pit or 1, SoundId  = "http://www.roblox.com/asset/?id="..id, Parent = par or workspace})
313+
						con2:Disconnect()
314-
		wait()
314+
315-
		S:play()
315+
316-
		game:GetService("Debris"):AddItem(S, 12)
316+
317
		end
318-
))
318+
319
end)