View difference between Paste ID: NvhhQExN and zkDqjixt
SHOW: | | - or go back to the newest paste.
1-
lp=game.Players.LocalPlayer
1+
-- This script has been converted to FE by iPxter
2
3
4-
mouse = game.Players.LocalPlayer:GetMouse()
4+
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5
local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6
do
7
	print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
8
	script.Parent = Player.Character
9
10
	--RemoteEvent for communicating
11
	local Event = Instance.new("RemoteEvent")
12
	Event.Name = "UserInput_Event"
13
14
	--Fake event to make stuff like Mouse.KeyDown work
15
	local function fakeEvent()
16
		local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
17
		t.connect = t.Connect
18
		return t
19
	end
20
21
	--Creating fake input objects with fake variables
22
    local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
23
	local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
24
	local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
25
		CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
26
	end}
27
	--Merged 2 functions into one by checking amount of arguments
28
	CAS.UnbindAction = CAS.BindAction
29
30
	--This function will trigger the events that have been :Connect()'ed
31
	local function te(self,ev,...)
32
		local t = m[ev]
33
		if t and t._fakeEvent and t.Function then
34
			t.Function(...)
35
		end
36
	end
37
	m.TrigEvent = te
38
	UIS.TrigEvent = te
39
40
	Event.OnServerEvent:Connect(function(plr,io)
41
	    if plr~=Player then return end
42
		if io.isMouse then
43
			m.Target = io.Target
44
			m.Hit = io.Hit
45
		else
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 UIS = game:GetService("UserInputService")
66
	local input = function(io,a)
67
		if a then return end
68
		--Since InputObject is a client-side instance, we create and pass table instead
69
		Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
70
	end
71
	UIS.InputBegan:Connect(input)
72
	UIS.InputEnded:Connect(input)
73
74
	local Mouse = Player:GetMouse()
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
	Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
85
end
86
87
lp=game.Players.von12222222
88
chr=lp.Character
89
attacking=false
90
Weld = function(p0,p1,x,y,z,rx,ry,rz,par)
91
    p0.Position = p1.Position
92
    local w = Instance.new('Motor',par or p0)
93
    w.Part0 = p0
94
    w.Part1 = p1
95
    w.C1 = CFrame.new(x,y,z)*CFrame.Angles(rx,ry,rz)
96
    return w
97
end
98
z=Instance.new("Part",chr)
99
z.Size=chr.Torso.Size
100
cloud=Instance.new("SpecialMesh",z)
101
cloud.MeshId="rbxassetid://1095708"
102
cloud.Scale=Vector3.new(2,2,2)
103
z.Transparency=1
104
Weld(z,chr.Torso,0,15,0,0,0,0,z)
105
Song = function(Volume,SoundId,Looped,Object)
106
    sound=Instance.new("Sound")
107
    sound.Parent=Object
108
    sound.Volume=Volume
109
    sound.SoundId="rbxassetid://"..SoundId
110
    sound.Looped=Looped
111
    sound:Play()
112
end
113
Lightning = function(Start,End,Times,Offset,Color,Thickness,Transparency)
114
    local magz = (Start - End).magnitude local curpos = Start local trz = {-Offset,Offset}
115
    for i=1,Times do 
116
        local li = Instance.new("Part",workspace) 
117
        li.TopSurface =0 
118
        li.BottomSurface = 0 
119
        li.Anchored = true  
120
        li.Material = 288
121
        li.Transparency = Transparency or 0.4 
122
        li.BrickColor = BrickColor.new("Really black")
123
        li.formFactor = "Custom" 
124
        li.CanCollide = false 
125
        li.Size = Vector3.new(Thickness,Thickness,magz/Times) local ofz = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) 
126
        local trolpos = CFrame.new(curpos,End)*CFrame.new(0,0,magz/Times).p+ofz
127
        if Times == i then 
128
            local magz2 = (curpos - End).magnitude li.Size = Vector3.new(Thickness,Thickness,magz2)
129
            li.CFrame = CFrame.new(curpos,End)*CFrame.new(0,0,-magz2/2)
130
        else
131
            li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2)
132
        end
133
        curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p game.Debris:AddItem(li,0.25)
134
    end
135
end
136
mouse.KeyDown:connect(function(key)
137
key:lower()
138
if key == "q" and attacking == false then
139
    attacking= true
140
    for i=1,4 do
141
        Lightning(chr.Head.Position,mouse.Hit.p,10,math.random(5,10),math.random(-2.5,2.5),"New Yeller",0.05,0.3)
142
        explode=Instance.new("Explosion",Workspace)
143
        explode.Position=mouse.Hit.p
144
    end
145
    attacking=false
146
end
147
end)
148
mouse.KeyDown:connect(function(key)
149
key:lower()
150
if key == "." and attacking == false then
151
    attacking = true
152
    Instance.new("ForceField",chr)
153
    chr.Torso.Anchored=true
154
    z.Transparency=0
155
    z.Material = 288
156
    for i=1,20 do
157
        Wait()
158
        Lightning(z.Position,chr.Torso.Position,10,math.random(5,10),math.random(-2.5,2.5),"New Yeller",0.05,0.3)
159
        explode=Instance.new("Explosion",chr)
160
        explode.Position=chr.Torso.Position
161
    end
162
    wait(2)
163
    chr.ForceField:Destroy()
164
    chr.Torso.Anchored=false
165
    z.Transparency=1
166
    z.Material = 288
167
    attacking=false
168
end
169
end)
170
mouse.KeyDown:connect(function(key)
171
key:lower()
172
if key == "." and attacking == false then
173
    Song(math.huge,172949886,true,chr.Head)
174
end
175
end)
176
mouse.KeyDown:connect(function(key)
177
key:lower()
178
if key == "e" and attacking == false then
179
    wait()
180
    for i=1,5 do
181
        Lightning(chr.Torso.Position,mouse.Hit.p,10,math.random(5,10),math.random(-2.5,2.5),"New Yeller",0.05,0.3)
182
    end
183
    Wait()
184
    x=Instance.new("Part",chr)
185
    x.Transparency=1
186
    x.Material = 288
187
    x.Position=mouse.Hit.p
188
    chr.Torso.CFrame=x.CFrame*CFrame.new(0,5,0)
189
    x:Destroy()
190
end
191
end)
192
mouse.KeyDown:connect(function(key)
193
key:lower()
194
if key == "y" and attacking == false then
195
    for i,v in pairs(chr.Head:GetChildren()) do
196
        if v:IsA("Sound") then
197
            v:Destroy()
198
        end
199
    end
200
end
201
end)
202
mouse.KeyDown:connect(function(key)
203
key:lower()
204
if key == "h" and attacking == false then
205
    for i=1,10 do
206
        wait()
207
        Lightning(z.Position,chr.Torso.Position,10,math.random(5,10),math.random(-2.5,2.5),"New Yeller",0.05,0.3)
208
        explode=Instance.new("Explosion",chr)
209
        explode.Position=chr.Torso.Position
210
        explode.BlastPressure=0
211
        chr.Humanoid.Health=chr.Humanoid.Health+10
212
    end
213
end
214
end)
215
mouse.KeyDown:connect(function(key)
216
key:lower()
217
if key == "r" and attacking == false then
218
    attacking=true
219
    z.Transparency=0
220
    Lightning(z.Position,mouse.Hit.p,10,math.random(5,10),math.random(-2.5,2.5),"New Yeller",0.05,0.3)
221
    explode=Instance.new("Explosion",chr)
222
    explode.Position=mouse.Hit.p
223
    z.Transparency=1
224
    attacking=false
225
end
226
end)