Advertisement
Guest User

Untitled

a guest
Aug 15th, 2023
798
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 38.18 KB | None | 0 0
  1. -- [[ Ghost Roamer, by Melon and MyWorld ]] --
  2. --[[ Note, MyWorld did not work on this script,
  3. im just using some of his sines and raycasts.]]--
  4. -- [[ Hats ]] --
  5.  
  6. --[[
  7. - Free
  8. https://www.roblox.com/catalog/4819740796/Robox
  9. https://www.roblox.com/catalog/9867487176/Le-Rouge-Cross-body-Bag-3-0
  10. https://www.roblox.com/catalog/9867481700/Le-Rouge-Cross-body-Bag-1-0
  11. https://www.roblox.com/catalog/8763318146/Warrior-Mat-Alo-Yoga-Strap-Jungle
  12. https://www.roblox.com/catalog/8763290412/Warrior-Mat-Alo-Yoga-Strap-Black
  13.  
  14. - Free (2)
  15. https://www.roblox.com/catalog/4819740796/Robox
  16. https://www.roblox.com/catalog/3033908130/International-Fedora-France
  17. https://www.roblox.com/catalog/3398308134/International-Fedora-Canada
  18. https://www.roblox.com/catalog/3409612660/International-Fedora-USA
  19. https://www.roblox.com/catalog/3033910400/International-Fedora-Germany
  20.  
  21. - Paid
  22. https://www.roblox.com/catalog/14255528083/Torso-Extension
  23. https://www.roblox.com/catalog/14255556501/Extra-Right-White-Arm
  24. https://www.roblox.com/catalog/14255554762/Extra-Left-White-Arm
  25. https://www.roblox.com/catalog/12344591101/Extra-Right-hand-moving-Blocky-white
  26. https://www.roblox.com/catalog/12344545199/Extra-Left-hand-moving-Blocky-white3
  27.  
  28. - Paid *LEGS ALTERNATIVE* (2)
  29. https://www.roblox.com/catalog/11263254795/Dummy-Head-For-Headless
  30. https://www.roblox.com/catalog/11159410305/Rectangle-Head-For-Headless
  31. ]]--
  32.  
  33. local plrs=game:FindFirstChildOfClass("Players")
  34. local rs=game:FindFirstChildOfClass("RunService")
  35. local ws=game:FindFirstChildOfClass("Workspace")
  36. local uis=game:FindFirstChildOfClass("UserInputService")
  37. local gs=game:FindFirstChildOfClass("GuiService")
  38. local cg=game:FindFirstChildOfClass("CoreGui")
  39.  
  40. local lp=plrs.LocalPlayer
  41. local pg=lp:FindFirstChildOfClass("PlayerGui")
  42. local mouse=lp:GetMouse()
  43. local stepped=rs.Stepped
  44. local heartbeat=rs.Heartbeat
  45. local renderstepped=rs.RenderStepped
  46.  
  47. local osclock=os.clock
  48. local tspawn=task.spawn
  49. local twait=task.wait
  50. local schar=string.char
  51. local sbyte=string.byte
  52. local ssub=string.sub
  53. local sfind=string.find
  54. local supper=string.upper
  55. local mrandom=math.random
  56. local clamp=math.clamp
  57. local sin=math.sin
  58. local cos=math.cos
  59. local abs=math.abs
  60. local rad=math.rad
  61. local tinsert=table.insert
  62. local tclear=table.clear
  63. local tfind=table.find
  64. local tunpack=table.unpack
  65.  
  66. local i=Instance.new
  67. local v2=Vector2.new
  68. local v3=Vector3.new
  69. local c3=Color3.new
  70. local cf=CFrame.new
  71. local angles=CFrame.Angles
  72. local u2=UDim2.new
  73. local e=Enum
  74. local cs=ColorSequence.new
  75. local csk=ColorSequenceKeypoint.new
  76.  
  77. local sine=osclock()
  78. local deltaTime=0
  79. local v3_0=v3(0,0,0)
  80. local v3_101=v3(1,0,1)
  81. local v3_010=v3(0,1,0)
  82. local v3_001=v3(0,0,1)
  83. local cf_0=cf(0,0,0)
  84. local v3_xz=v3_101*10
  85. local v3_net=v3_010*25.01
  86.  
  87. local function makepcall(f)
  88. if type(f)=="function" then
  89. return function(...)
  90. local a={...}
  91. local r=nil
  92. pcall(function()
  93. r={f(tunpack(a))}
  94. end)
  95. return tunpack(r or {})
  96. end
  97. end
  98. return function() end
  99. end
  100. local function rs(l)
  101. l=l or mrandom(8,15)
  102. local s=""
  103. for i=1,l do
  104. if mrandom(1,2)==1 then
  105. s=s..schar(mrandom(65,90))
  106. else
  107. s=s..schar(mrandom(97,122))
  108. end
  109. end
  110. return s
  111. end
  112. local function gp(p,n,cl)
  113. if typeof(p)=="Instance" then
  114. local c=p:GetChildren()
  115. for i=1,#c do
  116. local v=c[i]
  117. if (v.Name==n) and v:IsA(cl) then
  118. return v
  119. end
  120. end
  121. end
  122. return nil
  123. end
  124. local function loopgp(...)
  125. while true do
  126. local r=gp(...)
  127. if r then
  128. return r
  129. end
  130. twait()
  131. end
  132. end
  133. local function timegp(p,n,c,t)
  134. t=osclock()+t
  135. while t>osclock() do
  136. local r=gp(p,n,c)
  137. if r then
  138. return r
  139. end
  140. twait()
  141. end
  142. return nil
  143. end
  144. local function getNetlessVelocity(realVel)
  145. --if true then return v3_0 end
  146. --if true then return realPartVelocity end
  147. --if true then return v3_net end
  148. if realVel.Magnitude>25.01 then
  149. realVel=realVel.Unit*25.01
  150. end
  151. return realVel*v3_xz+v3_net
  152. end
  153. local isClientInstance=makepcall(function(i)
  154. return ssub(i:GetDebugId(),1,1)=="0"
  155. end)
  156. local isServerInstance=function(i)
  157. return not isClientInstance(i)
  158. end
  159. local shp=(((type(getfenv)=="function") and getfenv()) or {}).sethiddenproperty
  160.  
  161. local allowshiftlock=nil
  162. local ctrltp=nil
  163. local simrad=nil
  164. local placeholders=nil
  165. local clickfling=nil
  166.  
  167. local stopreanimate=function() return nil end
  168. local function reanimate()
  169. --[[
  170. FDless reanimate by MyWorld
  171. aka no client sided instances
  172. "what else do i optimize here"
  173. ]]
  174.  
  175. local novoid = true --prevents parts from going under workspace.FallenPartsDestroyHeight if you control them
  176. local placeholders = true --makes client sided accessories replacing the real ones when unavailable
  177. local speedlimit = 3000 --makes your parts move slower if the magnitude of their velocity is higher than this
  178. local antiragdoll = true --removes instances that are usually used for ragdolling form your character
  179. local addPartsOnRun = false --allows u to add more parts and joints to the simulation after it started
  180. local R15toR6 = true --adds fake r6 parts and joints for animations if your character is r15
  181. local walkSpeed = 16 --your walkspeed (can be changed at runtime)
  182. local jumpPower = 50 --your jump power (can be changed at runtime)
  183. local allowshiftlock = true --allows the user to use shiftlock (can be changed at runtime)
  184. local gravity = 196.2 --how fast the characters velocity increases while falling (can be changed at runtime)
  185. local simrad = "shp" --sets simulation radius to this with sethiddenproperty if its set to a number
  186. local ctrlclicktp = false --makes you teleport where u point ur mouse cursor at when click and hold ctrl down
  187. local clickfling = true --makes you fling the person you clicked when its available to do so
  188. local flingvel = v3(16000,16000,16000) --the rotation velocity that ur character will have while flinging
  189.  
  190. local c=lp.Character
  191. if stopreanimate() or not (c and c:IsDescendantOf(ws)) then return end
  192.  
  193. local hum=c:FindFirstChildOfClass("Humanoid")
  194. local rootpart=gp(c,"HumanoidRootPart","BasePart") or gp(c,"Torso","BasePart") or gp(c,"UpperTorso","BasePart") or (hum and hum.RootPart) or timegp(c,"HumanoidRootPart","BasePart",0.5) or c:FindFirstChildWhichIsA("BasePart")
  195. if not rootpart then return end
  196.  
  197. R15toR6=R15toR6 and hum and (hum.RigType==e.HumanoidRigType.R15)
  198. simrad = (type(simrad)=="number") and (type(shp)=="function") and simrad
  199.  
  200. local flingparts={}
  201. local cam=nil
  202. --theres a way to have ws.currentcamera nil on heartbeat and still have the game run normally
  203. local function refcam()
  204. cam=ws.CurrentCamera
  205. while not cam do
  206. ws:GetPropertyChangedSignal("CurrentCamera"):Wait()
  207. cam=ws.CurrentCamera
  208. end
  209. end
  210. refcam()
  211. local camcf=cam.CFrame
  212. local enumCamS=e.CameraType.Scriptable
  213. local camt=cam.CameraType
  214. local camcon0=nil
  215. local camcon1=nil
  216. local function onnewcamera()
  217. refcam()
  218. if camcon0 then
  219. camcon0:Disconnect()
  220. camcon0=nil
  221. end
  222. if not c then
  223. if cam.CameraType==enumCamS then
  224. cam.CameraType=camt
  225. end
  226. return camcon1:Disconnect()
  227. end
  228. camcon0=cam.Changed:Connect(function(p)
  229. if not c then
  230. camcon0:Disconnect()
  231. return camcon1:Disconnect()
  232. end
  233. if (p=="CFrame") and (cam.CFrame~=camcf) then
  234. cam.CFrame=camcf
  235. elseif (p=="CameraSubject") or (p=="CameraType") then
  236. local subj=cam.CameraSubject
  237. if subj and subj:IsA("Humanoid") and (subj.Parent==c) and (cam.CameraType~=enumCamS) then
  238. cam.CameraType = enumCamS
  239. end
  240. end
  241. end)
  242. local subj=cam.CameraSubject
  243. if subj and subj:IsA("Humanoid") and (subj.Parent==c) and (cam.CameraType~=enumCamS) then
  244. cam.CameraType=enumCamS
  245. end
  246. cam.CFrame=camcf
  247. end
  248. camcon1=ws:GetPropertyChangedSignal("CurrentCamera"):Connect(onnewcamera)
  249. onnewcamera()
  250.  
  251. local fpdh=ws.FallenPartsDestroyHeight
  252. novoid=novoid and (fpdh+1)
  253.  
  254. local function getMeshOfPart(v)
  255. if typeof(v)=="Instance" then
  256. if v:IsA("MeshPart") then
  257. return v.MeshId, v.TextureID
  258. else
  259. v=v:FindFirstChildOfClass("SpecialMesh")
  260. if v then
  261. return v.MeshId, v.TextureId
  262. end
  263. end
  264. end
  265. return nil, nil
  266. end
  267.  
  268. local joints={}
  269. local cframes={}
  270. local des=c:GetDescendants()
  271. for i=1,#des do
  272. local v=des[i]
  273. if v:IsA("JointInstance") then
  274. tinsert(joints,{
  275. Name=v.Name,
  276. C0=v.C0,
  277. C1=v.C1,
  278. Part0=v.Part0,
  279. Part1=v.Part1
  280. })
  281. elseif v:IsA("BasePart") then
  282. cframes[v]=v.CFrame
  283. end
  284. end
  285.  
  286. local function makeplaceholder(v)
  287. if typeof(v)~="Instance" then
  288. return nil
  289. end
  290. if not v.Archivable then
  291. v.Archivable=true
  292. end
  293. v=v:Clone()
  294. local c=v:GetChildren()
  295. for i=1,#c do
  296. local v=c[i]
  297. if v:IsA("SpecialMesh") then
  298. v.Name=rs()
  299. v:ClearAllChildren()
  300. else
  301. v:Destroy()
  302. end
  303. end
  304. v.Name=rs()
  305. v.Anchored=true
  306. v.CanCollide=false
  307. v.Transparency=0.25
  308. v.Parent=ws
  309. return v
  310. end
  311.  
  312. local function filterInstance(v)
  313. local ins=v
  314. if isClientInstance(v) then
  315. v={CFrame=v.CFrame,Name=v.Name,Anchored=true}
  316. else
  317. local meshid,textureid=getMeshOfPart(v)
  318. if meshid and (meshid~="") and textureid and (textureid~="") then
  319. if placeholders then
  320. v={CFrame=v.CFrame,Name=v.Name,Anchored=true,meshid=meshid,textureid=textureid,placeholder=makeplaceholder(v)}
  321. else
  322. v={CFrame=v.CFrame,Name=v.Name,Anchored=true,meshid=meshid,textureid=textureid}
  323. end
  324. else
  325. v={CFrame=v.CFrame,Name=v.Name,Anchored=true}
  326. end
  327. end
  328. local check=ins~=v
  329. while check do
  330. check=false
  331. for i,v1 in pairs(cframes) do
  332. if i==ins then
  333. cframes[ins]=nil
  334. cframes[v]=v1
  335. check=true
  336. break
  337. end
  338. end
  339. end
  340. for i,v1 in pairs(joints) do
  341. if v1.Part0==ins then
  342. v1.Part0=v
  343. elseif v1.Part1==ins then
  344. v1.Part1=v
  345. end
  346. end
  347. if rootpart==ins then
  348. rootpart=v
  349. end
  350. return v
  351. end
  352. for i,v in pairs(joints) do
  353. v.Part0=filterInstance(v.Part0)
  354. v.Part1=filterInstance(v.Part1)
  355. end
  356.  
  357. local Yvel=0
  358. local cfr=rootpart.CFrame
  359. local pos=cfr.Position
  360. local shiftlock=false
  361. local firstperson=false
  362. local xzvel=v3_0
  363. local v3_0150=v3_010*1.5
  364. local camoff=cf(v3_0,camcf.LookVector)
  365. camoff=camoff-v3_001*(camcf.Position-(pos+v3_0150)).Magnitude
  366.  
  367. local refreshjointsinternal=nil
  368. refreshjointsinternal=function(part,refreshed)
  369. if not part then return end
  370. tinsert(refreshed,part)
  371. for i,v in pairs(joints) do
  372. local part0=v.Part0
  373. local part1=v.Part1
  374. if part1 and (part0==part) then
  375. cframes[part1]=cframes[part]*v.C0*v.C1:Inverse()
  376. if not tfind(refreshed,part1) then
  377. refreshjointsinternal(part1,refreshed)
  378. end
  379. elseif part0 and (part1==part) then
  380. cframes[part0]=cframes[part]*v.C1*v.C0:Inverse()
  381. if not tfind(refreshed,part0) then
  382. refreshjointsinternal(part0,refreshed)
  383. end
  384. end
  385. end
  386. end
  387. local function refreshjoints(v)
  388. refreshjointsinternal(v,{})
  389. end
  390.  
  391. if R15toR6 then
  392. local R6parts={
  393. head={Name="Head",Anchored=true},
  394. torso={Name="Torso",Anchored=true},
  395. root={Name="HumanoidRootPart",Anchored=true},
  396. leftArm={Name="Left Arm",Anchored=true},
  397. rightArm={Name="Right Arm",Anchored=true},
  398. leftLeg={Name="Left Leg",Anchored=true},
  399. rightLeg={Name="Right Leg",Anchored=true}
  400. }
  401. for i,v in pairs(R6parts) do
  402. cframes[v]=cfr
  403. end
  404. tinsert(joints,{
  405. Name="Neck",
  406. Part0=R6parts.torso,Part1=R6parts.head,
  407. C0=cf(0,1,0,-1,0,0,0,0,1,0,1,-0),
  408. C1=cf(0,-0.5,0,-1,0,0,0,0,1,0,1,-0)
  409. })
  410. tinsert(joints,{
  411. Name="RootJoint",
  412. Part0=R6parts.root,Part1=R6parts.torso,
  413. C0=cf(0,0,0,-1,0,0,0,0,1,0,1,-0),
  414. C1=cf(0,0,0,-1,0,0,0,0,1,0,1,-0)
  415. })
  416. tinsert(joints,{
  417. Name="Right Shoulder",
  418. Part0=R6parts.torso,Part1=R6parts.rightArm,
  419. C0=cf(1,0.5,0,0,0,1,0,1,-0,-1,0,0),
  420. C1=cf(-0.5,0.5,0,0,0,1,0,1,-0,-1,0,0)
  421. })
  422. tinsert(joints,{
  423. Name="Left Shoulder",
  424. Part0=R6parts.torso,Part1=R6parts.leftArm,
  425. C0=cf(-1,0.5,0,0,0,-1,0,1,0,1,0,0),
  426. C1=cf(0.5,0.5,0,0,0,-1,0,1,0,1,0,0)
  427. })
  428. tinsert(joints,{
  429. Name="Right Hip",
  430. Part0=R6parts.torso,Part1=R6parts.rightLeg,
  431. C0=cf(1,-1,0,0,0,1,0,1,-0,-1,0,0),
  432. C1=cf(0.5,1,0,0,0,1,0,1,-0,-1,0,0)
  433. })
  434. tinsert(joints,{
  435. Name="Left Hip" ,
  436. Part0=R6parts.torso,Part1=R6parts.leftLeg,
  437. C0=cf(-1,-1,0,0,0,-1,0,1,0,1,0,0),
  438. C1=cf(-0.5,1,0,0,0,-1,0,1,0,1,0,0)
  439. })
  440. tinsert(joints,{
  441. Part0=R6parts.root,Part1=rootpart,
  442. C0=cf_0,C1=cf_0
  443. })
  444. refreshjoints(rootpart)
  445. local function getpart(n)
  446. for i,_ in pairs(cframes) do
  447. if (i.Name==n) and (type(i)~="table") then
  448. return i
  449. end
  450. end
  451. return nil
  452. end
  453. local function makejoint(p0, p1, p2)
  454. p1=getpart(p1)
  455. p2=getpart(p2)
  456. if not (p1 and p2) then return end
  457. for i,v in pairs(joints) do
  458. if (v.Part0==p1) and (v.Part1==p2) then
  459. joints[i]=nil
  460. elseif (v.Part0==p2) and (v.Part1==p1) then
  461. joints[i]=nil
  462. end
  463. end
  464. tinsert(joints,{
  465. Part0=p0,Part1=p1,
  466. C0=cf_0,
  467. C1=cframes[p1]:Inverse()*cframes[p0]
  468. })
  469. end
  470. makejoint(R6parts.head,"Head","UpperTorso")
  471. makejoint(R6parts.leftArm,"LeftUpperArm","UpperTorso")
  472. makejoint(R6parts.rightArm,"RightUpperArm","UpperTorso")
  473. makejoint(R6parts.leftLeg,"LeftUpperLeg","LowerTorso")
  474. makejoint(R6parts.rightLeg,"RightUpperLeg","LowerTorso")
  475. makejoint(R6parts.torso,"LowerTorso","HumanoidRootPart")
  476. end
  477.  
  478. local function getPart(name,blacklist)
  479. for i,v in pairs(cframes) do
  480. if (i.Name==name) and not (blacklist and tfind(blacklist,i)) then
  481. return i
  482. end
  483. end
  484. return nil
  485. end
  486.  
  487. local function getPartFromMesh(meshid,textureid,blacklist)
  488. for v,_ in pairs(cframes) do
  489. if (type(v)=="table") and not (blacklist and tfind(blacklist,v)) then
  490. if v.meshid and sfind(v.meshid,meshid) and sfind(v.textureid,textureid) then
  491. return v
  492. end
  493. end
  494. end
  495. return nil
  496. end
  497.  
  498. local function getJoint(name)
  499. for i,v in pairs(joints) do
  500. if v.Name==name then
  501. return v
  502. end
  503. end
  504. return {C0=cf_0,C1=cf_0}
  505. end
  506.  
  507. local function getPartJoint(handle)
  508. for i,v in pairs(joints) do
  509. if v.Part0==handle then
  510. return v
  511. end
  512. end
  513. for i,v in pairs(joints) do
  514. if v.Part1==handle then
  515. return v
  516. end
  517. end
  518. return nil
  519. end
  520.  
  521. local accessorylimbs={
  522. -- paid aligning --
  523. {meshid="12344207333",textureid="12344207341",C0=angles(115,0,0),Name="Left Arm"}, -- Moving Left Arm [White]
  524. {meshid="12344206657",textureid="12344206675",C0=angles(115,0,0),Name="Right Arm"}, -- Moving Right Arm [White]
  525. {meshid="14255522247",textureid="14255543546",C0=angles(0,0,1.5707963267948966),Name="Left Leg"}, -- Blocky Left Leg [White]
  526. {meshid="14255522247",textureid="14255543546",C0=angles(0,0,1.5707963267948966),Name="Right Leg"}, -- Blocky Right Leg [White]
  527. {meshid="14241018198",textureid="14251599953",C0=cf_0,Name="Torso"}, -- Torso Extension
  528. {meshid="11159370334",textureid="11159284657",C0=angles(0,0,1.5707963267948966),Name="Right Leg"}, -- Dummy Head1
  529. {meshid="11263221350",textureid="11263219250",C0=angles(0,0,1.5707963267948966),Name="Left Leg"}, -- Dummy Head2
  530.  
  531. -- free aligning --
  532. {meshid="8761442057",textureid="8761547598",C0=angles(115,0,0),Name="Left Arm"}, -- Yoga Mat1
  533. {meshid="8761442057",textureid="8761421987",C0=angles(115,0,0),Name="Right Arm"}, -- Yoga Mat2
  534. {meshid="9867442567",textureid="9867451480",C0=angles(0,0,-15),Name="Left Leg"}, -- Rouge Bag1
  535. {meshid="9867442661",textureid="9867451480",C0=angles(0,0,-15),Name="Right Leg"}, -- Rouge Bag2
  536. {meshid="4819720316",textureid="4819722776",C0=angles(0,0,-105),Name="Torso"}, -- Robox
  537.  
  538. -- free aligning, fedoras --
  539. {meshid="3030546036",textureid="3033903209",C0=angles(115,0,0),Name="Left Arm"},
  540. {meshid="3030546036",textureid="3360978739",C0=angles(115,0,0),Name="Right Arm"},
  541. {meshid="3030546036",textureid="3409604993",C0=angles(115,-115,0),Name="Left Leg"},
  542. {meshid="3030546036",textureid="3033898741",C0=angles(115,115,0),Name="Right Leg"}
  543. }
  544.  
  545. local alignblacklist={}
  546. for i=1,#accessorylimbs do
  547. local v=accessorylimbs[i]
  548. local p=getPart(v.Name)
  549. local h=getPartFromMesh(v.meshid,v.textureid,alignblacklist)
  550. local w=getPartJoint(h)
  551. if p and w then
  552. w.C0=v.C0
  553. w.Part0=h
  554. w.C1=cf_0
  555. w.Part1=p
  556. tinsert(alignblacklist,h)
  557. end
  558. end
  559.  
  560. local raycastparams=RaycastParams.new()
  561. raycastparams.FilterType=e.RaycastFilterType.Blacklist
  562. raycastparams.RespectCanCollide=true
  563. local rayfilter={}
  564. local characters={}
  565. local function refreshrayfilter()
  566. tclear(rayfilter)
  567. for i,v in pairs(characters) do
  568. tinsert(rayfilter,v)
  569. end
  570. raycastparams.FilterDescendantsInstances=rayfilter
  571. end
  572. local flingtarget=nil
  573. local cframes1={}
  574. local lastpositions={}
  575. local rootparts={}
  576. local function onplayer(v)
  577. local lastc=nil
  578. local function oncharacter()
  579. local newc=v.Character
  580. if newc and (newc ~= lastc) then
  581. lastc=newc
  582. characters[v]=newc
  583. refreshrayfilter()
  584. local hrp=loopgp(newc,"HumanoidRootPart","BasePart")
  585. if v~=lp then
  586. rootparts[v]=hrp
  587. end
  588. twait()
  589. if c and (v==lp) and hrp and (hrp.Parent==newc) and newc:IsDescendantOf(ws) then
  590. local startpos=pos+v3(mrandom(-32,32),0,mrandom(-32,32))
  591. local dir=nil
  592. local poscheck=true
  593. while poscheck do
  594. poscheck=false
  595. for i,v in pairs(rootparts) do
  596. local diff=(startpos-v.Position)*v3_101
  597. if diff.Magnitude<10 then
  598. poscheck=true
  599. dir=dir or diff.Unit
  600. startpos=startpos+dir
  601. end
  602. end
  603. local diff=(startpos-pos)*v3_101
  604. if diff.Magnitude<10 then
  605. poscheck=true
  606. dir=dir or diff.Unit
  607. startpos=startpos+dir
  608. end
  609. end
  610. startpos=cfr+startpos-cfr.Position
  611. if flingtarget then
  612. local con=heartbeat:Connect(function()
  613. local idleoff=v3(sin((sine-0.0375)*16),sin(sine*16),sin((sine+0.075)*16))
  614.  
  615. hrp.CFrame=flingtarget.CFrame+flingtarget.Velocity*(sin(sine*15)+1)+v3(0,-2,0)+idleoff*0.001
  616. hrp.Velocity=idleoff
  617. hrp.RotVelocity=flingvel+idleoff
  618. end)
  619. twait(0.5)
  620. con:Disconnect()
  621. flingtarget=nil
  622. end
  623. tspawn(function()
  624. local con=heartbeat:Connect(function()
  625. hrp.CFrame=startpos+v3(sin((sine-0.0375)*16),sin(sine*16),sin((sine+0.075)*16))*0.005
  626. hrp.Velocity=v3_0
  627. hrp.RotVelocity=v3_0
  628. end)
  629. twait(0.3)
  630. con:Disconnect()
  631. if newc:IsDescendantOf(ws) then
  632. tclear(cframes1)
  633. tclear(lastpositions)
  634. newc:BreakJoints()
  635. twait(0.1)
  636. local cd=newc:GetDescendants()
  637. for i,v in pairs(cframes) do
  638. if type(i)=="table" then
  639. local meshid=i.meshid
  640. if meshid then
  641. local textureid=i.textureid
  642. for i1=1,#cd do
  643. local v=cd[i1]
  644. if v and v:IsA("BasePart") then
  645. local meshid1,textureid1=getMeshOfPart(v)
  646. if (meshid1==meshid) and (textureid1==textureid) then
  647. cd[i1]=nil
  648. cframes1[v]=i
  649. lastpositions[v]=v.Position
  650. break
  651. end
  652. end
  653. end
  654. end
  655. end
  656. end
  657. end
  658. end)
  659. end
  660. end
  661. end
  662. v:GetPropertyChangedSignal("Character"):Connect(oncharacter)
  663. oncharacter()
  664. end
  665. local plrst=plrs:GetPlayers()
  666. for i=1,#plrst do onplayer(plrst[i]) end
  667. plrs.PlayerAdded:Connect(onplayer)
  668. plrs.PlayerRemoving:Connect(function(v)
  669. characters[v]=nil
  670. rootparts[v]=nil
  671. end)
  672.  
  673. local mradN05=rad(-0.5)
  674. local enumMLC=e.MouseBehavior.LockCenter
  675. local enumMB2=e.UserInputType.MouseButton2
  676. local enumMLCP=e.MouseBehavior.LockCurrentPosition
  677. local enumMD=e.MouseBehavior.Default
  678. local enumMW=e.UserInputType.MouseWheel
  679.  
  680. local mode="default"
  681. local modes={default={}}
  682. local function addmode(key,mode)
  683. if (type(key)~="string") or (type(mode)~="table") then
  684. return
  685. end
  686. for i, v in pairs(mode) do
  687. if type(v)~="function" then
  688. mode[i]=nil
  689. end
  690. end
  691. if key=="default" then
  692. modes.default=mode
  693. if mode.modeEntered then
  694. mode.modeEntered()
  695. end
  696. elseif #key==1 then
  697. key=e.KeyCode[supper(ssub(key,1,1))]
  698. modes[key]=mode
  699. end
  700. end
  701.  
  702. local keyW=e.KeyCode.W
  703. local keyA=e.KeyCode.A
  704. local keyS=e.KeyCode.S
  705. local keyD=e.KeyCode.D
  706. local keySpace=e.KeyCode.Space
  707. local keyShift=e.KeyCode.LeftShift
  708. local movementkeys = {
  709. [keyW]=false,
  710. [keyA]=false,
  711. [keyS]=false,
  712. [keyD]=false,
  713. [keySpace]=false
  714. }
  715. uis.InputBegan:Connect(function(a)
  716. if gs.MenuIsOpen or uis:GetFocusedTextBox() then
  717. return
  718. end
  719. a=a.KeyCode
  720. if movementkeys[a]==false then
  721. movementkeys[a]=true
  722. elseif a==keyShift then
  723. shiftlock=allowshiftlock and not shiftlock
  724. elseif modes[a] then
  725. if modes[mode].modeLeft then
  726. modes[mode].modeLeft()
  727. end
  728. if mode==a then
  729. mode="default"
  730. else
  731. mode=a
  732. end
  733. if modes[mode].modeEntered then
  734. modes[mode].modeEntered()
  735. end
  736. end
  737. end)
  738. uis.InputEnded:Connect(function(a)
  739. if movementkeys[a.KeyCode] then
  740. movementkeys[a.KeyCode]=false
  741. end
  742. end)
  743. uis.InputChanged:Connect(function(a,b)
  744. if (not b) and (a.UserInputType==enumMW) then
  745. camoff=camoff+a.Position*v3_001*(0.75-camoff.Z/4)
  746. if camoff.Z>0 then
  747. camoff=camoff-camoff.Position
  748. end
  749. firstperson=camoff.Z==0
  750. end
  751. end)
  752.  
  753. local function fling(target,duration,rotVelocity)
  754. twait()
  755. return true --maybe later
  756. end
  757.  
  758. local function predictionfling(target)
  759. if typeof(target)~="Instance" then
  760. target=mouse.Target
  761. if not target then
  762. return twait() and false
  763. end
  764. end
  765. if target:IsA("Humanoid") or target:IsA("BasePart") then
  766. target=target.Parent
  767. if target:IsA("Accessory") then
  768. target=target.Parent
  769. end
  770. end
  771. if (not target:IsA("Model")) or (target==c) then
  772. return twait() and false
  773. end
  774. target=gp(target,"HumanoidRootPart","BasePart") or gp(target,"Torso","BasePart") or gp(target,"UpperTorso","BasePart")
  775. if not (target and target:IsDescendantOf(ws)) then
  776. return twait() and false
  777. end
  778. flingtarget=target
  779. twait()
  780. return true
  781. end
  782.  
  783. if ctrlclicktp then
  784. ctrlclicktp=e.KeyCode.LeftControl
  785. local tpoff=v3_010*3
  786. if clickfling then
  787. mouse.Button1Down:Connect(function()
  788. if mouse.Target then
  789. if uis:IsKeyDown(ctrlclicktp) then
  790. pos=mouse.Hit.Position+tpoff
  791. cfr=cf(pos,pos+camoff.LookVector*v3_101)
  792. xzvel=v3_0
  793. Yvel=0
  794. else
  795. predictionfling()
  796. end
  797. end
  798. end)
  799. else
  800. mouse.Button1Down:Connect(function()
  801. if mouse.Target and uis:IsKeyDown(ctrlclicktp) then
  802. pos=mouse.Hit.Position+tpoff
  803. cfr=cf(pos,pos+camoff.LookVector*v3_101)
  804. xzvel=v3_0
  805. Yvel=0
  806. end
  807. end)
  808. end
  809. elseif clickfling then
  810. mouse.Button1Down:Connect(predictionfling)
  811. end
  812.  
  813. local noYvelTime=1
  814. local lastsine=sine
  815. local pose=nil
  816. local con=nil
  817. local function mainFunction()
  818. if not c then
  819. for i,v in pairs(cframes) do
  820. local p=i.placeholder
  821. if p then
  822. p:Destroy()
  823. end
  824. end
  825. uis.MouseBehavior=enumMD
  826. onnewcamera()
  827. local c=lp.Character
  828. if c then
  829. cam.CameraSubject=c:FindFirstChildOfClass("Humanoid")
  830. end
  831. return con and con:Disconnect()
  832. end
  833.  
  834. sine=osclock()
  835. local delta=sine-lastsine
  836. deltaTime=clamp(delta*10,0,1)
  837. lastsine=sine
  838.  
  839. if shiftlock then
  840. if allowshiftlock then
  841. uis.MouseBehavior=enumMLC
  842. local rotation=uis:GetMouseDelta()*mradN05
  843. local camoffpos=camoff.Position
  844. camoff=cf(camoffpos,camoffpos+camoff.LookVector)*angles(rotation.Y,rotation.X,0)
  845. else
  846. shiftlock=false
  847. end
  848. elseif firstperson then
  849. uis.MouseBehavior=enumMLC
  850. local rotation=uis:GetMouseDelta()*mradN05
  851. local camoffpos=camoff.Position
  852. camoff=cf(camoffpos,camoffpos+camoff.LookVector)*angles(rotation.Y,rotation.X,0)
  853. elseif uis:IsMouseButtonPressed(enumMB2) then
  854. uis.MouseBehavior=enumMLCP
  855. local rotation=uis:GetMouseDelta()*mradN05
  856. local camoffpos=camoff.Position
  857. camoff=cf(camoffpos,camoffpos+camoff.LookVector)*angles(rotation.Y,rotation.X,0)
  858. else
  859. uis.MouseBehavior=enumMD
  860. end
  861.  
  862. local raycastresult=ws:Raycast(pos,v3_010*(fpdh-pos.Y),raycastparams)
  863. local onground=nil
  864. if raycastresult then
  865. raycastresult=raycastresult.Position
  866. onground=(pos.Y-raycastresult.Y)<3.01
  867. if onground then
  868. Yvel=0
  869. cfr=cfr+v3_010*(raycastresult.Y+3-pos.Y)*clamp(delta*20,0,1)
  870. if movementkeys[keySpace] then
  871. Yvel=jumpPower
  872. end
  873. else
  874. Yvel=Yvel-gravity*delta
  875. if pos.Y+Yvel*delta<raycastresult.Y then
  876. Yvel=0
  877. cfr=cfr+v3_010*(raycastresult.Y+3-pos.Y)
  878. end
  879. end
  880. else
  881. Yvel=0
  882. onground=false
  883. end
  884. xzvel=v3_0
  885. if movementkeys[keyW] then
  886. xzvel=xzvel+(camoff.LookVector*v3_101).Unit
  887. end
  888. if movementkeys[keyS] then
  889. xzvel=xzvel-(camoff.LookVector*v3_101).Unit
  890. end
  891. if movementkeys[keyA] then
  892. xzvel=xzvel-(camoff.RightVector*v3_101).Unit
  893. end
  894. if movementkeys[keyD] then
  895. xzvel=xzvel+(camoff.RightVector*v3_101).Unit
  896. end
  897. pos=cfr.Position
  898. if shiftlock or firstperson then
  899. if xzvel.Magnitude>0 then
  900. xzvel=xzvel.Unit*walkSpeed
  901. end
  902. cfr=cf(pos,pos+camoff.LookVector*v3_101)
  903. elseif xzvel.Magnitude>0 then
  904. xzvel=xzvel.Unit*walkSpeed
  905. cfr=cfr:Lerp(cf(pos,pos+xzvel),deltaTime)
  906. end
  907. cfr=cfr+(xzvel+(v3_010*Yvel))*delta
  908. pos=cfr.Position
  909.  
  910. camcf=cf(pos,pos+camoff.LookVector)+camoff.LookVector*camoff.Z+v3_0150
  911. if shiftlock and not firstperson then
  912. camcf=camcf+camcf.RightVector*1.75
  913. end
  914. if cam then
  915. cam.CFrame=camcf
  916. end
  917.  
  918. if onground then
  919. if xzvel==v3_0 then
  920. pose="idle"
  921. else
  922. pose="walk"
  923. end
  924. elseif Yvel>0 then
  925. pose="jump"
  926. else
  927. pose="fall"
  928. end
  929. local lerpfunc=modes[mode][pose]
  930. lerpfunc=lerpfunc or modes.default[pose]
  931. if lerpfunc then
  932. lerpfunc()
  933. end
  934.  
  935. cframes[rootpart]=cfr
  936. refreshjoints(rootpart)
  937.  
  938. if abs(Yvel)>1 then
  939. noYvelTime=0
  940. else
  941. noYvelTime=clamp(noYvelTime+delta*0.3,0,1)
  942. xzvel=xzvel*(1-noYvelTime)
  943. end
  944.  
  945. local idlerv=v3(sin((sine-0.0375)*16),sin(sine*16),sin((sine+0.075)*16))
  946. local idleoff=idlerv*0.001
  947.  
  948. for i,v in pairs(cframes) do
  949. local p=i.placeholder
  950. if p then
  951. if p.Parent~=ws then
  952. p.Parent=ws
  953. end
  954. p.CFrame=v
  955. end
  956. end
  957. for i,v in pairs(cframes1) do
  958. if (not i.Anchored) and i:IsDescendantOf(ws) then
  959. if i.ReceiveAge==0 then
  960. local p=v.placeholder
  961. if p and p.Parent then
  962. p.Parent=nil
  963. end
  964. v=cframes[v]
  965. local lastpos=lastpositions[i]
  966. local vel=(v.Position-lastpos)/delta
  967. if vel.Magnitude>speedlimit then
  968. vel=vel.Unit*speedlimit
  969. v=v+(lastpos+vel*delta)-v.Position
  970. end
  971. lastpositions[i]=v.Position
  972. if vel.Magnitude<0.15 then
  973. v=v+idleoff
  974. end
  975. if novoid and (v.Y<novoid) then
  976. v=v+v3_010*(novoid-v.Y)
  977. end
  978. i.Velocity=getNetlessVelocity(vel*noYvelTime+xzvel)
  979. i.CFrame=v
  980. i.RotVelocity=idlerv
  981. else
  982. lastpositions[i]=i.Position
  983. end
  984. end
  985. end
  986.  
  987. if simrad then
  988. shp(lp,"SimulationRadius",simrad)
  989. end
  990. end
  991.  
  992. con=heartbeat:Connect(mainFunction)
  993. mainFunction()
  994.  
  995. stopreanimate=function()
  996. if c then
  997. c=nil
  998. return true
  999. else
  1000. return false
  1001. end
  1002. end
  1003.  
  1004. local legcfR=cf(1,-1,0)
  1005. local legcfL=cf(-1,-1,0)
  1006. local raydir=v3_010*-2
  1007. local function raycastlegs() --this returns 2 values: right leg raycast offset, left leg raycast offset
  1008. local rY=ws:Raycast((cfr*legcfR).Position,raydir,raycastparams)
  1009. local lY=ws:Raycast((cfr*legcfL).Position,raydir,raycastparams)
  1010. return rY and (rY.Position.Y-(pos.Y-3)) or 0,lY and (lY.Position.Y-(pos.Y-3)) or 0
  1011. end
  1012.  
  1013. local function velbycfrvec() --this returns 2 values: forward/backwards movement (from -1 to 1), right/left movement (from -1 to 1)
  1014. local fw=cfr.LookVector*xzvel/walkSpeed
  1015. local rt=cfr.RightVector*xzvel/walkSpeed
  1016. return fw.X+fw.Z,rt.X+rt.Z
  1017. end
  1018.  
  1019. local lastvel=v3_0
  1020. local velchg1=v3_0
  1021. local function velchgbycfrvec() --this returns 2 values: forward/backwards velocity change, right/left velocity change
  1022. velchg1=velchg1+(lastvel-xzvel) --i recommend setting velchg1 to v3_0 when u start using this function or it will look worse
  1023. lastvel=xzvel
  1024. velchg1=velchg1:Lerp(v3_0,deltaTime/2)
  1025. local fw=cfr.LookVector*velchg1/32
  1026. local rt=cfr.RightVector*velchg1/32
  1027. return fw.X+fw.Z,rt.X+rt.Z
  1028. end
  1029.  
  1030. local function rotToMouse(alpha) --this rotates ur character towards your mouse hit position
  1031. local mpos=mouse.Hit.Position
  1032. cfr=cfr:Lerp(cf(pos,v3(mpos.X,pos.Y,mpos.Z)),alpha or deltaTime)
  1033. end
  1034.  
  1035. local function setWalkSpeed(n)
  1036. if type(n) ~= "number" then
  1037. n=16
  1038. end
  1039. walkSpeed=n
  1040. end
  1041. local function setJumpPower(n)
  1042. if type(n) ~= "number" then
  1043. n=50
  1044. end
  1045. jumpPower=n
  1046. end
  1047. local function setGravity(n)
  1048. if type(n) ~= "number" then
  1049. n=196.2
  1050. end
  1051. gravity=n
  1052. end
  1053.  
  1054. return {
  1055. cframes=cframes,
  1056. joints=joints,
  1057. refreshjoints=refreshjoints,
  1058. raycastlegs=raycastlegs,
  1059. velbycfrvec=velbycfrvec,
  1060. velchgbycfrvec=velchgbycfrvec,
  1061. addmode=addmode,
  1062. getPart=getPart,
  1063. getPartFromMesh=getPartFromMesh,
  1064. getJoint=getJoint,
  1065. getPartJoint=getPartJoint,
  1066. rotToMouse=rotToMouse,
  1067. setWalkSpeed=setWalkSpeed,
  1068. setJumpPower=setJumpPower,
  1069. setGravity=setGravity
  1070. }
  1071. end
  1072.  
  1073. local t=reanimate()
  1074. if type(t)~="table" then return end
  1075. local raycastlegs=t.raycastlegs
  1076. local velbycfrvec=t.velbycfrvec
  1077. local velchgbycfrvec=t.velchgbycfrvec
  1078. local addmode=t.addmode
  1079. local getJoint=t.getJoint
  1080. local RootJoint=getJoint("RootJoint")
  1081. local RightShoulder=getJoint("Right Shoulder")
  1082. local LeftShoulder=getJoint("Left Shoulder")
  1083. local RightHip=getJoint("Right Hip")
  1084. local LeftHip=getJoint("Left Hip")
  1085. local Neck=getJoint("Neck")
  1086.  
  1087. addmode("default", {
  1088. idle = function()
  1089. local rY, lY = raycastlegs()
  1090. local Cfw, Crt = velchgbycfrvec()
  1091.  
  1092. RightShoulder.C0=RightShoulder.C0:Lerp(cf(1,1+0.05*sin(sine*1),-0.85)*angles(0,0,2.45+0.03490658503988659*sin(sine*1)),deltaTime)
  1093. Neck.C0 = Neck.C0:Lerp(cf(0, 1, 0) * angles(0.35 + -0.15 * sin((sine + 0.6) * 2), 0, 85 + 0.5 * sin((sine - 1.2) * 1)), deltaTime)
  1094. RootJoint.C0 = RootJoint.C0:Lerp(cf(Crt * 3, 0.1 * sin(sine * 2), Cfw * -3) * angles(-3 + 0.15 * sin(sine * 2) - Cfw, Crt, 3.141592653589793), deltaTime)
  1095. RightHip.C0 = RightHip.C0:Lerp(cf(1.15, -1 - 0.1 * sin(sine * 2) + rY, -0.1 * sin(sine * 2) - rY * 0.5) * angles(-0.6981317007977318 - 0.08726646259971647 * sin(sine * 2), 1.0471975511965976, 0.5235987755982988), deltaTime)
  1096. LeftShoulder.C0=LeftShoulder.C0:Lerp(cf(-1,1+0.05*sin(sine*1),-0.85)*angles(0,0,-2.45+-0.25*sin(sine*1)),deltaTime)
  1097. LeftHip.C0 = LeftHip.C0:Lerp(cf(-1.15, -1 - 0.1 * sin(sine * 2) + lY, -0.1 * sin(sine * 2) - lY * 0.5) * angles(-0.90 - 0.08726646259971647 * sin(sine * 2), -1.0471975511965976, -0.5235987755982988), deltaTime)
  1098. end,
  1099.  
  1100. walk = function()
  1101. local Vfw, Vrt = velbycfrvec()
  1102. local rY, lY = raycastlegs()
  1103. local Cfw, Crt = velchgbycfrvec()
  1104.  
  1105. RootJoint.C0 = RootJoint.C0:Lerp(cf(Crt * 3, 0, Cfw * -3) * angles(3.4835298641951802 + 3 * 0.1 - Cfw, Vrt * -0.05 + Crt, -3.141592653589793), deltaTime)
  1106. RightShoulder.C0 = RightShoulder.C0:Lerp(cf(1, 0.5, 0) * angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966), deltaTime)
  1107. LeftHip.C0 = LeftHip.C0:Lerp(cf(-1, -1, 0) * angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966), deltaTime)
  1108. LeftShoulder.C0 = LeftShoulder.C0:Lerp(cf(-1, 0.5, 0) * angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -2 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966), deltaTime)
  1109. Neck.C0 = Neck.C0:Lerp(cf(0, 1, 0) * angles(-0.4, 0, -3.141592653589793 - Vrt), deltaTime)
  1110. RightHip.C0 = RightHip.C0:Lerp(cf(1, 0, -1.05) * angles(1.45 - 0.05 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966), deltaTime)
  1111. end,
  1112.  
  1113. jump = function()
  1114. local Cfw, Crt = velchgbycfrvec()
  1115. local Vfw, Vrt = velbycfrvec()
  1116.  
  1117. RootJoint.C0 = RootJoint.C0:Lerp(cf(Crt * 3, 0, Cfw * -3) * angles(3.4835298641951802 + Vfw * 0.1 - Cfw, Vrt * -0.05 + Crt, -3.141592653589793), deltaTime)
  1118. RightShoulder.C0 = RightShoulder.C0:Lerp(cf(1, 0.5, 0) * angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966), deltaTime)
  1119. LeftHip.C0 = LeftHip.C0:Lerp(cf(-1, -1, 0) * angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966), deltaTime)
  1120. LeftShoulder.C0 = LeftShoulder.C0:Lerp(cf(-1, 0.5, 0) * angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.7453292519943295 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966), deltaTime)
  1121. Neck.C0 = Neck.C0:Lerp(cf(0, 1, 0) * angles(-0.4, 0, -3.141592653589793 - Vrt), deltaTime)
  1122. RightHip.C0 = RightHip.C0:Lerp(cf(1, 0, -1.05) * angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966), deltaTime)
  1123. end,
  1124.  
  1125. fall = function()
  1126. local Vfw, Vrt = velbycfrvec()
  1127. local Cfw, Crt = velchgbycfrvec()
  1128.  
  1129. RootJoint.C0 = RootJoint.C0:Lerp(cf(Crt * 3, 0, Cfw * -3) * angles(-1.6580627893946132 + Vfw * 0.1 - Cfw, Vrt * -0.05 + Crt, -3.141592653589793), deltaTime)
  1130. RightShoulder.C0 = RightShoulder.C0:Lerp(cf(1, 0.5, 0) * angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), 1.7453292519943295 + 0.08726646259971647 * sin((sine + 0.25) * 4), -1.5707963267948966), deltaTime)
  1131. LeftHip.C0 = LeftHip.C0:Lerp(cf(-1, -1, 0) * angles(1.5707963267948966 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.6580627893946132 + 0.06981317007977318 * sin((sine + 0.25) * 4), 1.5707963267948966), deltaTime)
  1132. LeftShoulder.C0 = LeftShoulder.C0:Lerp(cf(-1, 0.5, 0) * angles(4.014257279586958 - 0.08726646259971647 * sin((sine + 0.5) * 4), -1.7453292519943295 - 0.08726646259971647 * sin((sine + 0.25) * 4), 1.5707963267948966), deltaTime)
  1133. Neck.C0 = Neck.C0:Lerp(cf(0, 1, 0) * angles(-1.95, 0, -3.141592653589793 - Vrt), deltaTime)
  1134. RightHip.C0 = RightHip.C0:Lerp(cf(1, -1, 0) * angles(1.5707963267948966 - 0.35 * sin((sine + 0.5) * 4), 1.6580627893946132 - 0.06981317007977318 * sin((sine + 0.25) * 4), -1.5707963267948966), deltaTime)
  1135. end
  1136. })
  1137.  
  1138. local ButtonsUI = Instance.new("ScreenGui")
  1139. local Frame = Instance.new("Frame")
  1140. local EndScript = Instance.new("TextButton")
  1141. local RejoinScript = Instance.new("TextButton")
  1142.  
  1143. ButtonsUI.Name = math.random()
  1144. ButtonsUI.Parent = game.Players.LocalPlayer:WaitForChild("PlayerGui")
  1145. ButtonsUI.ResetOnSpawn = false
  1146.  
  1147. Frame.Name = math.random()
  1148. Frame.Parent = ButtonsUI
  1149. Frame.BackgroundTransparency = 1
  1150. Frame.BackgroundColor3 = Color3.fromRGB(255, 255, 255)
  1151. Frame.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1152. Frame.BorderSizePixel = 0
  1153. Frame.Position = UDim2.new(0.328567654, 0, 0.027431421, 0)
  1154. Frame.Size = UDim2.new(0, 648, 0, 68)
  1155.  
  1156.  
  1157. EndScript.Name = math.random()
  1158. EndScript.Parent = Frame
  1159. EndScript.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  1160. EndScript.BackgroundTransparency = 0.750
  1161. EndScript.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1162. EndScript.BorderSizePixel = 0
  1163. EndScript.Position = UDim2.new(0.0182312392, 0, 0.122891314, 0)
  1164. EndScript.Size = UDim2.new(0, 224, 0, 50)
  1165. EndScript.Font = Enum.Font.Arcade
  1166. EndScript.Text = "End Script"
  1167. EndScript.TextColor3 = Color3.fromRGB(255, 0, 0)
  1168. EndScript.TextScaled = true
  1169. EndScript.TextSize = 14.000
  1170. EndScript.TextStrokeTransparency = 0.000
  1171. EndScript.TextWrapped = true
  1172.  
  1173. RejoinScript.Name = math.random()
  1174. RejoinScript.Parent = Frame
  1175. RejoinScript.BackgroundColor3 = Color3.fromRGB(0, 0, 0)
  1176. RejoinScript.BackgroundTransparency = 0.750
  1177. RejoinScript.BorderColor3 = Color3.fromRGB(0, 0, 0)
  1178. RejoinScript.BorderSizePixel = 0
  1179. RejoinScript.Position = UDim2.new(0.632830381, 0, 0.122891314, 0)
  1180. RejoinScript.Size = UDim2.new(0, 224, 0, 50)
  1181. RejoinScript.Font = Enum.Font.Arcade
  1182. RejoinScript.Text = "Rejoin Game"
  1183. RejoinScript.TextColor3 = Color3.fromRGB(255, 0, 0)
  1184. RejoinScript.TextScaled = true
  1185. RejoinScript.TextSize = 14.000
  1186. RejoinScript.TextStrokeTransparency = 0.000
  1187. RejoinScript.TextWrapped = true
  1188.  
  1189.  
  1190. -- Scripts:
  1191.  
  1192. local function VIXLQON_fake_script() -- EndScript.LocalScript
  1193. local script = Instance.new('LocalScript', EndScript)
  1194. script.Parent.Name = math.random()
  1195.  
  1196. script.Parent.MouseButton1Down:Connect(function()
  1197. ButtonsUI:Destroy()
  1198. stopreanimate()
  1199. SONG:Destroy()
  1200. game.Workspace.Camera.FieldOfView = 60
  1201. game.Lighting.Brightness = 1
  1202. end)
  1203.  
  1204. local obj = script.Parent --A reference to where the GUI is
  1205. local speed = 15 --Change to speed you want
  1206. while true do --Forever loop
  1207. for i = 0,1,0.001*speed do -- This is a for i loop. the first number is the start, second number is the end, and the third number is increment. We are multiplying speed by the increment.
  1208. obj.TextColor3 = Color3.fromHSV(i,1,1) --creates a color using i
  1209. task.wait() --I recommend using task.wait() instead of wait because it is more precise and just better
  1210. end
  1211. end
  1212. end
  1213. coroutine.wrap(VIXLQON_fake_script)()
  1214.  
  1215. local function MHCPPYO_fake_script() -- RejoinScript.LocalScript
  1216. local script = Instance.new('LocalScript', RejoinScript)
  1217.  
  1218. script.Parent.MouseButton1Down:Connect(function()
  1219. local TeleportService = game:GetService("TeleportService")
  1220. local Players = game:GetService("Players")
  1221. local LocalPlayer = Players.LocalPlayer
  1222. local Rejoin = coroutine.create(function()
  1223. local Success, ErrorMessage = pcall(function()
  1224. TeleportService:Teleport(game.PlaceId, LocalPlayer)
  1225. end)
  1226. if ErrorMessage and not Success then
  1227. warn(ErrorMessage)
  1228. end
  1229. end)
  1230.  
  1231. coroutine.resume(Rejoin)
  1232. end)
  1233.  
  1234. script.Parent.Name = math.random()
  1235.  
  1236. local obj = script.Parent --A reference to where the GUI is
  1237. local speed = 15 --Change to speed you want
  1238. while true do --Forever loop
  1239. for i = 0,1,0.001*speed do -- This is a for i loop. the first number is the start, second number is the end, and the third number is increment. We are multiplying speed by the increment.
  1240. obj.TextColor3 = Color3.fromHSV(i,1,1) --creates a color using i
  1241. task.wait() --I recommend using task.wait() instead of wait because it is more precise and just better
  1242. end
  1243. end
  1244. end
  1245.  
  1246. coroutine.wrap(MHCPPYO_fake_script)()
  1247.  
  1248.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement