Advertisement
ghostteen14

Untitled

May 13th, 2019
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.82 KB | None | 0 0
  1. -- This script has convert to FE by who i don't know?
  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,game,owner = owner,game
  6. local RealPlayer = Player
  7. do
  8. print("FE Compatibility code by Joseph Deramus")
  9. local rp = RealPlayer
  10. script.Parent = rp.Character
  11.  
  12. --RemoteEvent for communicating
  13. local Event = Instance.new("RemoteEvent")
  14. Event.Name = "UserInput_Event"
  15.  
  16. --Fake event to make stuff like Mouse.KeyDown work
  17. local function fakeEvent()
  18. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  19. t.connect = t.Connect
  20. return t
  21. end
  22.  
  23. --Creating fake input objects with fake variables
  24. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  25. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  26. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  27. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  28. end}
  29. --Merged 2 functions into one by checking amount of arguments
  30. CAS.UnbindAction = CAS.BindAction
  31.  
  32. --This function will trigger the events that have been :Connect()'ed
  33. local function te(self,ev,...)
  34. local t = m[ev]
  35. if t and t._fakeEvent then
  36. for _,f in pairs(t.Functions) do
  37. f(...)
  38. end
  39. end
  40. end
  41. m.TrigEvent = te
  42. UIS.TrigEvent = te
  43.  
  44. Event.OnServerEvent:Connect(function(plr,io)
  45. if plr~=rp then return end
  46. m.Target = io.Target
  47. m.Hit = io.Hit
  48. if not io.isMouse then
  49. local b = io.UserInputState == Enum.UserInputState.Begin
  50. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  51. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  52. end
  53. for _,t in pairs(CAS.Actions) do
  54. for _,k in pairs(t.Keys) do
  55. if k==io.KeyCode then
  56. t.Function(t.Name,io.UserInputState,io)
  57. end
  58. end
  59. end
  60. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  61. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  62. end
  63. end)
  64. Event.Parent = NLS([==[
  65. local Player = game:GetService("Players").LocalPlayer
  66. local Event = script:WaitForChild("UserInput_Event")
  67.  
  68. local Mouse = Player:GetMouse()
  69. local UIS = game:GetService("UserInputService")
  70. local input = function(io,a)
  71. if a then return end
  72. --Since InputObject is a client-side instance, we create and pass table instead
  73. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  74. end
  75. UIS.InputBegan:Connect(input)
  76. UIS.InputEnded:Connect(input)
  77.  
  78. local h,t
  79. --Give the server mouse data 30 times every second, but only if the values changed
  80. --If player is not moving their mouse, client won't fire events
  81. while wait(1/30) do
  82. if h~=Mouse.Hit or t~=Mouse.Target then
  83. h,t=Mouse.Hit,Mouse.Target
  84. Event:FireServer({isMouse=true,Target=t,Hit=h})
  85. end
  86. end]==],Player.Character)
  87.  
  88. ----Sandboxed game object that allows the usage of client-side methods and services
  89. --Real game object
  90. local _rg = game
  91.  
  92. --Metatable for fake service
  93. local fsmt = {
  94. __index = function(self,k)
  95. local s = rawget(self,"_RealService")
  96. if s then return s[k] end
  97. end,
  98. __newindex = function(self,k,v)
  99. local s = rawget(self,"_RealService")
  100. if s then s[k]=v end
  101. end,
  102. __call = function(self,...)
  103. local s = rawget(self,"_RealService")
  104. if s then return s(...) end
  105. end
  106. }
  107. local function FakeService(t,RealService)
  108. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  109. return setmetatable(t,fsmt)
  110. end
  111.  
  112. --Fake game object
  113. local g = {
  114. GetService = function(self,s)
  115. return self[s]
  116. end,
  117. Players = FakeService({
  118. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  119. },"Players"),
  120. UserInputService = FakeService(UIS,"UserInputService"),
  121. ContextActionService = FakeService(CAS,"ContextActionService"),
  122. }
  123. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  124. g.service = g.GetService
  125.  
  126. g.RunService = FakeService({
  127. RenderStepped = _rg:GetService("RunService").Heartbeat,
  128. BindToRenderStep = function(self,name,_,fun)
  129.  
  130. end,
  131. UnbindFromRenderStep = function(self,name)
  132. self._btrs[name]:Disconnect()
  133. end,
  134. },"RunService")
  135.  
  136. setmetatable(g,{
  137. __index=function(self,s)
  138. return _rg:GetService(s) or typeof(_rg[s])=="function"
  139. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  140. end,
  141. __newindex = fsmt.__newindex,
  142. __call = fsmt.__call
  143. })
  144. --Changing owner to fake player object to support owner:GetMouse()
  145. game,owner = g,g.Players.LocalPlayer
  146. end
  147. --Its Edited
  148.  
  149. script.Parent = workspace.CurrentCamera
  150. local plr = game:GetService("Players").LocalPlayer
  151.  
  152. local tool = Instance.new("Tool",plr:WaitForChild("Backpack"))
  153. tool.Grip = CFrame.new(0,-0.8,-0.2) * CFrame.Angles(math.rad(0),math.rad(180),math.rad(0))
  154. tool.Name = "Ban Hammer"
  155.  
  156. local part = Instance.new("Part",tool)
  157. part.Name = "Handle"
  158. part.Size = Vector3.new(4,6,4)
  159. part.TopSurface = "Smooth"
  160. part.BottomSurface = "Smooth"
  161. part.CanCollide = false
  162. part:BreakJoints()
  163.  
  164. local mesh = Instance.new("SpecialMesh",part)
  165. mesh.MeshId = "rbxassetid://10604848" --mesh.MeshId = "rbxassetid://132920499"
  166. mesh.TextureId = "rbxassetid://10605252" --"http://www.roblox.com/asset/?id=134479421"
  167. mesh.Scale = Vector3.new(0.5, 0.5, 0.5)
  168.  
  169. local sound = Instance.new("Sound",part)
  170. sound.SoundId = "rbxassetid://147722910"
  171. sound.Volume = 3
  172.  
  173. local sound2 = Instance.new("Sound",part)
  174. sound2.SoundId = "rbxassetid://139100774"
  175. sound2.Volume = 5
  176.  
  177. local sound3 = Instance.new("Sound",part)
  178. sound3.SoundId = "rbxassetid://139100774"
  179. sound3.Volume = 10
  180.  
  181. local sound4 = Instance.new("Sound",part)
  182. sound4.SoundId = "rbxassetid://572979823"
  183. sound4.Volume = 10
  184.  
  185. local sound5 = Instance.new("Sound",part)
  186. sound5.SoundId = "rbxassetid://1102543935"
  187. sound5.Volume = 10
  188.  
  189. local sound6 = Instance.new("Sound",part)
  190. sound6.SoundId = "rbxassetid://1102543935"
  191. sound6.Volume = 10
  192. sound6.TimePosition = 2
  193.  
  194. function firstHum(target)
  195. for i,v in pairs(target:GetChildren()) do
  196. if v:IsA("Humanoid") then
  197. return v
  198. end
  199. end
  200. return nil
  201. end
  202.  
  203. local slap = false
  204. local cd = false
  205.  
  206. plr:GetMouse().Button1Down:connect(function()
  207. if tool.Parent == plr.Character then
  208. if slap == false then
  209. slap = true
  210. sound2:Play()
  211. local str = Instance.new("StringValue")
  212. str.Name = "toolanim"
  213. str.Value = "Slash"
  214. str.Parent = tool
  215. wait(1)
  216. slap = false
  217. end
  218. end
  219. end)
  220.  
  221. part.Touched:connect(function(hit)
  222. if slap == true then
  223. if cd == false then
  224. if not hit:IsDescendantOf(plr.Character) then
  225. if hit.Parent:IsA("Model") then
  226. local fhum = firstHum(hit.Parent)
  227. if fhum then
  228. cd = true
  229. fhum.PlatformStand = true
  230. sound:Play()
  231. local con1
  232. con1 = game:GetService("RunService").Heartbeat:connect(function()
  233. fhum.PlatformStand = true
  234. end)
  235. wait(0.1)
  236. local vel = Instance.new("BodyVelocity",hit)
  237. vel.Velocity = ((hit.Position - plr.Character:WaitForChild("HumanoidRootPart").Position).unit + Vector3.new(0,0.5,0))*50
  238. vel.MaxForce = Vector3.new(10000000,10000000,10000000)
  239. wait(1)
  240. cd = false
  241. vel:Destroy()
  242. local vel2 = Instance.new("BodyVelocity",hit)
  243. vel2.Velocity = Vector3.new(0,12.5,0)
  244. vel2.MaxForce = Vector3.new(10000000,10000000,10000000)
  245. local p2 = Instance.new("Part",hit)
  246. p2.Anchored = true
  247. p2.Transparency = 0.6
  248. p2.CanCollide = false
  249. p2.Size = Vector3.new(0.2,0.2,0.2)
  250. p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  251. p2.BrickColor = BrickColor.new("Really Red")
  252. p2.Material = "Neon"
  253. local m2 = Instance.new("CylinderMesh",p2)
  254. m2.Scale = Vector3.new(60,10000,60)
  255. local scln = sound3:Clone()
  256. scln.Parent = hit
  257. scln:Play()
  258. local con2
  259. con2 = game:GetService("RunService").Heartbeat:connect(function()
  260. p2.CFrame = CFrame.new(hit.CFrame.p) * CFrame.Angles(math.rad(0),math.rad(90),math.rad(0))
  261. end)
  262. wait(7)
  263. vel2.Velocity = Vector3.new(0,0,0)
  264. wait(0.5)
  265. scln:Stop()
  266. local scln3 = sound5:Clone()
  267. scln3.Parent = hit
  268. scln3:Play()
  269. wait(1)
  270. local bav = Instance.new("BodyAngularVelocity",hit)
  271. bav.AngularVelocity = Vector3.new(math.random(0,360),math.random(0,360),math.random(0,360))
  272. vel2.Velocity = Vector3.new(0,-250,0)
  273. p2.BrickColor = BrickColor.new("Bright Blue")
  274. local scln6 = sound6:Clone()
  275. scln6.Parent = hit
  276. scln6:Play()
  277. local continue = false
  278. local htc
  279. htc = hit.Touched:connect(function(hitp)
  280. if not hitp:IsDescendantOf(hit.Parent) then
  281. continue = true
  282. scln6:Stop()
  283. vel2:Destroy()
  284. con2:Disconnect()
  285. con1:Disconnect()
  286. htc:Disconnect()
  287. p2:Destroy()
  288. end
  289. end)
  290. repeat wait() until continue == true
  291. local ctab = {}
  292. for i=1,4 do
  293. local p = Instance.new("Part",hit)
  294. p.Size = Vector3.new(30,30,30)
  295. p.Anchored = true
  296. p.CanCollide = false
  297. p.TopSurface = "Smooth"
  298. p.BottomSurface = "Smooth"
  299. p.Color = Color3.fromRGB(255,math.random(0,255),0)
  300. p.CFrame = hit.CFrame
  301. local con
  302. con = game:GetService("RunService").Heartbeat:connect(function()
  303. p.CFrame = p.CFrame * CFrame.Angles(math.rad(math.random(0,360)),math.rad(math.random(0,360)),math.rad(math.random(0,360)))
  304. p.Transparency = p.Transparency + 0.01
  305. if p.Transparency >= 1 then
  306. con:Disconnect()
  307. end
  308. end)
  309. table.insert(ctab,con)
  310. end
  311. Instance.new("Explosion",workspace).Position = hit.Position
  312. local scln2 = sound4:Clone()
  313. scln2.Parent = hit
  314. scln2:Play()
  315. vel2:Destroy()
  316. hit.Parent:BreakJoints()
  317. repeat wait() until not hit:IsDescendantOf(workspace)
  318. con2:Disconnect()
  319. end
  320. end
  321. end
  322. end
  323. end
  324. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement