Advertisement
AxeuerAlt

Tool Giver

Jun 11th, 2019
2,442
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.12 KB | None | 0 0
  1. -- Converted using Mokiros's Model to Script plugin
  2. -- Converted string size: 2890
  3.  
  4. local Scripts = { function()
  5. a=script.Parent b=game:service("RunService")c=game:GetService("Debris")d={"RightSlash","LeftSlash","OverHeadSwing","LeftSwingFast","RightSwingFast"}e=5 f=20 g=50 h=e i=a.Handle a.Taunting.Value=false local r=Instance.new("Sound")r.SoundId="rbxasset://sounds\\swordslash.wav"r.Parent=i r.Volume=.7 local s=Instance.new("Sound")s.SoundId="http://www.roblox.com/asset/?id=28257433"s.Parent=i s.Volume=1 function j(t,u)while true do local v=t:FindFirstChild(u)if v~=nil then return v end wait()end end j(a,"Taunting")j(a,"RunAnim")k=j(i,"Sparkles")function l(t)if t.Parent~=nil then local u=t.Parent:findFirstChild("Humanoid")local v=a.Parent if v~=nil then local w=game.Players:playerFromCharacter(v)if w~=nil then local x=v:findFirstChild("Humanoid")if u~=nil then if x~=nil and u~=x then local y=v:FindFirstChild("Right Arm")if y~=nil then local z=y:FindFirstChild("RightGrip")if z~=nil and(z.Part0==i or z.Part1==i)then k.Enabled=true m(u,w)u:TakeDamage(h)wait(.3)k.Enabled=false end end end end end end if t.Name=="Handle"then k.Enabled=true wait(.3)k.Enabled=false end end end function m(t,u)for w,x in ipairs(t:GetChildren())do if x.Name=="creator"then x:remove()end end local v=Instance.new("ObjectValue")v.Value=u v.Name="creator"v.Parent=t c:AddItem(v,1)end a.Enabled=true function n()if a.Enabled and not a.Taunting.Value then a.Enabled=false local t=a.Parent local u=t.Humanoid if u==nil then print("Humanoid not found")return end r:play()o=d[math.random(1,#d)]while o==a.RunAnim.Value do o=d[math.random(1,#d)]end a.RunAnim.Value=o if o=="OverHeadSwing"then h=g else h=f end wait(.75)h=e a.Enabled=true end end function p()s:play()k.Enabled=false end a.Activated:connect(n)a.Equipped:connect(p)q=i.Touched:connect(l)
  6. end; function()
  7. local m=script.Parent a=CFrame.new(.15,-2,0)*CFrame.Angles(0,math.pi/2,0)b=a c=true d=false function e(n,o)while true do local p=n:FindFirstChild(o)if p~=nil then return p end wait()end end e(m,"Handle")function f(n)if not c then return end c=false n.Icon="rbxasset://textures\\GunWaitCursor.png"wait(.75)n.Icon="rbxasset://textures\\GunCursor.png"c=true end function g()b=a end function h()b=a*CFrame.Angles(math.pi/4,.4,0)end function i(n)delay(0,function()local o=tick()local p=o+n while tick()<p do m.Grip=b*CFrame.Angles(math.pi*2*((tick()-o)/n),0,0)wait()end m.Grip=b end)end function j(n)local o=lastequipped if n==nil then print("Mouse not found")return end n.Icon="rbxasset://textures\\GunCursor.png"n.Button1Down:connect(function()f(n)end)e(m,"Taunting")e(m,"Taunt")n.KeyDown:connect(function(p)p=string.lower(p)if p=="l"or p=="t"or p=="g"then local q=m.Parent:FindFirstChild("Humanoid")if q~=nil then m.Taunting.Value=true q.WalkSpeed=0 k=q:LoadAnimation(m.Taunt)k:Play()wait(1)h()m.Grip=b wait(1.4)g()m.Grip=b wait(1)q.WalkSpeed=16 m.Taunting.Value=false end end end)end m.Equipped:connect(j)e(m,"RunAnim")m.RunAnim.Changed:connect(function()local n=m.Parent:FindFirstChild("Humanoid")local o=m.Parent:FindFirstChild("Torso")local p=m:FindFirstChild(m.RunAnim.Value)if p and o and n then l=n:LoadAnimation(p)if l and n.Health>0 then l:Play()if m.RunAnim.Value=="RightSlash"or m.RunAnim.Value=="LeftSlash"or m.RunAnim.Value=="OverHeadSwing"then i(.5)end if m.RunAnim.Value=="OverHeadSwing"then wait(.25)h()wait(.5)g()m.Grip=b elseif m.RunAnim.Value=="OverHeadSwingFast"then wait(.125)h()wait(.25)g()m.Grip=b end end end end)
  8. end; function()
  9. local c=false function a(d)local e=game.Players:children()for f=1,#e do if e[f].Character.Humanoid==d then return e[f]end end return nil end function b(d)local e=d.Parent:findFirstChild("Humanoid")if(e~=nil)and c==false then c=true local f=a(e)if(f==nil)then return end script.Parent:clone().Parent=f.Backpack wait(2)c=false end end script.Parent.Parent.Touched:connect(b)
  10. end; function()
  11. a=nil function b()if script.Parent.Parent==workspace or script.Parent.Parent.className~="Backpack"then return end local d=script.Parent.Parent.Parent.Character if d~=nil then local e=d:findFirstChild("Torso")local f=d:findFirstChild(script.Parent.Name)if e~=nil and f==nil then local g=Instance.new("Model")g.Name=script.Parent.Name g.Parent=d a=script.Parent.Handle:clone()a.CanCollide=false a.Name=script.Parent.Name a.Parent=g local h=Instance.new("Weld")h.Name="BackWeld"h.Part0=e h.Part1=a h.C0=CFrame.new(0,0,0.6)h.C0=h.C0*CFrame.fromEulerAnglesXYZ(math.rad(90),math.rad(330),0)h.Parent=a end end end script.Parent.Unequipped:connect(b)function c()if a~=nil then a.Parent:remove()end end script.Parent.Equipped:connect(c)
  12. end; function()
  13.  
  14. end;}local ActualScripts = {}
  15. function s(var)
  16. local func = table.remove(Scripts,1)
  17. setfenv(func,setmetatable({script=var},{
  18. __index = getfenv(func),
  19. }))
  20. table.insert(ActualScripts,coroutine.wrap(func))
  21. end
  22.  
  23. local Decode = function(str,t,props,classes,values,ICList,Model,CurPar,LastIns,split,RemoveAndSplit,InstanceList)
  24. local tonum,table_remove,inst,parnt,comma,table_foreach = tonumber,table.remove,Instance.new,"Parent",",",
  25. function(t,f)
  26. for a,b in pairs(t) do
  27. f(a,b)
  28. end
  29. end
  30. local Types = {
  31. Color3 = Color3.new,
  32. Vector3 = Vector3.new,
  33. Vector2 = Vector2.new,
  34. UDim = UDim.new,
  35. UDim2 = UDim2.new,
  36. CFrame = CFrame.new,
  37. Rect = Rect.new,
  38. NumberRange = NumberRange.new,
  39. NumberSequence = function(...)
  40. local a = {...}
  41. local t = {}
  42. repeat
  43. t[#t+1] = NumberSequenceKeypoint.new(table_remove(a,1),table_remove(a,1),table_remove(a,1))
  44. until #a==0
  45. return NumberSequence.new(t)
  46. end,
  47. ColorSequence = function(...)
  48. local a = {...}
  49. local t = {}
  50. repeat
  51. t[#t+1] = ColorSequenceKeypoint.new(table_remove(a,1),Color3.new(table_remove(a,1),table_remove(a,1),table_remove(a,1)))
  52. until #a==0
  53. return ColorSequence.new(t)
  54. end,
  55. number = tonumber,
  56. boolean = function(a)
  57. return a=="1"
  58. end
  59. }
  60. split = function(str,sep)
  61. if not str then return end
  62. local fields = {}
  63. local ConcatNext = false
  64. str:gsub(("([^%s]+)"):format(sep),function(c)
  65. if ConcatNext == true then
  66. fields[#fields] = fields[#fields]..sep..c
  67. ConcatNext = false
  68. else
  69. fields[#fields+1] = c
  70. end
  71. if c:sub(#c)=="\\" then
  72. c = fields[#fields]
  73. fields[#fields] = c:sub(1,#c-1)
  74. ConcatNext = true
  75. end
  76. end)
  77. return fields
  78. end
  79. RemoveAndSplit = function(t)
  80. return split(table_remove(t,1),comma)
  81. end
  82. t = split(str,";")
  83. props = RemoveAndSplit(t)
  84. classes = RemoveAndSplit(t)
  85. values = split(table_remove(t,1),'|')
  86. ICList = RemoveAndSplit(t)
  87. InstanceList = {}
  88. Model = inst"Model"
  89. CurPar = Model
  90. table_foreach(t,function(ct,c)
  91. if c=="n" or c=="p" then
  92. CurPar = c=="n" and LastIns or CurPar[parnt]
  93. else
  94. ct = split(c,"|")
  95. local class = classes[tonum(table_remove(ct,1))]
  96. if class=="UnionOperation" then
  97. LastIns = {Locked="true",Anchored="true",UsePartColor="true"}
  98. else
  99. LastIns = inst(class)
  100. if LastIns:IsA"Script" then
  101. s(LastIns)
  102. end
  103. end
  104.  
  105. local function SetProperty(LastIns,p,str,s)
  106. s = Types[typeof(LastIns[p])]
  107. LastIns[p] = s and s(unpack(split(str,comma))) or str
  108. end
  109.  
  110. local UnionData
  111. table_foreach(ct,function(s,p,a,str)
  112. a = p:find":"
  113. p,str = props[tonum(p:sub(1,a-1))],values[tonum(p:sub(a+1))]
  114. if p=="UnionData" then
  115. UnionData = split(str," ")
  116. return
  117. end
  118. if class=="UnionOperation" then
  119. LastIns[p] = str
  120. return
  121. end
  122. SetProperty(LastIns,p,str)
  123. end)
  124.  
  125. if UnionData then
  126. local LI_Data = LastIns
  127. LastIns = DecodeUnion(UnionData)
  128. table_foreach(LI_Data,function(p,str)
  129. SetProperty(LastIns,p,str)
  130. end)
  131. end
  132. table.insert(InstanceList,LastIns)
  133. LastIns[parnt] = CurPar
  134. end
  135. end)
  136. table_remove(ICList,1)
  137. table_foreach(ICList,function(a,b)
  138. b = split(b,">")
  139. InstanceList[tonum(b[1])][props[tonum(b[2])]] = InstanceList[tonum(b[3])]
  140. end)
  141.  
  142. return Model:GetChildren()
  143. end
  144.  
  145. local Objects = Decode('Name,PrimaryPart,Anchored,Color,Transparency,Position,Orientation,Size,C0,C1,Part0,Part1,TopSurface,TextureId,Grip,GripPos,GripForward,GripRight,Material,BottomSurface,Scale,MeshId,MeshType,Heat,Secon'
  146. ..'daryColor,SoundId,Volume,Enabled,SparkleColor,Brightness,Value,AnimationId;Part,Model,Snap,Tool,SpecialMesh,Fire,Sound,Sparkles,PointLight,StringValue,Script,BoolValue,LocalScript,Animation;Part|1|0.1'
  147. ..'05,0.164,0.207|0.3|4.3,3,5.7|0,90,0|3,6,1|0,-3,0,1,0,0,-0,-0,-1,0,1,0|4.299,10,5.7,-0.001,0.999,-0.001,-0.001,-0.001,-1,-1,-0.001,0|5.299,3,3.7|0,-180,0|5.299,10,3.7,-1,-0.001,0,-0.001,0,-1,0,-1,-0.00'
  148. ..'1|PUT THE WEAPON IN THIS BRICK|0.949,0.952,0.952|3.299,2.705,5.701|-0.01,0,0|1,1.2,5|0|OverseerSword|http://www.roblox.com/asset/?id=101420051|-0,-2,0.1,0.954,0,0.298,0,1,-0,-0.299,0,0.954|-0,-2,0.1|-'
  149. ..'0.299,0,-0.955|0.954,0,-0.299|Handle|0.066,0.066,0.066|800|5.73,2.62,5.719|0,-180,180|0.26,5.24,0.639|0.75,0.75,0.75|http://www.roblox.com/asset/?id=94840342|http://www.roblox.com/asset/?id=250727362|'
  150. ..'5|0,0.501,0|4|6|0,0.2,0|rbxasset://sounds/swordslash.wav|0.699|http://www.roblox.com/asset/?id=28257433|0,2.04,0|0|0,0.666,0|2|RunAnim|RightSwingFast|SwordScript|Taunting|Local Gui|LeftSlash|http://ww'
  151. ..'w.roblox.com/Asset?ID=74894663|LeftSwingFast|http://www.roblox.com/Asset?ID=86313418|OverHeadSwing|http://www.roblox.com/Asset?ID=74897796|RightSlash|http://www.roblox.com/Asset?ID=74813494|http://www'
  152. ..'.roblox.com/Asset?ID=86313260|Taunt|http://www.roblox.com/Asset?ID=74901237|PUT THIS IN THE WEAPON|WeldToBackScript|7.3,3,5.699|5,6,1|7.299,10,5.7,-0.001,0.999,-0.001,-0.001,-0.001,-1,-1,-0.001,0|5.29'
  153. ..'9,3,7.699|5.299,10,7.699,-1,-0.001,0,-0.001,0,-1,0,-1,-0.001|5.8,6.6,5.699|5,1.2,4|0,-0.601,0,1,0,0,-0,-0,-1,0,1,0|-0.501,3,-2,0,-1,0,-0.001,-0.001,-1,0.999,0,-0.001|-0.001,2.999,1.499,0.999,-0.001,-0'
  154. ..'.001,0,-0.001,-1,-0.001,0.999,0|-0.001,2.999,-1.5,0.999,-0.001,-0.001,0,-0.001,-1,-0.001,0.999,0|-0.501,3,2,0,-1,0,-0.001,-0.001,-1,0.999,0,-0.001|READ ME FOR INSTRUCTIONS;0,1>2>34,3>11>2,3>12,5>11>4,'
  155. ..'5>12,31>11>30,31>12,33>11>32,33>12,35>11>34,35>12>4,36>11>34,36>12>2,37>11>34,37>12>30,38>11>34,38>12>32;2;n;1|3:2|4:3|5:4|6:5|7:6|8:7|4:3|4:3;n;3|9:8|10:9;p;1|3:2|4:3|5:4|6:10|7:11|8:7|4:3|4:3;n;3|9:'
  156. ..'8|10:12;p;1|1:13|3:2|4:14|6:15|7:16|8:17|13:18|4:14|4:14;n;4|1:19|14:20|15:21|16:22|17:23|18:24;n;1|1:25|4:26|19:27|6:28|7:29|8:30|20:18|13:18|4:26|4:26;n;5|21:31|22:32|14:33|23:34;6|4:35|8:36|24:37|2'
  157. ..'5:38|4:35|4:35;7|26:39|27:40;7|26:41|27:2;7|26:41|27:2;8|4:42|28:43|29:38|4:42|4:42;7|26:39|27:40;7|26:41|27:2;9|4:44|30:45|4:44|4:44;p;10|1:46|31:47;11|1:48;12|1:49;13|1:50;14|1:51|32:52;14|1:53|32:5'
  158. ..'4;14|1:55|32:56;14|1:57|32:58;14|1:47|32:59;14|1:60|32:61;11|1:62;13|1:63;p;p;1|3:2|4:3|5:4|6:64|7:6|8:65|4:3|4:3;n;3|9:8|10:66;p;1|3:2|4:3|5:4|6:67|7:11|8:7|4:3|4:3;n;3|9:8|10:68;p;1|3:2|4:3|5:4|6:69'
  159. ..'|7:6|8:70|13:18|4:3|4:3;n;3|9:71|10:72;3|9:71|10:73;3|9:71|10:74;3|9:71|10:75;p;11|1:76;p;')
  160. for _,Object in pairs(Objects) do
  161. Object.Parent = script and script.Parent==workspace and script or workspace
  162. end
  163. for _,f in pairs(ActualScripts) do f() end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement