· 6 years ago · Jun 02, 2019, 11:22 AM
1-- This script has been converted to FE by iPxter
2
3
4if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
5local Player,Mouse,mouse,UserInputService,ContextActionService = owner
6do
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
85end
86
87BAN = Instance.new("Sound")
88BAN.Parent = game.Workspace
89BAN.SoundId = "rbxassetid://147722910"
90MUSIC = Instance.new("Sound")
91MUSIC.SoundId = "rbxassetid://2761858312"
92MUSIC.Playing = true
93MUSIC.Parent = game.Workspace
94p = game.Players.mathias991
95c = p.Character
96head = c:WaitForChild("Head")
97rl = c:WaitForChild("Right Leg")
98ra = c:WaitForChild("Right Arm")
99ll = c:WaitForChild("Left Leg")
100la = c:WaitForChild("Left Arm")
101torso = c:WaitForChild("Torso")
102tool = Instance.new("Part")
103tool.Parent = ra
104tool.Name = "Hammer"
105tool.Position = ra.Position
106tool.Size = Vector3.new(1.02, 1.32, 1.05)
107tool.BrickColor = BrickColor.new("Really red")
108CF = CFrame.new()
109wel = Instance.new("Weld")
110wel.Parent = ra
111wel.Part0 = ra
112wel.Part1 = tool
113mouse = p:GetMouse()
114cir = Instance.new("Part")
115cir.Shape = "Cylinder"
116local SIZE = 1.3
117cir.BrickColor = BrickColor.new("Really red")
118cir.Material = "Neon"
119cir.Anchored = true
120cir.Size = Vector3.new(40, 12.88, 40)
121cir.Orientation = Vector3.new(0, 90, 90)
122an = Instance.new("Animation")
123an.AnimationId = "rbxassetid://03245564630"
124an.Parent = c
125local hum = c:WaitForChild("Humanoid")
126local anim = hum:LoadAnimation(c:FindFirstChildOfClass("Animation"))
127anim.Looped = false
128ff = Instance.new("ForceField")
129protec = Instance.new("Part")
130protec.Anchored = true
131protec.Transparency = 1
132protec.Size = Vector3.new(5, 0.7, 5)
133an2 = Instance.new("Animation")
134an2.AnimationId = "rbxassetid://03245693819"
135an2.Parent = c
136an2.Name = "Animation2"
137wel2 = Instance.new("Weld")
138attak = Instance.new("Part")
139attak.Size = Vector3.new(4, 3.17, 0.91)
140attak.Orientation = Vector3.new(90, 0, 0)
141attak.CanCollide = false
142wel2.Part0 = attak
143wel2.Part1 = torso
144BV = Instance.new("BodyVelocity")
145BV.velocity = CFrame.new(torso.Position,torso.Position+Vector3.new(0,0.1,0)).lookVector*math.random(70,100)
146local canattack = true
147local attacking = true
148CreateSound = Instance.new("Sound")
149
150attak.Touched:Connect(function(kill)
151
152 local humanoid = kill.Parent:FindFirstChild("Humanoid")
153 if (humanoid ~= nil) then -- if a humanoid exists, then
154 humanoid.Health = 0 -- damage the humanoid
155 BAN.Playing = true
156 end
157end)
158
159Debris = game:GetService("Debris")
160
161wow = Instance.new("Part")
162expp = Instance.new("Explosion")
163expp.Parent = wow
164expp.BlastRadius = 300
165
166cir.Touched:Connect(function(kill)
167 local humanoid = kill.Parent:FindFirstChild("Humanoid")
168 if (humanoid ~= nil) then -- if a humanoid exists, then
169 humanoid.Health = 0 -- damage the humanoid
170end
171end)
172
173function punch()
174 ra.CFrame = ra.CFrame + Vector3.new(5,0,0)
175 wait(0.5)
176 ra.CFrame = ra.CFrame + Vector3.new(-5,0,0)
177 wait(0.5)
178 la.CFrame = la.CFrame + Vector3.new(5,0,0)
179 wait(0.5)
180 la.CFrame = la.CFrame + Vector3.new(-5,0,0)
181 wow.Parent = game.Workspace
182 expp.Position = torso.Position
183 wait(3)
184 wow.Parent = game.Lighting
185 expp.Parent = wow
186end
187
188function ban()
189 hum.WalkSpeed = 0
190 anim:Play()
191 wait(0.6)
192 protec.Parent = game.Workspace
193 protec.Position = ra.Position
194 wait(0.1)
195 cir.Parent = game.Workspace
196 ff.Parent = c
197 cir.Position = rl.Position
198 cir.CFrame = cir.CFrame + Vector3.new()
199 wait(2)
200 cir.Parent = game.Lighting
201 ff.Parent = game.Lighting
202end
203
204function attack(hit,ra)
205 attak.Parent = game.Workspace
206 attak.Position = torso.Position
207 attak.CFrame = attak.CFrame + Vector3.new(10,0,0)
208 BV.Parent = attak
209 end
210
211mouse.KeyDown:Connect(function(key)
212 if key == "q" then
213 ban()
214 wait(2.6)
215 end
216end)
217
218mouse.Button1Down:Connect(function(key)
219 attack()
220end)
221
222mouse.KeyDown:Connect(function(key)
223 if key == "e" then
224 punch()
225 end
226end)
227
228while true do
229 hum.MaxHealth = math.huge
230 hum.Health = math.huge
231 wait(0.1)
232end