Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This script has been converted to FE by owenpinet06
- if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
- local Player,Mouse,mouse,UserInputService,ContextActionService = owner
- do
- print("FE Compatibility code by Mokiros | Translated to FE by owenpinet06")
- script.Parent = Player.Character
- --RemoteEvent for communicating
- local Event = Instance.new("RemoteEvent")
- Event.Name = "UserInput_Event"
- --Fake event to make stuff like Mouse.KeyDown work
- local function fakeEvent()
- local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
- t.connect = t.Connect
- return t
- end
- --Creating fake input objects with fake variables
- local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
- local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
- local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
- CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
- end}
- --Merged 2 functions into one by checking amount of arguments
- CAS.UnbindAction = CAS.BindAction
- --This function will trigger the events that have been :Connect()'ed
- local function te(self,ev,...)
- local t = m[ev]
- if t and t._fakeEvent and t.Function then
- t.Function(...)
- end
- end
- m.TrigEvent = te
- UIS.TrigEvent = te
- Event.OnServerEvent:Connect(function(plr,io)
- if plr~=Player then return end
- if io.isMouse then
- m.Target = io.Target
- m.Hit = io.Hit
- else
- local b = io.UserInputState == Enum.UserInputState.Begin
- if io.UserInputType == Enum.UserInputType.MouseButton1 then
- return m:TrigEvent(b and "Button1Down" or "Button1Up")
- end
- for _,t in pairs(CAS.Actions) do
- for _,k in pairs(t.Keys) do
- if k==io.KeyCode then
- t.Function(t.Name,io.UserInputState,io)
- end
- end
- end
- m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
- UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
- end
- end)
- Event.Parent = NLS([==[
- local Player = game:GetService("Players").LocalPlayer
- local Event = script:WaitForChild("UserInput_Event")
- local UIS = game:GetService("UserInputService")
- local input = function(io,a)
- if a then return end
- --Since InputObject is a client-side instance, we create and pass table instead
- Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
- end
- UIS.InputBegan:Connect(input)
- UIS.InputEnded:Connect(input)
- local Mouse = Player:GetMouse()
- local h,t
- --Give the server mouse data 30 times every second, but only if the values changed
- --If player is not moving their mouse, client won't fire events
- while wait(1/30) do
- if h~=Mouse.Hit or t~=Mouse.Target then
- h,t=Mouse.Hit,Mouse.Target
- Event:FireServer({isMouse=true,Target=t,Hit=h})
- end
- end]==],Player.Character)
- Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
- end
- ---------------
- --HAMMER TIME--
- ---------------
- --Original by Rufus14
- --By owenpinet06
- local plr = owner
- local character = plr.Character
- local lol = Instance.new("BillboardGui", character.Head)
- lol.Name = "Billboard"
- lol.Adornee = character.Head
- lol.Size = UDim2.new(10, 0, 5, 0)
- lol.StudsOffset = Vector3.new(0, 5, 0)
- local text = Instance.new("TextLabel", lol)
- text.Text = "A SCRIPT BY OWENPINET06"
- text.Size = UDim2.new(1, 0, 1, 0)
- text.TextScaled = true
- text.BackgroundTransparency = 1
- text.Font = Enum.Font.SourceSansLight
- text.TextColor3 = Color3.new(1, 1, 1)
- text.TextStrokeTransparency = 0
- wait(2)
- text:Destroy()
- character:findFirstChildOfClass("Humanoid").WalkSpeed = 0
- character:findFirstChildOfClass("Humanoid").JumpPower = 0
- local function addweld()
- if character:findFirstChild("Torso") then
- local heead = Instance.new("Weld", character.Torso)
- heead.Part0 = character.Torso
- heead.Part1 = character.Head
- heead.C0 = CFrame.new(0,1.5,0)
- heead.Name = "HeadWeld"
- wait(0.7)
- for i = 0,1 , 0.08 do
- heead.C0 = heead.C0:lerp(CFrame.new(0,1.5,0.4) * CFrame.fromEulerAnglesXYZ(1.2,0,0),i)
- wait()
- end
- wait(0.7)
- while wait() do
- heead.C0 = heead.C0 * CFrame.fromEulerAnglesXYZ(0.5,0.5,0.5)
- end
- elseif character:findFirstChild("UpperTorso") then
- local heead = Instance.new("Weld", character.UpperTorso)
- heead.Part0 = character.UpperTorso
- heead.Part1 = character.Head
- heead.C0 = CFrame.new(0,1.5,0)
- heead.Name = "HeadWeld"
- wait(0.7)
- for i = 0,1 , 0.08 do
- heead.C0 = heead.C0:lerp(CFrame.new(0,1.5,0.4) * CFrame.fromEulerAnglesXYZ(1.2,0,0),i)
- wait()
- end
- wait(0.7)
- while wait() do
- heead.C0 = heead.C0 * CFrame.fromEulerAnglesXYZ(0.5,0.5,0.5)
- end
- end
- end
- spawn(addweld)
- local banhamma = Instance.new("Part", character)
- banhamma.Size = Vector3.new(3, 10, 2)
- banhamma:BreakJoints()
- banhamma.CFrame = character.Head.CFrame * CFrame.new(0,20,0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,1)
- banhamma.Name = "ban"
- banhamma.Transparency = 1
- banhamma.Anchored = true
- local mesh = Instance.new("SpecialMesh", banhamma)
- mesh.MeshId = "http://www.roblox.com/asset/?id=10604848"
- mesh.TextureId = "http://www.roblox.com/asset/?id=10605252"
- local special = Instance.new("Sound", banhamma)
- special.SoundId = "rbxassetid://427090157"
- special.Volume = 2
- special:Play()
- for i = 1,20 do
- banhamma.Transparency = banhamma.Transparency - 0.05
- wait()
- end
- local hammertime = Instance.new("Sound", banhamma)
- hammertime.SoundId = "rbxassetid://176192087"
- hammertime.Volume = 3
- hammertime:Play()
- wait(1)
- if character:findFirstChild("Head") then
- local scream = Instance.new("Sound", character.Head)
- scream.SoundId = "rbxassetid://176238381"
- scream.Volume = 2
- scream:Play()
- banhamma.Anchored = false
- local angularvel = Instance.new("BodyAngularVelocity", banhamma)
- angularvel.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
- angularvel.AngularVelocity = banhamma.CFrame.rightVector * 20
- local touchedban = false
- local function touched(part)
- if part.Name == "Head" and part.Parent == character then
- touchedban = true
- local aaaaaaaa = Instance.new("Sound", banhamma)
- aaaaaaaa.SoundId = "rbxassetid://147722910"
- aaaaaaaa.Volume = 2
- aaaaaaaa:Play()
- angularvel:Destroy()
- banhamma.CanCollide = true
- for i,v in pairs(character:GetChildren()) do
- if v.ClassName == "Part" and v.Name ~= "ban" or v.ClassName == "Accessory" then
- v:destroy()
- end
- end
- end
- end
- banhamma.Touched:connect(touched)
- wait(2)
- if not touchedban and character:findFirstChild("Head") then
- banhamma.CFrame = character:findFirstChild("Head").CFrame
- end
- end
- --------------
- --SCRIPT END--
- --------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement