Advertisement
bmrx13

PUNCH

Feb 23rd, 2019
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.04 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. local rp = RealPlayer
  6. script.Parent = rp.Character
  7.  
  8. --RemoteEvent for communicating
  9. local Event = Instance.new("RemoteEvent")
  10. Event.Name = "UserInput_Event"
  11.  
  12. --Fake event to make stuff like Mouse.KeyDown work
  13. local function fakeEvent()
  14. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  15. t.connect = t.Connect
  16. return t
  17. end
  18.  
  19. --Creating fake input objects with fake variables
  20. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  21. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  22. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  23. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  24. end}
  25. --Merged 2 functions into one by checking amount of arguments
  26. CAS.UnbindAction = CAS.BindAction
  27.  
  28. --This function will trigger the events that have been :Connect()'ed
  29. local function te(self,ev,...)
  30. local t = m[ev]
  31. if t and t._fakeEvent then
  32. for _,f in pairs(t.Functions) do
  33. f(...)
  34. end
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=rp then return end
  42. m.Target = io.Target
  43. m.Hit = io.Hit
  44. if not io.isMouse then
  45. local b = io.UserInputState == Enum.UserInputState.Begin
  46. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  47. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  48. end
  49. for _,t in pairs(CAS.Actions) do
  50. for _,k in pairs(t.Keys) do
  51. if k==io.KeyCode then
  52. t.Function(t.Name,io.UserInputState,io)
  53. end
  54. end
  55. end
  56. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  57. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  58. end
  59. end)
  60. Event.Parent = NLS([==[
  61. local Player = game:GetService("Players").LocalPlayer
  62. local Event = script:WaitForChild("UserInput_Event")
  63.  
  64. local Mouse = Player:GetMouse()
  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,Hit=Mouse.Hit,Target=Mouse.Target})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local h,t
  75. --Give the server mouse data 30 times every second, but only if the values changed
  76. --If player is not moving their mouse, client won't fire events
  77. while wait(1/30) do
  78. if h~=Mouse.Hit or t~=Mouse.Target then
  79. h,t=Mouse.Hit,Mouse.Target
  80. Event:FireServer({isMouse=true,Target=t,Hit=h})
  81. end
  82. end]==],Player.Character)
  83.  
  84. ----Sandboxed game object that allows the usage of client-side methods and services
  85. --Real game object
  86. local _rg = game
  87.  
  88. --Metatable for fake service
  89. local fsmt = {
  90. __index = function(self,k)
  91. local s = rawget(self,"_RealService")
  92. if s then return s[k] end
  93. end,
  94. __newindex = function(self,k,v)
  95. local s = rawget(self,"_RealService")
  96. if s then s[k]=v end
  97. end,
  98. __call = function(self,...)
  99. local s = rawget(self,"_RealService")
  100. if s then return s(...) end
  101. end
  102. }
  103. local function FakeService(t,RealService)
  104. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  105. return setmetatable(t,fsmt)
  106. end
  107.  
  108. --Fake game object
  109. local g = {
  110. GetService = function(self,s)
  111. return self[s]
  112. end,
  113. Players = FakeService({
  114. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  115. },"Players"),
  116. UserInputService = FakeService(UIS,"UserInputService"),
  117. ContextActionService = FakeService(CAS,"ContextActionService"),
  118. }
  119. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  120. g.service = g.GetService
  121.  
  122. g.RunService = FakeService({
  123. RenderStepped = _rg:GetService("RunService").Heartbeat,
  124. BindToRenderStep = function(self,name,_,fun)
  125. self._btrs[name] = self.Heartbeat:Connect(fun)
  126. end,
  127. UnbindFromRenderStep = function(self,name)
  128. self._btrs[name]:Disconnect()
  129. end,
  130. },"RunService")
  131.  
  132. setmetatable(g,{
  133. __index=function(self,s)
  134. return _rg:GetService(s) or typeof(_rg[s])=="function"
  135. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  136. end,
  137. __newindex = fsmt.__newindex,
  138. __call = fsmt.__call
  139. })
  140. --Changing owner to fake player object to support owner:GetMouse()
  141. game,owner = g,g.Players.LocalPlayer
  142. end
  143. local plr = game:GetService("Players").LocalPlayer
  144. local plrg = plr.PlayerGui
  145. local mouse = plr:GetMouse()
  146. local char = plr.Character
  147. local h = char:FindFirstChild("Head")
  148. local t = char:FindFirstChild("Torso")
  149. local ra = char:FindFirstChild("Right Arm")
  150. local la = char:FindFirstChild("Left Arm")
  151. local rl = char:FindFirstChild("Right Leg")
  152. local ll = char:FindFirstChild("Left Leg")
  153. local rs = t:FindFirstChild("Right Shoulder")
  154. local ls = t:FindFirstChild("Left Shoulder")
  155. local rh = t:FindFirstChild("Right Hip")
  156. local lh = t:FindFirstChild("Left Hip")
  157. local nec = t.Neck
  158. local rut = char.HumanoidRootPart
  159. local rutj = rut.RootJoint
  160. local hum = char:FindFirstChildOfClass("Humanoid")
  161. local tweens = game:GetService("TweenService")
  162. local scr = Instance.new("ScreenGui",plrg)
  163. local bil = Instance.new("BillboardGui",char) bil.Name = "ChatFunc" bil.Adornee = h bil.Size = UDim2.new(1,0,1,0) bil.StudsOffset = Vector3.new(0,2,0)
  164. local rad = math.rad
  165. local huge = math.huge
  166. local brcf = rutj.C0
  167. local trans = 1
  168. local trans1 = 0
  169. local intros = 1.1
  170. local intross = .6
  171. local crnc = false
  172. local mcro = false
  173. local ek = false
  174. local began = false
  175. local using = false
  176. local deb = true
  177. local deb1 = false
  178. local defc0 = {nec.C0,rutj.C0,rs.C0,ls.C0,rh.C0,lh.C0}
  179. local defc1 = {nec.C1,rutj.C1,rs.C1,ls.C1,rh.C1,lh.C1}
  180. local rw = Instance.new("Weld",ra) rw.Part0 = ra rw.Part1 = nil rw.C1 = CFrame.new(1.5,.5,0) rw.C0 = CFrame.new(0,.5,0)
  181. local lw = Instance.new("Weld",la) lw.Part0 = la lw.Part1 = nil lw.C1 = CFrame.new(-1.5,.5,0) lw.C0 = CFrame.new(0,.5,0)
  182. local punc = Instance.new("Sound",char["Torso"]) punc.Volume = 0.5 punc.SoundId = "rbxassetid://2770705979"
  183. local blob = Instance.new("Sound",workspace) blob.Volume = 0.5 blob.SoundId = "rbxassetid://710813246"
  184. local ff = Instance.new("ForceField",char) ff.Visible = false
  185. local hitb = Instance.new("Part",char) hitb.Size = Vector3.new(1.5,1.5,1.5) hitb.CanCollide = false hitb.Transparency = 1
  186. local weldo = Instance.new("Weld",hitb) weldo.Part0 = ra weldo.Part1 = hitb weldo.C0 = CFrame.new(0,-.5,0)
  187. local tlerp = function(inst,tablee,leinght,easingstyle,easingdirec)
  188. local info = TweenInfo.new(
  189. leinght,
  190. easingstyle,
  191. easingdirec,
  192. 0,
  193. false,
  194. 0
  195. )
  196. local lerp = tweens:Create(inst,info,tablee)
  197. lerp:Play()
  198. end
  199. function fling(hoo,direc,power)
  200. local endd = false
  201. local vel = Instance.new("BodyVelocity",hoo) vel.MaxForce = Vector3.new(huge,huge,huge) vel.Velocity = direc * power
  202. coroutine.resume(coroutine.create(function()
  203. wait(1)
  204. vel:Destroy()
  205. wait(1)
  206. if not endd then
  207. blob.TimePosition = .2
  208. blob:Play()
  209. local expl = Instance.new("Explosion",workspace) expl.Position = hoo.Position
  210. hoo.Parent:BreakJoints()
  211. end
  212. end))
  213.  
  214. hoo.Touched:connect(function(hit)
  215. if not endd and hit.Parent ~= hoo.Parent and hit.Parent ~= char and hit.Name ~= "SuperFireEEE" then
  216. endd = true
  217. vel:Destroy()
  218. blob.TimePosition = .2
  219. blob:Play()
  220. local expl = Instance.new("Explosion",workspace) expl.Position = hoo.Position
  221. hoo.Parent:BreakJoints()
  222. end
  223. end)
  224. end
  225. hitb.Touched:connect(function(hit)
  226. if not deb and hit.Parent ~= char then
  227. if hit.Parent:FindFirstChild("Torso") ~= nil and hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil or hit.Parent:FindFirstChild("UpperTorso") ~= nil and hit.Parent:FindFirstChildOfClass("Humanoid") ~= nil then
  228. deb = true
  229. punc:Play()
  230. hit.Parent:FindFirstChildOfClass("Humanoid").PlatformStand = true
  231. local t = hit.Parent:FindFirstChild("Torso") or hit.Parent:FindFirstChild("UpperTorso")
  232. local cf = CFrame.new(t.Position,mouse.Hit.p)
  233. for i = 1,math.random(3,5) do
  234. fire(t,char,"Maroon","Crimson",math.random(2,6)/math.random(8,12),.1,1.5,"SmoothPlastic",math.random(-1,1),1,"Block",math.random(15,25),0,.5,false)
  235. end
  236. fling(t,cf.lookVector,400)
  237. end
  238. end
  239. end)
  240. function fire(partp,parent,color1,color2,ssize,osize,leinght,material,minr,maxr,shape,spread,st,ot,onlyraise)
  241. local part = Instance.new("Part",parent) part.Name = "SuperFireEEE" part.Size = Vector3.new(ssize,ssize,ssize) part.Transparency = st part.CanCollide = false part.Anchored = true part.Shape = shape part.Material = material part.BrickColor = BrickColor.new(color1) part.CFrame = partp.CFrame * CFrame.new(partp.Size.x/math.random(-20,20),partp.Size.y/math.random(-20,20),partp.Size.z/math.random(-20,20))
  242. if onlyraise == true then
  243. part.CFrame = CFrame.new(part.CFrame.p,Vector3.new(nil,part.CFrame.y,part.CFrame.z))
  244. else
  245.  
  246. end
  247. local pcf = part.CFrame
  248. tlerp(part,{CFrame = pcf * CFrame.new(math.random(-spread,spread)/math.random(2,4),math.random(minr,maxr),math.random(-spread,spread)/math.random(2,4)) * CFrame.Angles(rad(math.random(-180,180)),rad(math.random(-180,180)),rad(math.random(-180,180))),Size = Vector3.new(osize,osize,osize),Color = BrickColor.new(color2).Color,Transparency = ot},leinght,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut)
  249. game:GetService("Debris"):AddItem(part,leinght)
  250. end
  251. function PlusUltra()
  252. using = true
  253. rw.Part1 = t lw.Part1 = t
  254. local tiem = .6
  255. tlerp(rutj,{C0 = defc0[2] * CFrame.Angles(rad(-10),rad(0),rad(-30))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  256. tlerp(nec,{C0 = defc0[1] * CFrame.Angles(rad(10),rad(0),rad(30))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  257. tlerp(rw,{C0 = CFrame.new(0,.2,-.3) * CFrame.Angles(rad(-110),rad(20),rad(0))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  258. tlerp(lw,{C0 = CFrame.new(0,.9,0) * CFrame.Angles(rad(-80),rad(0),rad(40)) * CFrame.Angles(rad(0),rad(-40),rad(0))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  259. tlerp(rh,{C0 = defc0[5] * CFrame.Angles(rad(-5),rad(10),rad(-10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  260. tlerp(lh,{C0 = defc0[6] * CFrame.Angles(rad(-5),rad(10),rad(10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  261. wait(tiem)
  262. coroutine.resume(coroutine.create(function()
  263. for i = 1,7 do
  264. fire(ra,char,"White","Black",math.random(10,20)/math.random(8,12),.1,1.7,"Neon",math.random(7,9),math.random(12,15),"Block",math.random(13,20),math.random(3,6)/10,1,false)
  265. wait(.06)
  266. end
  267. end))
  268. deb = false
  269. tiem = .3
  270. tlerp(rutj,{C0 = defc0[2] * CFrame.Angles(rad(10),rad(0),rad(60))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  271. tlerp(nec,{C0 = defc0[1] * CFrame.Angles(rad(-10),rad(0),rad(-60))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  272. tlerp(rw,{C0 = CFrame.new(0,.8,-.3) * CFrame.Angles(rad(-115),rad(40),rad(20))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  273. tlerp(lw,{C0 = CFrame.new(0,.3,0) * CFrame.Angles(rad(-80),rad(0),rad(20)) * CFrame.Angles(rad(0),rad(-40),rad(0))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  274. tlerp(rh,{C0 = defc0[5] * CFrame.Angles(rad(-5),rad(10),rad(10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  275. tlerp(lh,{C0 = defc0[6] * CFrame.Angles(rad(-5),rad(10),rad(-10))},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  276. wait(tiem)
  277. deb = true
  278. tiem = .7
  279. tlerp(rutj,{C0 = defc0[2]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  280. tlerp(nec,{C0 = defc0[1]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  281. tlerp(rw,{C0 = CFrame.new(0,.5,0)},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  282. tlerp(lw,{C0 = CFrame.new(0,.5,0)},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  283. tlerp(rh,{C0 = defc0[5]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  284. tlerp(lh,{C0 = defc0[6]},tiem,Enum.EasingStyle.Quint,Enum.EasingDirection.InOut)
  285. wait(tiem)
  286. using = false
  287. rw.Part1 = nil lw.Part1 = nil
  288. end
  289. mouse.KeyDown:connect(function(key)
  290. if key == "e" and not using then
  291. PlusUltra()
  292. end
  293. if key == "t" and hitb.Transparency == 1 then
  294. hitb.Transparency = 0
  295. elseif key == "t" and hitb.Transparency == 0 then
  296. hitb.Transparency = 1
  297. end
  298. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement