View difference between Paste ID: cZk6BSw3 and ZNS0PMcb
SHOW: | | - or go back to the newest paste.
1-
-- By Theamazingnater
1+
--https://github.com/Mokiros/roblox-FE-compatibility
2
if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
3
local Player,game,owner = owner,game
4
local RealPlayer = Player
5
do print("FE Compatibility code V2 by Mokiros")local RealPlayer=RealPlayer;script.Parent=RealPlayer.Character;local a=function(b)b[1].f[b[2]]=nil end;local c={__index={disconnect=a,Disconnect=a}}local d={__index={Connect=function(b,e)local f=tostring(math.random(0,10000))while b.f[f]do f=tostring(math.random(0,10000))end;b.f[f]=e;return setmetatable({b,f},c)end}}d.__index.connect=d.__index.Connect;local function g()return setmetatable({f={}},d)end;local h={Hit=CFrame.new(),KeyUp=g(),KeyDown=g(),Button1Up=g(),Button1Down=g(),Button2Up=g(),Button2Down=g()}h.keyUp=h.KeyUp;h.keyDown=h.KeyDown;local i={InputBegan=g(),InputEnded=g()}local CAS={Actions={},BindAction=function(self,j,k,l,...)CAS.Actions[j]=k and{Name=j,Function=k,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function m(self,n,...)for o,e in pairs(self[n].f)do e(...)end end;h.T=m;i.T=m;local p=Instance.new("RemoteEvent")p.Name="UserInput_Event"p.OnServerEvent:Connect(function(q,r)if q~=RealPlayer then return end;h.Target=r.e;h.Hit=r.d;if not r.f then local s=r.c==Enum.UserInputState.Begin;if r.b==Enum.UserInputType.MouseButton1 then return h:T(s and"Button1Down"or"Button1Up")end;if r.b==Enum.UserInputType.MouseButton2 then return h:T(s and"Button2Down"or"Button2Up")end;for o,t in pairs(CAS.Actions)do for o,u in pairs(t.Keys)do if u==r.a then t.Function(t.Name,r.c,r)end end end;h:T(s and"KeyDown"or"KeyUp",r.a.Name:lower())i:T(s and"InputBegan"or"InputEnded",r,false)end end)p.Parent=NLS([==[local a=script:WaitForChild("UserInput_Event")local b=owner:GetMouse()local c=game:GetService("UserInputService")local d=function(e,f)if f then return end;a:FireServer({a=e.KeyCode,b=e.UserInputType,c=e.UserInputState,d=b.Hit,e=b.Target})end;c.InputBegan:Connect(d)c.InputEnded:Connect(d)local g,h;local i=game:GetService("RunService").Heartbeat;while true do if g~=b.Hit or h~=b.Target then g,h=b.Hit,b.Target;a:FireServer({f=1,Target=h,d=g})end;for j=1,2 do i:Wait()end end]==],script)local v=game;local w={__index=function(self,u)local x=rawget(self,"_RealService")if x then return typeof(x[u])=="function"and function(o,...)return x[u](x,...)end or x[u]end end,__newindex=function(self,u,y)local x=rawget(self,"_RealService")if x then x[u]=y end end}local function z(t,A)t._RealService=typeof(A)=="string"and v:GetService(A)or A;return setmetatable(t,w)end;local B={GetService=function(self,x)return rawget(self,x)or v:GetService(x)end,Players=z({LocalPlayer=z({GetMouse=function(self)return h end},Player)},"Players"),UserInputService=z(i,"UserInputService"),ContextActionService=z(CAS,"ContextActionService"),RunService=z({_btrs={},RenderStepped=v:GetService("RunService").Heartbeat,BindToRenderStep=function(self,j,o,k)self._btrs[j]=self.Heartbeat:Connect(k)end,UnbindFromRenderStep=function(self,j)self._btrs[j]:Disconnect()end},"RunService")}rawset(B.Players,"localPlayer",B.Players.LocalPlayer)B.service=B.GetService;z(B,game)game,owner=B,B.Players.LocalPlayer end -- By Theamazingnater
6
char = game.Players.LocalPlayer.Character
7
local music = Instance.new("Sound",char)
8
music.Volume = 1
9
music.SoundId = "rbxassetid://952068290"
10
music.Looped = true
11
music:Play()
12
local ban = Instance.new("Sound",char.Torso)
13
ban.SoundId = "rbxassetid://147722910"
14
ban.Volume = 10
15
local banh = Instance.new("Part",char)
16
banh.Name = "BAN!"
17
banh.Size = Vector3.new(1, 5.2, 1)
18
banh.CanCollide = false
19
local banm = Instance.new("FileMesh",banh)
20
banm.MeshId = "http://www.roblox.com/asset/?id=10604848"
21
banm.TextureId = "http://www.roblox.com/asset/?id=10605252"
22
banm.Scale = Vector3.new(0.5,0.5,0.5)
23
local weld = Instance.new("Weld",banh)
24
weld.Part0 = banh
25
weld.Part1 = char["Right Arm"]
26
weld.C0 = CFrame.new(0.0185670853, -1.69550169, -1.06726038, -0.997520506, 0.00503299711, 0.0701959729, -0.0702080429, -0.00226099929, -0.997529864, -0.00486185262, -0.999984622, 0.00260874978)
27
mouse = game.Players.LocalPlayer:GetMouse()
28
local llegclone = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone()
29
game.Players.LocalPlayer.Character.Torso["Left Hip"]:Remove()
30
local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
31
llegweld.Part0 = game.Players.LocalPlayer.Character.Torso
32
llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"]
33
llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) * CFrame.new(0,-1,0)
34
local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone()
35
game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove()
36
local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
37
rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso
38
rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"]
39
rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) * CFrame.new(0,-1,0)
40
local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone()
41
local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
42
rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
43
rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"]
44
rhandweld.C0 = CFrame.new(1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
45
local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone()
46
local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
47
lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso
48
lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"]
49
lhandweld.C0 = CFrame.new(-1.5, 0, 0, 1, -1.6395192e-43, 0, -1.6395192e-43, 1, 0, 0, 0, 1)
50
local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone()
51
game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove()
52
local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
53
humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart
54
humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso
55
local heed = game.Players.LocalPlayer.Character.Torso["Neck"]:Clone()
56
local headweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
57
headweld.Part0 = game.Players.LocalPlayer.Character.Torso
58
headweld.Part1 = game.Players.LocalPlayer.Character.Head
59
headweld.C0 = headweld.C0 * CFrame.new(0,1.5,0)
60
using = false
61
cananimate = true
62
for i = 0,1 , 0.03 do
63
	lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
64
	rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.398939848, -0.585105896, 1.00000012, 3.85171006e-10, 1.11758709e-08, 9.31322042e-09, -0.0281364974, -0.99960357, -1.16415322e-10, 0.999603391, -0.0281365328),i)
65
    llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.75279808, -1.92294025, 0, 0.985477746, 0.16980496, 0, -0.16980496, 0.985477746, 0, 0, 0, 1),i)
66
    rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.696445823, -1.93322277, 0, 0.946795106, -0.321837038, 0, 0.321837038, 0.946795106, 0, 0, 0, 1),i)
67
	game:GetService("RunService").RenderStepped:wait()
68
end
69
function Ban(dude)
70
	local display = dude:FindFirstChild("Head"):Clone()
71
	display.Parent = workspace
72
	display.Transparency = 1
73
	display:FindFirstChildOfClass("Decal"):Destroy()
74
	display.Anchored = true
75
	display.CanCollide = false
76
	local txt = Instance.new("BillboardGui", display)
77
    txt.Adornee = display
78
    txt.Name = "Nametag"
79
    txt.Size = UDim2.new(2, 0, 1.2, 0)
80
    txt.StudsOffset = Vector3.new(-9, 6, 0)
81
    local text = Instance.new("TextLabel", txt)
82
    text.Size = UDim2.new(10, 0, 7, 0)
83
    text.TextSize = 30
84
    text.Font = Enum.Font.Arcade
85
    text.TextScaled = false
86
    text.BackgroundTransparency = 1
87
    text.TextColor3 = BrickColor.new("Really blue").Color
88
    text.TextStrokeTransparency = 0
89
    text.TextStrokeColor3 = Color3.new(0,0,0)
90
    text.Text = "Banned!"
91
    game:GetService("Debris"):AddItem(display,2)
92
	dude:Destroy()
93
end
94
95
function swing()
96
    if not using then
97
        using = true
98
        cananimate = false
99
        for i = 0,1 , 0.045 do
100
	        weld.C0 = weld.C0:lerp(CFrame.new(0.152735472, -1.66358948, -1.08551645, -0.0427260287, 0.00281231292, 0.999082863, -0.999074996, 0.00474835932, -0.0427390598, -0.00486420048, -0.999984741, 0.00260683335),i)
101
            headweld.C0 = headweld.C0:lerp(CFrame.new(-4.65661287e-10, 1.49999952, 0, 0.601507425, -2.32830644e-10, 0.798867226, 3.0559022e-10, 1, 0, -0.798867226, -4.65661287e-10, 0.601507425),i)
102
            humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.63088727, -0.00573391188, -0.775853336, 0, 0.999972701, -0.00739025697, 0.775874496, 0.00466241874, 0.630870044),i)
103
            lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(0.0363237262, 0.350219727, -1.1563791, 0.495106995, -0.857149601, 0.1419992, 0.110766649, -0.0998312235, -0.988819599, 0.861742377, 0.505300522, 0.0455164276),i)
104
            rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.50056481, 0.516354084, -0.499166548, 0.995925009, -0.00520473719, 0.09003409, 0.0901844054, 0.0574772507, -0.994265079, -2.98023224e-08, 0.998333335, 0.057712432),i)
105
            game:GetService("RunService").RenderStepped:wait()
106
        end
107
	local hitbox = Instance.new("Part",banh)
108
	hitbox.Name = "HurtBox"
109
	hitbox.Size = Vector3.new(2.09, 3.4, 1.8)
110
	hitbox.Transparency = 1
111
	local hitboxwe = Instance.new("Weld",hitbox)
112
	hitboxwe.Part0 = hitbox
113
	hitboxwe.Part1 = banh
114
	hitboxwe.C0 = CFrame.new(0.230496407, 0.228847623, 1.76342273, -0.997520506, -0.0702080652, -0.00486185262, 0.00503299385, -0.00226099882, -0.999983966, 0.070195958, -0.997529984, 0.00260874908)
115
	function getbanned(part)
116
		local human = part.Parent:FindFirstChildOfClass("Humanoid")
117
		if human then
118
			ban:Play()
119
			Ban(human.Parent)
120
		end
121
	end
122
	hitbox.Touched:connect(getbanned)
123
	for i = 0,1 , 0.08 do
124
            headweld.C0 = headweld.C0:lerp(CFrame.new(-0.0249017328, 1.48724031, 2.04332173e-06, 0.499998868, 0, -0.866026163, 0, 1, 0, 0.866026163, 0, 0.499998868),i)
125
            humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 0.305942208, 0, -0.952050149, 0, 1, 0, 0.952050149, 0, 0.305942208):inverse(),i)
126
            lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.07653618, 0.305679321, -0.818206966, 0.707105398, -0.707108259, 4.32133675e-07, 0.122787982, 0.122786887, -0.984807909, 0.696365714, 0.696363032, 0.173647687),i)
127
            rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.74788636, 0.363031864, -0.7663396, 0.70710665, 0.707106948, -2.23517418e-08, -0.0616280138, 0.061627958, -0.99619478, -0.704416275, 0.704416037, 0.0871551335),i)
128
            game:GetService("RunService").RenderStepped:wait()
129
        end
130
        using = false
131
        cananimate = true
132
        hitbox:Destroy()
133
        weld.C0 = CFrame.new(0.0185670853, -1.69550169, -1.06726038, -0.997520506, 0.00503299711, 0.0701959729, -0.0702080429, -0.00226099929, -0.997529864, -0.00486185262, -0.999984622, 0.00260874978)
134
    end
135
end       
136
mouse.Button1Down:connect(swing)
137
138
while true do
139
	if cananimate then
140
        --Walking animation 
141
		if game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
142
			for i = 0.1,0.3 , 0.008 do
143
				if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
144
					headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
145
					humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
146
					lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53402293, 0.0594797134, 0.144087285, 0.997264206, 0.0707819909, 0.0213012099, -0.0739177391, 0.9549582, 0.287386209, 2.98023224e-08, -0.28817457, 0.957577825),i)
147
					rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54035091, 0.0769848824, -0.170524538, 0.99592495, -0.0847774297, 0.0307573378, 0.090184398, 0.936214805, -0.339659303, 0, 0.341049016, 0.940045416),i)
148
					rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.67391682, -0.738807678, 0.99999994, 0, 0, 0, 0.673916757, -0.738807261, 0, 0.738807321, 0.673916817),i)
149
					llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.67705727, 0.735931396, 1, 0, 0, 0, 0.677056909, 0.735930681, 0, -0.735930741, 0.677056968),i)
150
					game:GetService("RunService").Stepped:wait()
151
				end
152
			end
153
			for i = 0.1,0.3 , 0.008 do
154
				if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x > 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > 0.5 and cananimate then
155
					headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
156
					humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
157
					rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.69855976, 0.715551376, 1, 0, 0, 0, 0.698559642, 0.715551734, 0, -0.715551794, 0.698559701),i)
158
					llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.80723953, -0.590223312, 1, 0, 0, 0, 0.807239354, -0.590224087, 0, 0.590224147, 0.807239413),i)
159
					lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53173375, 0.0903658867, -0.222393572, 0.997264206, 0.0662034005, -0.0328776538, -0.0739177391, 0.893185973, -0.443570435, 2.98023224e-08, 0.444787204, 0.895636141),i)
160
					rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54079688, 0.0720610619, 0.156226337, 0.99592495, -0.085669145, -0.0281783342, 0.090184398, 0.946062148, 0.311179608, 0, -0.312452823, 0.949932992),i)
161
					game:GetService("RunService").Stepped:wait()
162
				end
163
			end
164
			-- Idle animation
165
		elseif game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 then
166
			for i = 0,1 , 0.1 do
167
				if cananimate and game.Players.LocalPlayer.Character.Torso.Velocity.x > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.x < 0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z > -0.5 or game.Players.LocalPlayer.Character.Torso.Velocity.z < 0.5 and cananimate then
168
					headweld.C0 = headweld.C0:lerp(CFrame.new(0, 1.5, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
169
					humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),i)
170
					lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53559077, 0.0383267403, 0, 0.997264206, 0.0739177391, 0, -0.0739177391, 0.997264266, 0, 2.98023224e-08, 1.86264515e-09, 0.999999881),i)
171
					rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.5, 0.398939848, -0.585105896, 1.00000012, 3.85171006e-10, 1.11758709e-08, 9.31322042e-09, -0.0281364974, -0.99960357, -1.16415322e-10, 0.999603391, -0.0281365328),i)
172
                    llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.75279808, -1.92294025, 0, 0.985477746, 0.16980496, 0, -0.16980496, 0.985477746, 0, 0, 0, 1),i)
173
                    rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.696445823, -1.93322277, 0, 0.946795106, -0.321837038, 0, 0.321837038, 0.946795106, 0, 0, 0, 1),i)
174
		            game:GetService("RunService").RenderStepped:wait()
175
				end
176
	        end
177
		end
178
	end
179
	wait()
180
end