Advertisement
Guest User

Ban Time SCript FE By owenpinet06

a guest
Jun 24th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.12 KB | None | 0 0
  1. -- This script has been converted to FE by owenpinet06
  2.  
  3.  
  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 owenpinet06")
  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. --HAMMER TIME--
  88. ---------------
  89.  
  90. --Original by Rufus14
  91.  
  92. --By owenpinet06
  93.  
  94. local plr = owner
  95. local character = plr.Character
  96. local lol = Instance.new("BillboardGui", character.Head)
  97. lol.Name = "Billboard"
  98. lol.Adornee = character.Head
  99. lol.Size = UDim2.new(10, 0, 5, 0)
  100. lol.StudsOffset = Vector3.new(0, 5, 0)
  101. local text = Instance.new("TextLabel", lol)
  102. text.Text = "A SCRIPT BY OWENPINET06"
  103. text.Size = UDim2.new(1, 0, 1, 0)
  104. text.TextScaled = true
  105. text.BackgroundTransparency = 1
  106. text.Font = Enum.Font.SourceSansLight
  107. text.TextColor3 = Color3.new(1, 1, 1)
  108. text.TextStrokeTransparency = 0
  109. wait(2)
  110. text:Destroy()
  111. character:findFirstChildOfClass("Humanoid").WalkSpeed = 0
  112. character:findFirstChildOfClass("Humanoid").JumpPower = 0
  113. local function addweld()
  114. if character:findFirstChild("Torso") then
  115. local heead = Instance.new("Weld", character.Torso)
  116. heead.Part0 = character.Torso
  117. heead.Part1 = character.Head
  118. heead.C0 = CFrame.new(0,1.5,0)
  119. heead.Name = "HeadWeld"
  120. wait(0.7)
  121. for i = 0,1 , 0.08 do
  122. heead.C0 = heead.C0:lerp(CFrame.new(0,1.5,0.4) * CFrame.fromEulerAnglesXYZ(1.2,0,0),i)
  123. wait()
  124. end
  125. wait(0.7)
  126. while wait() do
  127. heead.C0 = heead.C0 * CFrame.fromEulerAnglesXYZ(0.5,0.5,0.5)
  128. end
  129. elseif character:findFirstChild("UpperTorso") then
  130. local heead = Instance.new("Weld", character.UpperTorso)
  131. heead.Part0 = character.UpperTorso
  132. heead.Part1 = character.Head
  133. heead.C0 = CFrame.new(0,1.5,0)
  134. heead.Name = "HeadWeld"
  135. wait(0.7)
  136. for i = 0,1 , 0.08 do
  137. heead.C0 = heead.C0:lerp(CFrame.new(0,1.5,0.4) * CFrame.fromEulerAnglesXYZ(1.2,0,0),i)
  138. wait()
  139. end
  140. wait(0.7)
  141. while wait() do
  142. heead.C0 = heead.C0 * CFrame.fromEulerAnglesXYZ(0.5,0.5,0.5)
  143. end
  144. end
  145. end
  146. spawn(addweld)
  147. local banhamma = Instance.new("Part", character)
  148. banhamma.Size = Vector3.new(3, 10, 2)
  149. banhamma:BreakJoints()
  150. banhamma.CFrame = character.Head.CFrame * CFrame.new(0,20,0) * CFrame.fromEulerAnglesXYZ(math.pi/2,0,1)
  151. banhamma.Name = "ban"
  152. banhamma.Transparency = 1
  153. banhamma.Anchored = true
  154. local mesh = Instance.new("SpecialMesh", banhamma)
  155. mesh.MeshId = "http://www.roblox.com/asset/?id=10604848"
  156. mesh.TextureId = "http://www.roblox.com/asset/?id=10605252"
  157. local special = Instance.new("Sound", banhamma)
  158. special.SoundId = "rbxassetid://427090157"
  159. special.Volume = 2
  160. special:Play()
  161. for i = 1,20 do
  162. banhamma.Transparency = banhamma.Transparency - 0.05
  163. wait()
  164. end
  165. local hammertime = Instance.new("Sound", banhamma)
  166. hammertime.SoundId = "rbxassetid://176192087"
  167. hammertime.Volume = 3
  168. hammertime:Play()
  169. wait(1)
  170. if character:findFirstChild("Head") then
  171. local scream = Instance.new("Sound", character.Head)
  172. scream.SoundId = "rbxassetid://176238381"
  173. scream.Volume = 2
  174. scream:Play()
  175. banhamma.Anchored = false
  176. local angularvel = Instance.new("BodyAngularVelocity", banhamma)
  177. angularvel.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
  178. angularvel.AngularVelocity = banhamma.CFrame.rightVector * 20
  179. local touchedban = false
  180. local function touched(part)
  181. if part.Name == "Head" and part.Parent == character then
  182. touchedban = true
  183. local aaaaaaaa = Instance.new("Sound", banhamma)
  184. aaaaaaaa.SoundId = "rbxassetid://147722910"
  185. aaaaaaaa.Volume = 2
  186. aaaaaaaa:Play()
  187. angularvel:Destroy()
  188. banhamma.CanCollide = true
  189. for i,v in pairs(character:GetChildren()) do
  190. if v.ClassName == "Part" and v.Name ~= "ban" or v.ClassName == "Accessory" then
  191. v:destroy()
  192. end
  193. end
  194. end
  195. end
  196. banhamma.Touched:connect(touched)
  197. wait(2)
  198. if not touchedban and character:findFirstChild("Head") then
  199. banhamma.CFrame = character:findFirstChild("Head").CFrame
  200. end
  201. end
  202.  
  203. --------------
  204. --SCRIPT END--
  205. --------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement